Computer example: Shows computer text without changing the spacing or line breaks.
<ex [nonumber | number] [smaller | smallest] [side | stack]> example text here ... <\ex>
(Default.) Omits the adding of line numbers to the beginning of each line.
Puts a line number at the beginning of each line.
Displays the example using smaller fonts.
Displays the example using smallest fonts. This makes long lines fit within a narrower width.
Applicable only when using an annotation within the example. Specifies the position of the annotation text in relation to the example text. The default position is side, which places the annotation to the right of the example text and on the same line as the first line of the example.
Places the annotation below the example text.
Examples are printed in computer font, and they are indented from the left text margin.
If you include the number attribute, the line numbers of the example will be numbered. This is useful for referring to specific lines.
The following character pairs, which have special meanings in other contexts, are treated as ordinary text within an example:
!! double exclamation -- double minus sign ++ double plus sign " double quote
The <\ex> end tag is required.
The following markup:
<ex> Examples are printed in computer font. Line breaks are preserved. <\ex>