Spelling fixes
[docutils.git] / test / functional / expected / standalone_rst_html5.html
blobabba150bfdb4e545685616425cf3dccdf6820ccf
1 <!DOCTYPE html>
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3 <head>
4 <meta charset="utf-8"/>
5 <meta name="generator" content="Docutils 0.14.0a: http://docutils.sourceforge.net/" />
6 <title>reStructuredText Test Document</title>
7 <meta name="author" content="David Goodger" />
8 <meta content="reStructuredText, test, parser" name="keywords" />
9 <meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" xml:lang="en" />
10 <link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
11 <link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
12 <link rel="stylesheet" href="../input/data/math.css" type="text/css" />
13 </head>
14 <body>
15 <div class="header">
16 <p>Document header</p>
18 <hr class="header"/>
19 </div>
20 <div class="document" id="restructuredtext-test-document">
21 <span id="doctitle"></span>
22 <h1 class="title">reStructuredText Test Document</h1>
24 <p class="subtitle" id="examples-of-syntax-constructs"><span id="subtitle"></span>Examples of Syntax Constructs</p>
25 <dl class="docinfo">
26 <dt class="author">Author</dt>
27 <dd class="author"><p>David Goodger</p></dd>
28 <dt class="address">Address</dt>
29 <dd class="address"><pre class="address">123 Example Street
30 Example, EX Canada
31 A1B 2C3
32 </pre>
33 </dd>
34 <dt class="contact">Contact</dt>
35 <dd class="contact"><a class="reference external" href="mailto:goodger&#64;python.org">goodger&#64;python.org</a></dd>
36 <dt class="authors">Authors</dt>
37 <dd class="authors"><p>Me</p>
38 <p>Myself</p>
39 <p>I</p>
40 </dd>
41 <dt class="organization">Organization</dt>
42 <dd class="organization">humankind</dd>
43 <dt class="date">Date</dt>
44 <dd class="date">Now, or yesterday. Or maybe even <em>before</em> yesterday.</dd>
45 <dt class="status">Status</dt>
46 <dd class="status">This is a &quot;work in progress&quot;</dd>
47 <dt class="revision">Revision</dt>
48 <dd class="revision">is managed by a version control system.</dd>
49 <dt class="version">Version</dt>
50 <dd class="version">1</dd>
51 <dt class="copyright">Copyright</dt>
52 <dd class="copyright">This document has been placed in the public domain. You
53 may do with it as you wish. You may copy, modify,
54 redistribute, reattribute, sell, buy, rent, lease,
55 destroy, or improve it, quote it at length, excerpt,
56 incorporate, collate, fold, staple, or mutilate it, or do
57 anything else to it that your or anyone else's heart
58 desires.</dd>
59 <dt class="field-name">field name</dt>
60 <dd class="field-name"><p>This is a &quot;generic bibliographic field&quot;.</p>
61 </dd>
62 <dt class="field-name-2">field name &quot;2&quot;</dt>
63 <dd class="field-name-2"><p>Generic bibliographic fields may contain multiple body elements.</p>
64 <p>Like this.</p>
65 </dd>
66 </dl>
67 <div class="dedication topic">
68 <p class="topic-title first">Dedication</p>
69 <p>For Docutils users &amp; co-developers.</p>
70 </div>
71 <div class="abstract topic">
72 <p class="topic-title first">Abstract</p>
73 <p>This is a test document, containing at least one example of each
74 reStructuredText construct.</p>
75 </div>
76 <!-- This is a comment. Note how any initial comments are moved by
77 transforms to after the document title, subtitle, and docinfo. -->
78 <!-- Above is the document title, and below is the subtitle.
79 They are transformed from section titles after parsing. -->
80 <!-- bibliographic fields (which also require a transform): -->
81 <div class="contents topic" id="table-of-contents">
82 <p class="topic-title first">Table of Contents</p>
83 <ul class="auto-toc simple">
84 <li><p><a class="reference internal" href="#structural-elements" id="id38"><span class="sectnum">1</span> Structural Elements</a></p>
85 <ul class="auto-toc">
86 <li><p><a class="reference internal" href="#section-title" id="id39"><span class="sectnum">1.1</span> Section Title</a></p></li>
87 <li><p><a class="reference internal" href="#empty-section" id="id40"><span class="sectnum">1.2</span> Empty Section</a></p></li>
88 <li><p><a class="reference internal" href="#transitions" id="id41"><span class="sectnum">1.3</span> Transitions</a></p></li>
89 </ul>
90 </li>
91 <li><p><a class="reference internal" href="#body-elements" id="id42"><span class="sectnum">2</span> Body Elements</a></p>
92 <ul class="auto-toc">
93 <li><p><a class="reference internal" href="#paragraphs" id="id43"><span class="sectnum">2.1</span> Paragraphs</a></p>
94 <ul class="auto-toc">
95 <li><p><a class="reference internal" href="#inline-markup" id="id44"><span class="sectnum">2.1.1</span> Inline Markup</a></p></li>
96 </ul>
97 </li>
98 <li><p><a class="reference internal" href="#bullet-lists" id="id45"><span class="sectnum">2.2</span> Bullet Lists</a></p></li>
99 <li><p><a class="reference internal" href="#enumerated-lists" id="id46"><span class="sectnum">2.3</span> Enumerated Lists</a></p></li>
100 <li><p><a class="reference internal" href="#definition-lists" id="id47"><span class="sectnum">2.4</span> Definition Lists</a></p></li>
101 <li><p><a class="reference internal" href="#field-lists" id="id48"><span class="sectnum">2.5</span> Field Lists</a></p></li>
102 <li><p><a class="reference internal" href="#option-lists" id="id49"><span class="sectnum">2.6</span> Option Lists</a></p></li>
103 <li><p><a class="reference internal" href="#literal-blocks" id="id50"><span class="sectnum">2.7</span> Literal Blocks</a></p></li>
104 <li><p><a class="reference internal" href="#line-blocks" id="id51"><span class="sectnum">2.8</span> Line Blocks</a></p></li>
105 <li><p><a class="reference internal" href="#block-quotes" id="id52"><span class="sectnum">2.9</span> Block Quotes</a></p></li>
106 <li><p><a class="reference internal" href="#doctest-blocks" id="id53"><span class="sectnum">2.10</span> Doctest Blocks</a></p></li>
107 <li><p><a class="reference internal" href="#footnotes" id="id54"><span class="sectnum">2.11</span> Footnotes</a></p></li>
108 <li><p><a class="reference internal" href="#citations" id="id55"><span class="sectnum">2.12</span> Citations</a></p></li>
109 <li><p><a class="reference internal" href="#targets" id="id56"><span class="sectnum">2.13</span> Targets</a></p>
110 <ul class="auto-toc">
111 <li><p><a class="reference internal" href="#duplicate-target-names" id="id57"><span class="sectnum">2.13.1</span> Duplicate Target Names</a></p></li>
112 <li><p><a class="reference internal" href="#id21" id="id58"><span class="sectnum">2.13.2</span> Duplicate Target Names</a></p></li>
113 </ul>
114 </li>
115 <li><p><a class="reference internal" href="#directives" id="id59"><span class="sectnum">2.14</span> Directives</a></p>
116 <ul class="auto-toc">
117 <li><p><a class="reference internal" href="#document-parts" id="id60"><span class="sectnum">2.14.1</span> Document Parts</a></p></li>
118 <li><p><a class="reference internal" href="#images-and-figures" id="id61"><span class="sectnum">2.14.2</span> Images and Figures</a></p></li>
119 <li><p><a class="reference internal" href="#admonitions" id="id62"><span class="sectnum">2.14.3</span> Admonitions</a></p></li>
120 <li><p><a class="reference internal" href="#topics-sidebars-and-rubrics" id="id63"><span class="sectnum">2.14.4</span> Topics, Sidebars, and Rubrics</a></p></li>
121 <li><p><a class="reference internal" href="#target-footnotes" id="id64"><span class="sectnum">2.14.5</span> Target Footnotes</a></p></li>
122 <li><p><a class="reference internal" href="#replacement-text" id="id65"><span class="sectnum">2.14.6</span> Replacement Text</a></p></li>
123 <li><p><a class="reference internal" href="#compound-paragraph" id="id66"><span class="sectnum">2.14.7</span> Compound Paragraph</a></p></li>
124 <li><p><a class="reference internal" href="#parsed-literal-blocks" id="id67"><span class="sectnum">2.14.8</span> Parsed Literal Blocks</a></p></li>
125 <li><p><a class="reference internal" href="#code" id="id68"><span class="sectnum">2.14.9</span> Code</a></p></li>
126 </ul>
127 </li>
128 <li><p><a class="reference internal" href="#substitution-definitions" id="id69"><span class="sectnum">2.15</span> Substitution Definitions</a></p></li>
129 <li><p><a class="reference internal" href="#comments" id="id70"><span class="sectnum">2.16</span> Comments</a></p></li>
130 <li><p><a class="reference internal" href="#raw-text" id="id71"><span class="sectnum">2.17</span> Raw text</a></p></li>
131 <li><p><a class="reference internal" href="#container" id="id72"><span class="sectnum">2.18</span> Container</a></p></li>
132 <li><p><a class="reference internal" href="#colspanning-tables" id="id73"><span class="sectnum">2.19</span> Colspanning tables</a></p></li>
133 <li><p><a class="reference internal" href="#rowspanning-tables" id="id74"><span class="sectnum">2.20</span> Rowspanning tables</a></p></li>
134 <li><p><a class="reference internal" href="#complex-tables" id="id75"><span class="sectnum">2.21</span> Complex tables</a></p></li>
135 <li><p><a class="reference internal" href="#list-tables" id="id76"><span class="sectnum">2.22</span> List Tables</a></p></li>
136 <li><p><a class="reference internal" href="#custom-roles" id="id77"><span class="sectnum">2.23</span> Custom Roles</a></p></li>
137 <li><p><a class="reference internal" href="#svg-images" id="id78"><span class="sectnum">2.24</span> SVG Images</a></p></li>
138 <li><p><a class="reference internal" href="#swf-images" id="id79"><span class="sectnum">2.25</span> SWF Images</a></p></li>
139 </ul>
140 </li>
141 <li><p><a class="reference internal" href="#changes-to-the-html4css1-writer" id="id80"><span class="sectnum">3</span> Changes to the html4css1 writer</a></p>
142 <ul class="auto-toc">
143 <li><p><a class="reference internal" href="#field-list-handling" id="id81"><span class="sectnum">3.1</span> Field list handling</a></p></li>
144 <li><p><a class="reference internal" href="#styling-with-class-arguments" id="id82"><span class="sectnum">3.2</span> Styling with class arguments</a></p>
145 <ul class="auto-toc">
146 <li><p><a class="reference internal" href="#description-lists" id="id83"><span class="sectnum">3.2.1</span> Description lists</a></p></li>
147 <li><p><a class="reference internal" href="#field-list-variants" id="id84"><span class="sectnum">3.2.2</span> Field list variants</a></p></li>
148 <li><p><a class="reference internal" href="#table-variants" id="id85"><span class="sectnum">3.2.3</span> Table variants</a></p></li>
149 </ul>
150 </li>
151 </ul>
152 </li>
153 <li><p><a class="reference internal" href="#error-handling" id="id86"><span class="sectnum">4</span> Error Handling</a></p></li>
154 </ul>
155 </div>
156 <div class="section" id="structural-elements">
157 <h1><a class="toc-backref" href="#id38"><span class="sectnum">1</span> Structural Elements</a></h1>
158 <div class="section" id="section-title">
159 <h2 class="with-subtitle"><a class="toc-backref" href="#id39"><span class="sectnum">1.1</span> Section Title</a></h2>
160 <p class="section-subtitle" id="section-subtitle">Section Subtitle</p>
161 <p>Lone subsections are converted to a section subtitle by a transform
162 activated with the <span class="docutils literal"><span class="pre">--section-subtitles</span></span> command line option or the
163 <span class="docutils literal"><span class="pre">sectsubtitle-xform</span></span> configuration value.</p>
164 </div>
165 <div class="section" id="empty-section">
166 <h2><a class="toc-backref" href="#id40"><span class="sectnum">1.2</span> Empty Section</a></h2>
167 </div>
168 <div class="section" id="transitions">
169 <h2><a class="toc-backref" href="#id41"><span class="sectnum">1.3</span> Transitions</a></h2>
170 <p>Here's a transition:</p>
171 <hr class="docutils" />
172 <p>It divides the section. Transitions may also occur between sections:</p>
173 </div>
174 </div>
175 <hr class="docutils" />
176 <div class="section" id="body-elements">
177 <h1><a class="toc-backref" href="#id42"><span class="sectnum">2</span> Body Elements</a></h1>
178 <div class="section" id="paragraphs">
179 <h2><a class="toc-backref" href="#id43"><span class="sectnum">2.1</span> Paragraphs</a></h2>
180 <p>A paragraph.</p>
181 <div class="section" id="inline-markup">
182 <h3><a class="toc-backref" href="#id44"><span class="sectnum">2.1.1</span> Inline Markup</a></h3>
183 <p>Paragraphs contain text and may contain inline markup: <em>emphasis</em>,
184 <strong>strong emphasis</strong>, <span class="docutils literal">inline literals</span>, standalone hyperlinks
185 (<a class="reference external" href="http://www.python.org">http://www.python.org</a>), external hyperlinks (<a class="reference external" href="http://www.python.org/">Python</a> <a class="footnote-reference brackets" href="#id25" id="id26">5</a>), internal
186 cross-references (<a class="reference internal" href="#example">example</a>), external hyperlinks with embedded URIs
187 (<a class="reference external" href="http://www.python.org">Python web site</a>), <a class="reference external" href="http://www.python.org/">anonymous hyperlink
188 references</a> <a class="footnote-reference brackets" href="#id25" id="id35">5</a> (<a class="reference external" href="http://docutils.sourceforge.net/">a second reference</a> <a class="footnote-reference brackets" href="#id36" id="id37">9</a>), footnote references (manually
189 numbered <a class="footnote-reference brackets" href="#id8" id="id1">1</a>, anonymous auto-numbered <a class="footnote-reference brackets" href="#id12" id="id2">3</a>, labeled auto-numbered
190 <a class="footnote-reference brackets" href="#label" id="id3">2</a>, or symbolic <a class="footnote-reference brackets" href="#id13" id="id4">*</a>), citation references (<a class="citation-reference" href="#cit2002" id="id5">[CIT2002]</a>),
191 substitution references (<img alt="EXAMPLE" src="../../../docs/user/rst/images/biohazard.png" />), and <span class="target" id="inline-hyperlink-targets">inline hyperlink targets</span>
192 (see <a class="reference internal" href="#targets">Targets</a> below for a reference back to here). Character-level
193 inline markup is also possible (although exceedingly ugly!) in <em>re</em><span class="docutils literal">Structured</span><em>Text</em>. Problems are indicated by <a href="#id23"><span class="problematic" id="id24">|problematic|</span></a> text
194 (generated by processing errors; this one is intentional). Here is a
195 reference to the <a class="reference internal" href="#doctitle">doctitle</a> and the <a class="reference internal" href="#subtitle">subtitle</a>.</p>
196 <p>The default role for interpreted text is <cite>Title Reference</cite>. Here are
197 some explicit interpreted text roles: a PEP reference (<a class="reference external" href="http://www.python.org/dev/peps/pep-0287">PEP 287</a>); an
198 RFC reference (<a class="reference external" href="http://tools.ietf.org/html/rfc2822.html">RFC 2822</a>); an abbreviation (<abbr>abb.</abbr>), an acronym
199 (<abbr>reST</abbr>), code (<code>print &quot;hello world&quot;</code>); a <sub>subscript</sub>;
200 a <sup>superscript</sup> and explicit roles for <cite>Docutils</cite>'
201 <em>standard</em> <strong>inline</strong> <span class="docutils literal">markup</span>.</p>
202 <!-- DO NOT RE-WRAP THE FOLLOWING PARAGRAPH! -->
203 <p>Let's test wrapping and whitespace significance in inline literals:
204 <span class="docutils literal">This is an example of <span class="pre">--inline-literal</span> <span class="pre">--text,</span> <span class="pre">--including</span> <span class="pre">some--</span> <span class="pre">strangely--hyphenated-words.</span> <span class="pre">Adjust-the-width-of-your-browser-window</span> to see how the text is wrapped. <span class="pre">--</span> <span class="pre">----</span> <span class="pre">--------</span> Now note the spacing between the words of this sentence (words should be grouped in pairs).</span></p>
205 <p>If the <span class="docutils literal"><span class="pre">--pep-references</span></span> option was supplied, there should be a
206 live link to PEP 258 here.</p>
207 </div>
208 </div>
209 <div class="section" id="bullet-lists">
210 <h2><a class="toc-backref" href="#id45"><span class="sectnum">2.2</span> Bullet Lists</a></h2>
211 <ul>
212 <li><p>A bullet list</p>
213 <ul class="simple">
214 <li><p>Nested bullet list.</p></li>
215 <li><p>Nested item 2.</p></li>
216 </ul>
217 </li>
218 <li><p>Item 2.</p>
219 <p>Paragraph 2 of item 2.</p>
220 <ul class="simple">
221 <li><p>Nested bullet list.</p></li>
222 <li><p>Nested item 2.</p>
223 <ul>
224 <li><p>Third level.</p></li>
225 <li><p>Item 2.</p></li>
226 </ul>
227 </li>
228 <li><p>Nested item 3.</p></li>
229 <li><p>This nested list should be compacted by the HTML writer.</p>
230 <span class="target" id="target"></span><!-- Even if this item contains a target and a comment. -->
231 </li>
232 </ul>
233 </li>
234 </ul>
235 </div>
236 <div class="section" id="enumerated-lists">
237 <h2><a class="toc-backref" href="#id46"><span class="sectnum">2.3</span> Enumerated Lists</a></h2>
238 <ol class="arabic">
239 <li><p>Arabic numerals.</p>
240 <ol class="loweralpha simple">
241 <li><p>lower alpha)</p>
242 <ol class="lowerroman simple">
243 <li><p>(lower roman)</p>
244 <ol class="upperalpha simple">
245 <li><p>upper alpha.</p>
246 <ol class="upperroman simple">
247 <li><p>upper roman)</p></li>
248 </ol>
249 </li>
250 </ol>
251 </li>
252 </ol>
253 </li>
254 </ol>
255 </li>
256 <li><p>Lists that don't start at 1:</p>
257 <ol class="arabic simple" start="3">
258 <li><p>Three</p></li>
259 <li><p>Four</p></li>
260 </ol>
261 <ol class="upperalpha simple" start="3">
262 <li><p>C</p></li>
263 <li><p>D</p></li>
264 </ol>
265 <ol class="lowerroman simple" start="3">
266 <li><p>iii</p></li>
267 <li><p>iv</p></li>
268 </ol>
269 </li>
270 </ol>
271 </div>
272 <div class="section" id="definition-lists">
273 <h2><a class="toc-backref" href="#id47"><span class="sectnum">2.4</span> Definition Lists</a></h2>
274 <dl>
275 <dt>Term</dt>
276 <dd><p>Definition</p>
277 </dd>
278 <dt>Term<span class="classifier">classifier</span></dt>
279 <dd><p>Definition paragraph 1.</p>
280 <p>Definition paragraph 2.</p>
281 </dd>
282 <dt>Term</dt>
283 <dd><p>Definition</p>
284 </dd>
285 <dt>Term<span class="classifier">classifier one</span><span class="classifier">classifier two</span></dt>
286 <dd><p>Definition</p>
287 </dd>
288 </dl>
289 </div>
290 <div class="section" id="field-lists">
291 <h2><a class="toc-backref" href="#id48"><span class="sectnum">2.5</span> Field Lists</a></h2>
292 <dl class="field-list">
293 <dt>what</dt>
294 <dd><p>Field lists map field names to field bodies, like database
295 records. They are often part of an extension syntax. They are
296 an unambiguous variant of RFC 2822 fields.</p>
297 </dd>
298 <dt>how arg1 arg2</dt>
299 <dd><p>The field marker is a colon, the field name, and a colon.</p>
300 <p>The field body may contain one or more body elements, indented
301 relative to the field marker.</p>
302 </dd>
303 <dt>credits</dt>
304 <dd><p class="credits">This paragraph has the <cite>credits</cite> class set. (This is actually not
305 about credits but just for ensuring that the class attribute
306 doesn't get stripped away.)</p>
307 </dd>
308 </dl>
309 </div>
310 <div class="section" id="option-lists">
311 <h2><a class="toc-backref" href="#id49"><span class="sectnum">2.6</span> Option Lists</a></h2>
312 <p>For listing command-line options:</p>
313 <dl class="option-list">
314 <dt><kbd><span class="option">-a</span></kbd></dt>
315 <dd><p>command-line option &quot;a&quot;</p>
316 </dd>
317 <dt><kbd><span class="option">-b <var>file</var></span></kbd></dt>
318 <dd><p>options can have arguments
319 and long descriptions</p>
320 </dd>
321 <dt><kbd><span class="option">--long</span></kbd></dt>
322 <dd><p>options can be long also</p>
323 </dd>
324 <dt><kbd><span class="option">--input=<var>file</var></span></kbd></dt>
325 <dd><p>long options can also have
326 arguments</p>
327 </dd>
328 <dt><kbd><span class="option">--very-long-option</span></kbd></dt>
329 <dd><p>The description can also start on the next line.</p>
330 <p>The description may contain multiple body elements,
331 regardless of where it starts.</p>
332 </dd>
333 <dt><kbd><span class="option">-x</span>, <span class="option">-y</span>, <span class="option">-z</span></kbd></dt>
334 <dd><p>Multiple options are an &quot;option group&quot;.</p>
335 </dd>
336 <dt><kbd><span class="option">-v</span>, <span class="option">--verbose</span></kbd></dt>
337 <dd><p>Commonly-seen: short &amp; long options.</p>
338 </dd>
339 <dt><kbd><span class="option">-1 <var>file</var></span>, <span class="option">--one=<var>file</var></span>, <span class="option">--two <var>file</var></span></kbd></dt>
340 <dd><p>Multiple options with arguments.</p>
341 </dd>
342 <dt><kbd><span class="option">/V</span></kbd></dt>
343 <dd><p>DOS/VMS-style options too</p>
344 </dd>
345 </dl>
346 <p>There must be at least two spaces between the option and the
347 description.</p>
348 </div>
349 <div class="section" id="literal-blocks">
350 <h2><a class="toc-backref" href="#id50"><span class="sectnum">2.7</span> Literal Blocks</a></h2>
351 <p>Literal blocks are indicated with a double-colon (&quot;::&quot;) at the end of
352 the preceding paragraph (over there <span class="docutils literal"><span class="pre">--&gt;</span></span>). They can be indented:</p>
353 <pre class="literal-block">if literal_block:
354 text = 'is left as-is'
355 spaces_and_linebreaks = 'are preserved'
356 markup_processing = None</pre>
357 <p>Or they can be quoted without indentation:</p>
358 <pre class="literal-block">&gt;&gt; Great idea!
359 &gt;
360 &gt; Why didn't I think of that?</pre>
361 </div>
362 <div class="section" id="line-blocks">
363 <h2><a class="toc-backref" href="#id51"><span class="sectnum">2.8</span> Line Blocks</a></h2>
364 <p>This section tests line blocks. Line blocks are body elements which
365 consist of lines and other line blocks. Nested line blocks cause
366 indentation.</p>
367 <div class="line-block">
368 <div class="line">This is a line block. It ends with a blank line.</div>
369 <div class="line-block">
370 <div class="line">New lines begin with a vertical bar (&quot;|&quot;).</div>
371 <div class="line">Line breaks and initial indent are significant, and preserved.</div>
372 <div class="line-block">
373 <div class="line">Continuation lines are also possible. A long line that is intended
374 to wrap should begin with a space in place of the vertical bar.</div>
375 </div>
376 <div class="line">The left edge of a continuation line need not be aligned with
377 the left edge of the text above it.</div>
378 </div>
379 </div>
380 <div class="line-block">
381 <div class="line">This is a second line block.</div>
382 <div class="line"><br /></div>
383 <div class="line">Blank lines are permitted internally, but they must begin with a &quot;|&quot;.</div>
384 </div>
385 <p>Another line block, surrounded by paragraphs:</p>
386 <div class="line-block">
387 <div class="line">And it's no good waiting by the window</div>
388 <div class="line">It's no good waiting for the sun</div>
389 <div class="line">Please believe me, the things you dream of</div>
390 <div class="line">They don't fall in the lap of no-one</div>
391 </div>
392 <p>Take it away, Eric the Orchestra Leader!</p>
393 <blockquote>
394 <div class="line-block">
395 <div class="line">A one, two, a one two three four</div>
396 <div class="line"><br /></div>
397 <div class="line">Half a bee, philosophically,</div>
398 <div class="line-block">
399 <div class="line">must, <em>ipso facto</em>, half not be.</div>
400 </div>
401 <div class="line">But half the bee has got to be,</div>
402 <div class="line-block">
403 <div class="line"><em>vis a vis</em> its entity. D'you see?</div>
404 <div class="line"><br /></div>
405 </div>
406 <div class="line">But can a bee be said to be</div>
407 <div class="line-block">
408 <div class="line">or not to be an entire bee,</div>
409 <div class="line-block">
410 <div class="line">when half the bee is not a bee,</div>
411 <div class="line-block">
412 <div class="line">due to some ancient injury?</div>
413 <div class="line"><br /></div>
414 </div>
415 </div>
416 </div>
417 <div class="line">Singing...</div>
418 </div>
419 </blockquote>
420 <p>A line block, like the following poem by Christian Morgenstern, can
421 also be centre-aligned:</p>
422 <div class="align-center line-block" lang="de">
423 <div class="line"><strong>Die Trichter</strong></div>
424 <div class="line"><br /></div>
425 <div class="line">Zwei Trichter wandeln durch die Nacht.</div>
426 <div class="line">Durch ihres Rumpfs verengten Schacht</div>
427 <div class="line">fließt weißes Mondlicht</div>
428 <div class="line">still und heiter</div>
429 <div class="line">auf   ihren</div>
430 <div class="line">Waldweg</div>
431 <div class="line">u. s.</div>
432 <div class="line">w.</div>
433 <div class="line"><br /></div>
434 </div>
435 </div>
436 <div class="section" id="block-quotes">
437 <h2><a class="toc-backref" href="#id52"><span class="sectnum">2.9</span> Block Quotes</a></h2>
438 <p>Block quotes consist of indented body elements:</p>
439 <blockquote>
440 <p>My theory by A. Elk. Brackets Miss, brackets. This theory goes
441 as follows and begins now. All brontosauruses are thin at one
442 end, much much thicker in the middle and then thin again at the
443 far end. That is my theory, it is mine, and belongs to me and I
444 own it, and what it is too.</p>
445 <p class="attribution">—Anne Elk (Miss)</p>
446 </blockquote>
447 <p>The language of a quote (like any other object) can be specified by
448 a class attribute:</p>
449 <!-- -->
450 <blockquote lang="fr">
451 <p>ReStructuredText est un langage de balisage léger utilisé
452 notamment dans la documentation du langage Python.</p>
453 </blockquote>
454 </div>
455 <div class="section" id="doctest-blocks">
456 <h2><a class="toc-backref" href="#id53"><span class="sectnum">2.10</span> Doctest Blocks</a></h2>
457 <pre class="code python doctest">&gt;&gt;&gt; print 'Python-specific usage examples; begun with &quot;&gt;&gt;&gt;&quot;'
458 Python-specific usage examples; begun with &quot;&gt;&gt;&gt;&quot;
459 &gt;&gt;&gt; print '(cut and pasted from interactive Python sessions)'
460 (cut and pasted from interactive Python sessions)
461 </pre>
462 </div>
463 <div class="section" id="footnotes">
464 <h2><a class="toc-backref" href="#id54"><span class="sectnum">2.11</span> Footnotes</a></h2>
465 <dl class="footnote brackets">
466 <dt class="label" id="id8"><span class="brackets">1</span><span class="fn-backref">(<a href="#id1">1</a>,<a href="#id9">2</a>,<a href="#id22">3</a>)</span></dt>
467 <dd><p>A footnote contains body elements, consistently indented by at
468 least 3 spaces.</p>
469 <p>This is the footnote's second paragraph.</p>
470 </dd>
471 <dt class="label" id="label"><span class="brackets">2</span><span class="fn-backref">(<a href="#id3">1</a>,<a href="#id10">2</a>)</span></dt>
472 <dd><p>Footnotes may be numbered, either manually (as in <a class="footnote-reference brackets" href="#id8" id="id9">1</a>) or
473 automatically using a &quot;#&quot;-prefixed label. This footnote has a
474 label so it can be referred to from multiple places, both as a
475 footnote reference (<a class="footnote-reference brackets" href="#label" id="id10">2</a>) and as a <a class="reference internal" href="#label">hyperlink reference</a>.</p>
476 </dd>
477 <dt class="label" id="id12"><span class="brackets"><a class="fn-backref" href="#id2">3</a></span></dt>
478 <dd><p>This footnote is numbered automatically and anonymously using a
479 label of &quot;#&quot; only.</p>
480 <p>This is the second paragraph.</p>
481 <p>And this is the third paragraph.</p>
482 </dd>
483 <dt class="label" id="id13"><span class="brackets"><a class="fn-backref" href="#id4">*</a></span></dt>
484 <dd><p>Footnotes may also use symbols, specified with a &quot;*&quot; label.
485 Here's a reference to the next footnote: <a class="footnote-reference brackets" href="#id15" id="id14">†</a>.</p>
486 </dd>
487 <dt class="label" id="id15"><span class="brackets"><a class="fn-backref" href="#id14">†</a></span></dt>
488 <dd><p>This footnote shows the next symbol in the sequence.</p>
489 </dd>
490 <dt class="label" id="id16"><span class="brackets">4</span></dt>
491 <dd><p>Here's an unreferenced footnote, with a reference to a
492 nonexistent footnote: <a href="#id96"><span class="problematic" id="id17">[5]_</span></a>.</p>
493 </dd>
494 </dl>
495 </div>
496 <div class="section" id="citations">
497 <h2><a class="toc-backref" href="#id55"><span class="sectnum">2.12</span> Citations</a></h2>
498 <dl class="citation">
499 <dt class="label" id="cit2002"><span class="brackets">CIT2002</span><span class="fn-backref">(<a href="#id5">1</a>,<a href="#id18">2</a>)</span></dt>
500 <dd><p>Citations are text-labeled footnotes. They may be
501 rendered separately and differently from footnotes.</p>
502 </dd>
503 </dl>
504 <p>Here's a reference to the above, <a class="citation-reference" href="#cit2002" id="id18">[CIT2002]</a>, and a <a href="#id97"><span class="problematic" id="id19">[nonexistent]_</span></a>
505 citation.</p>
506 </div>
507 <div class="section" id="targets">
508 <span id="another-target"></span><h2><a class="toc-backref" href="#id56"><span class="sectnum">2.13</span> Targets</a></h2>
509 <p id="example">This paragraph is pointed to by the explicit &quot;example&quot; target. A
510 reference can be found under <a class="reference internal" href="#inline-markup">Inline Markup</a>, above. <a class="reference internal" href="#inline-hyperlink-targets">Inline
511 hyperlink targets</a> are also possible.</p>
512 <p>Section headers are implicit targets, referred to by name. See
513 <a class="reference internal" href="#targets">Targets</a>, which is a subsection of <a class="reference internal" href="#body-elements">Body Elements</a>.</p>
514 <p>Explicit external targets are interpolated into references such as
515 &quot;<a class="reference external" href="http://www.python.org/">Python</a> <a class="footnote-reference brackets" href="#id25" id="id27">5</a>&quot;.</p>
516 <p>Targets may be indirect and anonymous. Thus <a class="reference internal" href="#targets">this phrase</a> may also
517 refer to the <a class="reference internal" href="#targets">Targets</a> section.</p>
518 <p>Here's a <a href="#id98"><span class="problematic" id="id99">`hyperlink reference without a target`_</span></a>, which generates an
519 error.</p>
520 <div class="section" id="duplicate-target-names">
521 <h3><a class="toc-backref" href="#id57"><span class="sectnum">2.13.1</span> Duplicate Target Names</a></h3>
522 <p>Duplicate names in section headers or other implicit targets will
523 generate &quot;info&quot; (level-1) system messages. Duplicate names in
524 explicit targets will generate &quot;warning&quot; (level-2) system messages.</p>
525 </div>
526 <div class="section" id="id21">
527 <h3><a class="toc-backref" href="#id58"><span class="sectnum">2.13.2</span> Duplicate Target Names</a></h3>
528 <p>Since there are two &quot;Duplicate Target Names&quot; section headers, we
529 cannot uniquely refer to either of them by name. If we try to (like
530 this: <a href="#id100"><span class="problematic" id="id101">`Duplicate Target Names`_</span></a>), an error is generated.</p>
531 </div>
532 </div>
533 <div class="section" id="directives">
534 <h2><a class="toc-backref" href="#id59"><span class="sectnum">2.14</span> Directives</a></h2>
535 <div class="contents local topic" id="contents">
536 <ul class="auto-toc simple">
537 <li><p><a class="reference internal" href="#document-parts" id="id87"><span class="sectnum">2.14.1</span> Document Parts</a></p></li>
538 <li><p><a class="reference internal" href="#images-and-figures" id="id88"><span class="sectnum">2.14.2</span> Images and Figures</a></p></li>
539 <li><p><a class="reference internal" href="#admonitions" id="id89"><span class="sectnum">2.14.3</span> Admonitions</a></p></li>
540 <li><p><a class="reference internal" href="#topics-sidebars-and-rubrics" id="id90"><span class="sectnum">2.14.4</span> Topics, Sidebars, and Rubrics</a></p></li>
541 <li><p><a class="reference internal" href="#target-footnotes" id="id91"><span class="sectnum">2.14.5</span> Target Footnotes</a></p></li>
542 <li><p><a class="reference internal" href="#replacement-text" id="id92"><span class="sectnum">2.14.6</span> Replacement Text</a></p></li>
543 <li><p><a class="reference internal" href="#compound-paragraph" id="id93"><span class="sectnum">2.14.7</span> Compound Paragraph</a></p></li>
544 <li><p><a class="reference internal" href="#parsed-literal-blocks" id="id94"><span class="sectnum">2.14.8</span> Parsed Literal Blocks</a></p></li>
545 <li><p><a class="reference internal" href="#code" id="id95"><span class="sectnum">2.14.9</span> Code</a></p></li>
546 </ul>
547 </div>
548 <p>These are just a sample of the many reStructuredText Directives. For
549 others, please see
550 <a class="reference external" href="http://docutils.sourceforge.net/docs/ref/rst/directives.html">http://docutils.sourceforge.net/docs/ref/rst/directives.html</a>.</p>
551 <div class="section" id="document-parts">
552 <h3><a class="toc-backref" href="#id87"><span class="sectnum">2.14.1</span> Document Parts</a></h3>
553 <p>An example of the &quot;contents&quot; directive can be seen above this section
554 (a local, untitled table of <a class="reference internal" href="#contents">contents</a>) and at the beginning of the
555 document (a document-wide <a class="reference internal" href="#table-of-contents">table of contents</a>).</p>
556 </div>
557 <div class="section" id="images-and-figures">
558 <h3><a class="toc-backref" href="#id88"><span class="sectnum">2.14.2</span> Images and Figures</a></h3>
559 <p>An image directive (also clickable -- a hyperlink reference):</p>
560 <a class="reference internal image-reference" href="#directives"><img alt="../../../docs/user/rst/images/title.png" class="class1 class2" src="../../../docs/user/rst/images/title.png" /></a>
561 <p>Image with multiple IDs:</p>
562 <span id="image-target-2"></span><span id="image-target-1"></span><img alt="../../../docs/user/rst/images/title.png" id="image-target-3" src="../../../docs/user/rst/images/title.png" />
563 <p>A centered image:</p>
564 <img alt="../../../docs/user/rst/images/biohazard.png" class="align-center" src="../../../docs/user/rst/images/biohazard.png" />
565 <p>A left-aligned image:</p>
566 <img alt="../../../docs/user/rst/images/biohazard.png" class="align-left" src="../../../docs/user/rst/images/biohazard.png" />
567 <p>This paragraph might flow around the image.
568 The specific behavior depends upon the style sheet and
569 the browser or rendering software used.</p>
570 <p>A right-aligned image:</p>
571 <img alt="../../../docs/user/rst/images/biohazard.png" class="align-right" src="../../../docs/user/rst/images/biohazard.png" />
572 <p>This paragraph might flow around the image.
573 The specific behavior depends upon the style sheet and
574 the browser or rendering software used.</p>
575 <p>For inline images see <a class="reference internal" href="#substitution-definitions">Substitution Definitions</a>.</p>
576 <p>Image size:</p>
577 <p>An image 2 em wide:</p>
578 <img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 2em;" />
579 <p>An image 2 em wide and 15 pixel high:</p>
580 <img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 2em; height: 15px;" />
581 <p>An image occupying 50% of the line width:</p>
582 <img alt="../../../docs/user/rst/images/title.png" src="../../../docs/user/rst/images/title.png" style="width: 50%;" />
583 <p>An image 2 cm high:</p>
584 <img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="height: 2cm;" />
585 <p>A <em>figure</em> is an image with a caption and/or a legend. With page-based output
586 media, figures might float to a different position if this helps the page
587 layout.</p>
588 <div class="figclass1 figclass2 figure">
589 <img alt="reStructuredText, the markup syntax" class="class1 class2" src="../../../docs/user/rst/images/title.png" style="width: 258px;" />
590 <p class="caption">Plaintext markup syntax and parser system.</p>
591 <div class="legend">
592 <table>
593 <colgroup>
594 <col style="width: 20%" />
595 <col style="width: 80%" />
596 </colgroup>
597 <tbody>
598 <tr><td><p>re</p></td>
599 <td><p>Revised, revisited, based on 're' module.</p></td>
600 </tr>
601 <tr><td><p>Structured</p></td>
602 <td><p>Structure-enhanced text, structuredtext.</p></td>
603 </tr>
604 <tr><td><p>Text</p></td>
605 <td><p>Well it is, isn't it?</p></td>
606 </tr>
607 </tbody>
608 </table>
609 <p>This paragraph is also part of the legend.</p>
610 </div>
611 </div>
612 <p>A left-aligned figure:</p>
613 <div class="figclass1 figclass2 figure align-left" style="width: 70%">
614 <img alt="reStructuredText, the markup syntax" class="class1 class2" src="../../../docs/user/rst/images/biohazard.png" style="width: 40px;" />
615 <p class="caption">This is the caption.</p>
616 <div class="legend">
617 <p>This is the legend.</p>
618 <p>The legend may consist of several paragraphs.</p>
619 </div>
620 </div>
621 <p>This paragraph might flow around the figure.</p>
622 <p>The specific behavior depends upon the style sheet and the browser or
623 rendering software used.</p>
624 <p>A centered figure:</p>
625 <div class="figure align-center">
626 <img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 40px;" />
627 <p class="caption">This is the caption.</p>
628 <div class="legend">
629 <p>This is the legend.</p>
630 <p>The legend may consist of several paragraphs.</p>
631 </div>
632 </div>
633 <p>This paragraph might flow around the figure.</p>
634 <p>The specific behavior depends upon the style sheet and the browser or
635 rendering software used.</p>
636 <p>A right-aligned figure:</p>
637 <div class="figure align-right">
638 <img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 40px;" />
639 <p class="caption">This is the caption.</p>
640 <div class="legend">
641 <p>This is the legend.</p>
642 <p>The legend may consist of several paragraphs.</p>
643 </div>
644 </div>
645 <p>This paragraph might flow around the figure. The specific behavior depends
646 upon the style sheet and the browser or rendering software used.</p>
647 <p>Tables may be given titles and additional arguments with the <em>table</em>
648 directive:</p>
649 <table class="align-left">
650 <caption>left-aligned table</caption>
651 <colgroup>
652 <col style="width: 50%" />
653 <col style="width: 50%" />
654 </colgroup>
655 <thead>
656 <tr><th class="head"><p>A</p></th>
657 <th class="head"><p>not A</p></th>
658 </tr>
659 </thead>
660 <tbody>
661 <tr><td><p>False</p></td>
662 <td><p>True</p></td>
663 </tr>
664 <tr><td><p>True</p></td>
665 <td><p>False</p></td>
666 </tr>
667 </tbody>
668 </table>
669 <table class="align-center">
670 <caption>center-aligned table</caption>
671 <colgroup>
672 <col style="width: 50%" />
673 <col style="width: 50%" />
674 </colgroup>
675 <thead>
676 <tr><th class="head"><p>A</p></th>
677 <th class="head"><p>not A</p></th>
678 </tr>
679 </thead>
680 <tbody>
681 <tr><td><p>False</p></td>
682 <td><p>True</p></td>
683 </tr>
684 <tr><td><p>True</p></td>
685 <td><p>False</p></td>
686 </tr>
687 </tbody>
688 </table>
689 <table class="align-right">
690 <caption>right-aligned table</caption>
691 <colgroup>
692 <col style="width: 50%" />
693 <col style="width: 50%" />
694 </colgroup>
695 <thead>
696 <tr><th class="head"><p>A</p></th>
697 <th class="head"><p>not A</p></th>
698 </tr>
699 </thead>
700 <tbody>
701 <tr><td><p>False</p></td>
702 <td><p>True</p></td>
703 </tr>
704 <tr><td><p>True</p></td>
705 <td><p>False</p></td>
706 </tr>
707 </tbody>
708 </table>
709 <p>With the &quot;widths&quot; argument &quot;auto&quot; (or &quot;class&quot; value &quot;colwidths-auto&quot;),
710 column widths are determined by the backend (if supported by the
711 writer/backend).</p>
712 <span id="target1"></span><table class="colwidths-auto" id="target2">
713 <thead>
714 <tr><th class="head"><p>A</p></th>
715 <th class="head"><p>B</p></th>
716 <th class="head"><p>A or B</p></th>
717 </tr>
718 </thead>
719 <tbody>
720 <tr><td><p>False</p></td>
721 <td><p>False</p></td>
722 <td><p>False</p></td>
723 </tr>
724 <tr><td><p>True</p></td>
725 <td><p>False</p></td>
726 <td><p>True</p></td>
727 </tr>
728 <tr><td><p>False</p></td>
729 <td><p>True</p></td>
730 <td><p>True</p></td>
731 </tr>
732 <tr><td><p>True</p></td>
733 <td><p>True</p></td>
734 <td><p>True</p></td>
735 </tr>
736 </tbody>
737 </table>
738 </div>
739 <div class="section" id="admonitions">
740 <h3><a class="toc-backref" href="#id89"><span class="sectnum">2.14.3</span> Admonitions</a></h3>
741 <div class="admonition attention">
742 <p class="admonition-title">Attention!</p>
743 <p>Directives at large.</p>
744 </div>
745 <div class="admonition caution">
746 <p class="admonition-title">Caution!</p>
747 <p>Don't take any wooden nickels.</p>
748 </div>
749 <div class="admonition danger">
750 <p class="admonition-title">!DANGER!</p>
751 <p>Mad scientist at work!</p>
752 </div>
753 <div class="admonition error">
754 <p class="admonition-title">Error</p>
755 <p>Does not compute.</p>
756 </div>
757 <div class="admonition hint">
758 <p class="admonition-title">Hint</p>
759 <p>It's bigger than a bread box.</p>
760 </div>
761 <div class="admonition important">
762 <p class="admonition-title">Important</p>
763 <ul class="simple">
764 <li><p>Wash behind your ears.</p></li>
765 <li><p>Clean up your room.</p></li>
766 <li><p>Call your mother.</p></li>
767 <li><p>Back up your data.</p></li>
768 </ul>
769 </div>
770 <div class="admonition note">
771 <p class="admonition-title">Note</p>
772 <p>This is a note.</p>
773 </div>
774 <div class="admonition tip">
775 <p class="admonition-title">Tip</p>
776 <p>15% if the service is good.</p>
777 </div>
778 <div class="admonition warning">
779 <p class="admonition-title">Warning</p>
780 <p>Strong prose may provoke extreme mental exertion.
781 Reader discretion is strongly advised.</p>
782 </div>
783 <div class="admonition admonition-and-by-the-way">
784 <p class="admonition-title">And, by the way...</p>
785 <p>You can make up your own admonition too.</p>
786 </div>
787 </div>
788 <div class="section" id="topics-sidebars-and-rubrics">
789 <h3><a class="toc-backref" href="#id90"><span class="sectnum">2.14.4</span> Topics, Sidebars, and Rubrics</a></h3>
790 <p><em>Sidebars</em> are like miniature, parallel documents.</p>
791 <div class="sidebar">
792 <p class="sidebar-title">Sidebar Title</p>
793 <p class="sidebar-subtitle">Optional Subtitle</p>
794 <p>This is a sidebar. It is for text outside the flow of the main
795 text.</p>
796 <p class="rubric">This is a rubric inside a sidebar</p>
797 <p>Sidebars often appear beside the main text with a border and a different
798 background or font color.</p>
799 </div>
800 <p>A <em>topic</em> is like a block quote with a title, or a self-contained section
801 with no subsections.</p>
802 <div class="topic">
803 <p class="topic-title first">Topic Title</p>
804 <p>This is a topic.</p>
805 </div>
806 <p>A <em>rubric</em> is like an informal heading that doesn't correspond to the
807 document's structure. It is typically highlighted in red (hence the name).</p>
808 <p class="rubric">This is a rubric</p>
809 <p>Topics and rubrics can be used at places where a <a class="reference internal" href="#section-title">section title</a> is not
810 allowed (e.g. inside a directive).</p>
811 </div>
812 <div class="section" id="target-footnotes">
813 <h3><a class="toc-backref" href="#id91"><span class="sectnum">2.14.5</span> Target Footnotes</a></h3>
814 <dl class="footnote brackets">
815 <dt class="label" id="id25"><span class="brackets">5</span><span class="fn-backref">(<a href="#id26">1</a>,<a href="#id27">2</a>,<a href="#id28">3</a>,<a href="#id35">4</a>)</span></dt>
816 <dd><p><a class="reference external" href="http://www.python.org/">http://www.python.org/</a></p>
817 </dd>
818 <dt class="label" id="id29"><span class="brackets"><a class="fn-backref" href="#id30">6</a></span></dt>
819 <dd><p><a class="reference external" href="http://pygments.org/">http://pygments.org/</a></p>
820 </dd>
821 <dt class="label" id="id31"><span class="brackets"><a class="fn-backref" href="#id32">7</a></span></dt>
822 <dd><p><a class="reference external" href="http://docutils.sourceforge.net/docs/user/config.html#table-style">http://docutils.sourceforge.net/docs/user/config.html#table-style</a></p>
823 </dd>
824 <dt class="label" id="id33"><span class="brackets"><a class="fn-backref" href="#id34">8</a></span></dt>
825 <dd><p><a class="reference external" href="http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf">http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf</a></p>
826 </dd>
827 <dt class="label" id="id36"><span class="brackets"><a class="fn-backref" href="#id37">9</a></span></dt>
828 <dd><p><a class="reference external" href="http://docutils.sourceforge.net/">http://docutils.sourceforge.net/</a></p>
829 </dd>
830 </dl>
831 </div>
832 <div class="section" id="replacement-text">
833 <h3><a class="toc-backref" href="#id92"><span class="sectnum">2.14.6</span> Replacement Text</a></h3>
834 <p>I recommend you try <a class="reference external" href="http://www.python.org/">Python, <em>the</em> best language around</a> <a class="footnote-reference brackets" href="#id25" id="id28">5</a>.</p>
835 </div>
836 <div class="section" id="compound-paragraph">
837 <h3><a class="toc-backref" href="#id93"><span class="sectnum">2.14.7</span> Compound Paragraph</a></h3>
838 <p>The <em>compound</em> directive is used to create a &quot;compound paragraph&quot;, which
839 is a single logical paragraph containing multiple physical body
840 elements. For example:</p>
841 <div class="compound">
842 <p class="compound-first">The 'rm' command is very dangerous. If you are logged
843 in as root and enter</p>
844 <pre class="compound-middle literal-block">cd /
845 rm -rf *</pre>
846 <p class="compound-last">you will erase the entire contents of your file system.</p>
847 </div>
848 <p>Test the handling and display of compound paragraphs:</p>
849 <div class="some-class compound">
850 <p class="compound-first">Compound 2, paragraph 1,</p>
851 <p class="compound-middle">compound 2, paragraph 2,</p>
852 <ul class="compound-middle simple">
853 <li><p>list item 1,</p></li>
854 <li><p>list item 2,</p></li>
855 </ul>
856 <p class="compound-last">compound 2, paragraph 3.</p>
857 </div>
858 <div class="compound">
859 <p>Compound 3, only consisting of one paragraph.</p>
860 </div>
861 <div class="compound">
862 <pre class="compound-first literal-block">Compound 4.
863 This one starts with a literal block.</pre>
864 <p class="compound-last">Compound 4, paragraph following the literal block.</p>
865 </div>
866 <p>Now something <em>really</em> perverted -- a nested compound block. This is
867 just to test that it works at all; the results don't have to be
868 meaningful.</p>
869 <div class="compound">
870 <p class="compound-first">Compound 5, block 1 (a paragraph).</p>
871 <div class="compound-middle compound">
872 <p class="compound-first">Compound 6 is block 2 in compound 5.</p>
873 <p class="compound-last">Compound 6, another paragraph.</p>
874 </div>
875 <p class="compound-last">Compound 5, block 3 (a paragraph).</p>
876 </div>
877 <div class="compound">
878 <p class="compound-first">Compound 7, tests the inclusion of various block-level
879 elements in one logical paragraph. First a table,</p>
880 <table class="compound-middle">
881 <colgroup>
882 <col style="width: 33%" />
883 <col style="width: 33%" />
884 <col style="width: 33%" />
885 </colgroup>
886 <tbody>
887 <tr><td><p>Left cell, first
888 paragraph.</p>
889 <p>Left cell, second
890 paragraph.</p>
891 </td>
892 <td><p>Middle cell,
893 consisting of
894 exactly one
895 paragraph.</p></td>
896 <td><p>Right cell.</p>
897 <p>Paragraph 2.</p>
898 <p>Paragraph 3.</p>
899 </td>
900 </tr>
901 </tbody>
902 </table>
903 <p class="compound-middle">followed by a paragraph. This physical paragraph is
904 actually a continuation of the paragraph before the table. It is followed
905 by</p>
906 <blockquote class="compound-middle">
907 <p>a quote and</p>
908 </blockquote>
909 <ol class="compound-middle arabic simple">
910 <li><p>an enumerated list,</p></li>
911 </ol>
912 <p class="compound-middle">a paragraph,</p>
913 <dl class="compound-middle option-list">
914 <dt><kbd><span class="option">--an</span></kbd></dt>
915 <dd><p>option list,</p>
916 </dd>
917 </dl>
918 <p class="compound-middle">a paragraph,</p>
919 <dl class="compound-middle field-list simple">
920 <dt>a field</dt>
921 <dd><p>list,</p>
922 </dd>
923 </dl>
924 <p class="compound-middle">a paragraph,</p>
925 <dl class="compound-middle simple">
926 <dt>a definition</dt>
927 <dd><p>list,</p>
928 </dd>
929 </dl>
930 <p class="compound-middle">a paragraph, an image:</p>
931 <img alt="../../../docs/user/rst/images/biohazard.png" class="compound-middle" src="../../../docs/user/rst/images/biohazard.png" />
932 <p class="compound-middle">a paragraph,</p>
933 <div class="compound-middle line-block">
934 <div class="line">a line</div>
935 <div class="line">block,</div>
936 </div>
937 <p class="compound-middle">a paragraph followed by a comment,</p>
938 <!-- this is a comment -->
939 <p class="compound-middle">a paragraph, a</p>
940 <div class="admonition note compound-middle">
941 <p class="admonition-title">Note</p>
942 <p>with content</p>
943 </div>
944 <p class="compound-last">and the final paragraph of the compound 7.</p>
945 </div>
946 </div>
947 <div class="section" id="parsed-literal-blocks">
948 <h3><a class="toc-backref" href="#id94"><span class="sectnum">2.14.8</span> Parsed Literal Blocks</a></h3>
949 <pre class="literal-block">This is a parsed literal block.
950 This line is indented. The next line is blank.
952 Inline markup is supported, e.g. <em>emphasis</em>, <strong>strong</strong>, <span class="docutils literal">literal
953 text</span>, <sub>sub-</sub> and <sup>super</sup>scripts,
954 inline formulas: <span class="formula"><i>A</i> = 2<i>π</i><i>r</i><sup>2</sup></span>,
955 footnotes <a class="footnote-reference brackets" href="#id8" id="id22">1</a>, <span class="target" id="hyperlink-targets">hyperlink targets</span>, and <a class="reference external" href="http://www.python.org/">references</a>.</pre>
956 </div>
957 <div class="section" id="code">
958 <h3><a class="toc-backref" href="#id95"><span class="sectnum">2.14.9</span> Code</a></h3>
959 <p>Blocks of source code can be set with the <cite>code</cite> directive. If the code
960 language is specified, the content is parsed and tagged by the <a class="reference external" href="http://pygments.org/">Pygments</a> <a class="footnote-reference brackets" href="#id29" id="id30">6</a>
961 syntax highlighter and can be formatted with a style sheet. (Code parsing
962 is turned off using the <span class="docutils literal"><span class="pre">syntax-highlight</span></span> config setting in the test
963 conversions in order to get identical results with/without installed
964 Pygments highlighter.)</p>
965 <pre class="code python literal-block"><code>print 'This is Python code.'</code></pre>
966 <p>The <span class="docutils literal"><span class="pre">:number-lines:</span></span> option (with optional start value) generates line
967 numbers:</p>
968 <pre class="code python literal-block"><code><span class="ln"> 8 </span># print integers from 0 to 9:
969 <span class="ln"> 9 </span>for i in range(10):
970 <span class="ln">10 </span> print i</code></pre>
971 <p>For inline code snippets, there is the <cite>code</cite> role, which can be used
972 directly (the code will not be parsed/tagged, as the language is not known)
973 or as base for special code roles, e.g. the LaTeX code in the next
974 paragraph.</p>
975 <p>Docutils uses LaTeX syntax for math directives and roles:
976 <code class="tex">\alpha = f(x)</code> prints <span class="formula"><i>α</i> = <i>f</i>(<i>x</i>)</span>.</p>
977 <p>The <span class="docutils literal">:code:</span> option of the <cite>include</cite> directive sets the included content
978 as a code block, here the rst file <span class="docutils literal">header_footer.txt</span> with line numbers:</p>
979 <pre class="code rst literal-block"><code><span class="ln">1 </span>.. header:: Document header
980 <span class="ln">2 </span>.. footer:: Document footer</code></pre>
981 </div>
982 </div>
983 <div class="section" id="substitution-definitions">
984 <h2><a class="toc-backref" href="#id69"><span class="sectnum">2.15</span> Substitution Definitions</a></h2>
985 <p>An inline image (<img alt="EXAMPLE" src="../../../docs/user/rst/images/biohazard.png" />) example:</p>
986 <p>(Substitution definitions are not visible in the HTML source.)</p>
987 </div>
988 <div class="section" id="comments">
989 <h2><a class="toc-backref" href="#id70"><span class="sectnum">2.16</span> Comments</a></h2>
990 <p>Here's one:</p>
991 <!-- Comments begin with two dots and a space. Anything may
992 follow, except for the syntax of footnotes, hyperlink
993 targets, directives, or substitution definitions.
995 Double-dashes - - "- -" - - must be escaped somehow in HTML output.
997 Comments may contain non-ASCII characters: ä ö ü æ ø å -->
998 <p>(View the HTML source to see the comment.)</p>
999 </div>
1000 <div class="section" id="raw-text">
1001 <h2><a class="toc-backref" href="#id71"><span class="sectnum">2.17</span> Raw text</a></h2>
1002 <p>This does not necessarily look nice, because there may be missing white space.</p>
1003 <p>It's just there to freeze the behavior.</p>
1004 A test.Second test.<div class="myclass">Another test with myclass set.</div><p>This is the <span class="myrawroleclass">fourth test</span> with myrawroleclass set.</p>
1005 Fifth test in HTML.<br />Line two.</div>
1006 <div class="section" id="container">
1007 <h2><a class="toc-backref" href="#id72"><span class="sectnum">2.18</span> Container</a></h2>
1008 <div class="custom docutils container">
1009 <p>paragraph 1</p>
1010 <p>paragraph 2</p>
1011 </div>
1012 </div>
1013 <div class="section" id="colspanning-tables">
1014 <h2><a class="toc-backref" href="#id73"><span class="sectnum">2.19</span> Colspanning tables</a></h2>
1015 <p>This table has a cell spanning two columns:</p>
1016 <table>
1017 <colgroup>
1018 <col style="width: 31%" />
1019 <col style="width: 31%" />
1020 <col style="width: 38%" />
1021 </colgroup>
1022 <thead>
1023 <tr><th class="head" colspan="2"><p>Inputs</p></th>
1024 <th class="head"><p>Output</p></th>
1025 </tr>
1026 <tr><th class="head"><p>A</p></th>
1027 <th class="head"><p>B</p></th>
1028 <th class="head"><p>A or B</p></th>
1029 </tr>
1030 </thead>
1031 <tbody>
1032 <tr><td><p>False</p></td>
1033 <td><p>False</p></td>
1034 <td><p>False</p></td>
1035 </tr>
1036 <tr><td><p>True</p></td>
1037 <td><p>False</p></td>
1038 <td><p>True</p></td>
1039 </tr>
1040 <tr><td><p>False</p></td>
1041 <td><p>True</p></td>
1042 <td><p>True</p></td>
1043 </tr>
1044 <tr><td><p>True</p></td>
1045 <td><p>True</p></td>
1046 <td><p>True</p></td>
1047 </tr>
1048 </tbody>
1049 </table>
1050 </div>
1051 <div class="section" id="rowspanning-tables">
1052 <h2><a class="toc-backref" href="#id74"><span class="sectnum">2.20</span> Rowspanning tables</a></h2>
1053 <p>Here's a table with cells spanning several rows:</p>
1054 <table>
1055 <colgroup>
1056 <col style="width: 44%" />
1057 <col style="width: 22%" />
1058 <col style="width: 33%" />
1059 </colgroup>
1060 <thead>
1061 <tr><th class="head"><p>Header row, column 1
1062 (header rows optional)</p></th>
1063 <th class="head"><p>Header 2</p></th>
1064 <th class="head"><p>Header 3</p></th>
1065 </tr>
1066 </thead>
1067 <tbody>
1068 <tr><td><p>body row 1, column 1</p></td>
1069 <td><p>column 2</p></td>
1070 <td><p>column 3</p></td>
1071 </tr>
1072 <tr><td><p>body row 2</p></td>
1073 <td rowspan="2"><p>Cells may
1074 span rows.</p></td>
1075 <td rowspan="2"><p>Another
1076 rowspanning
1077 cell.</p></td>
1078 </tr>
1079 <tr><td><p>body row 3</p></td>
1080 </tr>
1081 </tbody>
1082 </table>
1083 </div>
1084 <div class="section" id="complex-tables">
1085 <h2><a class="toc-backref" href="#id75"><span class="sectnum">2.21</span> Complex tables</a></h2>
1086 <p>Here's a complex table, which should test all features.</p>
1087 <table>
1088 <colgroup>
1089 <col style="width: 43%" />
1090 <col style="width: 21%" />
1091 <col style="width: 18%" />
1092 <col style="width: 18%" />
1093 </colgroup>
1094 <thead>
1095 <tr><th class="head"><p>Header row, column 1
1096 (header rows optional)</p></th>
1097 <th class="head"><p>Header 2</p></th>
1098 <th class="head"><p>Header 3</p></th>
1099 <th class="head"><p>Header 4</p></th>
1100 </tr>
1101 </thead>
1102 <tbody>
1103 <tr><td><p>body row 1, column 1</p></td>
1104 <td><p>column 2</p></td>
1105 <td><p>column 3</p></td>
1106 <td><p>column 4</p></td>
1107 </tr>
1108 <tr><td><p>body row 2</p></td>
1109 <td colspan="3"><p>Cells may span columns.</p></td>
1110 </tr>
1111 <tr><td><p>body row 3</p></td>
1112 <td rowspan="2"><p>Cells may
1113 span rows.</p>
1114 <p>Paragraph.</p>
1115 </td>
1116 <td colspan="2" rowspan="2"><ul class="simple">
1117 <li><p>Table cells</p></li>
1118 <li><p>contain</p></li>
1119 <li><p>body elements.</p></li>
1120 </ul>
1121 </td>
1122 </tr>
1123 <tr><td><p>body row 4</p></td>
1124 </tr>
1125 <tr><td><p>body row 5</p></td>
1126 <td colspan="2"><p>Cells may also be
1127 empty: <span class="docutils literal"><span class="pre">--&gt;</span></span></p></td>
1128 <td></td>
1129 </tr>
1130 </tbody>
1131 </table>
1132 </div>
1133 <div class="section" id="list-tables">
1134 <h2><a class="toc-backref" href="#id76"><span class="sectnum">2.22</span> List Tables</a></h2>
1135 <p>Here's a list table exercising all features:</p>
1136 <table class="colwidths-given test">
1137 <caption>list table with integral header</caption>
1138 <colgroup>
1139 <col style="width: 17%" />
1140 <col style="width: 33%" />
1141 <col style="width: 50%" />
1142 </colgroup>
1143 <thead>
1144 <tr><th class="head stub"><p>Treat</p></th>
1145 <th class="head"><p>Quantity</p></th>
1146 <th class="head"><p>Description</p></th>
1147 </tr>
1148 </thead>
1149 <tbody>
1150 <tr><th class="stub"><p>Albatross</p></th>
1151 <td><p>2.99</p></td>
1152 <td><p>On a stick!</p></td>
1153 </tr>
1154 <tr><th class="stub"><p>Crunchy Frog</p></th>
1155 <td><p>1.49</p></td>
1156 <td><p>If we took the bones out, it wouldn't be
1157 crunchy, now would it?</p></td>
1158 </tr>
1159 <tr><th class="stub"><p>Gannet Ripple</p></th>
1160 <td><p>1.99</p></td>
1161 <td><p>On a stick!</p></td>
1162 </tr>
1163 </tbody>
1164 </table>
1165 <table class="align-center">
1166 <caption>center aligned list table</caption>
1167 <colgroup>
1168 <col style="width: 50%" />
1169 <col style="width: 50%" />
1170 </colgroup>
1171 <tbody>
1172 <tr><td><p>Albatross</p></td>
1173 <td><p>2.99</p></td>
1174 </tr>
1175 <tr><td><p>Crunchy Frog</p></td>
1176 <td><p>1.49</p></td>
1177 </tr>
1178 <tr><td><p>Gannet Ripple</p></td>
1179 <td><p>1.99</p></td>
1180 </tr>
1181 </tbody>
1182 </table>
1183 </div>
1184 <div class="section" id="custom-roles">
1185 <h2><a class="toc-backref" href="#id77"><span class="sectnum">2.23</span> Custom Roles</a></h2>
1186 <ul>
1187 <li><p>A role based on an existing role.</p>
1188 <p><span class="custom docutils literal">one</span> <span class="custom docutils literal">two</span> <span class="custom docutils literal">three</span></p>
1189 </li>
1190 <li><p>A new role.</p>
1191 <p><span class="customnew">one two three</span></p>
1192 </li>
1193 <li><p>A role with class attribute.</p>
1194 <p><span class="special">interpreted text</span></p>
1195 </li>
1196 <li><p>A language-switching role:</p>
1197 <p>Let's count in German <span lang="de">eins zwei drei</span>.</p>
1198 </li>
1199 <li><p>A role with multiple class attributes, styled with raw directives:</p>
1200 <p>The following works in most browsers but does not validate
1201 (<span class="docutils literal">&lt;style&gt;</span> is only allowed in the document head):</p>
1202 <pre class="literal-block">.. raw:: html
1204 &lt;style type=&quot;text/css&quot;&gt;&lt;!--
1205 .green {color: green;}
1206 .sc {font-variant: small-caps;}
1207 --&gt;&lt;/style&gt;</pre>
1208 <p><span class="green sc" lang="en-gb">British colourful text in small-caps</span>.</p>
1209 </li>
1210 </ul>
1211 </div>
1212 <div class="section" id="svg-images">
1213 <h2><a class="toc-backref" href="#id78"><span class="sectnum">2.24</span> SVG Images</a></h2>
1214 <img alt="../../../docs/user/rst/images/biohazard.svg" class="align-left" src="../../../docs/user/rst/images/biohazard.svg" style="width: 48px; height: 48px;" />
1215 <p>Scalable vector graphics (SVG) images are the only standards-compliable way
1216 to include vector graphics in HTML documents. However, they are not
1217 supported by all backends/output formats. (E.g., LaTeX supports the
1218 PDF or Postscript formats for vector graphics instead.)</p>
1219 <p>Rendering behaviour varies, depending on</p>
1220 <ol class="loweralpha">
1221 <li><p>The SVG image itself, e.g. fixed-size vs. scaling:</p>
1222 <pre class="literal-block">width=&quot;280&quot; viewBox=&quot;0 0 280 27&quot;
1223 height=&quot;27&quot; width=&quot;100%&quot;
1224 height=&quot;100%&quot;</pre>
1225 </li>
1226 <li><p>The method used to put the image in the document.</p>
1227 <p>For HTML, there are several alternatives including:</p>
1228 <ul class="simple">
1229 <li><p>using the HTML <span class="docutils literal">&lt;img&gt;</span> tag (not for interactive/animated SVG),</p></li>
1230 <li><p>using the HTML <span class="docutils literal">&lt;object&gt;</span> tag,</p></li>
1231 <li><p>including within SVG using the SVG <span class="docutils literal">&lt;image&gt;</span> tag,</p></li>
1232 <li><p>embedd the SVG code within HTML (inlining).</p></li>
1233 </ul>
1234 <p>The <cite>html4css1</cite> writer uses <span class="docutils literal">&lt;object&gt;</span> tags, the <cite>html5</cite>
1235 writer uses <span class="docutils literal">&lt;img&gt;</span> tags.</p>
1236 <!-- cf. http://edutechwiki.unige.ch/en/Using_SVG_with_HTML5_tutorial -->
1237 </li>
1238 <li><p>The viewing agent.</p>
1239 <p>All up-to-date HTML browsers support SVG, however not all do this fully
1240 and in the same manner. Many older versions, especially IE &lt; 9, have
1241 deficiencies or require plug-ins (i.e. don't support the <span class="docutils literal">&lt;img&gt;</span> tag).</p>
1242 </li>
1243 </ol>
1244 <p>If the image is wrapped in <span class="docutils literal">&lt;object&gt;</span> or <span class="docutils literal">&lt;svg&gt;</span> tags, it depends on the
1245 <span class="docutils literal">viewBox</span> declaration inside the images root <span class="docutils literal">&lt;svg&gt;</span> element whether an
1246 SVG image is scaled or clipped/padded. Images wrapped in <span class="docutils literal">&lt;img&gt;</span> are
1247 always scaled.</p>
1248 <ul>
1249 <li><img alt="../../../docs/user/rst/images/title-scaling.svg" class="align-right" src="../../../docs/user/rst/images/title-scaling.svg" style="width: 50%;" />
1250 <p>A scaling image (scales with the browser window), occupying 50% of the line
1251 width. The <span class="docutils literal">viewBox</span> setting in the image file enables auto-scaling also in
1252 <span class="docutils literal">&lt;object&gt;</span> tags and embedded SVG (if width and hight are set to 100% in the
1253 SVG &lt;image&gt; tag).</p>
1254 </li>
1255 <li><img alt="../../../docs/user/rst/images/title.svg" class="align-right" src="../../../docs/user/rst/images/title.svg" style="width: 50%; height: 15px;" />
1256 <p>A fixed-size image in a box 50% wide and 15 pixles high. This image is
1257 scaled, if wrapped in an <span class="docutils literal">&lt;img&gt;</span> tag but clipped in an <span class="docutils literal">&lt;object&gt;</span> tag
1258 or within SVG.</p>
1259 </li>
1260 <li><img alt="../../../docs/user/rst/images/title-scaling.svg" class="align-right" src="../../../docs/user/rst/images/title-scaling.svg" style="width: 50%; height: 1.5em;" />
1261 <p>A right aligned, scaling image 50% wide and 1.5 em high. (This SVG image
1262 keeps the aspect ratio.)</p>
1263 </li>
1264 <li><p>An inline image <img alt="inline-svg" src="../../../docs/user/rst/images/biohazard-scaling.svg" style="height: 0.8em;" /> scaled to a height of 0.8 em.</p>
1265 </li>
1266 <li><img alt="../../../docs/user/rst/images/biohazard-scaling.svg" class="align-right" src="../../../docs/user/rst/images/biohazard-scaling.svg" style="height: 1em;" />
1267 <p>A scaling image 1 em high, right aligned:</p>
1268 </li>
1269 <li><p>A scaling image 5 mm x 5 mm, centered, with hyperlink reference:</p>
1270 <a class="reference internal image-reference" href="#svg-images"><img alt="../../../docs/user/rst/images/biohazard-scaling.svg" class="align-center" src="../../../docs/user/rst/images/biohazard-scaling.svg" style="width: 5mm; height: 5mm;" /></a>
1271 </li>
1272 <li><img alt="../../../docs/user/rst/images/biohazard.svg" class="align-right" src="../../../docs/user/rst/images/biohazard.svg" style="width: 4cm; height: 2em;" />
1273 <p>A fixed-size image in a 4 cm x 2 em box.</p>
1274 </li>
1275 </ul>
1276 <p>Older versions of <cite>webkit</cite> based browsers (chromium, safari, midori,
1277 konqueror) support the <span class="docutils literal">&lt;img&gt;</span> tag but don't display contained bitmap
1278 images in this case.</p>
1279 <ul>
1280 <li><img alt="../../../docs/user/rst/images/biohazard-bitmap.svg" class="align-right" src="../../../docs/user/rst/images/biohazard-bitmap.svg" style="width: 3em;" />
1281 <p>A small, fixed-size SVG image with embedded bitmap, The <span class="docutils literal">:width:</span> is
1282 set to 3 em in the rST source. Does not scale if wrapped in <span class="docutils literal">&lt;object&gt;</span>
1283 tags.</p>
1284 </li>
1285 <li><img alt="../../../docs/user/rst/images/biohazard-bitmap-scaling.svg" class="align-right" src="../../../docs/user/rst/images/biohazard-bitmap-scaling.svg" style="width: 3em;" />
1286 <p>A scaling SVG image with embedded bitmap, 3 em wide.</p>
1287 </li>
1288 </ul>
1289 <p>SVG images can also be put in figures:</p>
1290 <blockquote>
1291 <div class="figure align-center">
1292 <img alt="reStructuredText, the markup syntax" src="../../../docs/user/rst/images/title.svg" style="width: 290px; height: 28px;" />
1293 <p class="caption"><strong>Figure:</strong> SVG image in a figure.</p>
1294 </div>
1295 </blockquote>
1296 </div>
1297 <div class="section" id="swf-images">
1298 <h2><a class="toc-backref" href="#id79"><span class="sectnum">2.25</span> SWF Images</a></h2>
1299 <p>Shockwave Flash is an image/movie format that most modern web browsers
1300 support via a plugin. It is sometimes blocked due to privacy/security
1301 concerns.</p>
1302 <p>Images with extension <span class="docutils literal">.swf</span> are placed inside &lt;object&gt; elements.
1303 For complete control over display options use raw HTML.</p>
1304 <object class="align-left" data="../../../docs/user/rst/images/biohazard.swf" style="width: 4cm; height: 2em;" type="application/x-shockwave-flash">
1305 [biohazard.swf]</object>
1306 <p>An SWF image in a 4 cm x 2 em box, left aligned.</p>
1307 <p>An inline SWF image <object data="../../../docs/user/rst/images/biohazard.swf" style="width: 0.8em; height: 0.8em;" type="application/x-shockwave-flash">inline-swf</object> scaled to 0.8 em x 0.8 em.</p>
1308 </div>
1309 </div>
1310 <div class="section" id="changes-to-the-html4css1-writer">
1311 <h1><a class="toc-backref" href="#id80"><span class="sectnum">3</span> Changes to the html4css1 writer</a></h1>
1312 <ul class="simple">
1313 <li><p>Use only meta keywords recognized by HTML 5.</p></li>
1314 <li><p>Set table column widths with &lt;style=&quot;width: ...&quot;&gt;, not &quot;width&quot; argument.</p></li>
1315 <li><p>Horizontal alignment of table heads with CSS.</p></li>
1316 <li><p>Field lists as styled definition lists.</p></li>
1317 <li><p>Do not drop paragraph objects, use CSS rules to prevent unwanted vertical
1318 space.</p></li>
1319 <li><p>Put subtitles in &lt;p&gt; elements.</p></li>
1320 </ul>
1321 <div class="section" id="field-list-handling">
1322 <h2><a class="toc-backref" href="#id81"><span class="sectnum">3.1</span> Field list handling</a></h2>
1323 <p>The following list demonstrates the problems with the html4css1
1324 approach: the <cite>field-name-limit</cite> setting is given in &quot;number of
1325 characters&quot; but the field name uses a proportional font.</p>
1326 <dl class="field-list simple">
1327 <dt>The field name</dt>
1328 <dd><p>is typeset on the same line, unless it is &quot;long&quot;.</p>
1329 </dd>
1330 <dt>this field name</dt>
1331 <dd><p>is considered &quot;long&quot; in the html table rendering by
1332 the html4css1 writer with the default setting of
1333 <span class="docutils literal"><span class="pre">--field-name-limit=14</span></span>.</p>
1334 </dd>
1335 <dt>iiiiiiiiiiiiiii</dt>
1336 <dd><p>a field name that is considered &quot;long&quot; by html4css1
1337 with the default setting of <cite>field-name-limit: 14</cite>.</p>
1338 </dd>
1339 <dt>MMMMMMMMMMMMMM</dt>
1340 <dd><p>a field name that is actually longer than the
1341 previous one but regarded &quot;short&quot; by html4css1.</p>
1342 </dd>
1343 </dl>
1344 <p>With <span class="docutils literal">html_plain</span>, a <cite>field list</cite> is typeset as CSS-styled <cite>definition
1345 list</cite>. The default layout is similar to the look with <cite>html4css1</cite>:</p>
1346 <dl class="open field-list">
1347 <dt>A long field name</dt>
1348 <dd><p>sticks into the field body.</p>
1349 <p>The field body is pushed to the next line (you can suppress
1350 this behaviour with the <a class="reference internal" href="#run-in">run-in</a> class argument).</p>
1351 </dd>
1352 <dt>Customization</dt>
1353 <dd><p>of the field name width is possible with CSS instead
1354 of the <cite>field-name-limit</cite> configuration setting, for
1355 example:</p>
1356 <pre class="literal-block">dl.field-list &gt; dd { margin-left: 6em; }</pre>
1357 </dd>
1358 <dt>Empty</dt>
1359 <dd><p></p></dd>
1360 <dt>fields</dt>
1361 <dd><p>must not lead to misalignment of the following content.</p>
1362 </dd>
1363 </dl>
1364 </div>
1365 <div class="section" id="styling-with-class-arguments">
1366 <h2><a class="toc-backref" href="#id82"><span class="sectnum">3.2</span> Styling with class arguments</a></h2>
1367 <p>The <span class="docutils literal">plain.css</span> style sheet comes with some pre-defined style variants
1368 that can be chosen via a class argument.</p>
1369 <div class="section" id="description-lists">
1370 <h3><a class="toc-backref" href="#id83"><span class="sectnum">3.2.1</span> Description lists</a></h3>
1371 <p>Definition lists with the &quot;description&quot; class argument:</p>
1372 <dl class="description simple">
1373 <dt>description lists</dt>
1374 <dd><p>Definition lists that are styled like in most dictionaries,
1375 encyclopedias etc. (as well as the LaTeX <cite>description</cite> environment).</p>
1376 </dd>
1377 <dt>label</dt>
1378 <dd><p>The term to be described. Put in boldface.</p>
1379 </dd>
1380 <dt>content</dt>
1381 <dd><p>Starts on the same line and has a hanging indent.</p>
1382 </dd>
1383 </dl>
1384 </div>
1385 <div class="section" id="field-list-variants">
1386 <h3><a class="toc-backref" href="#id84"><span class="sectnum">3.2.2</span> Field list variants</a></h3>
1387 <p>For field lists, the &quot;compact/open&quot;, &quot;narrow&quot; and &quot;run-in&quot; styles are defined.</p>
1388 <dl class="simple">
1389 <dt><em>compact</em></dt>
1390 <dd><dl class="compact field-list simple">
1391 <dt>Feature</dt>
1392 <dd><p>No additional space between list items.</p>
1393 </dd>
1394 <dt>Option</dt>
1395 <dd><p>The <span class="docutils literal"><span class="pre">--compact-field-lists</span></span> command line option (and the
1396 corresponding configuration setting) set the <cite>compact</cite>
1397 class argument on all &quot;simple&quot; field lists, if not
1398 overridden with <cite>open</cite>.</p>
1399 </dd>
1400 <dt>Use</dt>
1401 <dd><p>For lists with short field body.</p>
1402 </dd>
1403 </dl>
1404 </dd>
1405 <dt><em>open</em></dt>
1406 <dd><dl class="open field-list">
1407 <dt>Feature</dt>
1408 <dd><p>Additional space between list items also in &quot;simple&quot; lists.
1409 (Overrides the <span class="docutils literal"><span class="pre">--compact-field-lists</span></span> command line
1410 option and the corresponding configuration setting)</p>
1411 </dd>
1412 <dt>Use</dt>
1413 <dd><p>For &quot;simple&quot; lists that should keep the space between list items.</p>
1414 </dd>
1415 </dl>
1416 </dd>
1417 <dt><em>narrow</em></dt>
1418 <dd><dl class="narrow field-list simple">
1419 <dt>Feature</dt>
1420 <dd><p>Less indented field body.</p>
1421 </dd>
1422 <dt>Use</dt>
1423 <dd><p>For lists with short field names.</p>
1424 </dd>
1425 <dt>A long field name</dt>
1426 <dd><p>sticks into the field body and the field body starts on a
1427 new line (if not combined with <a class="reference internal" href="#run-in">run-in</a>).</p>
1428 </dd>
1429 </dl>
1430 </dd>
1431 </dl>
1432 <dl class="simple" id="run-in">
1433 <dt><em>run-in</em></dt>
1434 <dd><dl class="run-in field-list simple">
1435 <dt>Feature</dt>
1436 <dd><p>Field body starts on the same line also after long field
1437 names.</p>
1438 </dd>
1439 <dt>A long field name</dt>
1440 <dd><p>sticks into the field body which continues on
1441 the same line.</p>
1442 </dd>
1443 <dt>The next field name</dt>
1444 <dd><p>and field body should align. Long text in the field
1445 body is wrapped and aligns with other fields.</p>
1446 </dd>
1447 </dl>
1448 </dd>
1449 </dl>
1450 </div>
1451 <div class="section" id="table-variants">
1452 <h3><a class="toc-backref" href="#id85"><span class="sectnum">3.2.3</span> Table variants</a></h3>
1453 <p>The following styles can be applied to individual tables via a class
1454 argument or as document wide setting with the <a class="reference external" href="http://docutils.sourceforge.net/docs/user/config.html#table-style">table-style</a> <a class="footnote-reference brackets" href="#id31" id="id32">7</a> configuration
1455 setting (or command line argument).</p>
1456 <ul>
1457 <li><p>Numbered tables can be achieved with the &quot;numbered&quot; class option:</p>
1458 <table class="numbered">
1459 <caption>truth values</caption>
1460 <colgroup>
1461 <col style="width: 29%" />
1462 <col style="width: 29%" />
1463 <col style="width: 42%" />
1464 </colgroup>
1465 <thead>
1466 <tr><th class="head"><p>A</p></th>
1467 <th class="head"><p>B</p></th>
1468 <th class="head"><p>A or B</p></th>
1469 </tr>
1470 </thead>
1471 <tbody>
1472 <tr><td><p>False</p></td>
1473 <td><p>False</p></td>
1474 <td><p>False</p></td>
1475 </tr>
1476 <tr><td><p>True</p></td>
1477 <td><p>False</p></td>
1478 <td><p>True</p></td>
1479 </tr>
1480 <tr><td><p>False</p></td>
1481 <td><p>True</p></td>
1482 <td><p>True</p></td>
1483 </tr>
1484 <tr><td><p>True</p></td>
1485 <td><p>True</p></td>
1486 <td><p>True</p></td>
1487 </tr>
1488 </tbody>
1489 </table>
1490 <p>Currently, referencing to the table by number is not supported. This is a
1491 common request and already on the <cite>TODO list</cite>.</p>
1492 </li>
1493 <li><p>A table with &quot;booktabs&quot; class value, is rendered similar to the style
1494 from the <a class="reference external" href="http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf">booktabs</a> <a class="footnote-reference brackets" href="#id33" id="id34">8</a> LaTeX package.</p>
1495 </li>
1496 </ul>
1497 <p>&quot;Booktabs&quot; style table, numbered, centre-aligned, with auto-sized columns:</p>
1498 <blockquote>
1499 <table class="booktabs numbered colwidths-auto align-center">
1500 <caption>I/O values</caption>
1501 <thead>
1502 <tr><th class="head" colspan="2"><p>Input</p></th>
1503 <th class="head"><p>Output</p></th>
1504 </tr>
1505 <tr><th class="head"><p>A</p></th>
1506 <th class="head"><p>B</p></th>
1507 <th class="head"><p>A or B</p></th>
1508 </tr>
1509 </thead>
1510 <tbody>
1511 <tr><td><p>False</p></td>
1512 <td><p>False</p></td>
1513 <td><p>False</p></td>
1514 </tr>
1515 <tr><td><p>True</p></td>
1516 <td><p>False</p></td>
1517 <td><p>True</p></td>
1518 </tr>
1519 <tr><td><p>False</p></td>
1520 <td><p>True</p></td>
1521 <td><p>True</p></td>
1522 </tr>
1523 <tr><td><p>True</p></td>
1524 <td><p>True</p></td>
1525 <td><p>True</p></td>
1526 </tr>
1527 </tbody>
1528 </table>
1529 </blockquote>
1530 </div>
1531 </div>
1532 </div>
1533 <div class="section" id="error-handling">
1534 <h1><a class="toc-backref" href="#id86"><span class="sectnum">4</span> Error Handling</a></h1>
1535 <p>Any errors caught during processing will generate system messages.</p>
1536 <p>There should be five messages in the following, auto-generated
1537 section, &quot;Docutils System Messages&quot;:</p>
1538 <!-- section should be added by Docutils automatically -->
1539 </div>
1540 <div class="system-messages section">
1541 <h1>Docutils System Messages</h1>
1542 <div class="system-message" id="id23">
1543 <p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 104); <em><a href="#id24">backlink</a></em></p>
1544 <p>Undefined substitution referenced: &quot;problematic&quot;.</p>
1545 </div>
1546 <div class="system-message" id="id96">
1547 <p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 391); <em><a href="#id17">backlink</a></em></p>
1548 <p>Unknown target name: &quot;5&quot;.</p>
1549 </div>
1550 <div class="system-message" id="id97">
1551 <p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 400); <em><a href="#id19">backlink</a></em></p>
1552 <p>Unknown target name: &quot;nonexistent&quot;.</p>
1553 </div>
1554 <div class="system-message" id="id98">
1555 <p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 427); <em><a href="#id99">backlink</a></em></p>
1556 <p>Unknown target name: &quot;hyperlink reference without a target&quot;.</p>
1557 </div>
1558 <div class="system-message" id="id100">
1559 <p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 440); <em><a href="#id101">backlink</a></em></p>
1560 <p>Duplicate target name, cannot be used as a unique reference: &quot;duplicate target names&quot;.</p>
1561 </div>
1562 </div>
1563 </div>
1564 <div class="footer">
1565 <hr class="footer" />
1566 <p>Document footer</p>
1567 <p><a class="reference external" href="http://www.w3.org/TR/html5/"><img alt="Conforms to HTML 5" src="http://www.w3.org/html/logo/badge/html5-badge-h-css3-semantics.png" style="width: 88px; height: 31px;" /></a> <a class="reference external" href="http://validator.w3.org/check?uri=referer"><img alt="Check validity!" src="https://validator-suite.w3.org/icons/vs-blue-256.png" style="width: 88px; height: 31px;" /></a> <a class="reference external" href="http://jigsaw.w3.org/css-validator/check/referer"><img alt="Valid CSS 2.1!" src="http://jigsaw.w3.org/css-validator/images/vcss" style="width: 88px; height: 31px;" /></a></p>
1569 </div>
1570 </body>
1571 </html>