30.9 Configuring preformatted text for HTML/XML

Paragraphs to which you have assigned the pre format property (for “preformatted” text) become blocks enclosed in <pre> tags in HTML. Browsers and other HTML viewers treat text within <pre> tags differently from other text. For example, long lines do not wrap when you narrow the viewer window, and whitespace is preserved.

To omit all line breaks from text mapped to pre elements;

[HTMLOptions]
; UnwrapPRE = No (default) or Yes (ignore line breaks in PRE)
UnwrapPRE = Yes

When UnwrapPRE=Yes, DITA2Go ignores all line breaks in text mapped to preformatted elements, including those caused by paragraph breaks. UnwrapPRE is effective only within <pre> elements in HTML and XHTML, and within preformatted elements in XML.

To preserve leading spaces in preformatted text, also assign the following format property to the paragraph format:

[HTMLParaStyles]
ParaFmt = NoWrap

See also:

§22.6.3 Suppressing line breaks in HTML and XML output

Previous Topic:  30.8 Specifying text colors for HTML

Next Topic:  30.10 Converting footnotes to HTML or XML

Parent Topic:  30. Mapping text formats to HTML/XML

Sibling Topics:

30.1 Choosing how to map formats

30.2 Mapping paragraph formats

30.3 Mapping character formats

30.4 Assigning properties to text formats

30.5 Mapping special characters

30.6 Mapping fonts

30.7 Managing typographic elements for HTML or XML

30.8 Specifying text colors for HTML

30.10 Converting footnotes to HTML or XML

30.11 Converting list formats to HTML (deprecated)