[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ A ] [ B ] [ next ]


DebianDoc-SGML Manual
Chapter 6 - Lists and examples


6.1 Lists

There are three kinds of lists:

Each entry in an ordinary or numbered list is an item introduced by <item>. Each entry in a tagged list is one or more <tag>s followed by an <item>.

It is not necessary to mark the end of <tag> or <item> elements.

All three types of list come in two flavours, depending on whether you specify the compact attribute (eg, <taglist compact>) or not (eg, <enumlist>). The <tag> may contain only marked-up inline text.

The compact versions are intended for use within paragraphs. The formatter will not put gaps around the list or between entries.[1] The entries in a compact list should each be a single paragraph (it is not necessary to mark the start of the paragraph). Any lists inside a compact list should themselves be marked compact (though the formatters will in fact infer for themselves that they ought to be compact).

The non-compact versions are intended to stand as paragraphs themselves. Each entry in such a list may contain more than one paragraph (once again, the start of the first paragraph need not be marked). The list is separated from the surrounding text, and the entries from each other, by blank lines as would be expected for paragraph breaks.


6.2 Examples

Examples - multi-line code fragments, scripts, and similar pieces of computer text - are introduced with <example> and finish with </example>.

The example will be formatted exactly as it is typed in, with spacing and newlines reproduced. It will be displayed in a fixed-width font, usually the one used for the <tt> character style, even if the formatter usually uses a proportional font. Any indentation which is appropriate will be added by the formatter; the example should be entered starting in the left hand column.

Examples may contain marked up character text but may not contain cross-references or the character style elements <em>, <strong>, <package>, <prgn>, <file>, and <tt>. See Marked-up inline text and character style markup, Chapter 5.

An example does not produce a paragraph break; examples are considered parts of paragraphs. If an example is to be a paragraph on its own then paragraph start tags should be added as appropriate.

Any SGML markup characters in the example must be escaped as usual - see SGML markup and metacharacters, Chapter 2. <example> does not work like TeX's verbatim environment.


[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ A ] [ B ] [ next ]


DebianDoc-SGML Manual

2021-01-16

Ardo van Rangelrooij mailto:ardo@debian.org
Ian Jackson mailto:ijackson@gnu.ai.mit.edu