Adobe 65030365 Developer's Guide - Page 150
Specifying an element paragraph format, Writing context-dependent format rules
UPC - 883919170923
View all Adobe 65030365 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 150 highlights
10 Specifying an element paragraph format Specifying an element paragraph format An element definition can include a reference to a base paragraph format. If an instance of the element contains text, the text's format is the paragraph format plus any changes specified for the current context in the element's format rules. A paragraph format is also passed on to the element's descendants-until a descendant provides a different format. To specify an element paragraph format, insert an ElementPgfFormatTag element as the first child element of TextFormatRules, and type the tag of the format. The tag must refer to a paragraph format stored in the Paragraph Catalog of the documents. For example, this element uses the item paragraph format, and a format rule specifies an autonumber format that is either a bullet or an incrementing number (in either case, followed by a tab): Element (Container): Item General rule: Text format rules Element paragraph format: item 1. If context is: BulletList Numbering properties Autonumber format: \b\t Else, if context is: NumberList Numbering properties Autonumber format: \t The base paragraph format Usually, paragraph formats do not vary greatly from one element to another. Your definitions will be simpler and the catalogs easier to maintain if you specify paragraph formats for as few elements as necessary and let most elements inherit their format. You can use format rules to handle changes to the format for particular elements. For information on inheritance, see "How elements inherit formatting information" on page 127. Table, heading, body, footing, and row elements cannot contain text themselves, but can hold other elements that do. If you specify a paragraph format for one of these elements, the format applies only to the element's descendants that can contain text. A paragraph format can also be part of a context-dependent format rule so that it is used only in some cases. This is described in "Writing context-dependent format rules," next. Writing context-dependent format rules You can define changes to the element paragraph format in use with one or more format rules. The rules describe possible contexts in which an element can occur and give formatting changes for each context. When FrameMaker formats text in the element, it uses the current paragraph format (which may have been inherited and modified by ancestors' definitions), plus any format rules that apply to the current context. A format rule provides context and formatting information: • The rule can apply to all contexts in which the element occurs, or it can define particular contexts or the number of levels deep the element is nested in an ancestor. If the rule Text Format Rules for Containers, Tables, and Footnotes 132