#### 7.4.5 Basing format properties on other formats

Format property based confers all the properties of the referenced format on the current format.

Suppose you have based a given format on some other format:

[FormatName]
based = OtherFormat

This setting says: if a property is not specified in [FormatName], DITA2Go should get it from the properties of OtherFormat. However, before doing so, DITA2Go first looks for higher-level (farther along the template chain) instances of FormatName; and if found, if the property in question is defined there, uses that value for the property. The implication is that if you are going to base a format on another one, there should be no higher-level instances of the basing format.

You can chain based formats. When based=parent DITA2Go goes through the based chain to the end, or to the first instance of a format already seen (to break circularity), just as with configuration templates.

Note: If you override a property of a format that other formats are based on, and it is a property that those other formats do not override, the change propagates to all those basing formats.

Because format properties are assigned in fixed-key configuration sections (see §42.2.7 Understanding fixed-key vs. variable-key settings), they inherit from higher-level (farther away in the chain of templates) sections of the same name. For example, if you override a property that sets margin left = 6pt, and you want no left margin, you have to specify margin left = 0 explicitly, just as you would have to do to override a property of the format on which you based a new format.

However, if the overridden format at the higher level is itself based on yet another format, and the new format is also based, the new format does not inherit the properties of the format the higher-level format is based on, just the properties set in the overridden format.

Previous Topic: 7.4.4 Understanding the basis of format properties

Next Topic: 7.4.6 Modifying DITA2Go default output formats

Parent Topic: 7.4 Understanding how to define output formats

Sibling Topics:

7.4.1 Naming output formats

7.4.2 Assigning values to format properties

7.4.3 Documenting output formats

7.4.4 Understanding the basis of format properties

7.4.6 Modifying DITA2Go default output formats

7.4.7 Applying CSS and RTF code to output formats

7.4.8 Assigning content-adding properties to formats

Table of Contents • Index