5.2 Understanding how to modify formats

Make changes in appearance, such as font, style, or alignment, in local or document-specific format configuration files (never in the master format configuration files, nor in your project configuration file).

For example, in %omsyshome%\d2g\system\formats\d2htm_formats.ini you will find the following definition of the format for top-level numbered list items:

[Numbered1]
based = Body
margin top = 4pt
margin bottom = 0pt
margin left = 2pt
list style = decimal
list level = 1
number = List1Num
xref = NumXref

If you want more space above each list item in HTML output, you would add the following setting to %omsyshome%\d2g\local\formats\local_d2htm_formats.ini:

[Numbered1]
margin top = 12pt

This setting would override the space above for all HTML outputs from all DITA documents. (You must include this setting in a format configuration file; it will not take effect in your project configuration file.)

Formats can inherit properties from other formats, so this change would automatically carry through to the rest of the numbered formats, because they are based on the definition of Numbered1:

[Numbered1First]
based = Numbered1
[Numbered2]
based = Numbered1

However, this change would not affect any added paragraphs under each numbered item, because their definition overrides the space-above property:

[Unnumbered1]
based = Numbered1
margin top = 2pt

Format definitions form a tree, with inheritance, so you can adjust a particular branch, in one place. The format configuration files themselves also form trees, where the scope of a change is determined by which file you modify. See §39.4 Deciding which configuration file to edit.

Previous Topic:  5.1 Understanding where to modify formats

Next Topic:  5.3 Changing how the output looks

Parent Topic:  5. Modifying output appearance

Sibling Topics:

5.1 Understanding where to modify formats

5.3 Changing how the output looks

5.4 Determining how an element is rendered