Common Desktop Environment: Help System Author's and Programmer's Guide

<ex>

Computer example: Shows computer text without changing the spacing or line breaks.

Syntax

<ex [nonumber | number] [smaller | smallest] [side | stack]>
example text here ...
 <\ex> 

Where:

nonumber

(Default.) Omits the adding of line numbers to the beginning of each line.

number

Puts a line number at the beginning of each line.

smaller

Displays the example using smaller fonts.

smallest

Displays the example using smallest fonts. This makes long lines fit within a narrower width.

side

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.

stack

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.

Example

The following markup:

<ex>
 Examples are printed in computer
 font. Line breaks are preserved.
 <\ex> 

produces:

Graphic

See Also