##### 26.4.2.1 Assigning DocBook elements to paragraph formats

To map paragraph formats in your document to DocBook elements, assign the element name to the format name:

    [DocBookParaTags]
    ; paragraph format (wildcards OK) = DocBook element, can be
    ;  overridden by a DocBookTag marker; or format = No.
    ParaFmtName = elementname

Default element

The default element for a paragraph format that is not mapped in [DocBookParaTags] is one of the following:

- If UseFormatAsTag=Yes and the name of the format matches the name of a DocBook element, the format is mapped to that element.
- If UseFormatAsTag=No or the format name does not match an element name, the format is mapped to the element designated by DefParaElem; see §26.4.2.2 Specifying a default element for unmapped paragraph formats.

Specify ancestry for list formats

For list formats, if mapping the format to an element is not sufficient to identify the list type, you must also specify the parent of the element; see §26.5.2 Designating DocBook ancestor elements. Definition lists can be derived from paragraph pairs, possibly with run-in headings for the term.

Omit element mapping

To specify that a particular paragraph format should not be mapped to any element:

    [DocBookParaTags]
    ParaFmtName = No

The value No means that the tags for the format should be omitted, leaving the text inside the enclosing element. Use this mapping for code examples (which can run on for pages), to avoid having each line of code mapped to a separate <codeblock> element. For example:

    [DocBookParaTags]
    PgmCode* = No

    [DocBookParents]
    PgmCode* = codeblock

Specifying ancestry guarantees that DITA2Go will retain the original line breaks, instead of normalizing them as for HTML or XML.

See §26.5.2 Designating DocBook ancestor elements.

Previous Topic: 26.4.2 Mapping paragraph formats to DocBook elements

Next Topic: 26.4.2.2 Specifying a default element for unmapped paragraph formats

Parent Topic: 26.4.2 Mapping paragraph formats to DocBook elements

Sibling Topics:

26.4.2.2 Specifying a default element for unmapped paragraph formats

26.4.2.3 Omitting invalid tags for default DocBook block elements

26.4.2.4 Overriding element mapping for paragraph formats

26.4.2.5 Providing aliases for paragraph formats