Skip to main content

The PreTeXt Guide

Section 4.4 Verbatim and Literal Text

This section expands on parts of Section 3.16. For descriptions of more involved uses, such as program listings and console sessions, see Section 4.15.
The tags described here contain only raw characters. By that we typically mean the first 128 characters of the ASCII code. Unicode characters are likely to migrate to HTML output just fine, but results for output will be variable. The restriction to character data has two consequences. First, any markup mistakenly included will have its content silently ignored and dropped. Second, you need to observe the rules on exceptional characters and escaped characters for XML for literal text, which are mercifully simple.
In your source, use &amp; for an &, use &lt; for <, and optionally use &gt; for >. Otherwise, every other ASCII character will render faithfully across all possible formats.
See Subsubsection 4.1.4.2 for more detail and explanation.