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