#### 6.5.4 Assigning run-in headings to format-name prefixes

For block and inline elements, you can use the prefixes that are to be tacked onto format names to specify the text and format of a run-in heading that will precede the content of the element itself on output. For example:

Required: Churzen the framble with the supplied grappitz.

In this example, Required: is a run-in heading, with a character format different from that of the content.

DITA2Go supplies default formats and text for <note> and <step> run-in headings. These default formats are included in the following subformat configuration files:

%omsyshome%\d2g\system\formats\d2*_subformats.ini

The text for the default run-in headings comes from a language configuration file:

%omsyshome%\d2g\system\lang\d2g_lang_en.ini

In other words, the text is not taken from the attribute value; the latter only determines the name of the output format for the element in question.

To associate a run-in heading with a format-name prefix:

Assign a run-in heading format name to the prefix

Define the run-in heading format

Provide content for the run-in heading .

Assign a run-in heading format name to the prefix

To assign the name of a character format to a run-in heading for a prefix:

[BlockFormatPrefixRunins]
; prefix = default runin format to be used if no prefixed
; format exists and if base format has no runin itself
prefix = PrefixFormatHead

For example:

[BlockFormatPrefixRunins]
ReqStep = ReqStepHead
OptStep = OptStepHead
Req = RequiredHead
Opt = OptionalHead
warning = WarningHead

You can also assign a character format to a run-in heading for a prefix to the content of an inline element:

[InlineFormatPrefixRunins]
; prefix = default runin format to be used if no prefixed
; format exists and if base format has no runin itself
prefix = PrefixFormatHead

Default assignments of run-in headings to prefixes are located in the following configuration file:

%omsyshome%\d2g\system\config\d2g_config.ini

See §39.1.3 Understanding how templates are chained together.

Define the run-in heading format

To specify the style for a run-in heading:

[PrefixHead]
form = format components

For example:

[ReqStepHead]
form = <b>[<name/>] </b>

[OptStepHead]
form = <i>[<name/>] </i>

[RequiredHead]
form = <b><name/>: </b>

[OptionalHead]
form = <i><name/>: </i>

[WarningHead]
form = <b><name/>!</b><br/>

Define run-in heading formats in a Subformats configuration file, see §8.6 Configuring run-in headings for text formats.

Provide content for the run-in heading

In place of the <name/> building block, you can include fixed text for a run-in heading. For example:

[DangerHead]
form = <b><i>!! DANGER !!</i></b>\\n

However, the <name/> building block allows you to specify alternate text in different languages.

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

[RuninHeadText]
; used as the <name/> content in the matching subformat
PrefixHead = Text of heading

To cancel run-in headings individually, set them to nothing (empty).

Run-in headings for notes are based on the type attribute of the <note> element:

[RuninHeadText]
NoteHead = Note:
AttentionHead = Attention:
CautionHead = Caution:
WarningHead = Warning:
DangerHead = Danger:
FastpathHead = Fastpath:
ImportantHead = Important:
RememberHead = Remember:
RestrictionHead = Restriction:
TipHead = Tip:
OtherHead = Note:

Importance run-in headings are based on the importance attribute value:

[RuninHeadText]
optional = Optional:
required = Required:
urgent = Urgent!
obsolete = [obsolete]
deprecated = [deprecated]
default =
low =
medium =
high =
recommended =

Run-in headings for task elements:

[RuninHeadText]
; ReqStepHead = at start of step with importance=required
ReqStepHead = [Required step]
; OptStepHead = at start of step with importance=optional
OptStepHead = [Optional step]
; StepsHead = at start of steps, in its own para with StepsFormat
StepsHead = Procedure:
; PrereqHead = at start of prereq element
PrereqHead = Before you start:
; ContextHead = at start of context element
ContextHead = Purpose:
; ExampleHead = at start of example element
ExampleHead = For example:
; ResultHead = at start of result element
ResultHead = Results:
; PostreqHead = at start of postreq element
PostreqHead = After you finish:
; StepxmpHead = at start of stepxmp element
StepxmpHead = Example:
; StepresultHead = at start of stepresult element
StepresultHead = Result:

The ExampleHead text also applies to <example> in other topic types. StepsHead is a separate paragraph.

Specify run-in heading content for the <name/> building block in a Languages configuration file; see §8.9 Localizing output headings, labels, and names. The default settings above are in the following file:

%omsyshome%\d2g\system\lang\d2g_lang_en.ini

Previous Topic: 6.5.3 Assigning format-name prefixes to attribute values

Next Topic: 6.5.5 Deciding which formats need a run-in heading property

Parent Topic: 6.5 Mapping element attributes to output formats

Sibling Topics:

6.5.1 Listing elements whose attributes can affect output formats

6.5.2 Listing attributes whose values can affect output formats

6.5.3 Assigning format-name prefixes to attribute values

6.5.5 Deciding which formats need a run-in heading property

6.5.6 Understanding the order of prefixes for multiple attributes

6.5.7 Understanding how prefixes modify output formats

6.5.8 Understanding default attribute-based prefixes and headings

Table of Contents • Index