8.6 Configuring run-in headings for text formats

You can precede paragraphs or character spans in a given format with predefined text that may have a character format different from that of the paragraph or span itself. This fixed text constitutes a run-in heading. For example:

Note: The framble must be glommered before you can dechurf it.

In this example, Note: is a run-in heading, with a character format different from that of the main paragraph content. As a convention, the name of any run-in heading should end in Head.

Run-in headings are assigned to text formats with property runin; see §7.6.4 Specifying inline properties for paragraph and character formats and §7.6.5 Specifying block properties for paragraph formats. Run-in headings are often used for block elements for which you have specified that the values of one or more element attributes should determine the output format in each case; see §6.5 Mapping element attributes to output formats.

Run-in headings have only one property: form. Table 8-4 lists the building blocks you can use for the form property of a run-in heading.

Table 8-4 Building blocks for run-in heading formats

Building block

Description

<name/>

For the text of the heading in [RuninHeadText] in a language file; see §8.10 Localizing output headings, labels, and names

<tab/>

(RTF only) Each tab advances by the amount in [WordOptions]AnumTabWidth (see §15.3.3 Converting autonumbered formats)

(HTML only) Adds a space

<spc/>

For a space, used to preserve trailing spaces; for HTML, becomes &nbsp;

<format>

For a character format, reset at the end of the run-in heading or earlier by a <­/­format>; typographic tags are valid; see §8.1.5 Including typographic tags and character formats

You can mix format tags and typographic tags in the same run-in heading definition; however, best practice is to assign the typographic tags to the format itself. See §8.1.5 Including typographic tags and character formats.

Note:  Do not assign more than one <format> tag to a run-in heading.

For example:

[MethodHead]
form = <i>Method:</i><spc/>
[WarningHead]
form = <b><i><name/>!</i></b><br/>

In the last example, <br/> causes the content of the main paragraph or character span to start on the next line after the heading; otherwise, the run-in heading becomes the start of the first line of content.

To create a hanging indent for a paragraph format that has property runin, you might have to fiddle with properties margin left and text indent until everything lines up the way you want; see §7.6.5 Specifying block properties for paragraph formats. However, you will not be able to produce a perfect left margin for the text this way, and you will most likely have to use a different combination for every possible heading content in every supported language.

You can include any fixed text content as part of the form property for a run-in heading, as in the first example above. However, if you want to be able to substitute text in other languages, use the <name/> building block and create an entry for the run-in heading format in the appropriate language configuration file; see §8.10 Localizing output headings, labels, and names.

To specify text for the <name/> building block of a run-in heading, in a language configuration file or a general configuration file assign the text to the run-in heading format name:

[RuninHeadText]
; use this for runin head subformats
NameOfHead = Text of heading

For example, in d2g_lang_de.ini:

[RuninHeadText]
WarnHead = Achtung

You can include punctuation with the text, but you cannot use any <tags> in language configuration settings.

Previous Topic:  8.5.5.4 Specifying symbols for bulleted lists

Next Topic:  8.7 Defining cross-reference output formats

Parent Topic:  8. Configuring format components

Sibling Topics:

8.1 Managing format components

8.2 Defining border subformats

8.3 Defining shading subformats

8.4 Overriding border and shading properties

8.5 Configuring output numbering properties

8.7 Defining cross-reference output formats

8.8 Configuring index see and see-also entries

8.9 Configuring trademark formats

8.10 Localizing output headings, labels, and names