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