2 <!DOCTYPE chapter SYSTEM "../doc.dtd">
3 <?xml-stylesheet type="text/xsl" href="../html.xsl"?>
6 XML documentation system
7 Original author : Arjen Baart - arjen@andromeda.nl
8 Version : $Revision: 1.2 $
12 <heading><label name='block'/>Block-level content</heading>
14 The actual content of your document is organized in <emph>block-level</emph>
15 elements, such a paragraphs, lists or tables.
19 <heading>Paragraphs</heading>
21 The most basic type of content block is an ordinary paragraph, contained
22 in a <strong>para</strong> element.
23 To make several separate paragraphs, you must enclose each paragraph
24 in a <strong>para</strong> open tag and a <strong>para</strong> close tag.
25 Here is an example of two small paragraphs:
29 This is an example of a small paragraph.
32 And here is another paragraph.
40 A second type of paragraph is a <strong>quote</strong>.
41 You can make a quote by using the <code>quote</code> element:
45 This is an example of a quote.
46 The text within a quoted paragraph is usually slightly indented on both
47 the left and the right margin.
54 This is an example of a quote.
55 The text within a quoted paragraph is usually slightly indented on both
56 the left and the right margin.
61 A special kind of paragraph is the <strong>verbatim</strong> environment.
62 Just as in LaTeX, this is used to include literal text output with spaces,
63 indentation and line breaks preserved.
64 The practical use for the <strong>verbatim</strong> element is to
65 include coding examples, such as:
77 Which comes out like this:
90 <heading><label name='footnote'/>Footnotes</heading>
92 Footnotes are created with the <strong>footnote</strong> element:
93 <footnote>This is an example of a footnote</footnote>
96 <footnote>This is an example of a footnote</footnote>
99 Within a footnote, you can use <emph>inline</emph> content <footnote>described in the
100 next chapter</footnote> to format the type
101 styles of the text in the footnote.
102 It is not possible to use the block content described in this chapter within
107 Footnotes appear at the bottom of the page, with a small number in the
108 running text referring to that footnote.
114 <heading><label name='list'/>Lists</heading>
116 Three types of lists are supported:
118 <item><code>itemize</code> for bulleted lists such as this one.</item>
119 <item><code>enumerate</code> for numbered lists.</item>
120 <item><code>description</code> for tagged lists.</item>
123 Each item in such a list must be in an <code>item</code> element.
124 In fact, an <code>item</code> is the only element allowed in an
125 <code>itemize</code>, <code>enumerate</code> or <code>description</code> element.
126 You should not put ordinary text or any other element in a list without
127 enclosing them in <code><item></code> and <code></item></code>.
128 Here is an example of a numbered list:
133 <item>First you need an enumerate or itemize tag.</item>
134 <item>Second, include one or more item elements.</item>
135 <item>Finally, put the content inside the items.</item>
140 And this is what the list turns into:
143 <item>First you need an enumerate, itemize or description tag.</item>
144 <item>Second, include one or more item elements.</item>
145 <item>Finally, put the content inside the items.</item>
148 In a description list, you make your own tags for each item instead
149 of the automatically generated bullts or numbers.
150 The tags for each item go in the <code>tag</code> attribute of the
151 <code>item</code> element.
152 So, repeating the above list as a description list:
156 <item tag='itemize'> for bulleted lists such as this one.</item>
157 <item tag='enumerate'> for numbered lists.</item>
158 <item tag='description'> for tagged lists.</item>
162 Which creates the following output:
165 <item tag='itemize'> for bulleted lists.</item>
166 <item tag='enumerate'> for numbered lists.</item>
167 <item tag='description'> for tagged lists such as this one.</item>
170 An item can contain inline content as well as block-level content.
175 <heading><label name='graphics'/>Including graphics</heading>
177 The empty element <strong>picture</strong> is used to include
178 graphics in your document, like this:
181 <picture src='diagram.png' eps='diagram' scale='0.5'/>
184 The two attributes are used in either HTML or LaTeX.
189 <heading><label name='table'/>Tables</heading>
191 Creating tables in XMLDoc is much like creating tables in HTML.
192 First, there is the <code>table</code> element.
193 The <code>table</code> element may contain an optional <code>thead</code>
194 and any number of <code>row</code> elements.
195 Both the <code>thead</code> and the <code>row</code> elements must contain
196 one or more <code>col</code> elements.
197 The <code>col</code> elements hold the actual content of
198 the table, which must be inline content (see next chapter) or block content.
199 To use the tables in LaTeX, you must supply a <code>cpos</code>
200 attribute in the <code>table</code> tag.
204 An example of a table is shown below:
208 <table cpos='lr'>
209 <thead><col>Drink </col><col>Price</col></thead>
210 <row><col>Beer </col><col> 1.80</col></row>
211 <row><col>Wiskey </col><col> 3.50</col></row>
212 <row><col>Wine </col><col> 2.20</col></row>
218 <thead><col>Drink </col><col>Price</col></thead>
219 <row><col>Beer </col><col> 1.80</col></row>
220 <row><col>Wiskey </col><col> 3.50</col></row>
221 <row><col>Wine </col><col> 2.20</col></row>