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