Document the section subtitle transform in the functional tests.
[docutils.git] / test / functional / expected / standalone_rst_html4css1.html
blob92328fbc439d8e133b26d6948f8c414abf6f6c5a
1 <?xml version="1.0" encoding="utf-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Docutils 0.8: 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." lang="en" name="description" />
15 <link rel="stylesheet" href="../../../docutils/writers/html4css1/html4css1.css" type="text/css" />
16 </head>
17 <body>
18 <div class="header">
19 Document header
20 <hr class="header"/>
21 </div>
22 <div class="document" id="restructuredtext-test-document">
23 <span id="doctitle"></span>
24 <h1 class="title">reStructuredText Test Document</h1>
25 <h2 class="subtitle" id="examples-of-syntax-constructs"><span id="subtitle"></span>Examples of Syntax Constructs</h2>
26 <table class="docinfo" frame="void" rules="none">
27 <col class="docinfo-name" />
28 <col class="docinfo-content" />
29 <tbody valign="top">
30 <tr><th class="docinfo-name">Author:</th>
31 <td>David Goodger</td></tr>
32 <tr><th class="docinfo-name">Address:</th>
33 <td><pre class="address">
34 123 Example Street
35 Example, EX Canada
36 A1B 2C3
37 </pre>
38 </td></tr>
39 <tr><th class="docinfo-name">Contact:</th>
40 <td><a class="first last reference external" href="mailto:goodger&#64;python.org">goodger&#64;python.org</a></td></tr>
41 <tr><th class="docinfo-name">Authors:</th>
42 <td>Me
43 <br />Myself
44 <br />I</td></tr>
45 <tr><th class="docinfo-name">Organization:</th>
46 <td>humankind</td></tr>
47 <tr><th class="docinfo-name">Date:</th>
48 <td>Now, or yesterday. Or maybe even <em>before</em> yesterday.</td></tr>
49 <tr><th class="docinfo-name">Status:</th>
50 <td>This is a &quot;work in progress&quot;</td></tr>
51 <tr><th class="docinfo-name">Revision:</th>
52 <td>is managed by a version control system.</td></tr>
53 <tr><th class="docinfo-name">Version:</th>
54 <td>1</td></tr>
55 <tr><th class="docinfo-name">Copyright:</th>
56 <td>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.</td></tr>
63 <tr class="field"><th class="docinfo-name">field name:</th><td class="field-body">This is a &quot;generic bibliographic field&quot;.</td>
64 </tr>
65 <tr class="field"><th class="docinfo-name">field name &quot;2&quot;:</th><td class="field-body"><p class="first">Generic bibliographic fields may contain multiple body elements.</p>
66 <p class="last">Like this.</p>
67 </td>
68 </tr>
69 </tbody>
70 </table>
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><a class="reference internal" href="#structural-elements" id="id32">1&nbsp;&nbsp;&nbsp;Structural Elements</a><ul class="auto-toc">
89 <li><a class="reference internal" href="#section-title" id="id33">1.1&nbsp;&nbsp;&nbsp;Section Title</a></li>
90 <li><a class="reference internal" href="#empty-section" id="id34">1.2&nbsp;&nbsp;&nbsp;Empty Section</a></li>
91 <li><a class="reference internal" href="#transitions" id="id35">1.3&nbsp;&nbsp;&nbsp;Transitions</a></li>
92 </ul>
93 </li>
94 <li><a class="reference internal" href="#body-elements" id="id36">2&nbsp;&nbsp;&nbsp;Body Elements</a><ul class="auto-toc">
95 <li><a class="reference internal" href="#paragraphs" id="id37">2.1&nbsp;&nbsp;&nbsp;Paragraphs</a><ul class="auto-toc">
96 <li><a class="reference internal" href="#inline-markup" id="id38">2.1.1&nbsp;&nbsp;&nbsp;Inline Markup</a></li>
97 </ul>
98 </li>
99 <li><a class="reference internal" href="#bullet-lists" id="id39">2.2&nbsp;&nbsp;&nbsp;Bullet Lists</a></li>
100 <li><a class="reference internal" href="#enumerated-lists" id="id40">2.3&nbsp;&nbsp;&nbsp;Enumerated Lists</a></li>
101 <li><a class="reference internal" href="#definition-lists" id="id41">2.4&nbsp;&nbsp;&nbsp;Definition Lists</a></li>
102 <li><a class="reference internal" href="#field-lists" id="id42">2.5&nbsp;&nbsp;&nbsp;Field Lists</a></li>
103 <li><a class="reference internal" href="#option-lists" id="id43">2.6&nbsp;&nbsp;&nbsp;Option Lists</a></li>
104 <li><a class="reference internal" href="#literal-blocks" id="id44">2.7&nbsp;&nbsp;&nbsp;Literal Blocks</a></li>
105 <li><a class="reference internal" href="#line-blocks" id="id45">2.8&nbsp;&nbsp;&nbsp;Line Blocks</a></li>
106 <li><a class="reference internal" href="#block-quotes" id="id46">2.9&nbsp;&nbsp;&nbsp;Block Quotes</a></li>
107 <li><a class="reference internal" href="#doctest-blocks" id="id47">2.10&nbsp;&nbsp;&nbsp;Doctest Blocks</a></li>
108 <li><a class="reference internal" href="#footnotes" id="id48">2.11&nbsp;&nbsp;&nbsp;Footnotes</a></li>
109 <li><a class="reference internal" href="#citations" id="id49">2.12&nbsp;&nbsp;&nbsp;Citations</a></li>
110 <li><a class="reference internal" href="#targets" id="id50">2.13&nbsp;&nbsp;&nbsp;Targets</a><ul class="auto-toc">
111 <li><a class="reference internal" href="#duplicate-target-names" id="id51">2.13.1&nbsp;&nbsp;&nbsp;Duplicate Target Names</a></li>
112 <li><a class="reference internal" href="#id21" id="id52">2.13.2&nbsp;&nbsp;&nbsp;Duplicate Target Names</a></li>
113 </ul>
114 </li>
115 <li><a class="reference internal" href="#directives" id="id53">2.14&nbsp;&nbsp;&nbsp;Directives</a><ul class="auto-toc">
116 <li><a class="reference internal" href="#document-parts" id="id54">2.14.1&nbsp;&nbsp;&nbsp;Document Parts</a></li>
117 <li><a class="reference internal" href="#images-and-figures" id="id55">2.14.2&nbsp;&nbsp;&nbsp;Images and Figures</a></li>
118 <li><a class="reference internal" href="#admonitions" id="id56">2.14.3&nbsp;&nbsp;&nbsp;Admonitions</a></li>
119 <li><a class="reference internal" href="#topics-sidebars-and-rubrics" id="id57">2.14.4&nbsp;&nbsp;&nbsp;Topics, Sidebars, and Rubrics</a></li>
120 <li><a class="reference internal" href="#target-footnotes" id="id58">2.14.5&nbsp;&nbsp;&nbsp;Target Footnotes</a></li>
121 <li><a class="reference internal" href="#replacement-text" id="id59">2.14.6&nbsp;&nbsp;&nbsp;Replacement Text</a></li>
122 <li><a class="reference internal" href="#compound-paragraph" id="id60">2.14.7&nbsp;&nbsp;&nbsp;Compound Paragraph</a></li>
123 <li><a class="reference internal" href="#parsed-literal-blocks" id="id61">2.14.8&nbsp;&nbsp;&nbsp;Parsed Literal Blocks</a></li>
124 </ul>
125 </li>
126 <li><a class="reference internal" href="#substitution-definitions" id="id62">2.15&nbsp;&nbsp;&nbsp;Substitution Definitions</a></li>
127 <li><a class="reference internal" href="#comments" id="id63">2.16&nbsp;&nbsp;&nbsp;Comments</a></li>
128 <li><a class="reference internal" href="#raw-text" id="id64">2.17&nbsp;&nbsp;&nbsp;Raw text</a></li>
129 <li><a class="reference internal" href="#container" id="id65">2.18&nbsp;&nbsp;&nbsp;Container</a></li>
130 <li><a class="reference internal" href="#colspanning-tables" id="id66">2.19&nbsp;&nbsp;&nbsp;Colspanning tables</a></li>
131 <li><a class="reference internal" href="#rowspanning-tables" id="id67">2.20&nbsp;&nbsp;&nbsp;Rowspanning tables</a></li>
132 <li><a class="reference internal" href="#complex-tables" id="id68">2.21&nbsp;&nbsp;&nbsp;Complex tables</a></li>
133 <li><a class="reference internal" href="#list-tables" id="id69">2.22&nbsp;&nbsp;&nbsp;List Tables</a></li>
134 <li><a class="reference internal" href="#custom-roles" id="id70">2.23&nbsp;&nbsp;&nbsp;Custom Roles</a></li>
135 <li><a class="reference internal" href="#svg-images" id="id71">2.24&nbsp;&nbsp;&nbsp;SVG Images</a></li>
136 <li><a class="reference internal" href="#swf-images" id="id72">2.25&nbsp;&nbsp;&nbsp;SWF Images</a></li>
137 </ul>
138 </li>
139 <li><a class="reference internal" href="#error-handling" id="id73">3&nbsp;&nbsp;&nbsp;Error Handling</a></li>
140 </ul>
141 </div>
142 <div class="section" id="structural-elements">
143 <h1><a class="toc-backref" href="#id32">1&nbsp;&nbsp;&nbsp;Structural Elements</a></h1>
144 <div class="section" id="section-title">
145 <h2 class="with-subtitle"><a class="toc-backref" href="#id33">1.1&nbsp;&nbsp;&nbsp;Section Title</a></h2>
146 <h2 class="section-subtitle" id="section-subtitle"><span class="section-subtitle">Section Subtitle</span></h2>
147 <p>Lone subsections are converted to a section subtitle by a transform
148 activated with the <tt class="docutils literal"><span class="pre">--section-subtitles</span></tt> command line option or the
149 <tt class="docutils literal"><span class="pre">sectsubtitle-xform</span></tt> configuration value.</p>
150 </div>
151 <div class="section" id="empty-section">
152 <h2><a class="toc-backref" href="#id34">1.2&nbsp;&nbsp;&nbsp;Empty Section</a></h2>
153 </div>
154 <div class="section" id="transitions">
155 <h2><a class="toc-backref" href="#id35">1.3&nbsp;&nbsp;&nbsp;Transitions</a></h2>
156 <p>Here's a transition:</p>
157 <hr class="docutils" />
158 <p>It divides the section. Transitions may also occur between sections:</p>
159 </div>
160 </div>
161 <hr class="docutils" />
162 <div class="section" id="body-elements">
163 <h1><a class="toc-backref" href="#id36">2&nbsp;&nbsp;&nbsp;Body Elements</a></h1>
164 <div class="section" id="paragraphs">
165 <h2><a class="toc-backref" href="#id37">2.1&nbsp;&nbsp;&nbsp;Paragraphs</a></h2>
166 <p>A paragraph.</p>
167 <div class="section" id="inline-markup">
168 <h3><a class="toc-backref" href="#id38">2.1.1&nbsp;&nbsp;&nbsp;Inline Markup</a></h3>
169 <p>Paragraphs contain text and may contain inline markup: <em>emphasis</em>,
170 <strong>strong emphasis</strong>, <tt class="docutils literal">inline literals</tt>, standalone hyperlinks
171 (<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
172 cross-references (<a class="reference internal" href="#example">example</a>), external hyperlinks with embedded URIs
173 (<a class="reference external" href="http://www.python.org">Python web site</a>), <a class="reference external" href="http://www.python.org/">anonymous hyperlink
174 references</a> <a class="footnote-reference" href="#id25" id="id29">[5]</a> (<a class="reference external" href="http://docutils.sourceforge.net/">a second reference</a> <a class="footnote-reference" href="#id30" id="id31">[6]</a>), footnote references (manually
175 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
176 <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>),
177 substitution references (<img alt="EXAMPLE" src="../../../docs/user/rst/images/biohazard.png" />), and <span class="target" id="inline-hyperlink-targets">inline hyperlink targets</span>
178 (see <a class="reference internal" href="#targets">Targets</a> below for a reference back to here). Character-level
179 inline markup is also possible (although exceedingly ugly!) in <em>re</em><tt class="docutils literal">Structured</tt><em>Text</em>. Problems are indicated by <a href="#id23"><span class="problematic" id="id24">|problematic|</span></a> text
180 (generated by processing errors; this one is intentional). Here is a
181 reference to the <a class="reference internal" href="#doctitle">doctitle</a> and the <a class="reference internal" href="#subtitle">subtitle</a>.</p>
182 <p>The default role for interpreted text is <cite>Title Reference</cite>. Here are
183 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
184 RFC reference (<a class="reference external" href="http://www.faqs.org/rfcs/rfc2822.html">RFC 2822</a>); a <sub>subscript</sub>; a <sup>superscript</sup>;
185 and explicit roles for <em>standard</em> <strong>inline</strong>
186 <tt class="docutils literal">markup</tt>.</p>
187 <!-- DO NOT RE-WRAP THE FOLLOWING PARAGRAPH! -->
188 <p>Let's test wrapping and whitespace significance in inline literals:
189 <tt 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>
190 <span class="pre">strangely--hyphenated-words.</span>&nbsp; <span class="pre">Adjust-the-width-of-your-browser-window</span>
191 to see how the text is wrapped.&nbsp; <span class="pre">--</span> <span class="pre">----</span> <span class="pre">--------</span>&nbsp; Now note&nbsp;&nbsp;&nbsp; the
192 spacing&nbsp;&nbsp;&nbsp; between the&nbsp;&nbsp;&nbsp; words of&nbsp;&nbsp;&nbsp; this sentence&nbsp;&nbsp;&nbsp; (words
193 should&nbsp;&nbsp;&nbsp; be grouped&nbsp;&nbsp;&nbsp; in pairs).</tt></p>
194 <p>If the <tt class="docutils literal"><span class="pre">--pep-references</span></tt> option was supplied, there should be a
195 live link to PEP 258 here.</p>
196 </div>
197 </div>
198 <div class="section" id="bullet-lists">
199 <h2><a class="toc-backref" href="#id39">2.2&nbsp;&nbsp;&nbsp;Bullet Lists</a></h2>
200 <ul>
201 <li><p class="first">A bullet list</p>
202 <ul class="simple">
203 <li>Nested bullet list.</li>
204 <li>Nested item 2.</li>
205 </ul>
206 </li>
207 <li><p class="first">Item 2.</p>
208 <p>Paragraph 2 of item 2.</p>
209 <ul class="simple">
210 <li>Nested bullet list.</li>
211 <li>Nested item 2.<ul>
212 <li>Third level.</li>
213 <li>Item 2.</li>
214 </ul>
215 </li>
216 <li>Nested item 3.</li>
217 <li>This nested list should be compacted by the HTML writer.<span class="target" id="target"></span><!-- Even if this item contains a target and a comment. -->
218 </li>
219 </ul>
220 </li>
221 </ul>
222 </div>
223 <div class="section" id="enumerated-lists">
224 <h2><a class="toc-backref" href="#id40">2.3&nbsp;&nbsp;&nbsp;Enumerated Lists</a></h2>
225 <ol class="arabic">
226 <li><p class="first">Arabic numerals.</p>
227 <ol class="loweralpha simple">
228 <li>lower alpha)<ol class="lowerroman">
229 <li>(lower roman)<ol class="upperalpha">
230 <li>upper alpha.<ol class="upperroman">
231 <li>upper roman)</li>
232 </ol>
233 </li>
234 </ol>
235 </li>
236 </ol>
237 </li>
238 </ol>
239 </li>
240 <li><p class="first">Lists that don't start at 1:</p>
241 <ol class="arabic simple" start="3">
242 <li>Three</li>
243 <li>Four</li>
244 </ol>
245 <ol class="upperalpha simple" start="3">
246 <li>C</li>
247 <li>D</li>
248 </ol>
249 <ol class="lowerroman simple" start="3">
250 <li>iii</li>
251 <li>iv</li>
252 </ol>
253 </li>
254 </ol>
255 </div>
256 <div class="section" id="definition-lists">
257 <h2><a class="toc-backref" href="#id41">2.4&nbsp;&nbsp;&nbsp;Definition Lists</a></h2>
258 <dl class="docutils">
259 <dt>Term</dt>
260 <dd>Definition</dd>
261 <dt>Term <span class="classifier-delimiter">:</span> <span class="classifier">classifier</span></dt>
262 <dd><p class="first">Definition paragraph 1.</p>
263 <p class="last">Definition paragraph 2.</p>
264 </dd>
265 <dt>Term</dt>
266 <dd>Definition</dd>
267 <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>
268 <dd>Definition</dd>
269 </dl>
270 </div>
271 <div class="section" id="field-lists">
272 <h2><a class="toc-backref" href="#id42">2.5&nbsp;&nbsp;&nbsp;Field Lists</a></h2>
273 <table class="docutils field-list" frame="void" rules="none">
274 <col class="field-name" />
275 <col class="field-body" />
276 <tbody valign="top">
277 <tr class="field"><th class="field-name">what:</th><td class="field-body"><p class="first">Field lists map field names to field bodies, like database
278 records. They are often part of an extension syntax. They are
279 an unambiguous variant of RFC 2822 fields.</p>
280 </td>
281 </tr>
282 <tr class="field"><th class="field-name">how arg1 arg2:</th><td class="field-body"><p class="first">The field marker is a colon, the field name, and a colon.</p>
283 <p>The field body may contain one or more body elements, indented
284 relative to the field marker.</p>
285 </td>
286 </tr>
287 <tr class="field"><th class="field-name">credits:</th><td class="field-body"><p class="credits first last">This paragraph has the <cite>credits</cite> class set. (This is actually not
288 about credits but just for ensuring that the class attribute
289 doesn't get stripped away.)</p>
290 </td>
291 </tr>
292 </tbody>
293 </table>
294 </div>
295 <div class="section" id="option-lists">
296 <h2><a class="toc-backref" href="#id43">2.6&nbsp;&nbsp;&nbsp;Option Lists</a></h2>
297 <p>For listing command-line options:</p>
298 <table class="docutils option-list" frame="void" rules="none">
299 <col class="option" />
300 <col class="description" />
301 <tbody valign="top">
302 <tr><td class="option-group">
303 <kbd><span class="option">-a</span></kbd></td>
304 <td>command-line option &quot;a&quot;</td></tr>
305 <tr><td class="option-group">
306 <kbd><span class="option">-b <var>file</var></span></kbd></td>
307 <td>options can have arguments
308 and long descriptions</td></tr>
309 <tr><td class="option-group">
310 <kbd><span class="option">--long</span></kbd></td>
311 <td>options can be long also</td></tr>
312 <tr><td class="option-group">
313 <kbd><span class="option">--input=<var>file</var></span></kbd></td>
314 <td>long options can also have
315 arguments</td></tr>
316 <tr><td class="option-group" colspan="2">
317 <kbd><span class="option">--very-long-option</span></kbd></td>
318 </tr>
319 <tr><td>&nbsp;</td><td><p class="first">The description can also start on the next line.</p>
320 <p class="last">The description may contain multiple body elements,
321 regardless of where it starts.</p>
322 </td></tr>
323 <tr><td class="option-group">
324 <kbd><span class="option">-x</span>, <span class="option">-y</span>, <span class="option">-z</span></kbd></td>
325 <td>Multiple options are an &quot;option group&quot;.</td></tr>
326 <tr><td class="option-group">
327 <kbd><span class="option">-v</span>, <span class="option">--verbose</span></kbd></td>
328 <td>Commonly-seen: short &amp; long options.</td></tr>
329 <tr><td class="option-group" colspan="2">
330 <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></td>
331 </tr>
332 <tr><td>&nbsp;</td><td>Multiple options with arguments.</td></tr>
333 <tr><td class="option-group">
334 <kbd><span class="option">/V</span></kbd></td>
335 <td>DOS/VMS-style options too</td></tr>
336 </tbody>
337 </table>
338 <p>There must be at least two spaces between the option and the
339 description.</p>
340 </div>
341 <div class="section" id="literal-blocks">
342 <h2><a class="toc-backref" href="#id44">2.7&nbsp;&nbsp;&nbsp;Literal Blocks</a></h2>
343 <p>Literal blocks are indicated with a double-colon (&quot;::&quot;) at the end of
344 the preceding paragraph (over there <tt class="docutils literal"><span class="pre">--&gt;</span></tt>). They can be indented:</p>
345 <pre class="literal-block">
346 if literal_block:
347 text = 'is left as-is'
348 spaces_and_linebreaks = 'are preserved'
349 markup_processing = None
350 </pre>
351 <p>Or they can be quoted without indentation:</p>
352 <pre class="literal-block">
353 &gt;&gt; Great idea!
354 &gt;
355 &gt; Why didn't I think of that?
356 </pre>
357 </div>
358 <div class="section" id="line-blocks">
359 <h2><a class="toc-backref" href="#id45">2.8&nbsp;&nbsp;&nbsp;Line Blocks</a></h2>
360 <p>This section tests line blocks. Line blocks are body elements which
361 consist of lines and other line blocks. Nested line blocks cause
362 indentation.</p>
363 <div class="line-block">
364 <div class="line">This is a line block. It ends with a blank line.</div>
365 <div class="line-block">
366 <div class="line">New lines begin with a vertical bar (&quot;|&quot;).</div>
367 <div class="line">Line breaks and initial indent are significant, and preserved.</div>
368 <div class="line-block">
369 <div class="line">Continuation lines are also possible. A long line that is intended
370 to wrap should begin with a space in place of the vertical bar.</div>
371 </div>
372 <div class="line">The left edge of a continuation line need not be aligned with
373 the left edge of the text above it.</div>
374 </div>
375 </div>
376 <div class="line-block">
377 <div class="line">This is a second line block.</div>
378 <div class="line"><br /></div>
379 <div class="line">Blank lines are permitted internally, but they must begin with a &quot;|&quot;.</div>
380 </div>
381 <p>Another line block, surrounded by paragraphs:</p>
382 <div class="line-block">
383 <div class="line">And it's no good waiting by the window</div>
384 <div class="line">It's no good waiting for the sun</div>
385 <div class="line">Please believe me, the things you dream of</div>
386 <div class="line">They don't fall in the lap of no-one</div>
387 </div>
388 <p>Take it away, Eric the Orchestra Leader!</p>
389 <blockquote>
390 <div class="line-block">
391 <div class="line">A one, two, a one two three four</div>
392 <div class="line"><br /></div>
393 <div class="line">Half a bee, philosophically,</div>
394 <div class="line-block">
395 <div class="line">must, <em>ipso facto</em>, half not be.</div>
396 </div>
397 <div class="line">But half the bee has got to be,</div>
398 <div class="line-block">
399 <div class="line"><em>vis a vis</em> its entity. D'you see?</div>
400 <div class="line"><br /></div>
401 </div>
402 <div class="line">But can a bee be said to be</div>
403 <div class="line-block">
404 <div class="line">or not to be an entire bee,</div>
405 <div class="line-block">
406 <div class="line">when half the bee is not a bee,</div>
407 <div class="line-block">
408 <div class="line">due to some ancient injury?</div>
409 <div class="line"><br /></div>
410 </div>
411 </div>
412 </div>
413 <div class="line">Singing...</div>
414 </div>
415 </blockquote>
416 <p>A line block, like the following poem by Christian Morgenstern, can
417 also be centre-aligned:</p>
418 <div class="align-center line-block" lang="de">
419 <div class="line"><strong>Die Trichter</strong></div>
420 <div class="line"><br /></div>
421 <div class="line">Zwei Trichter wandeln durch die Nacht.</div>
422 <div class="line">Durch ihres Rumpfs verengten Schacht</div>
423 <div class="line">fließt weißes Mondlicht</div>
424 <div class="line">still und heiter</div>
425 <div class="line">auf &nbsp; ihren</div>
426 <div class="line">Waldweg</div>
427 <div class="line">u. s.</div>
428 <div class="line">w.</div>
429 <div class="line"><br /></div>
430 </div>
431 </div>
432 <div class="section" id="block-quotes">
433 <h2><a class="toc-backref" href="#id46">2.9&nbsp;&nbsp;&nbsp;Block Quotes</a></h2>
434 <p>Block quotes consist of indented body elements:</p>
435 <blockquote>
436 <p>My theory by A. Elk. Brackets Miss, brackets. This theory goes
437 as follows and begins now. All brontosauruses are thin at one
438 end, much much thicker in the middle and then thin again at the
439 far end. That is my theory, it is mine, and belongs to me and I
440 own it, and what it is too.</p>
441 <p class="attribution">&mdash;Anne Elk (Miss)</p>
442 </blockquote>
443 <p>The language of a quote (like any other object) can be specified by
444 a class attribute:</p>
445 <!-- -->
446 <blockquote lang="fr">
447 ReStructuredText est un langage de balisage léger utilisé
448 notamment dans la documentation du langage Python.</blockquote>
449 </div>
450 <div class="section" id="doctest-blocks">
451 <h2><a class="toc-backref" href="#id47">2.10&nbsp;&nbsp;&nbsp;Doctest Blocks</a></h2>
452 <pre class="doctest-block">
453 &gt;&gt;&gt; print 'Python-specific usage examples; begun with &quot;&gt;&gt;&gt;&quot;'
454 Python-specific usage examples; begun with &quot;&gt;&gt;&gt;&quot;
455 &gt;&gt;&gt; print '(cut and pasted from interactive Python sessions)'
456 (cut and pasted from interactive Python sessions)
457 </pre>
458 </div>
459 <div class="section" id="footnotes">
460 <h2><a class="toc-backref" href="#id48">2.11&nbsp;&nbsp;&nbsp;Footnotes</a></h2>
461 <table class="docutils footnote" frame="void" id="id8" rules="none">
462 <colgroup><col class="label" /><col /></colgroup>
463 <tbody valign="top">
464 <tr><td class="label">[1]</td><td><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
465 least 3 spaces.</p>
466 <p class="last">This is the footnote's second paragraph.</p>
467 </td></tr>
468 </tbody>
469 </table>
470 <table class="docutils footnote" frame="void" id="label" rules="none">
471 <colgroup><col class="label" /><col /></colgroup>
472 <tbody valign="top">
473 <tr><td class="label">[2]</td><td><em>(<a class="fn-backref" href="#id3">1</a>, <a class="fn-backref" href="#id10">2</a>)</em> 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>.</td></tr>
477 </tbody>
478 </table>
479 <table class="docutils footnote" frame="void" id="id12" rules="none">
480 <colgroup><col class="label" /><col /></colgroup>
481 <tbody valign="top">
482 <tr><td class="label"><a class="fn-backref" href="#id2">[3]</a></td><td><p class="first">This footnote is numbered automatically and anonymously using a
483 label of &quot;#&quot; only.</p>
484 <p>This is the second paragraph.</p>
485 <p class="last">And this is the third paragraph.</p>
486 </td></tr>
487 </tbody>
488 </table>
489 <table class="docutils footnote" frame="void" id="id13" rules="none">
490 <colgroup><col class="label" /><col /></colgroup>
491 <tbody valign="top">
492 <tr><td class="label"><a class="fn-backref" href="#id4">[*]</a></td><td>Footnotes may also use symbols, specified with a &quot;*&quot; label.
493 Here's a reference to the next footnote: <a class="footnote-reference" href="#id15" id="id14">[†]</a>.</td></tr>
494 </tbody>
495 </table>
496 <table class="docutils footnote" frame="void" id="id15" rules="none">
497 <colgroup><col class="label" /><col /></colgroup>
498 <tbody valign="top">
499 <tr><td class="label"><a class="fn-backref" href="#id14">[†]</a></td><td>This footnote shows the next symbol in the sequence.</td></tr>
500 </tbody>
501 </table>
502 <table class="docutils footnote" frame="void" id="id16" rules="none">
503 <colgroup><col class="label" /><col /></colgroup>
504 <tbody valign="top">
505 <tr><td class="label">[4]</td><td>Here's an unreferenced footnote, with a reference to a
506 nonexistent footnote: <a href="#id82"><span class="problematic" id="id83"><span id="id17"></span>[5]_</span></a>.</td></tr>
507 </tbody>
508 </table>
509 </div>
510 <div class="section" id="citations">
511 <h2><a class="toc-backref" href="#id49">2.12&nbsp;&nbsp;&nbsp;Citations</a></h2>
512 <table class="docutils citation" frame="void" id="cit2002" rules="none">
513 <colgroup><col class="label" /><col /></colgroup>
514 <tbody valign="top">
515 <tr><td class="label">[CIT2002]</td><td><em>(<a class="fn-backref" href="#id5">1</a>, <a class="fn-backref" href="#id18">2</a>)</em> Citations are text-labeled footnotes. They may be
516 rendered separately and differently from footnotes.</td></tr>
517 </tbody>
518 </table>
519 <p>Here's a reference to the above, <a class="citation-reference" href="#cit2002" id="id18">[CIT2002]</a>, and a <a href="#id84"><span class="problematic" id="id85"><span id="id19"></span>[nonexistent]_</span></a>
520 citation.</p>
521 </div>
522 <div class="section" id="targets">
523 <span id="another-target"></span><h2><a class="toc-backref" href="#id50">2.13&nbsp;&nbsp;&nbsp;Targets</a></h2>
524 <p id="example">This paragraph is pointed to by the explicit &quot;example&quot; target. A
525 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
526 hyperlink targets</a> are also possible.</p>
527 <p>Section headers are implicit targets, referred to by name. See
528 <a class="reference internal" href="#targets">Targets</a>, which is a subsection of <a class="reference internal" href="#body-elements">Body Elements</a>.</p>
529 <p>Explicit external targets are interpolated into references such as
530 &quot;<a class="reference external" href="http://www.python.org/">Python</a> <a class="footnote-reference" href="#id25" id="id27">[5]</a>&quot;.</p>
531 <p>Targets may be indirect and anonymous. Thus <a class="reference internal" href="#targets">this phrase</a> may also
532 refer to the <a class="reference internal" href="#targets">Targets</a> section.</p>
533 <p>Here's a <a href="#id86"><span class="problematic" id="id87">`hyperlink reference without a target`_</span></a>, which generates an
534 error.</p>
535 <div class="section" id="duplicate-target-names">
536 <h3><a class="toc-backref" href="#id51">2.13.1&nbsp;&nbsp;&nbsp;Duplicate Target Names</a></h3>
537 <p>Duplicate names in section headers or other implicit targets will
538 generate &quot;info&quot; (level-1) system messages. Duplicate names in
539 explicit targets will generate &quot;warning&quot; (level-2) system messages.</p>
540 </div>
541 <div class="section" id="id21">
542 <h3><a class="toc-backref" href="#id52">2.13.2&nbsp;&nbsp;&nbsp;Duplicate Target Names</a></h3>
543 <p>Since there are two &quot;Duplicate Target Names&quot; section headers, we
544 cannot uniquely refer to either of them by name. If we try to (like
545 this: <a href="#id88"><span class="problematic" id="id89">`Duplicate Target Names`_</span></a>), an error is generated.</p>
546 </div>
547 </div>
548 <div class="section" id="directives">
549 <h2><a class="toc-backref" href="#id53">2.14&nbsp;&nbsp;&nbsp;Directives</a></h2>
550 <div class="contents local topic" id="contents">
551 <ul class="auto-toc simple">
552 <li><a class="reference internal" href="#document-parts" id="id74">2.14.1&nbsp;&nbsp;&nbsp;Document Parts</a></li>
553 <li><a class="reference internal" href="#images-and-figures" id="id75">2.14.2&nbsp;&nbsp;&nbsp;Images and Figures</a></li>
554 <li><a class="reference internal" href="#admonitions" id="id76">2.14.3&nbsp;&nbsp;&nbsp;Admonitions</a></li>
555 <li><a class="reference internal" href="#topics-sidebars-and-rubrics" id="id77">2.14.4&nbsp;&nbsp;&nbsp;Topics, Sidebars, and Rubrics</a></li>
556 <li><a class="reference internal" href="#target-footnotes" id="id78">2.14.5&nbsp;&nbsp;&nbsp;Target Footnotes</a></li>
557 <li><a class="reference internal" href="#replacement-text" id="id79">2.14.6&nbsp;&nbsp;&nbsp;Replacement Text</a></li>
558 <li><a class="reference internal" href="#compound-paragraph" id="id80">2.14.7&nbsp;&nbsp;&nbsp;Compound Paragraph</a></li>
559 <li><a class="reference internal" href="#parsed-literal-blocks" id="id81">2.14.8&nbsp;&nbsp;&nbsp;Parsed Literal Blocks</a></li>
560 </ul>
561 </div>
562 <p>These are just a sample of the many reStructuredText Directives. For
563 others, please see
564 <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>
565 <div class="section" id="document-parts">
566 <h3><a class="toc-backref" href="#id74">2.14.1&nbsp;&nbsp;&nbsp;Document Parts</a></h3>
567 <p>An example of the &quot;contents&quot; directive can be seen above this section
568 (a local, untitled table of <a class="reference internal" href="#contents">contents</a>) and at the beginning of the
569 document (a document-wide <a class="reference internal" href="#table-of-contents">table of contents</a>).</p>
570 </div>
571 <div class="section" id="images-and-figures">
572 <h3><a class="toc-backref" href="#id75">2.14.2&nbsp;&nbsp;&nbsp;Images and Figures</a></h3>
573 <p>An image directive (also clickable -- a hyperlink reference):</p>
574 <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>
575 <p>Image with multiple IDs:</p>
576 <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" />
577 <p>A centered image:</p>
578 <img alt="../../../docs/user/rst/images/biohazard.png" class="align-center" src="../../../docs/user/rst/images/biohazard.png" />
579 <p>A left-aligned image:</p>
580 <img alt="../../../docs/user/rst/images/biohazard.png" class="align-left" src="../../../docs/user/rst/images/biohazard.png" />
581 <p>This paragraph might flow around the image.
582 The specific behavior depends upon the style sheet and
583 the browser or rendering software used.</p>
584 <p>A right-aligned image:</p>
585 <img alt="../../../docs/user/rst/images/biohazard.png" class="align-right" src="../../../docs/user/rst/images/biohazard.png" />
586 <p>This paragraph might flow around the image.
587 The specific behavior depends upon the style sheet and
588 the browser or rendering software used.</p>
589 <p>For inline images see <a class="reference internal" href="#substitution-definitions">Substitution Definitions</a>.</p>
590 <p>Image size:</p>
591 <p>An image 2 em wide:</p>
592 <img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 2em;" />
593 <p>An image 2 em wide and 15 pixel high:</p>
594 <img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 2em; height: 15px;" />
595 <p>An image occupying 50% of the line width:</p>
596 <img alt="../../../docs/user/rst/images/title.png" src="../../../docs/user/rst/images/title.png" style="width: 50%;" />
597 <p>An image 2 cm high:</p>
598 <img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="height: 2cm;" />
599 <p>A <em>figure</em> is an image with a caption and/or a legend. With page-based output
600 media, figures might float to a different position if this helps the page
601 layout.</p>
602 <div class="figclass1 figclass2 figure">
603 <img alt="reStructuredText, the markup syntax" class="class1 class2" src="../../../docs/user/rst/images/title.png" style="width: 258px;" />
604 <p class="caption">Plaintext markup syntax and parser system.</p>
605 <div class="legend">
606 <table border="1" class="docutils">
607 <colgroup>
608 <col width="20%" />
609 <col width="80%" />
610 </colgroup>
611 <tbody valign="top">
612 <tr><td>re</td>
613 <td>Revised, revisited, based on 're' module.</td>
614 </tr>
615 <tr><td>Structured</td>
616 <td>Structure-enhanced text, structuredtext.</td>
617 </tr>
618 <tr><td>Text</td>
619 <td>Well it is, isn't it?</td>
620 </tr>
621 </tbody>
622 </table>
623 <p>This paragraph is also part of the legend.</p>
624 </div>
625 </div>
626 <p>A left-aligned figure:</p>
627 <div class="figclass1 figclass2 figure align-left" style="width: 70%">
628 <img alt="reStructuredText, the markup syntax" class="class1 class2" src="../../../docs/user/rst/images/biohazard.png" style="width: 40px;" />
629 <p class="caption">This is the caption.</p>
630 <div class="legend">
631 <p>This is the legend.</p>
632 <p>The legend may consist of several paragraphs.</p>
633 </div>
634 </div>
635 <p>This paragraph might flow around the figure.</p>
636 <p>The specific behavior depends upon the style sheet and the browser or
637 rendering software used.</p>
638 <p>A centered figure:</p>
639 <div class="figure align-center">
640 <img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 40px;" />
641 <p class="caption">This is the caption.</p>
642 <div class="legend">
643 <p>This is the legend.</p>
644 <p>The legend may consist of several paragraphs.</p>
645 </div>
646 </div>
647 <p>This paragraph might flow around the figure.</p>
648 <p>The specific behavior depends upon the style sheet and the browser or
649 rendering software used.</p>
650 <p>A right-aligned figure:</p>
651 <div class="figure align-right">
652 <img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 40px;" />
653 <p class="caption">This is the caption.</p>
654 <div class="legend">
655 <p>This is the legend.</p>
656 <p>The legend may consist of several paragraphs.</p>
657 </div>
658 </div>
659 <p>This paragraph might flow around the figure. The specific behavior depends
660 upon the style sheet and the browser or rendering software used.</p>
661 </div>
662 <div class="section" id="admonitions">
663 <h3><a class="toc-backref" href="#id76">2.14.3&nbsp;&nbsp;&nbsp;Admonitions</a></h3>
664 <div class="attention">
665 <p class="first admonition-title">Attention!</p>
666 <p class="last">Directives at large.</p>
667 </div>
668 <div class="caution">
669 <p class="first admonition-title">Caution!</p>
670 <p class="last">Don't take any wooden nickels.</p>
671 </div>
672 <div class="danger">
673 <p class="first admonition-title">!DANGER!</p>
674 <p class="last">Mad scientist at work!</p>
675 </div>
676 <div class="error">
677 <p class="first admonition-title">Error</p>
678 <p class="last">Does not compute.</p>
679 </div>
680 <div class="hint">
681 <p class="first admonition-title">Hint</p>
682 <p class="last">It's bigger than a bread box.</p>
683 </div>
684 <div class="important">
685 <p class="first admonition-title">Important</p>
686 <ul class="last simple">
687 <li>Wash behind your ears.</li>
688 <li>Clean up your room.</li>
689 <li>Call your mother.</li>
690 <li>Back up your data.</li>
691 </ul>
692 </div>
693 <div class="note">
694 <p class="first admonition-title">Note</p>
695 <p class="last">This is a note.</p>
696 </div>
697 <div class="tip">
698 <p class="first admonition-title">Tip</p>
699 <p class="last">15% if the service is good.</p>
700 </div>
701 <div class="warning">
702 <p class="first admonition-title">Warning</p>
703 <p class="last">Strong prose may provoke extreme mental exertion.
704 Reader discretion is strongly advised.</p>
705 </div>
706 <div class="admonition-and-by-the-way admonition">
707 <p class="first admonition-title">And, by the way...</p>
708 <p class="last">You can make up your own admonition too.</p>
709 </div>
710 </div>
711 <div class="section" id="topics-sidebars-and-rubrics">
712 <h3><a class="toc-backref" href="#id77">2.14.4&nbsp;&nbsp;&nbsp;Topics, Sidebars, and Rubrics</a></h3>
713 <p><em>Sidebars</em> are like miniature, parallel documents.</p>
714 <div class="sidebar">
715 <p class="first sidebar-title">Sidebar Title</p>
716 <p class="sidebar-subtitle">Optional Subtitle</p>
717 <p>This is a sidebar. It is for text outside the flow of the main
718 text.</p>
719 <p class="rubric">This is a rubric inside a sidebar</p>
720 <p class="last">Sidebars often appear beside the main text with a border and a different
721 background or font color.</p>
722 </div>
723 <p>A <em>topic</em> is like a block quote with a title, or a self-contained section
724 with no subsections.</p>
725 <div class="topic">
726 <p class="topic-title first">Topic Title</p>
727 <p>This is a topic.</p>
728 </div>
729 <p>A <em>rubric</em> is like an informal heading that doesn't correspond to the
730 document's structure. It is typically highlighted in red (hence the name).</p>
731 <p class="rubric">This is a rubric</p>
732 <p>Topics and rubrics can be used at places where a <a class="reference internal" href="#section-title">section title</a> is not
733 allowed (e.g. inside a directive).</p>
734 </div>
735 <div class="section" id="target-footnotes">
736 <h3><a class="toc-backref" href="#id78">2.14.5&nbsp;&nbsp;&nbsp;Target Footnotes</a></h3>
737 <table class="docutils footnote" frame="void" id="id25" rules="none">
738 <colgroup><col class="label" /><col /></colgroup>
739 <tbody valign="top">
740 <tr><td class="label">[5]</td><td><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="#id29">4</a>)</em> <a class="reference external" href="http://www.python.org/">http://www.python.org/</a></td></tr>
741 </tbody>
742 </table>
743 <table class="docutils footnote" frame="void" id="id30" rules="none">
744 <colgroup><col class="label" /><col /></colgroup>
745 <tbody valign="top">
746 <tr><td class="label"><a class="fn-backref" href="#id31">[6]</a></td><td><a class="reference external" href="http://docutils.sourceforge.net/">http://docutils.sourceforge.net/</a></td></tr>
747 </tbody>
748 </table>
749 </div>
750 <div class="section" id="replacement-text">
751 <h3><a class="toc-backref" href="#id79">2.14.6&nbsp;&nbsp;&nbsp;Replacement Text</a></h3>
752 <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>
753 </div>
754 <div class="section" id="compound-paragraph">
755 <h3><a class="toc-backref" href="#id80">2.14.7&nbsp;&nbsp;&nbsp;Compound Paragraph</a></h3>
756 <div class="some-class compound">
757 <p class="compound-first">Compound 1, paragraph 1.</p>
758 <p class="compound-middle">Compound 1, paragraph 2.</p>
759 <ul class="compound-last simple">
760 <li>Compound 1, list item one.</li>
761 <li>Compound 1, list item two.</li>
762 </ul>
763 </div>
764 <p>Another compound statement:</p>
765 <div class="compound">
766 <p class="compound-first">Compound 2, a literal block:</p>
767 <pre class="compound-middle literal-block">
768 Compound 2, literal.
769 </pre>
770 <p class="compound-last">Compound 2, this is a test.</p>
771 </div>
772 <div class="compound">
773 <p>Compound 3, only consisting of one paragraph.</p>
774 </div>
775 <div class="compound">
776 <pre class="compound-first literal-block">
777 Compound 4.
778 This one starts with a literal block.
779 </pre>
780 <p class="compound-last">Compound 4, a paragraph.</p>
781 </div>
782 <p>Now something <em>really</em> perverted -- a nested compound block. This is
783 just to test that it works at all; the results don't have to be
784 meaningful.</p>
785 <div class="compound">
786 <p class="compound-first">Compound 5, block 1 (a paragraph).</p>
787 <div class="compound-middle compound">
788 <p class="compound-first">Compound 6, block 2 in compound 5.</p>
789 <p class="compound-last">Compound 6, another paragraph.</p>
790 </div>
791 <p class="compound-last">Compound 5, block 3 (a paragraph).</p>
792 </div>
793 <div class="compound">
794 <p class="compound-first">Compound 7, with a table inside:</p>
795 <table border="1" class="compound-middle docutils">
796 <colgroup>
797 <col width="33%" />
798 <col width="33%" />
799 <col width="33%" />
800 </colgroup>
801 <tbody valign="top">
802 <tr><td><p class="first">Left cell, first
803 paragraph.</p>
804 <p class="last">Left cell, second
805 paragraph.</p>
806 </td>
807 <td>Middle cell,
808 consisting of
809 exactly one
810 paragraph.</td>
811 <td><p class="first">Right cell.</p>
812 <p>Paragraph 2.</p>
813 <p class="last">Paragraph 3.</p>
814 </td>
815 </tr>
816 </tbody>
817 </table>
818 <p class="compound-middle">Compound 7, a paragraph after the table.</p>
819 <p class="compound-last">Compound 7, another paragraph.</p>
820 </div>
821 </div>
822 <div class="section" id="parsed-literal-blocks">
823 <h3><a class="toc-backref" href="#id81">2.14.8&nbsp;&nbsp;&nbsp;Parsed Literal Blocks</a></h3>
824 <pre class="literal-block">
825 This is a parsed literal block.
826 This line is indented. The next line is blank.
828 Inline markup is supported, e.g. <em>emphasis</em>, <strong>strong</strong>, <tt class="docutils literal">literal
829 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>.
830 </pre>
831 </div>
832 </div>
833 <div class="section" id="substitution-definitions">
834 <h2><a class="toc-backref" href="#id62">2.15&nbsp;&nbsp;&nbsp;Substitution Definitions</a></h2>
835 <p>An inline image (<img alt="EXAMPLE" src="../../../docs/user/rst/images/biohazard.png" />) example:</p>
836 <p>(Substitution definitions are not visible in the HTML source.)</p>
837 </div>
838 <div class="section" id="comments">
839 <h2><a class="toc-backref" href="#id63">2.16&nbsp;&nbsp;&nbsp;Comments</a></h2>
840 <p>Here's one:</p>
841 <!-- Comments begin with two dots and a space. Anything may
842 follow, except for the syntax of footnotes, hyperlink
843 targets, directives, or substitution definitions.
845 Double-dashes - - "- -" - - must be escaped somehow in HTML output.
847 Comments may contain non-ASCII characters: ä ö ü æ ø å -->
848 <p>(View the HTML source to see the comment.)</p>
849 </div>
850 <div class="section" id="raw-text">
851 <h2><a class="toc-backref" href="#id64">2.17&nbsp;&nbsp;&nbsp;Raw text</a></h2>
852 <p>This does not necessarily look nice, because there may be missing white space.</p>
853 <p>It's just there to freeze the behavior.</p>
854 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>
855 Fifth test in HTML.<br />Line two.</div>
856 <div class="section" id="container">
857 <h2><a class="toc-backref" href="#id65">2.18&nbsp;&nbsp;&nbsp;Container</a></h2>
858 <div class="custom container">
859 <p>paragraph 1</p>
860 <p>paragraph 2</p>
861 </div>
862 </div>
863 <div class="section" id="colspanning-tables">
864 <h2><a class="toc-backref" href="#id66">2.19&nbsp;&nbsp;&nbsp;Colspanning tables</a></h2>
865 <p>This table has a cell spanning two columns:</p>
866 <table border="1" class="docutils">
867 <colgroup>
868 <col width="31%" />
869 <col width="31%" />
870 <col width="38%" />
871 </colgroup>
872 <thead valign="bottom">
873 <tr><th class="head" colspan="2">Inputs</th>
874 <th class="head">Output</th>
875 </tr>
876 <tr><th class="head">A</th>
877 <th class="head">B</th>
878 <th class="head">A or B</th>
879 </tr>
880 </thead>
881 <tbody valign="top">
882 <tr><td>False</td>
883 <td>False</td>
884 <td>False</td>
885 </tr>
886 <tr><td>True</td>
887 <td>False</td>
888 <td>True</td>
889 </tr>
890 <tr><td>False</td>
891 <td>True</td>
892 <td>True</td>
893 </tr>
894 <tr><td>True</td>
895 <td>True</td>
896 <td>True</td>
897 </tr>
898 </tbody>
899 </table>
900 </div>
901 <div class="section" id="rowspanning-tables">
902 <h2><a class="toc-backref" href="#id67">2.20&nbsp;&nbsp;&nbsp;Rowspanning tables</a></h2>
903 <p>Here's a table with cells spanning several rows:</p>
904 <table border="1" class="docutils">
905 <colgroup>
906 <col width="44%" />
907 <col width="22%" />
908 <col width="33%" />
909 </colgroup>
910 <thead valign="bottom">
911 <tr><th class="head">Header row, column 1
912 (header rows optional)</th>
913 <th class="head">Header 2</th>
914 <th class="head">Header 3</th>
915 </tr>
916 </thead>
917 <tbody valign="top">
918 <tr><td>body row 1, column 1</td>
919 <td>column 2</td>
920 <td>column 3</td>
921 </tr>
922 <tr><td>body row 2</td>
923 <td rowspan="2">Cells may
924 span rows.</td>
925 <td rowspan="2">Another
926 rowspanning
927 cell.</td>
928 </tr>
929 <tr><td>body row 3</td>
930 </tr>
931 </tbody>
932 </table>
933 </div>
934 <div class="section" id="complex-tables">
935 <h2><a class="toc-backref" href="#id68">2.21&nbsp;&nbsp;&nbsp;Complex tables</a></h2>
936 <p>Here's a complex table, which should test all features.</p>
937 <table border="1" class="docutils">
938 <colgroup>
939 <col width="43%" />
940 <col width="21%" />
941 <col width="18%" />
942 <col width="18%" />
943 </colgroup>
944 <thead valign="bottom">
945 <tr><th class="head">Header row, column 1
946 (header rows optional)</th>
947 <th class="head">Header 2</th>
948 <th class="head">Header 3</th>
949 <th class="head">Header 4</th>
950 </tr>
951 </thead>
952 <tbody valign="top">
953 <tr><td>body row 1, column 1</td>
954 <td>column 2</td>
955 <td>column 3</td>
956 <td>column 4</td>
957 </tr>
958 <tr><td>body row 2</td>
959 <td colspan="3">Cells may span columns.</td>
960 </tr>
961 <tr><td>body row 3</td>
962 <td rowspan="2"><p class="first">Cells may
963 span rows.</p>
964 <p class="last">Paragraph.</p>
965 </td>
966 <td colspan="2" rowspan="2"><ul class="first last simple">
967 <li>Table cells</li>
968 <li>contain</li>
969 <li>body elements.</li>
970 </ul>
971 </td>
972 </tr>
973 <tr><td>body row 4</td>
974 </tr>
975 <tr><td>body row 5</td>
976 <td colspan="2">Cells may also be
977 empty: <tt class="docutils literal"><span class="pre">--&gt;</span></tt></td>
978 <td>&nbsp;</td>
979 </tr>
980 </tbody>
981 </table>
982 </div>
983 <div class="section" id="list-tables">
984 <h2><a class="toc-backref" href="#id69">2.22&nbsp;&nbsp;&nbsp;List Tables</a></h2>
985 <p>Here's a list table exercising all features:</p>
986 <table border="1" class="test docutils">
987 <caption>list table with integral header</caption>
988 <colgroup>
989 <col width="17%" />
990 <col width="33%" />
991 <col width="50%" />
992 </colgroup>
993 <thead valign="bottom">
994 <tr><th class="head stub">Treat</th>
995 <th class="head">Quantity</th>
996 <th class="head">Description</th>
997 </tr>
998 </thead>
999 <tbody valign="top">
1000 <tr><th class="stub">Albatross</th>
1001 <td>2.99</td>
1002 <td>On a stick!</td>
1003 </tr>
1004 <tr><th class="stub">Crunchy Frog</th>
1005 <td>1.49</td>
1006 <td>If we took the bones out, it wouldn't be
1007 crunchy, now would it?</td>
1008 </tr>
1009 <tr><th class="stub">Gannet Ripple</th>
1010 <td>1.99</td>
1011 <td>On a stick!</td>
1012 </tr>
1013 </tbody>
1014 </table>
1015 </div>
1016 <div class="section" id="custom-roles">
1017 <h2><a class="toc-backref" href="#id70">2.23&nbsp;&nbsp;&nbsp;Custom Roles</a></h2>
1018 <ul>
1019 <li><p class="first">A role based on an existing role.</p>
1020 <p><tt class="custom docutils literal">one</tt> <tt class="custom docutils literal">two</tt> <tt class="custom docutils literal">three</tt></p>
1021 </li>
1022 <li><p class="first">A new role.</p>
1023 <p><span class="customnew">one two three</span></p>
1024 </li>
1025 <li><p class="first">A role with class attribute.</p>
1026 <p><span class="special">interpreted text</span></p>
1027 </li>
1028 <li><p class="first">A language-switching role:</p>
1029 <p>Let's count in German <span lang="de">eins zwei drei</span>.</p>
1030 </li>
1031 <li><p class="first">A role with multiple class attributes, styled with raw directives:</p>
1032 <p>The following works in most browsers but does not validate
1033 (<tt class="docutils literal">&lt;style&gt;</tt> is only allowed in the document head):</p>
1034 <pre class="literal-block">
1035 .. raw:: html
1037 &lt;style type=&quot;text/css&quot;&gt;&lt;!--
1038 .green {color: green;}
1039 .sc {font-variant: small-caps;}
1040 --&gt;&lt;/style&gt;
1041 </pre>
1042 <p><span class="green sc" lang="en-gb">British colourful text in small-caps</span>.</p>
1043 </li>
1044 </ul>
1045 </div>
1046 <div class="section" id="svg-images">
1047 <h2><a class="toc-backref" href="#id71">2.24&nbsp;&nbsp;&nbsp;SVG Images</a></h2>
1048 <object data="../../../docs/user/rst/images/biohazard.svg" style="width: 48px; height: 48px;" type="image/svg+xml">
1049 ../../../docs/user/rst/images/biohazard.svg</object>
1050 <p>Scalable vector graphics (SVG) images are not supported by all backends.
1051 Rendering depends partially on the backend, especially if the size is
1052 not explicitely given.</p>
1053 <object class="align-left" data="../../../docs/user/rst/images/title-scaling.svg" style="width: 50%;" type="image/svg+xml">
1054 ../../../docs/user/rst/images/title-scaling.svg</object>
1055 <p>A scaling image occupying 50% of the line width (scales with the
1056 browser window).</p>
1057 <p>Whether an SVG image is scaled or clipped/padded cannot be set in the
1058 containing HTML. It depends on the viewport declaration inside its
1059 root &lt;svg&gt; element.</p>
1060 <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>
1061 <object class="align-right" data="../../../docs/user/rst/images/title-scaling.svg" style="width: 50%; height: 1.2em;" type="image/svg+xml">
1062 ../../../docs/user/rst/images/title-scaling.svg</object>
1063 <p>A scaling image occupying 50% of the line width and 1.2 em high,
1064 right aligned (this SVG image keeps the aspect ratio):</p>
1065 <object class="align-left" data="../../../docs/user/rst/images/biohazard-scaling.svg" style="height: 1em;" type="image/svg+xml">
1066 ../../../docs/user/rst/images/biohazard-scaling.svg</object>
1067 <p>A scaling image 1 em high, left aligned.</p>
1068 <p>A scaling image 5 mm x 5 mm, centered, with hyperlink reference:</p>
1069 <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>
1070 <object class="align-left" data="../../../docs/user/rst/images/biohazard.svg" style="width: 4cm; height: 2em;" type="image/svg+xml">
1071 ../../../docs/user/rst/images/biohazard.svg</object>
1072 <p>A fixed-size image in a 4 cm x 2 em box.</p>
1073 <object class="align-left" data="../../../docs/user/rst/images/title.svg" style="width: 50%; height: 15px;" type="image/svg+xml">
1074 ../../../docs/user/rst/images/title.svg</object>
1075 <p>A fixed-size image in a box 50% the line width and 15 pixle high.</p>
1076 <div class="figure">
1077 <object data="../../../docs/user/rst/images/title.svg" style="width: 290px; height: 28px;" type="image/svg+xml">
1078 reStructuredText, the markup syntax</object>
1079 <p class="caption">SVG image in a figure.</p>
1080 </div>
1081 </div>
1082 <div class="section" id="swf-images">
1083 <h2><a class="toc-backref" href="#id72">2.25&nbsp;&nbsp;&nbsp;SWF Images</a></h2>
1084 <p>Shockwave Flash is an image/movie format that most modern web browsers
1085 support via a plugin. It is sometimes blocked due to privacy/security
1086 concerns.</p>
1087 <p>Images with extension <tt class="docutils literal">.swf</tt> are placed inside &lt;object&gt; elements.
1088 For complete control over display options use raw HTML.</p>
1089 <object class="align-left" data="../../../docs/user/rst/images/biohazard.swf" style="width: 4cm; height: 2em;" type="application/x-shockwave-flash">
1090 [biohazard.swf]</object>
1091 <p>An SWF image in a 4 cm x 2 em box, left aligned.</p>
1092 <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 8.0 em x 0.8 em.</p>
1093 </div>
1094 </div>
1095 <div class="section" id="error-handling">
1096 <h1><a class="toc-backref" href="#id73">3&nbsp;&nbsp;&nbsp;Error Handling</a></h1>
1097 <p>Any errors caught during processing will generate system messages.</p>
1098 <p>There should be five messages in the following, auto-generated
1099 section, &quot;Docutils System Messages&quot;:</p>
1100 <!-- section should be added by Docutils automatically -->
1101 </div>
1102 <div class="system-messages section">
1103 <h1>Docutils System Messages</h1>
1104 <div class="system-message" id="id23">
1105 <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>
1106 Undefined substitution referenced: &quot;problematic&quot;.</div>
1107 <div class="system-message" id="id82">
1108 <p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">functional/input/data/standard.txt</tt>, line 390); <em><a href="#id83">backlink</a></em></p>
1109 Unknown target name: &quot;5&quot;.</div>
1110 <div class="system-message" id="id84">
1111 <p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">functional/input/data/standard.txt</tt>, line 399); <em><a href="#id85">backlink</a></em></p>
1112 Unknown target name: &quot;nonexistent&quot;.</div>
1113 <div class="system-message" id="id86">
1114 <p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">functional/input/data/standard.txt</tt>, line 426); <em><a href="#id87">backlink</a></em></p>
1115 Unknown target name: &quot;hyperlink reference without a target&quot;.</div>
1116 <div class="system-message" id="id88">
1117 <p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">functional/input/data/standard.txt</tt>, line 439); <em><a href="#id89">backlink</a></em></p>
1118 Duplicate target name, cannot be used as a unique reference: &quot;duplicate target names&quot;.</div>
1119 </div>
1120 </div>
1121 <div class="footer">
1122 <hr class="footer" />
1123 <p>Document footer</p>
1124 <p><a class="reference external" href="http://validator.w3.org/check?uri=referer"><img alt="Valid XHTML 1.0!" src="http://www.w3.org/Icons/valid-xhtml10" 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>
1126 </div>
1127 </body>
1128 </html>