Skip to main content

The PreTeXt Guide

Subsection 4.4.2 Longer, Inline, Verbatim Text

For longer pieces of verbatim text, use the <cd> tag, which is short for “code display”, analogous to the <md> for mathematics. It is used within sentences of a paragraph and will be presented with a vertical break above and below, but without interrupting the paragraph. Because of the display presentation, it cannot be used other places, such as a <title>, where a vertical gap is not appropriate. All of the previous discussion about exceptional characters applies for this tag.
You have two options in use. You may author inline with the rest of a sentence, with no extra newlines or whitespace before, after, or within the content. The result will be a single displayed line.
Or you may structure the content using one, or more, of the <cline> tag, which is meant to be similar to the <line> tag used elsewhere. You should still take care to not place any extra whitespace before or after the <cd> element, but in between the <cline> you may use as much visual formatting of your source as you wish, especially if you like your source to mirror your output.