### 6.2 Specifying options for naming formats

By default, wherever possible DITA2Go uses the value of the outputclass attribute as the name of the output format for a given element; if there is no outputclass attribute, DITA2Go uses the element mapping, and as a last resort, the element name. You can do the following:

Prevent outputclass as format name

Prevent border and shading from outputclass

Prevent element name as format name

Specify default format names

Specify a format for <steps> headings

Specify a format for links

Specify a continuation format suffix.

Specify a continuation format

If your DITA document includes instances of block elements nested inside other block elements, by default DITA2Go creates a new format for that portion of the containing block element that follows the nested block. This is because nested formats are not allowed in certain output types, notably RTF.

Prevent outputclass as format name

To prevent automatic use of outputclass values as output format names:

    [ElementOptions]
    ; UseOutputClassForFormat = Yes (default, use whenever present) or
    ; No (go on to mappings in [*FormatMaps] as the next choice)
    UseOutputClassForFormat = No

If your DITA document does not use outputclass attributes consistently, or you do not want the value of outputclass used as a format name in output, you can do either or both of the following:

- map outputclass values to other format names; see §6.3.1 Mapping block and inline outputclass attributes to formats
- map elements to formats explicitly; see §6.4 Mapping element paths to output formats.

For any element that has not been mapped to an output format either explicitly or via outputclass, by default DITA2Go uses the element name as the output format name.

Prevent border and shading from outputclass

To keep DITA2Go from rummaging in outputclass attributes for border and shading subformat names:

    [ElementOptions]
    ; OutputclassHasBorderShadeFormats = Yes (default, look for border and
    ; shading format specifications in outputclass attributes), or No).
    OutputclassHasBorderShadeFormats = No

See §8.4 Overriding border and shading properties.

Prevent element name as format name

To prevent automatic use of element names as output format names for unmapped elements:

    [ElementOptions]
    ; UseElementNameForFormat = Yes (default, use for unmapped elements)
    ; or No (use defaults below if unmapped)
    UseElementNameForFormat = No

Specify default format names

To specify default output format names for block and inline elements:

    [ElementOptions]
    ; DefaultInlineFormat = format to use for unmapped inline elems
    DefaultInlineFormat = Char
    ; DefaultBlockFormat = format to use for unmapped block elems
    DefaultBlockFormat = Para

If you do not specify a different default, unmapped block element names become format name para in output, and unmapped inline element names become format name char in output.

Specify a format for <steps> headings

To specify a paragraph format name for a <steps> heading:

    [ElementOptions]
    ; StepsHeadFormat = format to use for StepsHead para
    StepsHeadFormat = Steps

The default name for the paragraph format is Steps.

To omit <steps> headings from output:

    [ElementOptions]
    StepsHeadFormat = Delete

Specify a format for links

To specify a character format name for unmapped hypertext links that have no outputclass attribute:

    [ElementOptions]
    ; LinkFormat = char format for unmapped hyperlinks if no outputclass
    LinkFormat = Link

See also:

§6.6 Specifying formats for cross references

Specify a continuation format suffix

If your DITA source includes nested block elements, DITA2Go must create a new paragraph for those portions of the enclosing element that follows the enclosed elements. This is because some output types do not allow nested paragraphs. The new paragraph requires its own format, which can be derived from the format assigned to the original paragraph.

To specify a suffix to add to a format name for continued text:

    [ElementOptions]
    ; ContinuedFormatSuffix = suffix to add to format name when
    ; a block element containing text is interrupted by another
    ; block element, then resumes with more text after the
    ; interrupting element(s), default "Cont".
    ContinuedFormatSuffix = Cont

For example, with format Body defined (in system d2htm_formats.ini) as:

    [Body]
    based = Para
    margin top = 4pt
    margin bottom = 0pt
    margin left = 0pt
    font size = 10pt
    font family = Verdana, sans-serif

you might want to add, in local_d2htm_formats.ini:

    [BodyCont]
    based = Body
    margin top = 2pt

to adjust the spacing after a nested list. If you want the same format, unchanged, instead set:

    [FormatAliases]
    BodyCont = Body

Or set:

    [ElementOptions]
    ContinuedFormatSuffix =

to not use the suffix, just the original format name.

Previous Topic: 6.1 Understanding how to assign formats

Next Topic: 6.3 Mapping outputclass attribute values to formats

Parent Topic: 6. Mapping elements to output formats

Sibling Topics:

6.1 Understanding how to assign formats

6.3 Mapping outputclass attribute values to formats

6.4 Mapping element paths to output formats

6.5 Mapping element attributes to output formats

6.6 Specifying formats for cross references

6.7 Specifying formats for footnotes

6.8 Specifying options for figures

6.9 Specifying formats and options for tables

6.10 Specifying options for special lists

6.11 Specifying options for draft comments

6.12 Specifying options for maps

6.13 Deciding where to display title and shortdesc

Table of Contents • Index