I have a Running H/F 1, 2 and 3 on 3 separate lines in the Page Header. The Running H/F 2 is optional and appears on the second line between 1 and 3. Can I include a Line Return in the Running H/F 2 variable, because if the Running H/F 2 variable is set to OFF in the Page Header then I do not want a line space between Running H/F 1 and 3.
I have tried <$attribute[export:doc]> /r, but this didn't work. Any suggestions appreciated.
Hi Rick and Lynne, that works thanks! .. but it doesn't solve my problem unfortunately. When I have the \n, in the variable the line return is present even when I don't need it. .. of course. Doh. Do either of you know how I can solve this catch-22? perhaps there is some other way to approach it. .. so 3 line header, with optional 2nd line. If line in, great - currently just using attribute value and \n, but if the attribute is set to blank,.. and I have nothing displaying I am getting a blank line (from the \n of course),.. but I don't want that - I want no line return.. so just the line 1 and line 3 with no gap.
any tricks you'd be able to share?
I don't believe you can create the desired formatting with Running H/F variables. There is no way to test the value of a variable; the point of Running H/F variables is to display information about the first (or last) occurrence of something (paragraph, element, marker) on a page.
You might be able to define two different master pages: one with and one without the line break. Your master page mapping table could then test for the attribute you want to trigger the different layouts. If one page has multiple occurrences with different values, though, the selected master page would depend on the order of entries in the mapping table rather than the order of elements on the page.
You could also automate (with a script or plugin) selection of a master page or inserting the line break in the header of every page.
Forgot to mention: line breaks within an element are converted to spaces in a Running H/F variable and leading and trailing white space is removed. Thus, you can't solve the problem by picking up a line break from the body pages.
I went with a script, it was pretty easy. A lot tidier than duplicating Master pages for the sake of one line return.
Rick, of course, is correct. FYI, the problem with your first attempt was the direction of the slash. \r will also insert a line break in a variable.