2 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
4 <meta charset=
"utf-8"/>
5 <meta name=
"generator" content=
"Docutils 0.13: http://docutils.sourceforge.net/" />
6 <title>reStructuredText Test Document
</title>
7 <meta name=
"author" content=
"David Goodger" />
8 <meta content=
"reStructuredText, test, parser" name=
"keywords" />
9 <meta content=
"A test document, containing at least one example of each reStructuredText construct." lang=
"en" name=
"description" xml:
lang=
"en" />
10 <link rel=
"stylesheet" href=
"../input/data/minimal.css" type=
"text/css" />
11 <link rel=
"stylesheet" href=
"../input/data/plain.css" type=
"text/css" />
12 <link rel=
"stylesheet" href=
"../input/data/math.css" type=
"text/css" />
16 <p>Document header
</p>
20 <div class=
"document" id=
"restructuredtext-test-document">
21 <span id=
"doctitle"></span>
22 <h1 class=
"title">reStructuredText Test Document
</h1>
24 <p class=
"subtitle" id=
"examples-of-syntax-constructs"><span id=
"subtitle"></span>Examples of Syntax Constructs
</p>
26 <dt class=
"author">Author
</dt>
27 <dd class=
"author"><p>David Goodger
</p></dd>
28 <dt class=
"address">Address
</dt>
29 <dd class=
"address"><pre class=
"address">123 Example Street
34 <dt class=
"contact">Contact
</dt>
35 <dd class=
"contact"><a class=
"reference external" href=
"mailto:goodger@python.org">goodger
@python.org
</a></dd>
36 <dt class=
"authors">Authors
</dt>
37 <dd class=
"authors"><p>Me
</p>
41 <dt class=
"organization">Organization
</dt>
42 <dd class=
"organization">humankind
</dd>
43 <dt class=
"date">Date
</dt>
44 <dd class=
"date">Now, or yesterday. Or maybe even
<em>before
</em> yesterday.
</dd>
45 <dt class=
"status">Status
</dt>
46 <dd class=
"status">This is a
"work in progress
"</dd>
47 <dt class=
"revision">Revision
</dt>
48 <dd class=
"revision">is managed by a version control system.
</dd>
49 <dt class=
"version">Version
</dt>
50 <dd class=
"version">1</dd>
51 <dt class=
"copyright">Copyright
</dt>
52 <dd class=
"copyright">This document has been placed in the public domain. You
53 may do with it as you wish. You may copy, modify,
54 redistribute, reattribute, sell, buy, rent, lease,
55 destroy, or improve it, quote it at length, excerpt,
56 incorporate, collate, fold, staple, or mutilate it, or do
57 anything else to it that your or anyone else's heart
59 <dt class=
"field-name">field name
</dt>
60 <dd class=
"field-name"><p>This is a
"generic bibliographic field
".
</p>
62 <dt class=
"field-name-2">field name
"2"</dt>
63 <dd class=
"field-name-2"><p>Generic bibliographic fields may contain multiple body elements.
</p>
67 <div class=
"dedication topic">
68 <p class=
"topic-title first">Dedication
</p>
69 <p>For Docutils users
& co-developers.
</p>
71 <div class=
"abstract topic">
72 <p class=
"topic-title first">Abstract
</p>
73 <p>This is a test document, containing at least one example of each
74 reStructuredText construct.
</p>
76 <!-- This is a comment. Note how any initial comments are moved by
77 transforms to after the document title, subtitle, and docinfo. -->
78 <!-- Above is the document title, and below is the subtitle.
79 They are transformed from section titles after parsing. -->
80 <!-- bibliographic fields (which also require a transform): -->
81 <div class=
"contents topic" id=
"table-of-contents">
82 <p class=
"topic-title first">Table of Contents
</p>
83 <ul class=
"auto-toc simple">
84 <li><p><a class=
"reference internal" href=
"#structural-elements" id=
"id38"><span class=
"sectnum">1</span> Structural Elements
</a></p>
86 <li><p><a class=
"reference internal" href=
"#section-title" id=
"id39"><span class=
"sectnum">1.1</span> Section Title
</a></p></li>
87 <li><p><a class=
"reference internal" href=
"#empty-section" id=
"id40"><span class=
"sectnum">1.2</span> Empty Section
</a></p></li>
88 <li><p><a class=
"reference internal" href=
"#transitions" id=
"id41"><span class=
"sectnum">1.3</span> Transitions
</a></p></li>
91 <li><p><a class=
"reference internal" href=
"#body-elements" id=
"id42"><span class=
"sectnum">2</span> Body Elements
</a></p>
93 <li><p><a class=
"reference internal" href=
"#paragraphs" id=
"id43"><span class=
"sectnum">2.1</span> Paragraphs
</a></p>
95 <li><p><a class=
"reference internal" href=
"#inline-markup" id=
"id44"><span class=
"sectnum">2.1.1</span> Inline Markup
</a></p></li>
98 <li><p><a class=
"reference internal" href=
"#bullet-lists" id=
"id45"><span class=
"sectnum">2.2</span> Bullet Lists
</a></p></li>
99 <li><p><a class=
"reference internal" href=
"#enumerated-lists" id=
"id46"><span class=
"sectnum">2.3</span> Enumerated Lists
</a></p></li>
100 <li><p><a class=
"reference internal" href=
"#definition-lists" id=
"id47"><span class=
"sectnum">2.4</span> Definition Lists
</a></p></li>
101 <li><p><a class=
"reference internal" href=
"#field-lists" id=
"id48"><span class=
"sectnum">2.5</span> Field Lists
</a></p></li>
102 <li><p><a class=
"reference internal" href=
"#option-lists" id=
"id49"><span class=
"sectnum">2.6</span> Option Lists
</a></p></li>
103 <li><p><a class=
"reference internal" href=
"#literal-blocks" id=
"id50"><span class=
"sectnum">2.7</span> Literal Blocks
</a></p></li>
104 <li><p><a class=
"reference internal" href=
"#line-blocks" id=
"id51"><span class=
"sectnum">2.8</span> Line Blocks
</a></p></li>
105 <li><p><a class=
"reference internal" href=
"#block-quotes" id=
"id52"><span class=
"sectnum">2.9</span> Block Quotes
</a></p></li>
106 <li><p><a class=
"reference internal" href=
"#doctest-blocks" id=
"id53"><span class=
"sectnum">2.10</span> Doctest Blocks
</a></p></li>
107 <li><p><a class=
"reference internal" href=
"#footnotes" id=
"id54"><span class=
"sectnum">2.11</span> Footnotes
</a></p></li>
108 <li><p><a class=
"reference internal" href=
"#citations" id=
"id55"><span class=
"sectnum">2.12</span> Citations
</a></p></li>
109 <li><p><a class=
"reference internal" href=
"#targets" id=
"id56"><span class=
"sectnum">2.13</span> Targets
</a></p>
110 <ul class=
"auto-toc">
111 <li><p><a class=
"reference internal" href=
"#duplicate-target-names" id=
"id57"><span class=
"sectnum">2.13.1</span> Duplicate Target Names
</a></p></li>
112 <li><p><a class=
"reference internal" href=
"#id21" id=
"id58"><span class=
"sectnum">2.13.2</span> Duplicate Target Names
</a></p></li>
115 <li><p><a class=
"reference internal" href=
"#directives" id=
"id59"><span class=
"sectnum">2.14</span> Directives
</a></p>
116 <ul class=
"auto-toc">
117 <li><p><a class=
"reference internal" href=
"#document-parts" id=
"id60"><span class=
"sectnum">2.14.1</span> Document Parts
</a></p></li>
118 <li><p><a class=
"reference internal" href=
"#images-and-figures" id=
"id61"><span class=
"sectnum">2.14.2</span> Images and Figures
</a></p></li>
119 <li><p><a class=
"reference internal" href=
"#admonitions" id=
"id62"><span class=
"sectnum">2.14.3</span> Admonitions
</a></p></li>
120 <li><p><a class=
"reference internal" href=
"#topics-sidebars-and-rubrics" id=
"id63"><span class=
"sectnum">2.14.4</span> Topics, Sidebars, and Rubrics
</a></p></li>
121 <li><p><a class=
"reference internal" href=
"#target-footnotes" id=
"id64"><span class=
"sectnum">2.14.5</span> Target Footnotes
</a></p></li>
122 <li><p><a class=
"reference internal" href=
"#replacement-text" id=
"id65"><span class=
"sectnum">2.14.6</span> Replacement Text
</a></p></li>
123 <li><p><a class=
"reference internal" href=
"#compound-paragraph" id=
"id66"><span class=
"sectnum">2.14.7</span> Compound Paragraph
</a></p></li>
124 <li><p><a class=
"reference internal" href=
"#parsed-literal-blocks" id=
"id67"><span class=
"sectnum">2.14.8</span> Parsed Literal Blocks
</a></p></li>
125 <li><p><a class=
"reference internal" href=
"#code" id=
"id68"><span class=
"sectnum">2.14.9</span> Code
</a></p></li>
128 <li><p><a class=
"reference internal" href=
"#substitution-definitions" id=
"id69"><span class=
"sectnum">2.15</span> Substitution Definitions
</a></p></li>
129 <li><p><a class=
"reference internal" href=
"#comments" id=
"id70"><span class=
"sectnum">2.16</span> Comments
</a></p></li>
130 <li><p><a class=
"reference internal" href=
"#raw-text" id=
"id71"><span class=
"sectnum">2.17</span> Raw text
</a></p></li>
131 <li><p><a class=
"reference internal" href=
"#container" id=
"id72"><span class=
"sectnum">2.18</span> Container
</a></p></li>
132 <li><p><a class=
"reference internal" href=
"#colspanning-tables" id=
"id73"><span class=
"sectnum">2.19</span> Colspanning tables
</a></p></li>
133 <li><p><a class=
"reference internal" href=
"#rowspanning-tables" id=
"id74"><span class=
"sectnum">2.20</span> Rowspanning tables
</a></p></li>
134 <li><p><a class=
"reference internal" href=
"#complex-tables" id=
"id75"><span class=
"sectnum">2.21</span> Complex tables
</a></p></li>
135 <li><p><a class=
"reference internal" href=
"#list-tables" id=
"id76"><span class=
"sectnum">2.22</span> List Tables
</a></p></li>
136 <li><p><a class=
"reference internal" href=
"#custom-roles" id=
"id77"><span class=
"sectnum">2.23</span> Custom Roles
</a></p></li>
137 <li><p><a class=
"reference internal" href=
"#svg-images" id=
"id78"><span class=
"sectnum">2.24</span> SVG Images
</a></p></li>
138 <li><p><a class=
"reference internal" href=
"#swf-images" id=
"id79"><span class=
"sectnum">2.25</span> SWF Images
</a></p></li>
141 <li><p><a class=
"reference internal" href=
"#changes-to-the-html4css1-writer" id=
"id80"><span class=
"sectnum">3</span> Changes to the html4css1 writer
</a></p>
142 <ul class=
"auto-toc">
143 <li><p><a class=
"reference internal" href=
"#field-list-handling" id=
"id81"><span class=
"sectnum">3.1</span> Field list handling
</a></p></li>
144 <li><p><a class=
"reference internal" href=
"#styling-with-class-arguments" id=
"id82"><span class=
"sectnum">3.2</span> Styling with class arguments
</a></p>
145 <ul class=
"auto-toc">
146 <li><p><a class=
"reference internal" href=
"#description-lists" id=
"id83"><span class=
"sectnum">3.2.1</span> Description lists
</a></p></li>
147 <li><p><a class=
"reference internal" href=
"#field-list-variants" id=
"id84"><span class=
"sectnum">3.2.2</span> Field list variants
</a></p></li>
148 <li><p><a class=
"reference internal" href=
"#table-variants" id=
"id85"><span class=
"sectnum">3.2.3</span> Table variants
</a></p></li>
153 <li><p><a class=
"reference internal" href=
"#error-handling" id=
"id86"><span class=
"sectnum">4</span> Error Handling
</a></p></li>
156 <div class=
"section" id=
"structural-elements">
157 <h1><a class=
"toc-backref" href=
"#id38"><span class=
"sectnum">1</span> Structural Elements
</a></h1>
158 <div class=
"section" id=
"section-title">
159 <h2 class=
"with-subtitle"><a class=
"toc-backref" href=
"#id39"><span class=
"sectnum">1.1</span> Section Title
</a></h2>
160 <p class=
"section-subtitle" id=
"section-subtitle">Section Subtitle
</p>
161 <p>Lone subsections are converted to a section subtitle by a transform
162 activated with the
<span class=
"docutils literal"><span class=
"pre">--section-subtitles
</span></span> command line option or the
163 <span class=
"docutils literal"><span class=
"pre">sectsubtitle-xform
</span></span> configuration value.
</p>
165 <div class=
"section" id=
"empty-section">
166 <h2><a class=
"toc-backref" href=
"#id40"><span class=
"sectnum">1.2</span> Empty Section
</a></h2>
168 <div class=
"section" id=
"transitions">
169 <h2><a class=
"toc-backref" href=
"#id41"><span class=
"sectnum">1.3</span> Transitions
</a></h2>
170 <p>Here's a transition:
</p>
171 <hr class=
"docutils" />
172 <p>It divides the section. Transitions may also occur between sections:
</p>
175 <hr class=
"docutils" />
176 <div class=
"section" id=
"body-elements">
177 <h1><a class=
"toc-backref" href=
"#id42"><span class=
"sectnum">2</span> Body Elements
</a></h1>
178 <div class=
"section" id=
"paragraphs">
179 <h2><a class=
"toc-backref" href=
"#id43"><span class=
"sectnum">2.1</span> Paragraphs
</a></h2>
181 <div class=
"section" id=
"inline-markup">
182 <h3><a class=
"toc-backref" href=
"#id44"><span class=
"sectnum">2.1.1</span> Inline Markup
</a></h3>
183 <p>Paragraphs contain text and may contain inline markup:
<em>emphasis
</em>,
184 <strong>strong emphasis
</strong>,
<span class=
"docutils literal">inline literals
</span>, standalone hyperlinks
185 (
<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 brackets" href=
"#id25" id=
"id26">5</a>), internal
186 cross-references (
<a class=
"reference internal" href=
"#example">example
</a>), external hyperlinks with embedded URIs
187 (
<a class=
"reference external" href=
"http://www.python.org">Python web site
</a>),
<a class=
"reference external" href=
"http://www.python.org/">anonymous hyperlink
188 references
</a> <a class=
"footnote-reference brackets" href=
"#id25" id=
"id35">5</a> (
<a class=
"reference external" href=
"http://docutils.sourceforge.net/">a second reference
</a> <a class=
"footnote-reference brackets" href=
"#id36" id=
"id37">9</a>), footnote references (manually
189 numbered
<a class=
"footnote-reference brackets" href=
"#id8" id=
"id1">1</a>, anonymous auto-numbered
<a class=
"footnote-reference brackets" href=
"#id12" id=
"id2">3</a>, labeled auto-numbered
190 <a class=
"footnote-reference brackets" href=
"#label" id=
"id3">2</a>, or symbolic
<a class=
"footnote-reference brackets" href=
"#id13" id=
"id4">*
</a>), citation references (
<a class=
"citation-reference" href=
"#cit2002" id=
"id5">[CIT2002]
</a>),
191 substitution references (
<img alt=
"EXAMPLE" src=
"../../../docs/user/rst/images/biohazard.png" />), and
<span class=
"target" id=
"inline-hyperlink-targets">inline hyperlink targets
</span>
192 (see
<a class=
"reference internal" href=
"#targets">Targets
</a> below for a reference back to here). Character-level
193 inline markup is also possible (although exceedingly ugly!) in
<em>re
</em><span class=
"docutils literal">Structured
</span><em>Text
</em>. Problems are indicated by
<a href=
"#id23"><span class=
"problematic" id=
"id24">|problematic|
</span></a> text
194 (generated by processing errors; this one is intentional). Here is a
195 reference to the
<a class=
"reference internal" href=
"#doctitle">doctitle
</a> and the
<a class=
"reference internal" href=
"#subtitle">subtitle
</a>.
</p>
196 <p>The default role for interpreted text is
<cite>Title Reference
</cite>. Here are
197 some explicit interpreted text roles: a PEP reference (
<a class=
"reference external" href=
"http://www.python.org/dev/peps/pep-0287">PEP
287</a>); an
198 RFC reference (
<a class=
"reference external" href=
"http://tools.ietf.org/html/rfc2822.html">RFC
2822</a>); an abbreviation (
<abbr>abb.
</abbr>), an acronym
199 (
<abbr>reST
</abbr>), code (
<code>print
"hello world
"</code>); a
<sub>subscript
</sub>;
200 a
<sup>superscript
</sup> and explicit roles for
<cite>Docutils
</cite>'
201 <em>standard
</em> <strong>inline
</strong> <span class=
"docutils literal">markup
</span>.
</p>
202 <!-- DO NOT RE-WRAP THE FOLLOWING PARAGRAPH! -->
203 <p>Let's test wrapping and whitespace significance in inline literals:
204 <span class=
"docutils literal">This is an example of
<span class=
"pre">--inline-literal
</span> <span class=
"pre">--text,
</span> <span class=
"pre">--including
</span> <span class=
"pre">some--
</span> <span class=
"pre">strangely--hyphenated-words.
</span> <span class=
"pre">Adjust-the-width-of-your-browser-window
</span> to see how the text is wrapped.
<span class=
"pre">--
</span> <span class=
"pre">----
</span> <span class=
"pre">--------
</span> Now note the spacing between the words of this sentence (words should be grouped in pairs).
</span></p>
205 <p>If the
<span class=
"docutils literal"><span class=
"pre">--pep-references
</span></span> option was supplied, there should be a
206 live link to PEP
258 here.
</p>
209 <div class=
"section" id=
"bullet-lists">
210 <h2><a class=
"toc-backref" href=
"#id45"><span class=
"sectnum">2.2</span> Bullet Lists
</a></h2>
212 <li><p>A bullet list
</p>
214 <li><p>Nested bullet list.
</p></li>
215 <li><p>Nested item
2.
</p></li>
219 <p>Paragraph
2 of item
2.
</p>
221 <li><p>Nested bullet list.
</p></li>
222 <li><p>Nested item
2.
</p>
224 <li><p>Third level.
</p></li>
225 <li><p>Item
2.
</p></li>
228 <li><p>Nested item
3.
</p></li>
229 <li><p>This nested list should be compacted by the HTML writer.
</p>
230 <span class=
"target" id=
"target"></span><!-- Even if this item contains a target and a comment. -->
236 <div class=
"section" id=
"enumerated-lists">
237 <h2><a class=
"toc-backref" href=
"#id46"><span class=
"sectnum">2.3</span> Enumerated Lists
</a></h2>
239 <li><p>Arabic numerals.
</p>
240 <ol class=
"loweralpha simple">
241 <li><p>lower alpha)
</p>
242 <ol class=
"lowerroman simple">
243 <li><p>(lower roman)
</p>
244 <ol class=
"upperalpha simple">
245 <li><p>upper alpha.
</p>
246 <ol class=
"upperroman simple">
247 <li><p>upper roman)
</p></li>
256 <li><p>Lists that don't start at
1:
</p>
257 <ol class=
"arabic simple" start=
"3">
258 <li><p>Three
</p></li>
261 <ol class=
"upperalpha simple" start=
"3">
265 <ol class=
"lowerroman simple" start=
"3">
272 <div class=
"section" id=
"definition-lists">
273 <h2><a class=
"toc-backref" href=
"#id47"><span class=
"sectnum">2.4</span> Definition Lists
</a></h2>
276 <dd><p>Definition
</p>
278 <dt>Term
<span class=
"classifier">classifier
</span></dt>
279 <dd><p>Definition paragraph
1.
</p>
280 <p>Definition paragraph
2.
</p>
283 <dd><p>Definition
</p>
285 <dt>Term
<span class=
"classifier">classifier one
</span><span class=
"classifier">classifier two
</span></dt>
286 <dd><p>Definition
</p>
290 <div class=
"section" id=
"field-lists">
291 <h2><a class=
"toc-backref" href=
"#id48"><span class=
"sectnum">2.5</span> Field Lists
</a></h2>
292 <dl class=
"field-list">
294 <dd><p>Field lists map field names to field bodies, like database
295 records. They are often part of an extension syntax. They are
296 an unambiguous variant of RFC
2822 fields.
</p>
298 <dt>how arg1 arg2
</dt>
299 <dd><p>The field marker is a colon, the field name, and a colon.
</p>
300 <p>The field body may contain one or more body elements, indented
301 relative to the field marker.
</p>
304 <dd><p class=
"credits">This paragraph has the
<cite>credits
</cite> class set. (This is actually not
305 about credits but just for ensuring that the class attribute
306 doesn't get stripped away.)
</p>
310 <div class=
"section" id=
"option-lists">
311 <h2><a class=
"toc-backref" href=
"#id49"><span class=
"sectnum">2.6</span> Option Lists
</a></h2>
312 <p>For listing command-line options:
</p>
313 <dl class=
"option-list">
314 <dt><kbd><span class=
"option">-a
</span></kbd></dt>
315 <dd><p>command-line option
"a
"</p>
317 <dt><kbd><span class=
"option">-b
<var>file
</var></span></kbd></dt>
318 <dd><p>options can have arguments
319 and long descriptions
</p>
321 <dt><kbd><span class=
"option">--long
</span></kbd></dt>
322 <dd><p>options can be long also
</p>
324 <dt><kbd><span class=
"option">--input=
<var>file
</var></span></kbd></dt>
325 <dd><p>long options can also have
328 <dt><kbd><span class=
"option">--very-long-option
</span></kbd></dt>
329 <dd><p>The description can also start on the next line.
</p>
330 <p>The description may contain multiple body elements,
331 regardless of where it starts.
</p>
333 <dt><kbd><span class=
"option">-x
</span>,
<span class=
"option">-y
</span>,
<span class=
"option">-z
</span></kbd></dt>
334 <dd><p>Multiple options are an
"option group
".
</p>
336 <dt><kbd><span class=
"option">-v
</span>,
<span class=
"option">--verbose
</span></kbd></dt>
337 <dd><p>Commonly-seen: short
& long options.
</p>
339 <dt><kbd><span class=
"option">-
1 <var>file
</var></span>,
<span class=
"option">--one=
<var>file
</var></span>,
<span class=
"option">--two
<var>file
</var></span></kbd></dt>
340 <dd><p>Multiple options with arguments.
</p>
342 <dt><kbd><span class=
"option">/V
</span></kbd></dt>
343 <dd><p>DOS/VMS-style options too
</p>
346 <p>There must be at least two spaces between the option and the
349 <div class=
"section" id=
"literal-blocks">
350 <h2><a class=
"toc-backref" href=
"#id50"><span class=
"sectnum">2.7</span> Literal Blocks
</a></h2>
351 <p>Literal blocks are indicated with a double-colon (
"::
") at the end of
352 the preceding paragraph (over there
<span class=
"docutils literal"><span class=
"pre">--
></span></span>). They can be indented:
</p>
353 <pre class=
"literal-block">if literal_block:
354 text = 'is left as-is'
355 spaces_and_linebreaks = 'are preserved'
356 markup_processing = None
</pre>
357 <p>Or they can be quoted without indentation:
</p>
358 <pre class=
"literal-block">>> Great idea!
360 > Why didn't I think of that?
</pre>
362 <div class=
"section" id=
"line-blocks">
363 <h2><a class=
"toc-backref" href=
"#id51"><span class=
"sectnum">2.8</span> Line Blocks
</a></h2>
364 <p>This section tests line blocks. Line blocks are body elements which
365 consist of lines and other line blocks. Nested line blocks cause
367 <div class=
"line-block">
368 <div class=
"line">This is a line block. It ends with a blank line.
</div>
369 <div class=
"line-block">
370 <div class=
"line">New lines begin with a vertical bar (
"|
").
</div>
371 <div class=
"line">Line breaks and initial indent are significant, and preserved.
</div>
372 <div class=
"line-block">
373 <div class=
"line">Continuation lines are also possible. A long line that is intended
374 to wrap should begin with a space in place of the vertical bar.
</div>
376 <div class=
"line">The left edge of a continuation line need not be aligned with
377 the left edge of the text above it.
</div>
380 <div class=
"line-block">
381 <div class=
"line">This is a second line block.
</div>
382 <div class=
"line"><br /></div>
383 <div class=
"line">Blank lines are permitted internally, but they must begin with a
"|
".
</div>
385 <p>Another line block, surrounded by paragraphs:
</p>
386 <div class=
"line-block">
387 <div class=
"line">And it's no good waiting by the window
</div>
388 <div class=
"line">It's no good waiting for the sun
</div>
389 <div class=
"line">Please believe me, the things you dream of
</div>
390 <div class=
"line">They don't fall in the lap of no-one
</div>
392 <p>Take it away, Eric the Orchestra Leader!
</p>
394 <div class=
"line-block">
395 <div class=
"line">A one, two, a one two three four
</div>
396 <div class=
"line"><br /></div>
397 <div class=
"line">Half a bee, philosophically,
</div>
398 <div class=
"line-block">
399 <div class=
"line">must,
<em>ipso facto
</em>, half not be.
</div>
401 <div class=
"line">But half the bee has got to be,
</div>
402 <div class=
"line-block">
403 <div class=
"line"><em>vis a vis
</em> its entity. D'you see?
</div>
404 <div class=
"line"><br /></div>
406 <div class=
"line">But can a bee be said to be
</div>
407 <div class=
"line-block">
408 <div class=
"line">or not to be an entire bee,
</div>
409 <div class=
"line-block">
410 <div class=
"line">when half the bee is not a bee,
</div>
411 <div class=
"line-block">
412 <div class=
"line">due to some ancient injury?
</div>
413 <div class=
"line"><br /></div>
417 <div class=
"line">Singing...
</div>
420 <p>A line block, like the following poem by Christian Morgenstern, can
421 also be centre-aligned:
</p>
422 <div class=
"align-center line-block" lang=
"de">
423 <div class=
"line"><strong>Die Trichter
</strong></div>
424 <div class=
"line"><br /></div>
425 <div class=
"line">Zwei Trichter wandeln durch die Nacht.
</div>
426 <div class=
"line">Durch ihres Rumpfs verengten Schacht
</div>
427 <div class=
"line">fließt weißes Mondlicht
</div>
428 <div class=
"line">still und heiter
</div>
429 <div class=
"line">auf  ihren
</div>
430 <div class=
"line">Waldweg
</div>
431 <div class=
"line">u. s.
</div>
432 <div class=
"line">w.
</div>
433 <div class=
"line"><br /></div>
436 <div class=
"section" id=
"block-quotes">
437 <h2><a class=
"toc-backref" href=
"#id52"><span class=
"sectnum">2.9</span> Block Quotes
</a></h2>
438 <p>Block quotes consist of indented body elements:
</p>
440 <p>My theory by A. Elk. Brackets Miss, brackets. This theory goes
441 as follows and begins now. All brontosauruses are thin at one
442 end, much much thicker in the middle and then thin again at the
443 far end. That is my theory, it is mine, and belongs to me and I
444 own it, and what it is too.
</p>
445 <p class=
"attribution">—
<cite>Anne Elk (Miss)
</cite></p>
447 <p>The language of a quote (like any other object) can be specified by
448 a class attribute:
</p>
450 <blockquote lang=
"fr">
451 <p>ReStructuredText est un langage de balisage léger utilisé
452 notamment dans la documentation du langage Python.
</p>
455 <div class=
"section" id=
"doctest-blocks">
456 <h2><a class=
"toc-backref" href=
"#id53"><span class=
"sectnum">2.10</span> Doctest Blocks
</a></h2>
457 <pre class=
"code python doctest">>>> print 'Python-specific usage examples; begun with
">>>"'
458 Python-specific usage examples; begun with
">>>"
459 >>> print '(cut and pasted from interactive Python sessions)'
460 (cut and pasted from interactive Python sessions)
463 <div class=
"section" id=
"footnotes">
464 <h2><a class=
"toc-backref" href=
"#id54"><span class=
"sectnum">2.11</span> Footnotes
</a></h2>
465 <dl class=
"footnote brackets">
466 <dt class=
"label" id=
"id8"><span class=
"brackets">1</span><span class=
"fn-backref">(
<a href=
"#id1">1</a>,
<a href=
"#id9">2</a>,
<a href=
"#id22">3</a>)
</span></dt>
467 <dd><p>A footnote contains body elements, consistently indented by at
469 <p>This is the footnote's second paragraph.
</p>
471 <dt class=
"label" id=
"label"><span class=
"brackets">2</span><span class=
"fn-backref">(
<a href=
"#id3">1</a>,
<a href=
"#id10">2</a>)
</span></dt>
472 <dd><p>Footnotes may be numbered, either manually (as in
<a class=
"footnote-reference brackets" href=
"#id8" id=
"id9">1</a>) or
473 automatically using a
"#
"-prefixed label. This footnote has a
474 label so it can be referred to from multiple places, both as a
475 footnote reference (
<a class=
"footnote-reference brackets" href=
"#label" id=
"id10">2</a>) and as a
<a class=
"reference internal" href=
"#label">hyperlink reference
</a>.
</p>
477 <dt class=
"label" id=
"id12"><span class=
"brackets"><a class=
"fn-backref" href=
"#id2">3</a></span></dt>
478 <dd><p>This footnote is numbered automatically and anonymously using a
479 label of
"#
" only.
</p>
480 <p>This is the second paragraph.
</p>
481 <p>And this is the third paragraph.
</p>
483 <dt class=
"label" id=
"id13"><span class=
"brackets"><a class=
"fn-backref" href=
"#id4">*
</a></span></dt>
484 <dd><p>Footnotes may also use symbols, specified with a
"*
" label.
485 Here's a reference to the next footnote:
<a class=
"footnote-reference brackets" href=
"#id15" id=
"id14">â€
</a>.
</p>
487 <dt class=
"label" id=
"id15"><span class=
"brackets"><a class=
"fn-backref" href=
"#id14">â€
</a></span></dt>
488 <dd><p>This footnote shows the next symbol in the sequence.
</p>
490 <dt class=
"label" id=
"id16"><span class=
"brackets">4</span></dt>
491 <dd><p>Here's an unreferenced footnote, with a reference to a
492 nonexistent footnote:
<a href=
"#id96"><span class=
"problematic" id=
"id97"><span id=
"id17"></span>[
5]_
</span></a>.
</p>
496 <div class=
"section" id=
"citations">
497 <h2><a class=
"toc-backref" href=
"#id55"><span class=
"sectnum">2.12</span> Citations
</a></h2>
498 <dl class=
"citation">
499 <dt class=
"label" id=
"cit2002"><span class=
"brackets">CIT2002
</span><span class=
"fn-backref">(
<a href=
"#id5">1</a>,
<a href=
"#id18">2</a>)
</span></dt>
500 <dd><p>Citations are text-labeled footnotes. They may be
501 rendered separately and differently from footnotes.
</p>
504 <p>Here's a reference to the above,
<a class=
"citation-reference" href=
"#cit2002" id=
"id18">[CIT2002]
</a>, and a
<a href=
"#id98"><span class=
"problematic" id=
"id99"><span id=
"id19"></span>[nonexistent]_
</span></a>
507 <div class=
"section" id=
"targets">
508 <span id=
"another-target"></span><h2><a class=
"toc-backref" href=
"#id56"><span class=
"sectnum">2.13</span> Targets
</a></h2>
509 <p id=
"example">This paragraph is pointed to by the explicit
"example
" target. A
510 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
511 hyperlink targets
</a> are also possible.
</p>
512 <p>Section headers are implicit targets, referred to by name. See
513 <a class=
"reference internal" href=
"#targets">Targets
</a>, which is a subsection of
<a class=
"reference internal" href=
"#body-elements">Body Elements
</a>.
</p>
514 <p>Explicit external targets are interpolated into references such as
515 "<a class=
"reference external" href=
"http://www.python.org/">Python
</a> <a class=
"footnote-reference brackets" href=
"#id25" id=
"id27">5</a>".
</p>
516 <p>Targets may be indirect and anonymous. Thus
<a class=
"reference internal" href=
"#targets">this phrase
</a> may also
517 refer to the
<a class=
"reference internal" href=
"#targets">Targets
</a> section.
</p>
518 <p>Here's a
<a href=
"#id100"><span class=
"problematic" id=
"id101">`hyperlink reference without a target`_
</span></a>, which generates an
520 <div class=
"section" id=
"duplicate-target-names">
521 <h3><a class=
"toc-backref" href=
"#id57"><span class=
"sectnum">2.13.1</span> Duplicate Target Names
</a></h3>
522 <p>Duplicate names in section headers or other implicit targets will
523 generate
"info
" (level-
1) system messages. Duplicate names in
524 explicit targets will generate
"warning
" (level-
2) system messages.
</p>
526 <div class=
"section" id=
"id21">
527 <h3><a class=
"toc-backref" href=
"#id58"><span class=
"sectnum">2.13.2</span> Duplicate Target Names
</a></h3>
528 <p>Since there are two
"Duplicate Target Names
" section headers, we
529 cannot uniquely refer to either of them by name. If we try to (like
530 this:
<a href=
"#id102"><span class=
"problematic" id=
"id103">`Duplicate Target Names`_
</span></a>), an error is generated.
</p>
533 <div class=
"section" id=
"directives">
534 <h2><a class=
"toc-backref" href=
"#id59"><span class=
"sectnum">2.14</span> Directives
</a></h2>
535 <div class=
"contents local topic" id=
"contents">
536 <ul class=
"auto-toc simple">
537 <li><p><a class=
"reference internal" href=
"#document-parts" id=
"id87"><span class=
"sectnum">2.14.1</span> Document Parts
</a></p></li>
538 <li><p><a class=
"reference internal" href=
"#images-and-figures" id=
"id88"><span class=
"sectnum">2.14.2</span> Images and Figures
</a></p></li>
539 <li><p><a class=
"reference internal" href=
"#admonitions" id=
"id89"><span class=
"sectnum">2.14.3</span> Admonitions
</a></p></li>
540 <li><p><a class=
"reference internal" href=
"#topics-sidebars-and-rubrics" id=
"id90"><span class=
"sectnum">2.14.4</span> Topics, Sidebars, and Rubrics
</a></p></li>
541 <li><p><a class=
"reference internal" href=
"#target-footnotes" id=
"id91"><span class=
"sectnum">2.14.5</span> Target Footnotes
</a></p></li>
542 <li><p><a class=
"reference internal" href=
"#replacement-text" id=
"id92"><span class=
"sectnum">2.14.6</span> Replacement Text
</a></p></li>
543 <li><p><a class=
"reference internal" href=
"#compound-paragraph" id=
"id93"><span class=
"sectnum">2.14.7</span> Compound Paragraph
</a></p></li>
544 <li><p><a class=
"reference internal" href=
"#parsed-literal-blocks" id=
"id94"><span class=
"sectnum">2.14.8</span> Parsed Literal Blocks
</a></p></li>
545 <li><p><a class=
"reference internal" href=
"#code" id=
"id95"><span class=
"sectnum">2.14.9</span> Code
</a></p></li>
548 <p>These are just a sample of the many reStructuredText Directives. For
550 <a class=
"reference external" href=
"http://docutils.sourceforge.net/docs/ref/rst/directives.html">http://docutils.sourceforge.net/docs/ref/rst/directives.html
</a>.
</p>
551 <div class=
"section" id=
"document-parts">
552 <h3><a class=
"toc-backref" href=
"#id87"><span class=
"sectnum">2.14.1</span> Document Parts
</a></h3>
553 <p>An example of the
"contents
" directive can be seen above this section
554 (a local, untitled table of
<a class=
"reference internal" href=
"#contents">contents
</a>) and at the beginning of the
555 document (a document-wide
<a class=
"reference internal" href=
"#table-of-contents">table of contents
</a>).
</p>
557 <div class=
"section" id=
"images-and-figures">
558 <h3><a class=
"toc-backref" href=
"#id88"><span class=
"sectnum">2.14.2</span> Images and Figures
</a></h3>
559 <p>An image directive (also clickable -- a hyperlink reference):
</p>
560 <a class=
"reference internal image-reference" href=
"#directives"><img alt=
"../../../docs/user/rst/images/title.png" class=
"class1 class2" src=
"../../../docs/user/rst/images/title.png" /></a>
561 <p>Image with multiple IDs:
</p>
562 <span id=
"image-target-2"></span><span id=
"image-target-1"></span><img alt=
"../../../docs/user/rst/images/title.png" id=
"image-target-3" src=
"../../../docs/user/rst/images/title.png" />
563 <p>A centered image:
</p>
564 <img alt=
"../../../docs/user/rst/images/biohazard.png" class=
"align-center" src=
"../../../docs/user/rst/images/biohazard.png" />
565 <p>A left-aligned image:
</p>
566 <img alt=
"../../../docs/user/rst/images/biohazard.png" class=
"align-left" src=
"../../../docs/user/rst/images/biohazard.png" />
567 <p>This paragraph might flow around the image.
568 The specific behavior depends upon the style sheet and
569 the browser or rendering software used.
</p>
570 <p>A right-aligned image:
</p>
571 <img alt=
"../../../docs/user/rst/images/biohazard.png" class=
"align-right" src=
"../../../docs/user/rst/images/biohazard.png" />
572 <p>This paragraph might flow around the image.
573 The specific behavior depends upon the style sheet and
574 the browser or rendering software used.
</p>
575 <p>For inline images see
<a class=
"reference internal" href=
"#substitution-definitions">Substitution Definitions
</a>.
</p>
577 <p>An image
2 em wide:
</p>
578 <img alt=
"../../../docs/user/rst/images/biohazard.png" src=
"../../../docs/user/rst/images/biohazard.png" style=
"width: 2em;" />
579 <p>An image
2 em wide and
15 pixel high:
</p>
580 <img alt=
"../../../docs/user/rst/images/biohazard.png" src=
"../../../docs/user/rst/images/biohazard.png" style=
"width: 2em; height: 15px;" />
581 <p>An image occupying
50% of the line width:
</p>
582 <img alt=
"../../../docs/user/rst/images/title.png" src=
"../../../docs/user/rst/images/title.png" style=
"width: 50%;" />
583 <p>An image
2 cm high:
</p>
584 <img alt=
"../../../docs/user/rst/images/biohazard.png" src=
"../../../docs/user/rst/images/biohazard.png" style=
"height: 2cm;" />
585 <p>A
<em>figure
</em> is an image with a caption and/or a legend. With page-based output
586 media, figures might float to a different position if this helps the page
588 <div class=
"figclass1 figclass2 figure">
589 <img alt=
"reStructuredText, the markup syntax" class=
"class1 class2" src=
"../../../docs/user/rst/images/title.png" style=
"width: 258px;" />
590 <p class=
"caption">Plaintext markup syntax and parser system.
</p>
594 <col style=
"width: 20%" />
595 <col style=
"width: 80%" />
598 <tr><td><p>re
</p></td>
599 <td><p>Revised, revisited, based on 're' module.
</p></td>
601 <tr><td><p>Structured
</p></td>
602 <td><p>Structure-enhanced text, structuredtext.
</p></td>
604 <tr><td><p>Text
</p></td>
605 <td><p>Well it is, isn't it?
</p></td>
609 <p>This paragraph is also part of the legend.
</p>
612 <p>A left-aligned figure:
</p>
613 <div class=
"figclass1 figclass2 figure align-left" style=
"width: 70%">
614 <img alt=
"reStructuredText, the markup syntax" class=
"class1 class2" src=
"../../../docs/user/rst/images/biohazard.png" style=
"width: 40px;" />
615 <p class=
"caption">This is the caption.
</p>
617 <p>This is the legend.
</p>
618 <p>The legend may consist of several paragraphs.
</p>
621 <p>This paragraph might flow around the figure.
</p>
622 <p>The specific behavior depends upon the style sheet and the browser or
623 rendering software used.
</p>
624 <p>A centered figure:
</p>
625 <div class=
"figure align-center">
626 <img alt=
"../../../docs/user/rst/images/biohazard.png" src=
"../../../docs/user/rst/images/biohazard.png" style=
"width: 40px;" />
627 <p class=
"caption">This is the caption.
</p>
629 <p>This is the legend.
</p>
630 <p>The legend may consist of several paragraphs.
</p>
633 <p>This paragraph might flow around the figure.
</p>
634 <p>The specific behavior depends upon the style sheet and the browser or
635 rendering software used.
</p>
636 <p>A right-aligned figure:
</p>
637 <div class=
"figure align-right">
638 <img alt=
"../../../docs/user/rst/images/biohazard.png" src=
"../../../docs/user/rst/images/biohazard.png" style=
"width: 40px;" />
639 <p class=
"caption">This is the caption.
</p>
641 <p>This is the legend.
</p>
642 <p>The legend may consist of several paragraphs.
</p>
645 <p>This paragraph might flow around the figure. The specific behavior depends
646 upon the style sheet and the browser or rendering software used.
</p>
647 <p>Tables may be given titles and additional arguments with the
<em>table
</em>
649 <table class=
"align-left">
650 <caption>left-aligned table
</caption>
652 <col style=
"width: 50%" />
653 <col style=
"width: 50%" />
656 <tr><th class=
"head"><p>A
</p></th>
657 <th class=
"head"><p>not A
</p></th>
661 <tr><td><p>False
</p></td>
664 <tr><td><p>True
</p></td>
665 <td><p>False
</p></td>
669 <table class=
"align-center">
670 <caption>center-aligned table
</caption>
672 <col style=
"width: 50%" />
673 <col style=
"width: 50%" />
676 <tr><th class=
"head"><p>A
</p></th>
677 <th class=
"head"><p>not A
</p></th>
681 <tr><td><p>False
</p></td>
684 <tr><td><p>True
</p></td>
685 <td><p>False
</p></td>
689 <table class=
"align-right">
690 <caption>right-aligned table
</caption>
692 <col style=
"width: 50%" />
693 <col style=
"width: 50%" />
696 <tr><th class=
"head"><p>A
</p></th>
697 <th class=
"head"><p>not A
</p></th>
701 <tr><td><p>False
</p></td>
704 <tr><td><p>True
</p></td>
705 <td><p>False
</p></td>
710 <div class=
"section" id=
"admonitions">
711 <h3><a class=
"toc-backref" href=
"#id89"><span class=
"sectnum">2.14.3</span> Admonitions
</a></h3>
712 <div class=
"admonition attention">
713 <p class=
"admonition-title">Attention!
</p>
714 <p>Directives at large.
</p>
716 <div class=
"admonition caution">
717 <p class=
"admonition-title">Caution!
</p>
718 <p>Don't take any wooden nickels.
</p>
720 <div class=
"admonition danger">
721 <p class=
"admonition-title">!DANGER!
</p>
722 <p>Mad scientist at work!
</p>
724 <div class=
"admonition error">
725 <p class=
"admonition-title">Error
</p>
726 <p>Does not compute.
</p>
728 <div class=
"admonition hint">
729 <p class=
"admonition-title">Hint
</p>
730 <p>It's bigger than a bread box.
</p>
732 <div class=
"admonition important">
733 <p class=
"admonition-title">Important
</p>
735 <li><p>Wash behind your ears.
</p></li>
736 <li><p>Clean up your room.
</p></li>
737 <li><p>Call your mother.
</p></li>
738 <li><p>Back up your data.
</p></li>
741 <div class=
"admonition note">
742 <p class=
"admonition-title">Note
</p>
743 <p>This is a note.
</p>
745 <div class=
"admonition tip">
746 <p class=
"admonition-title">Tip
</p>
747 <p>15% if the service is good.
</p>
749 <div class=
"admonition warning">
750 <p class=
"admonition-title">Warning
</p>
751 <p>Strong prose may provoke extreme mental exertion.
752 Reader discretion is strongly advised.
</p>
754 <div class=
"admonition admonition-and-by-the-way">
755 <p class=
"admonition-title">And, by the way...
</p>
756 <p>You can make up your own admonition too.
</p>
759 <div class=
"section" id=
"topics-sidebars-and-rubrics">
760 <h3><a class=
"toc-backref" href=
"#id90"><span class=
"sectnum">2.14.4</span> Topics, Sidebars, and Rubrics
</a></h3>
761 <p><em>Sidebars
</em> are like miniature, parallel documents.
</p>
762 <div class=
"sidebar">
763 <p class=
"sidebar-title">Sidebar Title
</p>
764 <p class=
"sidebar-subtitle">Optional Subtitle
</p>
765 <p>This is a sidebar. It is for text outside the flow of the main
767 <p class=
"rubric">This is a rubric inside a sidebar
</p>
768 <p>Sidebars often appear beside the main text with a border and a different
769 background or font color.
</p>
771 <p>A
<em>topic
</em> is like a block quote with a title, or a self-contained section
772 with no subsections.
</p>
774 <p class=
"topic-title first">Topic Title
</p>
775 <p>This is a topic.
</p>
777 <p>A
<em>rubric
</em> is like an informal heading that doesn't correspond to the
778 document's structure. It is typically highlighted in red (hence the name).
</p>
779 <p class=
"rubric">This is a rubric
</p>
780 <p>Topics and rubrics can be used at places where a
<a class=
"reference internal" href=
"#section-title">section title
</a> is not
781 allowed (e.g. inside a directive).
</p>
783 <div class=
"section" id=
"target-footnotes">
784 <h3><a class=
"toc-backref" href=
"#id91"><span class=
"sectnum">2.14.5</span> Target Footnotes
</a></h3>
785 <dl class=
"footnote brackets">
786 <dt class=
"label" id=
"id25"><span class=
"brackets">5</span><span class=
"fn-backref">(
<a href=
"#id26">1</a>,
<a href=
"#id27">2</a>,
<a href=
"#id28">3</a>,
<a href=
"#id35">4</a>)
</span></dt>
787 <dd><p><a class=
"reference external" href=
"http://www.python.org/">http://www.python.org/
</a></p>
789 <dt class=
"label" id=
"id29"><span class=
"brackets"><a class=
"fn-backref" href=
"#id30">6</a></span></dt>
790 <dd><p><a class=
"reference external" href=
"http://pygments.org/">http://pygments.org/
</a></p>
792 <dt class=
"label" id=
"id31"><span class=
"brackets"><a class=
"fn-backref" href=
"#id32">7</a></span></dt>
793 <dd><p><a class=
"reference external" href=
"http://docutils.sourceforge.net/docs/user/config.html#table-style">http://docutils.sourceforge.net/docs/user/config.html#table-style
</a></p>
795 <dt class=
"label" id=
"id33"><span class=
"brackets"><a class=
"fn-backref" href=
"#id34">8</a></span></dt>
796 <dd><p><a class=
"reference external" href=
"http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf">http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf
</a></p>
798 <dt class=
"label" id=
"id36"><span class=
"brackets"><a class=
"fn-backref" href=
"#id37">9</a></span></dt>
799 <dd><p><a class=
"reference external" href=
"http://docutils.sourceforge.net/">http://docutils.sourceforge.net/
</a></p>
803 <div class=
"section" id=
"replacement-text">
804 <h3><a class=
"toc-backref" href=
"#id92"><span class=
"sectnum">2.14.6</span> Replacement Text
</a></h3>
805 <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 brackets" href=
"#id25" id=
"id28">5</a>.
</p>
807 <div class=
"section" id=
"compound-paragraph">
808 <h3><a class=
"toc-backref" href=
"#id93"><span class=
"sectnum">2.14.7</span> Compound Paragraph
</a></h3>
809 <div class=
"some-class compound">
810 <p class=
"compound-first">Compound
1, paragraph
1.
</p>
811 <p class=
"compound-middle">Compound
1, paragraph
2.
</p>
812 <ul class=
"compound-last simple">
813 <li><p>Compound
1, list item one.
</p></li>
814 <li><p>Compound
1, list item two.
</p></li>
817 <p>Another compound statement:
</p>
818 <div class=
"compound">
819 <p class=
"compound-first">Compound
2, a literal block:
</p>
820 <pre class=
"compound-middle literal-block">Compound
2, literal.
</pre>
821 <p class=
"compound-last">Compound
2, this is a test.
</p>
823 <div class=
"compound">
824 <p>Compound
3, only consisting of one paragraph.
</p>
826 <div class=
"compound">
827 <pre class=
"compound-first literal-block">Compound
4.
828 This one starts with a literal block.
</pre>
829 <p class=
"compound-last">Compound
4, a paragraph.
</p>
831 <p>Now something
<em>really
</em> perverted -- a nested compound block. This is
832 just to test that it works at all; the results don't have to be
834 <div class=
"compound">
835 <p class=
"compound-first">Compound
5, block
1 (a paragraph).
</p>
836 <div class=
"compound-middle compound">
837 <p class=
"compound-first">Compound
6, block
2 in compound
5.
</p>
838 <p class=
"compound-last">Compound
6, another paragraph.
</p>
840 <p class=
"compound-last">Compound
5, block
3 (a paragraph).
</p>
842 <div class=
"compound">
843 <p class=
"compound-first">Compound
7, with a table inside:
</p>
844 <table class=
"compound-middle">
846 <col style=
"width: 33%" />
847 <col style=
"width: 33%" />
848 <col style=
"width: 33%" />
851 <tr><td><p>Left cell, first
860 <td><p>Right cell.
</p>
867 <p class=
"compound-middle">Compound
7, a paragraph after the table.
</p>
868 <p class=
"compound-last">Compound
7, another paragraph.
</p>
871 <div class=
"section" id=
"parsed-literal-blocks">
872 <h3><a class=
"toc-backref" href=
"#id94"><span class=
"sectnum">2.14.8</span> Parsed Literal Blocks
</a></h3>
873 <pre class=
"literal-block">This is a parsed literal block.
874 This line is indented. The next line is blank.
876 Inline markup is supported, e.g.
<em>emphasis
</em>,
<strong>strong
</strong>,
<span class=
"docutils literal">literal
877 text
</span>,
<sub>sub-
</sub> and
<sup>super
</sup>scripts,
878 inline formulas:
<span class=
"formula"><i>A
</i> = 
2<i>Ï€
</i><i>r
</i><sup>2</sup></span>,
879 footnotes
<a class=
"footnote-reference brackets" href=
"#id8" id=
"id22">1</a>,
<span class=
"target" id=
"hyperlink-targets">hyperlink targets
</span>, and
<a class=
"reference external" href=
"http://www.python.org/">references
</a>.
</pre>
881 <div class=
"section" id=
"code">
882 <h3><a class=
"toc-backref" href=
"#id95"><span class=
"sectnum">2.14.9</span> Code
</a></h3>
883 <p>Blocks of source code can be set with the
<cite>code
</cite> directive. If the code
884 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 brackets" href=
"#id29" id=
"id30">6</a>
885 syntax highlighter and can be formatted with a style sheet. (Code parsing
886 is turned off using the
<span class=
"docutils literal"><span class=
"pre">syntax-highlight
</span></span> config setting in the test
887 conversions in order to get identical results with/without installed
888 Pygments highlighter.)
</p>
889 <pre class=
"code python literal-block"><code>print 'This is Python code.'
</code></pre>
890 <p>The
<span class=
"docutils literal"><span class=
"pre">:number-lines:
</span></span> option (with optional start value) generates line
892 <pre class=
"code python literal-block"><code><span class=
"ln"> 8 </span># print integers from
0 to
9:
893 <span class=
"ln"> 9 </span>for i in range(
10):
894 <span class=
"ln">10 </span> print i
</code></pre>
895 <p>For inline code snippets, there is the
<cite>code
</cite> role, which can be used
896 directly (the code will not be parsed/tagged, as the language is not known)
897 or as base for special code roles, e.g. the LaTeX code in the next
899 <p>Docutils uses LaTeX syntax for math directives and roles:
900 <code class=
"tex">\alpha = f(x)
</code> prints
<span class=
"formula"><i>α
</i> = 
<i>f
</i>(
<i>x
</i>)
</span>.
</p>
901 <p>The
<span class=
"docutils literal">:code:
</span> option of the
<cite>include
</cite> directive sets the included content
902 as a code block, here the rst file
<span class=
"docutils literal">header_footer.txt
</span> with line numbers:
</p>
903 <pre class=
"code rst literal-block"><code><span class=
"ln">1 </span>.. header:: Document header
904 <span class=
"ln">2 </span>.. footer:: Document footer
</code></pre>
907 <div class=
"section" id=
"substitution-definitions">
908 <h2><a class=
"toc-backref" href=
"#id69"><span class=
"sectnum">2.15</span> Substitution Definitions
</a></h2>
909 <p>An inline image (
<img alt=
"EXAMPLE" src=
"../../../docs/user/rst/images/biohazard.png" />) example:
</p>
910 <p>(Substitution definitions are not visible in the HTML source.)
</p>
912 <div class=
"section" id=
"comments">
913 <h2><a class=
"toc-backref" href=
"#id70"><span class=
"sectnum">2.16</span> Comments
</a></h2>
915 <!-- Comments begin with two dots and a space. Anything may
916 follow, except for the syntax of footnotes, hyperlink
917 targets, directives, or substitution definitions.
919 Double-dashes - - "- -" - - must be escaped somehow in HTML output.
921 Comments may contain non-ASCII characters: ä ö ü æ ø å -->
922 <p>(View the HTML source to see the comment.)
</p>
924 <div class=
"section" id=
"raw-text">
925 <h2><a class=
"toc-backref" href=
"#id71"><span class=
"sectnum">2.17</span> Raw text
</a></h2>
926 <p>This does not necessarily look nice, because there may be missing white space.
</p>
927 <p>It's just there to freeze the behavior.
</p>
928 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>
929 Fifth test in HTML.
<br />Line two.
</div>
930 <div class=
"section" id=
"container">
931 <h2><a class=
"toc-backref" href=
"#id72"><span class=
"sectnum">2.18</span> Container
</a></h2>
932 <div class=
"custom docutils container">
937 <div class=
"section" id=
"colspanning-tables">
938 <h2><a class=
"toc-backref" href=
"#id73"><span class=
"sectnum">2.19</span> Colspanning tables
</a></h2>
939 <p>This table has a cell spanning two columns:
</p>
942 <col style=
"width: 31%" />
943 <col style=
"width: 31%" />
944 <col style=
"width: 38%" />
947 <tr><th class=
"head" colspan=
"2"><p>Inputs
</p></th>
948 <th class=
"head"><p>Output
</p></th>
950 <tr><th class=
"head"><p>A
</p></th>
951 <th class=
"head"><p>B
</p></th>
952 <th class=
"head"><p>A or B
</p></th>
956 <tr><td><p>False
</p></td>
957 <td><p>False
</p></td>
958 <td><p>False
</p></td>
960 <tr><td><p>True
</p></td>
961 <td><p>False
</p></td>
964 <tr><td><p>False
</p></td>
968 <tr><td><p>True
</p></td>
975 <div class=
"section" id=
"rowspanning-tables">
976 <h2><a class=
"toc-backref" href=
"#id74"><span class=
"sectnum">2.20</span> Rowspanning tables
</a></h2>
977 <p>Here's a table with cells spanning several rows:
</p>
980 <col style=
"width: 44%" />
981 <col style=
"width: 22%" />
982 <col style=
"width: 33%" />
985 <tr><th class=
"head"><p>Header row, column
1
986 (header rows optional)
</p></th>
987 <th class=
"head"><p>Header
2</p></th>
988 <th class=
"head"><p>Header
3</p></th>
992 <tr><td><p>body row
1, column
1</p></td>
993 <td><p>column
2</p></td>
994 <td><p>column
3</p></td>
996 <tr><td><p>body row
2</p></td>
997 <td rowspan=
"2"><p>Cells may
999 <td rowspan=
"2"><p>Another
1003 <tr><td><p>body row
3</p></td>
1008 <div class=
"section" id=
"complex-tables">
1009 <h2><a class=
"toc-backref" href=
"#id75"><span class=
"sectnum">2.21</span> Complex tables
</a></h2>
1010 <p>Here's a complex table, which should test all features.
</p>
1013 <col style=
"width: 43%" />
1014 <col style=
"width: 21%" />
1015 <col style=
"width: 18%" />
1016 <col style=
"width: 18%" />
1019 <tr><th class=
"head"><p>Header row, column
1
1020 (header rows optional)
</p></th>
1021 <th class=
"head"><p>Header
2</p></th>
1022 <th class=
"head"><p>Header
3</p></th>
1023 <th class=
"head"><p>Header
4</p></th>
1027 <tr><td><p>body row
1, column
1</p></td>
1028 <td><p>column
2</p></td>
1029 <td><p>column
3</p></td>
1030 <td><p>column
4</p></td>
1032 <tr><td><p>body row
2</p></td>
1033 <td colspan=
"3"><p>Cells may span columns.
</p></td>
1035 <tr><td><p>body row
3</p></td>
1036 <td rowspan=
"2"><p>Cells may
1040 <td colspan=
"2" rowspan=
"2"><ul class=
"simple">
1041 <li><p>Table cells
</p></li>
1042 <li><p>contain
</p></li>
1043 <li><p>body elements.
</p></li>
1047 <tr><td><p>body row
4</p></td>
1049 <tr><td><p>body row
5</p></td>
1050 <td colspan=
"2"><p>Cells may also be
1051 empty:
<span class=
"docutils literal"><span class=
"pre">--
></span></span></p></td>
1057 <div class=
"section" id=
"list-tables">
1058 <h2><a class=
"toc-backref" href=
"#id76"><span class=
"sectnum">2.22</span> List Tables
</a></h2>
1059 <p>Here's a list table exercising all features:
</p>
1060 <table class=
"colwidths-given test">
1061 <caption>list table with integral header
</caption>
1063 <col style=
"width: 17%" />
1064 <col style=
"width: 33%" />
1065 <col style=
"width: 50%" />
1068 <tr><th class=
"head stub"><p>Treat
</p></th>
1069 <th class=
"head"><p>Quantity
</p></th>
1070 <th class=
"head"><p>Description
</p></th>
1074 <tr><th class=
"stub"><p>Albatross
</p></th>
1075 <td><p>2.99</p></td>
1076 <td><p>On a stick!
</p></td>
1078 <tr><th class=
"stub"><p>Crunchy Frog
</p></th>
1079 <td><p>1.49</p></td>
1080 <td><p>If we took the bones out, it wouldn't be
1081 crunchy, now would it?
</p></td>
1083 <tr><th class=
"stub"><p>Gannet Ripple
</p></th>
1084 <td><p>1.99</p></td>
1085 <td><p>On a stick!
</p></td>
1089 <table class=
"align-center">
1090 <caption>center aligned list table
</caption>
1092 <col style=
"width: 50%" />
1093 <col style=
"width: 50%" />
1096 <tr><td><p>Albatross
</p></td>
1097 <td><p>2.99</p></td>
1099 <tr><td><p>Crunchy Frog
</p></td>
1100 <td><p>1.49</p></td>
1102 <tr><td><p>Gannet Ripple
</p></td>
1103 <td><p>1.99</p></td>
1108 <div class=
"section" id=
"custom-roles">
1109 <h2><a class=
"toc-backref" href=
"#id77"><span class=
"sectnum">2.23</span> Custom Roles
</a></h2>
1111 <li><p>A role based on an existing role.
</p>
1112 <p><span class=
"custom docutils literal">one
</span> <span class=
"custom docutils literal">two
</span> <span class=
"custom docutils literal">three
</span></p>
1114 <li><p>A new role.
</p>
1115 <p><span class=
"customnew">one two three
</span></p>
1117 <li><p>A role with class attribute.
</p>
1118 <p><span class=
"special">interpreted text
</span></p>
1120 <li><p>A language-switching role:
</p>
1121 <p>Let's count in German
<span lang=
"de">eins zwei drei
</span>.
</p>
1123 <li><p>A role with multiple class attributes, styled with raw directives:
</p>
1124 <p>The following works in most browsers but does not validate
1125 (
<span class=
"docutils literal"><style
></span> is only allowed in the document head):
</p>
1126 <pre class=
"literal-block">.. raw:: html
1128 <style type=
"text/css
"><!--
1129 .green {color: green;}
1130 .sc {font-variant: small-caps;}
1131 --
></style
></pre>
1132 <p><span class=
"green sc" lang=
"en-gb">British colourful text in small-caps
</span>.
</p>
1136 <div class=
"section" id=
"svg-images">
1137 <h2><a class=
"toc-backref" href=
"#id78"><span class=
"sectnum">2.24</span> SVG Images
</a></h2>
1138 <img alt=
"../../../docs/user/rst/images/biohazard.svg" class=
"align-left" src=
"../../../docs/user/rst/images/biohazard.svg" style=
"width: 48px; height: 48px;" />
1139 <p>Scalable vector graphics (SVG) images are the only standards-compliable way
1140 to include vector graphics in HTML documents. However, they are not
1141 supported by all backends/output formats. (E.g., LaTeX supports the
1142 PDF or Postscript formats for vector graphics instead.)
</p>
1143 <p>Rendering behaviour varies, depending on
</p>
1144 <ol class=
"loweralpha">
1145 <li><p>The SVG image itself, e.g. fixed-size vs. scaling:
</p>
1146 <pre class=
"literal-block">width=
"280" viewBox=
"0 0 280 27"
1147 height=
"27" width=
"100%
"
1148 height=
"100%
"</pre>
1150 <li><p>The method used to put the image in the document.
</p>
1151 <p>For HTML, there are several alternatives including:
</p>
1153 <li><p>using the HTML
<span class=
"docutils literal"><img
></span> tag (not for interactive/animated SVG),
</p></li>
1154 <li><p>using the HTML
<span class=
"docutils literal"><object
></span> tag,
</p></li>
1155 <li><p>including within SVG using the SVGÂ
<span class=
"docutils literal"><image
></span> tag,
</p></li>
1156 <li><p>embedd the SVG code within HTML (inlining).
</p></li>
1158 <p>The
<cite>html4css1
</cite> writer uses
<span class=
"docutils literal"><object
></span> tags, the
<cite>html5
</cite>
1159 writer uses
<span class=
"docutils literal"><img
></span> tags.
</p>
1160 <!-- cf. http://edutechwiki.unige.ch/en/Using_SVG_with_HTML5_tutorial -->
1162 <li><p>The viewing agent.
</p>
1163 <p>All up-to-date HTML browsers support SVG, however not all do this fully
1164 and in the same manner. Many older versions, especially IE
< 9, have
1165 deficiencies or require plug-ins (i.e. don't support the
<span class=
"docutils literal"><img
></span> tag).
</p>
1168 <p>If the image is wrapped in
<span class=
"docutils literal"><object
></span> or
<span class=
"docutils literal"><svg
></span> tags, it depends on the
1169 <span class=
"docutils literal">viewBox
</span> declaration inside the images root
<span class=
"docutils literal"><svg
></span> element whether an
1170 SVG image is scaled or clipped/padded. Images wrapped in
<span class=
"docutils literal"><img
></span> are
1173 <li><img alt=
"../../../docs/user/rst/images/title-scaling.svg" class=
"align-right" src=
"../../../docs/user/rst/images/title-scaling.svg" style=
"width: 50%;" />
1174 <p>A scaling image (scales with the browser window), occupying
50% of the line
1175 width. The
<span class=
"docutils literal">viewBox
</span> setting in the image file enables auto-scaling also in
1176 <span class=
"docutils literal"><object
></span> tags and embedded SVG (if width and hight are set to
100% in the
1177 SVGÂ
<image
> tag).
</p>
1179 <li><img alt=
"../../../docs/user/rst/images/title.svg" class=
"align-right" src=
"../../../docs/user/rst/images/title.svg" style=
"width: 50%; height: 15px;" />
1180 <p>A fixed-size image in a box
50% wide and
15Â pixles high. This image is
1181 scaled, if wrapped in an
<span class=
"docutils literal"><img
></span> tag but clipped in an
<span class=
"docutils literal"><object
></span> tag
1184 <li><img alt=
"../../../docs/user/rst/images/title-scaling.svg" class=
"align-right" src=
"../../../docs/user/rst/images/title-scaling.svg" style=
"width: 50%; height: 1.5em;" />
1185 <p>A right aligned, scaling image
50% wide and
1.5 em high. (This SVG image
1186 keeps the aspect ratio.)
</p>
1188 <li><p>An inline image
<img alt=
"inline-svg" src=
"../../../docs/user/rst/images/biohazard-scaling.svg" style=
"height: 0.8em;" /> scaled to a height of
0.8 em.
</p>
1190 <li><img alt=
"../../../docs/user/rst/images/biohazard-scaling.svg" class=
"align-right" src=
"../../../docs/user/rst/images/biohazard-scaling.svg" style=
"height: 1em;" />
1191 <p>A scaling image
1 em high, right aligned:
</p>
1193 <li><p>A scaling image
5 mm x
5 mm, centered, with hyperlink reference:
</p>
1194 <a class=
"reference internal image-reference" href=
"#svg-images"><img alt=
"../../../docs/user/rst/images/biohazard-scaling.svg" class=
"align-center" src=
"../../../docs/user/rst/images/biohazard-scaling.svg" style=
"width: 5mm; height: 5mm;" /></a>
1196 <li><img alt=
"../../../docs/user/rst/images/biohazard.svg" class=
"align-right" src=
"../../../docs/user/rst/images/biohazard.svg" style=
"width: 4cm; height: 2em;" />
1197 <p>A fixed-size image in a
4 cm x
2 em box.
</p>
1200 <p>Older versions of
<cite>webkit
</cite> based browsers (chromium, safari, midori,
1201 konqueror) support the
<span class=
"docutils literal"><img
></span> tag but don't display contained bitmap
1202 images in this case.
</p>
1204 <li><img alt=
"../../../docs/user/rst/images/biohazard-bitmap.svg" class=
"align-right" src=
"../../../docs/user/rst/images/biohazard-bitmap.svg" style=
"width: 3em;" />
1205 <p>A small, fixed-size SVG image with embedded bitmap, The
<span class=
"docutils literal">:width:
</span> is
1206 set to
3Â em in the rST source. Does not scale if wrapped in
<span class=
"docutils literal"><object
></span>
1209 <li><img alt=
"../../../docs/user/rst/images/biohazard-bitmap-scaling.svg" class=
"align-right" src=
"../../../docs/user/rst/images/biohazard-bitmap-scaling.svg" style=
"width: 3em;" />
1210 <p>A scaling SVG image with embedded bitmap,
3Â em wide.
</p>
1213 <p>SVG images can also be put in figures:
</p>
1215 <div class=
"figure align-center">
1216 <img alt=
"reStructuredText, the markup syntax" src=
"../../../docs/user/rst/images/title.svg" style=
"width: 290px; height: 28px;" />
1217 <p class=
"caption"><strong>Figure:
</strong> SVG image in a figure.
</p>
1221 <div class=
"section" id=
"swf-images">
1222 <h2><a class=
"toc-backref" href=
"#id79"><span class=
"sectnum">2.25</span> SWF Images
</a></h2>
1223 <p>Shockwave Flash is an image/movie format that most modern web browsers
1224 support via a plugin. It is sometimes blocked due to privacy/security
1226 <p>Images with extension
<span class=
"docutils literal">.swf
</span> are placed inside
<object
> elements.
1227 For complete control over display options use raw HTML.
</p>
1228 <object class=
"align-left" data=
"../../../docs/user/rst/images/biohazard.swf" style=
"width: 4cm; height: 2em;" type=
"application/x-shockwave-flash">
1229 [biohazard.swf]
</object>
1230 <p>An SWF image in a
4 cm x
2 em box, left aligned.
</p>
1231 <p>An inline SWF image
<object data=
"../../../docs/user/rst/images/biohazard.swf" style=
"width: 0.8em; height: 0.8em;" type=
"application/x-shockwave-flash">inline-swf
</object> scaled to
0.8 em x
0.8 em.
</p>
1234 <div class=
"section" id=
"changes-to-the-html4css1-writer">
1235 <h1><a class=
"toc-backref" href=
"#id80"><span class=
"sectnum">3</span> Changes to the html4css1 writer
</a></h1>
1237 <li><p>Use only meta keywords recognized by HTML
5.
</p></li>
1238 <li><p>Set table column widths with
<style=
"width: ...
">, not
"width
" argument.
</p></li>
1239 <li><p>Horizontal alignment of table heads with CSS.
</p></li>
1240 <li><p>Field lists as styled definition lists.
</p></li>
1241 <li><p>Do not drop paragraph objects, use CSS rules to prevent unwanted vertical
1243 <li><p>Put subtitles in
<p
> elements.
</p></li>
1245 <div class=
"section" id=
"field-list-handling">
1246 <h2><a class=
"toc-backref" href=
"#id81"><span class=
"sectnum">3.1</span> Field list handling
</a></h2>
1247 <p>The following list demonstrates the problems with the html4css1
1248 approach: the
<cite>field-name-limit
</cite> setting is given in
"number of
1249 characters
" but the field name uses a proportional font.
</p>
1250 <dl class=
"field-list simple">
1251 <dt>The field name
</dt>
1252 <dd><p>is typeset on the same line, unless it is
"long
".
</p>
1254 <dt>this field name
</dt>
1255 <dd><p>is considered
"long
" in the html table rendering by
1256 the html4css1 writer with the default setting of
1257 <span class=
"docutils literal"><span class=
"pre">--field-name-limit=
14</span></span>.
</p>
1259 <dt>iiiiiiiiiiiiiii
</dt>
1260 <dd><p>a field name that is considered
"long
" by html4css1
1261 with the default setting of
<cite>field-name-limit:
14</cite>.
</p>
1263 <dt>MMMMMMMMMMMMMM
</dt>
1264 <dd><p>a field name that is actually longer than the
1265 previous one but regarded
"short
" by html4css1.
</p>
1268 <p>With
<span class=
"docutils literal">html_plain
</span>, a
<cite>field list
</cite> is typeset as CSS-styled
<cite>definition
1269 list
</cite>. The default layout is similar to the look with
<cite>html4css1
</cite>:
</p>
1270 <dl class=
"open field-list">
1271 <dt>A long field name
</dt>
1272 <dd><p>sticks into the field body.
</p>
1273 <p>The field body is pushed to the next line (you can suppress
1274 this behaviour with the
<a class=
"reference internal" href=
"#run-in">run-in
</a> class argument).
</p>
1276 <dt>Customization
</dt>
1277 <dd><p>of the field name width is possible with CSS instead
1278 of the
<cite>field-name-limit
</cite> configuration setting, for
1280 <pre class=
"literal-block">dl.field-list
> dd { margin-left:
6em; }
</pre>
1285 <dd><p>must not lead to misalignment of the following content.
</p>
1289 <div class=
"section" id=
"styling-with-class-arguments">
1290 <h2><a class=
"toc-backref" href=
"#id82"><span class=
"sectnum">3.2</span> Styling with class arguments
</a></h2>
1291 <p>The
<span class=
"docutils literal">plain.css
</span> style sheet comes with some pre-defined style variants
1292 that can be choosen via a class argument.
</p>
1293 <div class=
"section" id=
"description-lists">
1294 <h3><a class=
"toc-backref" href=
"#id83"><span class=
"sectnum">3.2.1</span> Description lists
</a></h3>
1295 <p>Definition lists with the
"description
" class argument:
</p>
1296 <dl class=
"description simple">
1297 <dt>description lists
</dt>
1298 <dd><p>Definition lists that are styled like in most dictionaries,
1299 encyclopedias etc. (as well as the LaTeX
<cite>description
</cite> environment).
</p>
1302 <dd><p>The term to be described. Put in boldface.
</p>
1305 <dd><p>Starts on the same line and has a hanging indent.
</p>
1309 <div class=
"section" id=
"field-list-variants">
1310 <h3><a class=
"toc-backref" href=
"#id84"><span class=
"sectnum">3.2.2</span> Field list variants
</a></h3>
1311 <p>For field lists, the
"compact/open
",
"narrow
" and
"run-in
" styles are defined.
</p>
1313 <dt><em>compact
</em></dt>
1314 <dd><dl class=
"compact field-list simple">
1316 <dd><p>No additional space between list items.
</p>
1319 <dd><p>The
<span class=
"docutils literal"><span class=
"pre">--compact-field-lists
</span></span> command line option (and the
1320 corresponding configuration setting) set the
<cite>compact
</cite>
1321 class argument on all
"simple
" field lists, if not
1322 overridden with
<cite>open
</cite>.
</p>
1325 <dd><p>For lists with short field body.
</p>
1329 <dt><em>open
</em></dt>
1330 <dd><dl class=
"open field-list">
1332 <dd><p>Additional space between list items also in
"simple
" lists.
1333 (Overrides the
<span class=
"docutils literal"><span class=
"pre">--compact-field-lists
</span></span> command line
1334 option and the corresponding configuration setting)
</p>
1337 <dd><p>For
"simple
" lists that should keep the space between list items.
</p>
1341 <dt><em>narrow
</em></dt>
1342 <dd><dl class=
"narrow field-list simple">
1344 <dd><p>Less indented field body.
</p>
1347 <dd><p>For lists with short field names.
</p>
1349 <dt>A long field name
</dt>
1350 <dd><p>sticks into the field body and the field body starts on a
1351 new line (if not combined with
<a class=
"reference internal" href=
"#run-in">run-in
</a>).
</p>
1356 <dl class=
"simple" id=
"run-in">
1357 <dt><em>run-in
</em></dt>
1358 <dd><dl class=
"run-in field-list simple">
1360 <dd><p>Field body starts on the same line also after long field
1363 <dt>A long field name
</dt>
1364 <dd><p>sticks into the field body which continues on
1367 <dt>The next field name
</dt>
1368 <dd><p>and field body should align. Long text in the field
1369 body is wrapped and aligns with other fields.
</p>
1375 <div class=
"section" id=
"table-variants">
1376 <h3><a class=
"toc-backref" href=
"#id85"><span class=
"sectnum">3.2.3</span> Table variants
</a></h3>
1377 <p>The following styles can be applied to individual tables via a class
1378 argument or as document wide setting with the
<a class=
"reference external" href=
"http://docutils.sourceforge.net/docs/user/config.html#table-style">table-style
</a> <a class=
"footnote-reference brackets" href=
"#id31" id=
"id32">7</a> configuration
1379 setting (or command line argument).
</p>
1381 <li><p>Numbered tables can be achieved with the
"numbered
" class option:
</p>
1382 <table class=
"numbered">
1383 <caption>truth values
</caption>
1385 <col style=
"width: 29%" />
1386 <col style=
"width: 29%" />
1387 <col style=
"width: 42%" />
1390 <tr><th class=
"head"><p>A
</p></th>
1391 <th class=
"head"><p>B
</p></th>
1392 <th class=
"head"><p>A or B
</p></th>
1396 <tr><td><p>False
</p></td>
1397 <td><p>False
</p></td>
1398 <td><p>False
</p></td>
1400 <tr><td><p>True
</p></td>
1401 <td><p>False
</p></td>
1402 <td><p>True
</p></td>
1404 <tr><td><p>False
</p></td>
1405 <td><p>True
</p></td>
1406 <td><p>True
</p></td>
1408 <tr><td><p>True
</p></td>
1409 <td><p>True
</p></td>
1410 <td><p>True
</p></td>
1414 <p>Currently, referencing to the table by number is not supported. This is a
1415 common request and already on the
<cite>TODO list
</cite>.
</p>
1417 <li><p>With the
"widths
" argument
"auto
" (or
"class
" value
"colwidths-auto
"),
1418 column widths are determined by the browser.
</p>
1419 <table class=
"colwidths-auto">
1421 <tr><th class=
"head"><p>A
</p></th>
1422 <th class=
"head"><p>B
</p></th>
1423 <th class=
"head"><p>A or B
</p></th>
1427 <tr><td><p>False
</p></td>
1428 <td><p>False
</p></td>
1429 <td><p>False
</p></td>
1431 <tr><td><p>True
</p></td>
1432 <td><p>False
</p></td>
1433 <td><p>True
</p></td>
1435 <tr><td><p>False
</p></td>
1436 <td><p>True
</p></td>
1437 <td><p>True
</p></td>
1439 <tr><td><p>True
</p></td>
1440 <td><p>True
</p></td>
1441 <td><p>True
</p></td>
1446 <li><p>A table with
"booktabs
" class value, is rendered similar to the style
1447 from the
<a class=
"reference external" href=
"http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf">booktabs
</a> <a class=
"footnote-reference brackets" href=
"#id33" id=
"id34">8</a> LaTeX package.
</p>
1450 <p>"Booktabs
" style table, numbered, centre-aligned, with auto-sized columns:
</p>
1452 <table class=
"booktabs numbered colwidths-auto align-center">
1453 <caption>I/O values
</caption>
1455 <tr><th class=
"head" colspan=
"2"><p>Input
</p></th>
1456 <th class=
"head"><p>Output
</p></th>
1458 <tr><th class=
"head"><p>A
</p></th>
1459 <th class=
"head"><p>B
</p></th>
1460 <th class=
"head"><p>A or B
</p></th>
1464 <tr><td><p>False
</p></td>
1465 <td><p>False
</p></td>
1466 <td><p>False
</p></td>
1468 <tr><td><p>True
</p></td>
1469 <td><p>False
</p></td>
1470 <td><p>True
</p></td>
1472 <tr><td><p>False
</p></td>
1473 <td><p>True
</p></td>
1474 <td><p>True
</p></td>
1476 <tr><td><p>True
</p></td>
1477 <td><p>True
</p></td>
1478 <td><p>True
</p></td>
1486 <div class=
"section" id=
"error-handling">
1487 <h1><a class=
"toc-backref" href=
"#id86"><span class=
"sectnum">4</span> Error Handling
</a></h1>
1488 <p>Any errors caught during processing will generate system messages.
</p>
1489 <p>There should be five messages in the following, auto-generated
1490 section,
"Docutils System Messages
":
</p>
1491 <!-- section should be added by Docutils automatically -->
1493 <div class=
"system-messages section">
1494 <h1>Docutils System Messages
</h1>
1495 <div class=
"system-message" id=
"id23">
1496 <p class=
"system-message-title">System Message: ERROR/
3 (
<span class=
"docutils literal">functional/input/data/standard.txt
</span>, line
104);
<em><a href=
"#id24">backlink
</a></em></p>
1497 <p>Undefined substitution referenced:
"problematic
".
</p>
1499 <div class=
"system-message" id=
"id96">
1500 <p class=
"system-message-title">System Message: ERROR/
3 (
<span class=
"docutils literal">functional/input/data/standard.txt
</span>, line
391);
<em><a href=
"#id97">backlink
</a></em></p>
1501 <p>Unknown target name:
"5".
</p>
1503 <div class=
"system-message" id=
"id98">
1504 <p class=
"system-message-title">System Message: ERROR/
3 (
<span class=
"docutils literal">functional/input/data/standard.txt
</span>, line
400);
<em><a href=
"#id99">backlink
</a></em></p>
1505 <p>Unknown target name:
"nonexistent
".
</p>
1507 <div class=
"system-message" id=
"id100">
1508 <p class=
"system-message-title">System Message: ERROR/
3 (
<span class=
"docutils literal">functional/input/data/standard.txt
</span>, line
427);
<em><a href=
"#id101">backlink
</a></em></p>
1509 <p>Unknown target name:
"hyperlink reference without a target
".
</p>
1511 <div class=
"system-message" id=
"id102">
1512 <p class=
"system-message-title">System Message: ERROR/
3 (
<span class=
"docutils literal">functional/input/data/standard.txt
</span>, line
440);
<em><a href=
"#id103">backlink
</a></em></p>
1513 <p>Duplicate target name, cannot be used as a unique reference:
"duplicate target names
".
</p>
1517 <div class=
"footer">
1518 <hr class=
"footer" />
1519 <p>Document footer
</p>
1520 <p><a class=
"reference external" href=
"http://www.w3.org/TR/html5/"><img alt=
"Conforms to HTML 5" src=
"http://www.w3.org/html/logo/badge/html5-badge-h-css3-semantics.png" style=
"width: 88px; height: 31px;" /></a> <a class=
"reference external" href=
"http://validator.w3.org/check?uri=referer"><img alt=
"Check validity!" src=
"https://validator-suite.w3.org/icons/vs-blue-256.png" style=
"width: 88px; height: 31px;" /></a> <a class=
"reference external" href=
"http://jigsaw.w3.org/css-validator/check/referer"><img alt=
"Valid CSS 2.1!" src=
"http://jigsaw.w3.org/css-validator/images/vcss" style=
"width: 88px; height: 31px;" /></a></p>