Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
As Martti explains, a prefix appears in the same FrameMaker paragraph as the element it prefixes. However, if that element begins with a child element that is in a separate paragraph, the prefix will appear in a paragraph of its own. The answer to your "sub-question" hence is yes, put the content of the role in a para so that the prefix of the role will be in a different paragraph than that of the para. By the way, you can format that prefix para with FirstParagraphRules for the role element.
Remember, though, that you can specify font properties for a prefix and include line breaks within it (indicate a forced return with \n or \r). Unless the prefix paragraph differs from the role paragraph other than in font properties, you can get by with a text-range prefix.
--Lynne
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Yes, there is always more to learn!
As far as prefixes go, consider situations such as a Chapter that starts with a Paragraph or a List that starts with an Item that starts with a Paragraph. Even though all these containers map to FM paragraphs rather than to text ranges, it is clearly undesirable to have each of them start a new paragraph. Instead, when FM encounters an element that is mapped to a paragraph, it checks to see whether there is content in the current paragraph. If so, it starts a new paragraph, if not, the new element goes into the existing paragraph. Thus, a BlockQuote element at the start of a Paragraph will not cause a paragraph break, but a BlockQuote element after some data characters will. Prefixes, like data characters, variables, and text-range elements are considered content, so a child element following a prefix will cause a paragraph break unless the child element is a text-range.
You can take advantage of this behavior to force paragraph breaks by defining a prefix that is simply a space. For example, suppose a Chapter starts with a Title, but you want an empty paragraph with an autonumber that specifies a chapter number preceding the Title, something like:
Chapter I
Introduction
where the two paragraphs have different paragraph formats.
You can give the Chapter a prefix of a space; since the space is content in the first paragraph in the Chapter, the Title will cause a paragraph break. Then you can use a FirstParagraphRule to format the chapter number and a TextFormatRule for Title to format the chapter title.
Of course, paragraph breaks preceding a suffix are created analogously.
--Lynne
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more