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