2 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
4 <meta http-equiv=
"Content-Type" content=
"text/html; 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/html-base.css" type=
"text/css" />
11 <link rel=
"stylesheet" href=
"../input/data/math.css" type=
"text/css" />
15 <p>Document header
</p>
19 <div class=
"document" id=
"restructuredtext-test-document">
20 <span id=
"doctitle"></span>
21 <h1 class=
"title">reStructuredText Test Document
</h1>
23 <p class=
"subtitle" id=
"examples-of-syntax-constructs"><span id=
"subtitle"></span>Examples of Syntax Constructs
</p>
25 <dt class=
"author">Author
</dt>
26 <dd class=
"author"><p>David Goodger
</p></dd>
27 <dt class=
"address">Address
</dt>
28 <dd class=
"address"><pre class=
"address">123 Example Street
33 <dt class=
"contact">Contact
</dt>
34 <dd class=
"contact"><a class=
"reference external" href=
"mailto:goodger@python.org">goodger
@python.org
</a></dd>
35 <dt class=
"authors">Authors
</dt>
36 <dd class=
"authors"><p>Me
</p>
40 <dt class=
"organization">Organization
</dt>
41 <dd class=
"organization">humankind
</dd>
42 <dt class=
"date">Date
</dt>
43 <dd class=
"date">Now, or yesterday. Or maybe even
<em>before
</em> yesterday.
</dd>
44 <dt class=
"status">Status
</dt>
45 <dd class=
"status">This is a
"work in progress
"</dd>
46 <dt class=
"revision">Revision
</dt>
47 <dd class=
"revision">is managed by a version control system.
</dd>
48 <dt class=
"version">Version
</dt>
49 <dd class=
"version">1</dd>
50 <dt class=
"copyright">Copyright
</dt>
51 <dd class=
"copyright">This document has been placed in the public domain. You
52 may do with it as you wish. You may copy, modify,
53 redistribute, reattribute, sell, buy, rent, lease,
54 destroy, or improve it, quote it at length, excerpt,
55 incorporate, collate, fold, staple, or mutilate it, or do
56 anything else to it that your or anyone else's heart
59 <dd><p>This is a
"generic bibliographic field
".
</p>
61 <dt>field name
"2"</dt>
62 <dd><p>Generic bibliographic fields may contain multiple body elements.
</p>
66 <div class=
"dedication topic">
67 <p class=
"topic-title first">Dedication
</p>
68 <p>For Docutils users
& co-developers.
</p>
70 <div class=
"abstract topic">
71 <p class=
"topic-title first">Abstract
</p>
72 <p>This is a test document, containing at least one example of each
73 reStructuredText construct.
</p>
75 <!-- This is a comment. Note how any initial comments are moved by
76 transforms to after the document title, subtitle, and docinfo. -->
77 <!-- Above is the document title, and below is the subtitle.
78 They are transformed from section titles after parsing. -->
79 <!-- bibliographic fields (which also require a transform): -->
80 <div class=
"contents topic" id=
"table-of-contents">
81 <p class=
"topic-title first">Table of Contents
</p>
82 <ul class=
"auto-toc simple">
83 <li><p><a class=
"reference internal" href=
"#structural-elements" id=
"id38"><span class=
"sectnum">1</span> Structural Elements
</a></p>
85 <li><p><a class=
"reference internal" href=
"#section-title" id=
"id39"><span class=
"sectnum">1.1</span> Section Title
</a></p></li>
86 <li><p><a class=
"reference internal" href=
"#empty-section" id=
"id40"><span class=
"sectnum">1.2</span> Empty Section
</a></p></li>
87 <li><p><a class=
"reference internal" href=
"#transitions" id=
"id41"><span class=
"sectnum">1.3</span> Transitions
</a></p></li>
90 <li><p><a class=
"reference internal" href=
"#body-elements" id=
"id42"><span class=
"sectnum">2</span> Body Elements
</a></p>
92 <li><p><a class=
"reference internal" href=
"#paragraphs" id=
"id43"><span class=
"sectnum">2.1</span> Paragraphs
</a></p>
94 <li><p><a class=
"reference internal" href=
"#inline-markup" id=
"id44"><span class=
"sectnum">2.1.1</span> Inline Markup
</a></p></li>
97 <li><p><a class=
"reference internal" href=
"#bullet-lists" id=
"id45"><span class=
"sectnum">2.2</span> Bullet Lists
</a></p></li>
98 <li><p><a class=
"reference internal" href=
"#enumerated-lists" id=
"id46"><span class=
"sectnum">2.3</span> Enumerated Lists
</a></p></li>
99 <li><p><a class=
"reference internal" href=
"#definition-lists" id=
"id47"><span class=
"sectnum">2.4</span> Definition Lists
</a></p></li>
100 <li><p><a class=
"reference internal" href=
"#field-lists" id=
"id48"><span class=
"sectnum">2.5</span> Field Lists
</a></p></li>
101 <li><p><a class=
"reference internal" href=
"#option-lists" id=
"id49"><span class=
"sectnum">2.6</span> Option Lists
</a></p></li>
102 <li><p><a class=
"reference internal" href=
"#literal-blocks" id=
"id50"><span class=
"sectnum">2.7</span> Literal Blocks
</a></p></li>
103 <li><p><a class=
"reference internal" href=
"#line-blocks" id=
"id51"><span class=
"sectnum">2.8</span> Line Blocks
</a></p></li>
104 <li><p><a class=
"reference internal" href=
"#block-quotes" id=
"id52"><span class=
"sectnum">2.9</span> Block Quotes
</a></p></li>
105 <li><p><a class=
"reference internal" href=
"#doctest-blocks" id=
"id53"><span class=
"sectnum">2.10</span> Doctest Blocks
</a></p></li>
106 <li><p><a class=
"reference internal" href=
"#footnotes" id=
"id54"><span class=
"sectnum">2.11</span> Footnotes
</a></p></li>
107 <li><p><a class=
"reference internal" href=
"#citations" id=
"id55"><span class=
"sectnum">2.12</span> Citations
</a></p></li>
108 <li><p><a class=
"reference internal" href=
"#targets" id=
"id56"><span class=
"sectnum">2.13</span> Targets
</a></p>
109 <ul class=
"auto-toc">
110 <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>
111 <li><p><a class=
"reference internal" href=
"#id21" id=
"id58"><span class=
"sectnum">2.13.2</span> Duplicate Target Names
</a></p></li>
114 <li><p><a class=
"reference internal" href=
"#directives" id=
"id59"><span class=
"sectnum">2.14</span> Directives
</a></p>
115 <ul class=
"auto-toc">
116 <li><p><a class=
"reference internal" href=
"#document-parts" id=
"id60"><span class=
"sectnum">2.14.1</span> Document Parts
</a></p></li>
117 <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>
118 <li><p><a class=
"reference internal" href=
"#admonitions" id=
"id62"><span class=
"sectnum">2.14.3</span> Admonitions
</a></p></li>
119 <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>
120 <li><p><a class=
"reference internal" href=
"#target-footnotes" id=
"id64"><span class=
"sectnum">2.14.5</span> Target Footnotes
</a></p></li>
121 <li><p><a class=
"reference internal" href=
"#replacement-text" id=
"id65"><span class=
"sectnum">2.14.6</span> Replacement Text
</a></p></li>
122 <li><p><a class=
"reference internal" href=
"#compound-paragraph" id=
"id66"><span class=
"sectnum">2.14.7</span> Compound Paragraph
</a></p></li>
123 <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>
124 <li><p><a class=
"reference internal" href=
"#code" id=
"id68"><span class=
"sectnum">2.14.9</span> Code
</a></p></li>
127 <li><p><a class=
"reference internal" href=
"#substitution-definitions" id=
"id69"><span class=
"sectnum">2.15</span> Substitution Definitions
</a></p></li>
128 <li><p><a class=
"reference internal" href=
"#comments" id=
"id70"><span class=
"sectnum">2.16</span> Comments
</a></p></li>
129 <li><p><a class=
"reference internal" href=
"#raw-text" id=
"id71"><span class=
"sectnum">2.17</span> Raw text
</a></p></li>
130 <li><p><a class=
"reference internal" href=
"#container" id=
"id72"><span class=
"sectnum">2.18</span> Container
</a></p></li>
131 <li><p><a class=
"reference internal" href=
"#colspanning-tables" id=
"id73"><span class=
"sectnum">2.19</span> Colspanning tables
</a></p></li>
132 <li><p><a class=
"reference internal" href=
"#rowspanning-tables" id=
"id74"><span class=
"sectnum">2.20</span> Rowspanning tables
</a></p></li>
133 <li><p><a class=
"reference internal" href=
"#complex-tables" id=
"id75"><span class=
"sectnum">2.21</span> Complex tables
</a></p></li>
134 <li><p><a class=
"reference internal" href=
"#list-tables" id=
"id76"><span class=
"sectnum">2.22</span> List Tables
</a></p></li>
135 <li><p><a class=
"reference internal" href=
"#custom-roles" id=
"id77"><span class=
"sectnum">2.23</span> Custom Roles
</a></p></li>
136 <li><p><a class=
"reference internal" href=
"#svg-images" id=
"id78"><span class=
"sectnum">2.24</span> SVG Images
</a></p></li>
137 <li><p><a class=
"reference internal" href=
"#swf-images" id=
"id79"><span class=
"sectnum">2.25</span> SWF Images
</a></p></li>
140 <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>
141 <ul class=
"auto-toc">
142 <li><p><a class=
"reference internal" href=
"#description-list" id=
"id81"><span class=
"sectnum">3.1</span> Description list
</a></p></li>
143 <li><p><a class=
"reference internal" href=
"#field-list-handling" id=
"id82"><span class=
"sectnum">3.2</span> Field list handling
</a></p>
144 <ul class=
"auto-toc">
145 <li><p><a class=
"reference internal" href=
"#styling-with-class-arguments" id=
"id83"><span class=
"sectnum">3.2.1</span> Styling with class arguments
</a></p></li>
148 <li><p><a class=
"reference internal" href=
"#table-styling-with-class-arguments" id=
"id84"><span class=
"sectnum">3.3</span> Table styling with class arguments
</a></p></li>
149 <li><p><a class=
"reference internal" href=
"#maths" id=
"id85"><span class=
"sectnum">3.4</span> Maths
</a></p></li>
152 <li><p><a class=
"reference internal" href=
"#error-handling" id=
"id86"><span class=
"sectnum">4</span> Error Handling
</a></p></li>
155 <div class=
"section" id=
"structural-elements">
156 <h1><a class=
"toc-backref" href=
"#id38"><span class=
"sectnum">1</span> Structural Elements
</a></h1>
157 <div class=
"section" id=
"section-title">
158 <h2 class=
"with-subtitle"><a class=
"toc-backref" href=
"#id39"><span class=
"sectnum">1.1</span> Section Title
</a></h2>
159 <p class=
"section-subtitle" id=
"section-subtitle">Section Subtitle
</p>
160 <p>Lone subsections are converted to a section subtitle by a transform
161 activated with the
<span class=
"docutils literal"><span class=
"pre">--section-subtitles
</span></span> command line option or the
162 <span class=
"docutils literal"><span class=
"pre">sectsubtitle-xform
</span></span> configuration value.
</p>
164 <div class=
"section" id=
"empty-section">
165 <h2><a class=
"toc-backref" href=
"#id40"><span class=
"sectnum">1.2</span> Empty Section
</a></h2>
167 <div class=
"section" id=
"transitions">
168 <h2><a class=
"toc-backref" href=
"#id41"><span class=
"sectnum">1.3</span> Transitions
</a></h2>
169 <p>Here's a transition:
</p>
170 <hr class=
"docutils" />
171 <p>It divides the section. Transitions may also occur between sections:
</p>
174 <hr class=
"docutils" />
175 <div class=
"section" id=
"body-elements">
176 <h1><a class=
"toc-backref" href=
"#id42"><span class=
"sectnum">2</span> Body Elements
</a></h1>
177 <div class=
"section" id=
"paragraphs">
178 <h2><a class=
"toc-backref" href=
"#id43"><span class=
"sectnum">2.1</span> Paragraphs
</a></h2>
180 <div class=
"section" id=
"inline-markup">
181 <h3><a class=
"toc-backref" href=
"#id44"><span class=
"sectnum">2.1.1</span> Inline Markup
</a></h3>
182 <p>Paragraphs contain text and may contain inline markup:
<em>emphasis
</em>,
183 <strong>strong emphasis
</strong>,
<span class=
"docutils literal">inline literals
</span>, standalone hyperlinks
184 (
<a class=
"reference external" href=
"http://www.python.org">http://www.python.org
</a>), external hyperlinks (
<a class=
"reference external" href=
"http://www.python.org/">Python
</a> <a class=
"footnote-reference" href=
"#id25" id=
"id26">[
5]
</a>), internal
185 cross-references (
<a class=
"reference internal" href=
"#example">example
</a>), external hyperlinks with embedded URIs
186 (
<a class=
"reference external" href=
"http://www.python.org">Python web site
</a>),
<a class=
"reference external" href=
"http://www.python.org/">anonymous hyperlink
187 references
</a> <a class=
"footnote-reference" href=
"#id25" id=
"id35">[
5]
</a> (
<a class=
"reference external" href=
"http://docutils.sourceforge.net/">a second reference
</a> <a class=
"footnote-reference" href=
"#id36" id=
"id37">[
9]
</a>), footnote references (manually
188 numbered
<a class=
"footnote-reference" href=
"#id8" id=
"id1">[
1]
</a>, anonymous auto-numbered
<a class=
"footnote-reference" href=
"#id12" id=
"id2">[
3]
</a>, labeled auto-numbered
189 <a class=
"footnote-reference" href=
"#label" id=
"id3">[
2]
</a>, or symbolic
<a class=
"footnote-reference" href=
"#id13" id=
"id4">[*]
</a>), citation references (
<a class=
"citation-reference" href=
"#cit2002" id=
"id5">[CIT2002]
</a>),
190 substitution references (
<img alt=
"EXAMPLE" src=
"../../../docs/user/rst/images/biohazard.png" />), and
<span class=
"target" id=
"inline-hyperlink-targets">inline hyperlink targets
</span>
191 (see
<a class=
"reference internal" href=
"#targets">Targets
</a> below for a reference back to here). Character-level
192 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
193 (generated by processing errors; this one is intentional). Here is a
194 reference to the
<a class=
"reference internal" href=
"#doctitle">doctitle
</a> and the
<a class=
"reference internal" href=
"#subtitle">subtitle
</a>.
</p>
195 <p>The default role for interpreted text is
<cite>Title Reference
</cite>. Here are
196 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
197 RFC reference (
<a class=
"reference external" href=
"http://tools.ietf.org/html/rfc2822.html">RFC
2822</a>); an abbreviation (
<abbr>abb.
</abbr>), an acronym
198 (
<abbr>reST
</abbr>), code (
<code>print
"hello world
"</code>); a
<sub>subscript
</sub>;
199 a
<sup>superscript
</sup> and explicit roles for
<cite>Docutils
</cite>'
200 <em>standard
</em> <strong>inline
</strong> <span class=
"docutils literal">markup
</span>.
</p>
201 <!-- DO NOT RE-WRAP THE FOLLOWING PARAGRAPH! -->
202 <p>Let's test wrapping and whitespace significance in inline literals:
203 <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>
204 <p>If the
<span class=
"docutils literal"><span class=
"pre">--pep-references
</span></span> option was supplied, there should be a
205 live link to PEP
258 here.
</p>
208 <div class=
"section" id=
"bullet-lists">
209 <h2><a class=
"toc-backref" href=
"#id45"><span class=
"sectnum">2.2</span> Bullet Lists
</a></h2>
211 <li><p>A bullet list
</p>
213 <li><p>Nested bullet list.
</p></li>
214 <li><p>Nested item
2.
</p></li>
218 <p>Paragraph
2 of item
2.
</p>
220 <li><p>Nested bullet list.
</p></li>
221 <li><p>Nested item
2.
</p>
223 <li><p>Third level.
</p></li>
224 <li><p>Item
2.
</p></li>
227 <li><p>Nested item
3.
</p></li>
228 <li><p>This nested list should be compacted by the HTML writer.
</p>
229 <span class=
"target" id=
"target"></span><!-- Even if this item contains a target and a comment. -->
235 <div class=
"section" id=
"enumerated-lists">
236 <h2><a class=
"toc-backref" href=
"#id46"><span class=
"sectnum">2.3</span> Enumerated Lists
</a></h2>
238 <li><p>Arabic numerals.
</p>
239 <ol class=
"loweralpha simple">
240 <li><p>lower alpha)
</p>
241 <ol class=
"lowerroman simple">
242 <li><p>(lower roman)
</p>
243 <ol class=
"upperalpha simple">
244 <li><p>upper alpha.
</p>
245 <ol class=
"upperroman simple">
246 <li><p>upper roman)
</p></li>
255 <li><p>Lists that don't start at
1:
</p>
256 <ol class=
"arabic simple" start=
"3">
257 <li><p>Three
</p></li>
260 <ol class=
"upperalpha simple" start=
"3">
264 <ol class=
"lowerroman simple" start=
"3">
271 <div class=
"section" id=
"definition-lists">
272 <h2><a class=
"toc-backref" href=
"#id47"><span class=
"sectnum">2.4</span> Definition Lists
</a></h2>
275 <dd><p>Definition
</p>
277 <dt>Term
<span class=
"classifier">classifier
</span></dt>
278 <dd><p>Definition paragraph
1.
</p>
279 <p>Definition paragraph
2.
</p>
282 <dd><p>Definition
</p>
284 <dt>Term
<span class=
"classifier">classifier one
</span><span class=
"classifier">classifier two
</span></dt>
285 <dd><p>Definition
</p>
289 <div class=
"section" id=
"field-lists">
290 <h2><a class=
"toc-backref" href=
"#id48"><span class=
"sectnum">2.5</span> Field Lists
</a></h2>
291 <dl class=
"field-list">
293 <dd><p>Field lists map field names to field bodies, like database
294 records. They are often part of an extension syntax. They are
295 an unambiguous variant of RFC
2822 fields.
</p>
297 <dt>how arg1 arg2
</dt>
298 <dd><p>The field marker is a colon, the field name, and a colon.
</p>
299 <p>The field body may contain one or more body elements, indented
300 relative to the field marker.
</p>
303 <dd><p class=
"credits">This paragraph has the
<cite>credits
</cite> class set. (This is actually not
304 about credits but just for ensuring that the class attribute
305 doesn't get stripped away.)
</p>
309 <div class=
"section" id=
"option-lists">
310 <h2><a class=
"toc-backref" href=
"#id49"><span class=
"sectnum">2.6</span> Option Lists
</a></h2>
311 <p>For listing command-line options:
</p>
312 <dl class=
"option-list">
313 <dt><kbd><span class=
"option">-a
</span></kbd></dt>
314 <dd><p>command-line option
"a
"</p>
316 <dt><kbd><span class=
"option">-b
<var>file
</var></span></kbd></dt>
317 <dd><p>options can have arguments
318 and long descriptions
</p>
320 <dt><kbd><span class=
"option">--long
</span></kbd></dt>
321 <dd><p>options can be long also
</p>
323 <dt><kbd><span class=
"option">--input=
<var>file
</var></span></kbd></dt>
324 <dd><p>long options can also have
327 <dt><kbd><span class=
"option">--very-long-option
</span></kbd></dt>
328 <dd><p>The description can also start on the next line.
</p>
329 <p>The description may contain multiple body elements,
330 regardless of where it starts.
</p>
332 <dt><kbd><span class=
"option">-x
</span>,
<span class=
"option">-y
</span>,
<span class=
"option">-z
</span></kbd></dt>
333 <dd><p>Multiple options are an
"option group
".
</p>
335 <dt><kbd><span class=
"option">-v
</span>,
<span class=
"option">--verbose
</span></kbd></dt>
336 <dd><p>Commonly-seen: short
& long options.
</p>
338 <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>
339 <dd><p>Multiple options with arguments.
</p>
341 <dt><kbd><span class=
"option">/V
</span></kbd></dt>
342 <dd><p>DOS/VMS-style options too
</p>
345 <p>There must be at least two spaces between the option and the
348 <div class=
"section" id=
"literal-blocks">
349 <h2><a class=
"toc-backref" href=
"#id50"><span class=
"sectnum">2.7</span> Literal Blocks
</a></h2>
350 <p>Literal blocks are indicated with a double-colon (
"::
") at the end of
351 the preceding paragraph (over there
<span class=
"docutils literal"><span class=
"pre">--
></span></span>). They can be indented:
</p>
352 <pre class=
"literal-block">if literal_block:
353 text = 'is left as-is'
354 spaces_and_linebreaks = 'are preserved'
355 markup_processing = None
</pre>
356 <p>Or they can be quoted without indentation:
</p>
357 <pre class=
"literal-block">>> Great idea!
359 > Why didn't I think of that?
</pre>
361 <div class=
"section" id=
"line-blocks">
362 <h2><a class=
"toc-backref" href=
"#id51"><span class=
"sectnum">2.8</span> Line Blocks
</a></h2>
363 <p>This section tests line blocks. Line blocks are body elements which
364 consist of lines and other line blocks. Nested line blocks cause
366 <div class=
"line-block">
367 <div class=
"line">This is a line block. It ends with a blank line.
</div>
368 <div class=
"line-block">
369 <div class=
"line">New lines begin with a vertical bar (
"|
").
</div>
370 <div class=
"line">Line breaks and initial indent are significant, and preserved.
</div>
371 <div class=
"line-block">
372 <div class=
"line">Continuation lines are also possible. A long line that is intended
373 to wrap should begin with a space in place of the vertical bar.
</div>
375 <div class=
"line">The left edge of a continuation line need not be aligned with
376 the left edge of the text above it.
</div>
379 <div class=
"line-block">
380 <div class=
"line">This is a second line block.
</div>
381 <div class=
"line"><br /></div>
382 <div class=
"line">Blank lines are permitted internally, but they must begin with a
"|
".
</div>
384 <p>Another line block, surrounded by paragraphs:
</p>
385 <div class=
"line-block">
386 <div class=
"line">And it's no good waiting by the window
</div>
387 <div class=
"line">It's no good waiting for the sun
</div>
388 <div class=
"line">Please believe me, the things you dream of
</div>
389 <div class=
"line">They don't fall in the lap of no-one
</div>
391 <p>Take it away, Eric the Orchestra Leader!
</p>
393 <div class=
"line-block">
394 <div class=
"line">A one, two, a one two three four
</div>
395 <div class=
"line"><br /></div>
396 <div class=
"line">Half a bee, philosophically,
</div>
397 <div class=
"line-block">
398 <div class=
"line">must,
<em>ipso facto
</em>, half not be.
</div>
400 <div class=
"line">But half the bee has got to be,
</div>
401 <div class=
"line-block">
402 <div class=
"line"><em>vis a vis
</em> its entity. D'you see?
</div>
403 <div class=
"line"><br /></div>
405 <div class=
"line">But can a bee be said to be
</div>
406 <div class=
"line-block">
407 <div class=
"line">or not to be an entire bee,
</div>
408 <div class=
"line-block">
409 <div class=
"line">when half the bee is not a bee,
</div>
410 <div class=
"line-block">
411 <div class=
"line">due to some ancient injury?
</div>
412 <div class=
"line"><br /></div>
416 <div class=
"line">Singing...
</div>
419 <p>A line block, like the following poem by Christian Morgenstern, can
420 also be centre-aligned:
</p>
421 <div class=
"align-center line-block" lang=
"de">
422 <div class=
"line"><strong>Die Trichter
</strong></div>
423 <div class=
"line"><br /></div>
424 <div class=
"line">Zwei Trichter wandeln durch die Nacht.
</div>
425 <div class=
"line">Durch ihres Rumpfs verengten Schacht
</div>
426 <div class=
"line">fließt weißes Mondlicht
</div>
427 <div class=
"line">still und heiter
</div>
428 <div class=
"line">auf ihren
</div>
429 <div class=
"line">Waldweg
</div>
430 <div class=
"line">u. s.
</div>
431 <div class=
"line">w.
</div>
432 <div class=
"line"><br /></div>
435 <div class=
"section" id=
"block-quotes">
436 <h2><a class=
"toc-backref" href=
"#id52"><span class=
"sectnum">2.9</span> Block Quotes
</a></h2>
437 <p>Block quotes consist of indented body elements:
</p>
439 <p>My theory by A. Elk. Brackets Miss, brackets. This theory goes
440 as follows and begins now. All brontosauruses are thin at one
441 end, much much thicker in the middle and then thin again at the
442 far end. That is my theory, it is mine, and belongs to me and I
443 own it, and what it is too.
</p>
444 <p class=
"attribution">—
<cite>Anne Elk (Miss)
</cite></p>
446 <p>The language of a quote (like any other object) can be specified by
447 a class attribute:
</p>
449 <blockquote lang=
"fr">
450 <p>ReStructuredText est un langage de balisage léger utilisé
451 notamment dans la documentation du langage Python.
</p>
454 <div class=
"section" id=
"doctest-blocks">
455 <h2><a class=
"toc-backref" href=
"#id53"><span class=
"sectnum">2.10</span> Doctest Blocks
</a></h2>
456 <pre class=
"code pycon doctest-block">>>> print 'Python-specific usage examples; begun with
">>>"'
457 Python-specific usage examples; begun with
">>>"
458 >>> print '(cut and pasted from interactive Python sessions)'
459 (cut and pasted from interactive Python sessions)
462 <div class=
"section" id=
"footnotes">
463 <h2><a class=
"toc-backref" href=
"#id54"><span class=
"sectnum">2.11</span> Footnotes
</a></h2>
464 <dl class=
"footnote">
465 <dt class=
"label" id=
"id8">[
1]
<span class=
"fn-backref">(
<a href=
"#id1">1</a>,
<a href=
"#id9">2</a>,
<a href=
"#id22">3</a>)
</span></dt>
466 <dd><p>A footnote contains body elements, consistently indented by at
468 <p>This is the footnote's second paragraph.
</p>
470 <dt class=
"label" id=
"label">[
2]
<span class=
"fn-backref">(
<a href=
"#id3">1</a>,
<a href=
"#id10">2</a>)
</span></dt>
471 <dd><p>Footnotes may be numbered, either manually (as in
<a class=
"footnote-reference" href=
"#id8" id=
"id9">[
1]
</a>) or
472 automatically using a
"#
"-prefixed label. This footnote has a
473 label so it can be referred to from multiple places, both as a
474 footnote reference (
<a class=
"footnote-reference" href=
"#label" id=
"id10">[
2]
</a>) and as a
<a class=
"reference internal" href=
"#label">hyperlink reference
</a>.
</p>
476 <dt class=
"label" id=
"id12"><a class=
"fn-backref" href=
"#id2">[
3]
</a></dt>
477 <dd><p>This footnote is numbered automatically and anonymously using a
478 label of
"#
" only.
</p>
479 <p>This is the second paragraph.
</p>
480 <p>And this is the third paragraph.
</p>
482 <dt class=
"label" id=
"id13"><a class=
"fn-backref" href=
"#id4">[*]
</a></dt>
483 <dd><p>Footnotes may also use symbols, specified with a
"*
" label.
484 Here's a reference to the next footnote:
<a class=
"footnote-reference" href=
"#id15" id=
"id14">[†]
</a>.
</p>
486 <dt class=
"label" id=
"id15"><a class=
"fn-backref" href=
"#id14">[†]
</a></dt>
487 <dd><p>This footnote shows the next symbol in the sequence.
</p>
489 <dt class=
"label" id=
"id16">[
4]
</dt>
490 <dd><p>Here's an unreferenced footnote, with a reference to a
491 nonexistent footnote:
<a href=
"#id96"><span class=
"problematic" id=
"id97"><span id=
"id17"></span>[
5]_
</span></a>.
</p>
495 <div class=
"section" id=
"citations">
496 <h2><a class=
"toc-backref" href=
"#id55"><span class=
"sectnum">2.12</span> Citations
</a></h2>
497 <dl class=
"citation">
498 <dt class=
"label" id=
"cit2002">[CIT2002]
<span class=
"fn-backref">(
<a href=
"#id5">1</a>,
<a href=
"#id18">2</a>)
</span></dt>
499 <dd><p>Citations are text-labeled footnotes. They may be
500 rendered separately and differently from footnotes.
</p>
503 <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>
506 <div class=
"section" id=
"targets">
507 <span id=
"another-target"></span><h2><a class=
"toc-backref" href=
"#id56"><span class=
"sectnum">2.13</span> Targets
</a></h2>
508 <p id=
"example">This paragraph is pointed to by the explicit
"example
" target. A
509 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
510 hyperlink targets
</a> are also possible.
</p>
511 <p>Section headers are implicit targets, referred to by name. See
512 <a class=
"reference internal" href=
"#targets">Targets
</a>, which is a subsection of
<a class=
"reference internal" href=
"#body-elements">Body Elements
</a>.
</p>
513 <p>Explicit external targets are interpolated into references such as
514 "<a class=
"reference external" href=
"http://www.python.org/">Python
</a> <a class=
"footnote-reference" href=
"#id25" id=
"id27">[
5]
</a>".
</p>
515 <p>Targets may be indirect and anonymous. Thus
<a class=
"reference internal" href=
"#targets">this phrase
</a> may also
516 refer to the
<a class=
"reference internal" href=
"#targets">Targets
</a> section.
</p>
517 <p>Here's a
<a href=
"#id100"><span class=
"problematic" id=
"id101">`hyperlink reference without a target`_
</span></a>, which generates an
519 <div class=
"section" id=
"duplicate-target-names">
520 <h3><a class=
"toc-backref" href=
"#id57"><span class=
"sectnum">2.13.1</span> Duplicate Target Names
</a></h3>
521 <p>Duplicate names in section headers or other implicit targets will
522 generate
"info
" (level-
1) system messages. Duplicate names in
523 explicit targets will generate
"warning
" (level-
2) system messages.
</p>
525 <div class=
"section" id=
"id21">
526 <h3><a class=
"toc-backref" href=
"#id58"><span class=
"sectnum">2.13.2</span> Duplicate Target Names
</a></h3>
527 <p>Since there are two
"Duplicate Target Names
" section headers, we
528 cannot uniquely refer to either of them by name. If we try to (like
529 this:
<a href=
"#id102"><span class=
"problematic" id=
"id103">`Duplicate Target Names`_
</span></a>), an error is generated.
</p>
532 <div class=
"section" id=
"directives">
533 <h2><a class=
"toc-backref" href=
"#id59"><span class=
"sectnum">2.14</span> Directives
</a></h2>
534 <div class=
"contents local topic" id=
"contents">
535 <ul class=
"auto-toc simple">
536 <li><p><a class=
"reference internal" href=
"#document-parts" id=
"id87"><span class=
"sectnum">2.14.1</span> Document Parts
</a></p></li>
537 <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>
538 <li><p><a class=
"reference internal" href=
"#admonitions" id=
"id89"><span class=
"sectnum">2.14.3</span> Admonitions
</a></p></li>
539 <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>
540 <li><p><a class=
"reference internal" href=
"#target-footnotes" id=
"id91"><span class=
"sectnum">2.14.5</span> Target Footnotes
</a></p></li>
541 <li><p><a class=
"reference internal" href=
"#replacement-text" id=
"id92"><span class=
"sectnum">2.14.6</span> Replacement Text
</a></p></li>
542 <li><p><a class=
"reference internal" href=
"#compound-paragraph" id=
"id93"><span class=
"sectnum">2.14.7</span> Compound Paragraph
</a></p></li>
543 <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>
544 <li><p><a class=
"reference internal" href=
"#code" id=
"id95"><span class=
"sectnum">2.14.9</span> Code
</a></p></li>
547 <p>These are just a sample of the many reStructuredText Directives. For
549 <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>
550 <div class=
"section" id=
"document-parts">
551 <h3><a class=
"toc-backref" href=
"#id87"><span class=
"sectnum">2.14.1</span> Document Parts
</a></h3>
552 <p>An example of the
"contents
" directive can be seen above this section
553 (a local, untitled table of
<a class=
"reference internal" href=
"#contents">contents
</a>) and at the beginning of the
554 document (a document-wide
<a class=
"reference internal" href=
"#table-of-contents">table of contents
</a>).
</p>
556 <div class=
"section" id=
"images-and-figures">
557 <h3><a class=
"toc-backref" href=
"#id88"><span class=
"sectnum">2.14.2</span> Images and Figures
</a></h3>
558 <p>An image directive (also clickable -- a hyperlink reference):
</p>
559 <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>
560 <p>Image with multiple IDs:
</p>
561 <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" />
562 <p>A centered image:
</p>
563 <img alt=
"../../../docs/user/rst/images/biohazard.png" class=
"align-center" src=
"../../../docs/user/rst/images/biohazard.png" />
564 <p>A left-aligned image:
</p>
565 <img alt=
"../../../docs/user/rst/images/biohazard.png" class=
"align-left" src=
"../../../docs/user/rst/images/biohazard.png" />
566 <p>This paragraph might flow around the image.
567 The specific behavior depends upon the style sheet and
568 the browser or rendering software used.
</p>
569 <p>A right-aligned image:
</p>
570 <img alt=
"../../../docs/user/rst/images/biohazard.png" class=
"align-right" src=
"../../../docs/user/rst/images/biohazard.png" />
571 <p>This paragraph might flow around the image.
572 The specific behavior depends upon the style sheet and
573 the browser or rendering software used.
</p>
574 <p>For inline images see
<a class=
"reference internal" href=
"#substitution-definitions">Substitution Definitions
</a>.
</p>
576 <p>An image
2 em wide:
</p>
577 <img alt=
"../../../docs/user/rst/images/biohazard.png" src=
"../../../docs/user/rst/images/biohazard.png" style=
"width: 2em;" />
578 <p>An image
2 em wide and
15 pixel high:
</p>
579 <img alt=
"../../../docs/user/rst/images/biohazard.png" src=
"../../../docs/user/rst/images/biohazard.png" style=
"width: 2em; height: 15px;" />
580 <p>An image occupying
50% of the line width:
</p>
581 <img alt=
"../../../docs/user/rst/images/title.png" src=
"../../../docs/user/rst/images/title.png" style=
"width: 50%;" />
582 <p>An image
2 cm high:
</p>
583 <img alt=
"../../../docs/user/rst/images/biohazard.png" src=
"../../../docs/user/rst/images/biohazard.png" style=
"height: 2cm;" />
584 <p>A
<em>figure
</em> is an image with a caption and/or a legend. With page-based output
585 media, figures might float to a different position if this helps the page
587 <div class=
"figclass1 figclass2 figure">
588 <img alt=
"reStructuredText, the markup syntax" class=
"class1 class2" src=
"../../../docs/user/rst/images/title.png" style=
"width: 258px;" />
589 <p class=
"caption">Plaintext markup syntax and parser system.
</p>
593 <col style=
"width: 20%" />
594 <col style=
"width: 80%" />
597 <tr><td><p>re
</p></td>
598 <td><p>Revised, revisited, based on 're' module.
</p></td>
600 <tr><td><p>Structured
</p></td>
601 <td><p>Structure-enhanced text, structuredtext.
</p></td>
603 <tr><td><p>Text
</p></td>
604 <td><p>Well it is, isn't it?
</p></td>
608 <p>This paragraph is also part of the legend.
</p>
611 <p>A left-aligned figure:
</p>
612 <div class=
"figclass1 figclass2 figure align-left" style=
"width: 70%">
613 <img alt=
"reStructuredText, the markup syntax" class=
"class1 class2" src=
"../../../docs/user/rst/images/biohazard.png" style=
"width: 40px;" />
614 <p class=
"caption">This is the caption.
</p>
616 <p>This is the legend.
</p>
617 <p>The legend may consist of several paragraphs.
</p>
620 <p>This paragraph might flow around the figure.
</p>
621 <p>The specific behavior depends upon the style sheet and the browser or
622 rendering software used.
</p>
623 <p>A centered figure:
</p>
624 <div class=
"figure align-center">
625 <img alt=
"../../../docs/user/rst/images/biohazard.png" src=
"../../../docs/user/rst/images/biohazard.png" style=
"width: 40px;" />
626 <p class=
"caption">This is the caption.
</p>
628 <p>This is the legend.
</p>
629 <p>The legend may consist of several paragraphs.
</p>
632 <p>This paragraph might flow around the figure.
</p>
633 <p>The specific behavior depends upon the style sheet and the browser or
634 rendering software used.
</p>
635 <p>A right-aligned figure:
</p>
636 <div class=
"figure align-right">
637 <img alt=
"../../../docs/user/rst/images/biohazard.png" src=
"../../../docs/user/rst/images/biohazard.png" style=
"width: 40px;" />
638 <p class=
"caption">This is the caption.
</p>
640 <p>This is the legend.
</p>
641 <p>The legend may consist of several paragraphs.
</p>
644 <p>This paragraph might flow around the figure. The specific behavior depends
645 upon the style sheet and the browser or rendering software used.
</p>
647 <div class=
"section" id=
"admonitions">
648 <h3><a class=
"toc-backref" href=
"#id89"><span class=
"sectnum">2.14.3</span> Admonitions
</a></h3>
649 <div class=
"admonition attention">
650 <p class=
"admonition-title">Attention!
</p>
651 <p>Directives at large.
</p>
653 <div class=
"admonition caution">
654 <p class=
"admonition-title">Caution!
</p>
655 <p>Don't take any wooden nickels.
</p>
657 <div class=
"admonition danger">
658 <p class=
"admonition-title">!DANGER!
</p>
659 <p>Mad scientist at work!
</p>
661 <div class=
"admonition error">
662 <p class=
"admonition-title">Error
</p>
663 <p>Does not compute.
</p>
665 <div class=
"admonition hint">
666 <p class=
"admonition-title">Hint
</p>
667 <p>It's bigger than a bread box.
</p>
669 <div class=
"admonition important">
670 <p class=
"admonition-title">Important
</p>
672 <li><p>Wash behind your ears.
</p></li>
673 <li><p>Clean up your room.
</p></li>
674 <li><p>Call your mother.
</p></li>
675 <li><p>Back up your data.
</p></li>
678 <div class=
"admonition note">
679 <p class=
"admonition-title">Note
</p>
680 <p>This is a note.
</p>
682 <div class=
"admonition tip">
683 <p class=
"admonition-title">Tip
</p>
684 <p>15% if the service is good.
</p>
686 <div class=
"admonition warning">
687 <p class=
"admonition-title">Warning
</p>
688 <p>Strong prose may provoke extreme mental exertion.
689 Reader discretion is strongly advised.
</p>
691 <div class=
"admonition admonition-and-by-the-way">
692 <p class=
"admonition-title">And, by the way...
</p>
693 <p>You can make up your own admonition too.
</p>
696 <div class=
"section" id=
"topics-sidebars-and-rubrics">
697 <h3><a class=
"toc-backref" href=
"#id90"><span class=
"sectnum">2.14.4</span> Topics, Sidebars, and Rubrics
</a></h3>
698 <p><em>Sidebars
</em> are like miniature, parallel documents.
</p>
699 <div class=
"sidebar">
700 <p class=
"sidebar-title">Sidebar Title
</p>
701 <p class=
"sidebar-subtitle">Optional Subtitle
</p>
702 <p>This is a sidebar. It is for text outside the flow of the main
704 <p class=
"rubric">This is a rubric inside a sidebar
</p>
705 <p>Sidebars often appear beside the main text with a border and a different
706 background or font color.
</p>
708 <p>A
<em>topic
</em> is like a block quote with a title, or a self-contained section
709 with no subsections.
</p>
711 <p class=
"topic-title first">Topic Title
</p>
712 <p>This is a topic.
</p>
714 <p>A
<em>rubric
</em> is like an informal heading that doesn't correspond to the
715 document's structure. It is typically highlighted in red (hence the name).
</p>
716 <p class=
"rubric">This is a rubric
</p>
717 <p>Topics and rubrics can be used at places where a
<a class=
"reference internal" href=
"#section-title">section title
</a> is not
718 allowed (e.g. inside a directive).
</p>
720 <div class=
"section" id=
"target-footnotes">
721 <h3><a class=
"toc-backref" href=
"#id91"><span class=
"sectnum">2.14.5</span> Target Footnotes
</a></h3>
722 <dl class=
"footnote">
723 <dt class=
"label" id=
"id25">[
5]
<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>
724 <dd><p><a class=
"reference external" href=
"http://www.python.org/">http://www.python.org/
</a></p>
726 <dt class=
"label" id=
"id29"><a class=
"fn-backref" href=
"#id30">[
6]
</a></dt>
727 <dd><p><a class=
"reference external" href=
"http://pygments.org/">http://pygments.org/
</a></p>
729 <dt class=
"label" id=
"id31"><a class=
"fn-backref" href=
"#id32">[
7]
</a></dt>
730 <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>
732 <dt class=
"label" id=
"id33"><a class=
"fn-backref" href=
"#id34">[
8]
</a></dt>
733 <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>
735 <dt class=
"label" id=
"id36"><a class=
"fn-backref" href=
"#id37">[
9]
</a></dt>
736 <dd><p><a class=
"reference external" href=
"http://docutils.sourceforge.net/">http://docutils.sourceforge.net/
</a></p>
740 <div class=
"section" id=
"replacement-text">
741 <h3><a class=
"toc-backref" href=
"#id92"><span class=
"sectnum">2.14.6</span> Replacement Text
</a></h3>
742 <p>I recommend you try
<a class=
"reference external" href=
"http://www.python.org/">Python,
<em>the
</em> best language around
</a> <a class=
"footnote-reference" href=
"#id25" id=
"id28">[
5]
</a>.
</p>
744 <div class=
"section" id=
"compound-paragraph">
745 <h3><a class=
"toc-backref" href=
"#id93"><span class=
"sectnum">2.14.7</span> Compound Paragraph
</a></h3>
746 <div class=
"some-class compound">
747 <p class=
"compound-first">Compound
1, paragraph
1.
</p>
748 <p class=
"compound-middle">Compound
1, paragraph
2.
</p>
749 <ul class=
"compound-last simple">
750 <li><p>Compound
1, list item one.
</p></li>
751 <li><p>Compound
1, list item two.
</p></li>
754 <p>Another compound statement:
</p>
755 <div class=
"compound">
756 <p class=
"compound-first">Compound
2, a literal block:
</p>
757 <pre class=
"compound-middle literal-block">Compound
2, literal.
</pre>
758 <p class=
"compound-last">Compound
2, this is a test.
</p>
760 <div class=
"compound">
761 <p>Compound
3, only consisting of one paragraph.
</p>
763 <div class=
"compound">
764 <pre class=
"compound-first literal-block">Compound
4.
765 This one starts with a literal block.
</pre>
766 <p class=
"compound-last">Compound
4, a paragraph.
</p>
768 <p>Now something
<em>really
</em> perverted -- a nested compound block. This is
769 just to test that it works at all; the results don't have to be
771 <div class=
"compound">
772 <p class=
"compound-first">Compound
5, block
1 (a paragraph).
</p>
773 <div class=
"compound-middle compound">
774 <p class=
"compound-first">Compound
6, block
2 in compound
5.
</p>
775 <p class=
"compound-last">Compound
6, another paragraph.
</p>
777 <p class=
"compound-last">Compound
5, block
3 (a paragraph).
</p>
779 <div class=
"compound">
780 <p class=
"compound-first">Compound
7, with a table inside:
</p>
781 <table class=
"compound-middle">
783 <col style=
"width: 33%" />
784 <col style=
"width: 33%" />
785 <col style=
"width: 33%" />
788 <tr><td><p>Left cell, first
797 <td><p>Right cell.
</p>
804 <p class=
"compound-middle">Compound
7, a paragraph after the table.
</p>
805 <p class=
"compound-last">Compound
7, another paragraph.
</p>
808 <div class=
"section" id=
"parsed-literal-blocks">
809 <h3><a class=
"toc-backref" href=
"#id94"><span class=
"sectnum">2.14.8</span> Parsed Literal Blocks
</a></h3>
810 <pre class=
"literal-block">This is a parsed literal block.
811 This line is indented. The next line is blank.
813 Inline markup is supported, e.g.
<em>emphasis
</em>,
<strong>strong
</strong>,
<span class=
"docutils literal">literal
814 text
</span>, footnotes
<a class=
"footnote-reference" href=
"#id8" id=
"id22">[
1]
</a>,
<span class=
"target" id=
"hyperlink-targets">hyperlink targets
</span>, and
<a class=
"reference external" href=
"http://www.python.org/">references
</a>.
</pre>
816 <div class=
"section" id=
"code">
817 <h3><a class=
"toc-backref" href=
"#id95"><span class=
"sectnum">2.14.9</span> Code
</a></h3>
818 <p>Blocks of source code can be set with the
<cite>code
</cite> directive. If the code
819 language is specified, the content is parsed and tagged by the
<a class=
"reference external" href=
"http://pygments.org/">Pygments
</a> <a class=
"footnote-reference" href=
"#id29" id=
"id30">[
6]
</a>
820 syntax highlighter and can be formatted with a style sheet. (Code parsing
821 is turned off using the
<span class=
"docutils literal"><span class=
"pre">syntax-highlight
</span></span> config setting in the test
822 conversions in order to get identical results with/without installed
823 Pygments highlighter.)
</p>
824 <pre class=
"code python literal-block"><code>print 'This is Python code.'
</code></pre>
825 <p>The
<span class=
"docutils literal"><span class=
"pre">:number-lines:
</span></span> option (with optional start value) generates line
827 <pre class=
"code python literal-block"><code><span class=
"ln"> 8 </span># print integers from
0 to
9:
828 <span class=
"ln"> 9 </span>for i in range(
10):
829 <span class=
"ln">10 </span> print i
</code></pre>
830 <p>For inline code snippets, there is the
<cite>code
</cite> role, which can be used
831 directly (the code will not be parsed/tagged, as the language is not known)
832 or as base for special code roles, e.g. the LaTeX code in the next
834 <p>Docutils uses LaTeX syntax for math directives and roles:
835 <code class=
"tex">\alpha = f(x)
</code> prints
<span class=
"formula"><i>α
</i> =
<i>f
</i>(
<i>x
</i>)
</span>.
</p>
836 <p>The
<span class=
"docutils literal">:code:
</span> option of the
<cite>include
</cite> directive sets the included content
837 as a code block, here the rst file
<span class=
"docutils literal">header_footer.txt
</span> with line numbers:
</p>
838 <pre class=
"code rst literal-block"><code><span class=
"ln">1 </span>.. header:: Document header
839 <span class=
"ln">2 </span>.. footer:: Document footer
</code></pre>
842 <div class=
"section" id=
"substitution-definitions">
843 <h2><a class=
"toc-backref" href=
"#id69"><span class=
"sectnum">2.15</span> Substitution Definitions
</a></h2>
844 <p>An inline image (
<img alt=
"EXAMPLE" src=
"../../../docs/user/rst/images/biohazard.png" />) example:
</p>
845 <p>(Substitution definitions are not visible in the HTML source.)
</p>
847 <div class=
"section" id=
"comments">
848 <h2><a class=
"toc-backref" href=
"#id70"><span class=
"sectnum">2.16</span> Comments
</a></h2>
850 <!-- Comments begin with two dots and a space. Anything may
851 follow, except for the syntax of footnotes, hyperlink
852 targets, directives, or substitution definitions.
854 Double-dashes - - "- -" - - must be escaped somehow in HTML output.
856 Comments may contain non-ASCII characters: ä ö ü æ ø å -->
857 <p>(View the HTML source to see the comment.)
</p>
859 <div class=
"section" id=
"raw-text">
860 <h2><a class=
"toc-backref" href=
"#id71"><span class=
"sectnum">2.17</span> Raw text
</a></h2>
861 <p>This does not necessarily look nice, because there may be missing white space.
</p>
862 <p>It's just there to freeze the behavior.
</p>
863 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>
864 Fifth test in HTML.
<br />Line two.
</div>
865 <div class=
"section" id=
"container">
866 <h2><a class=
"toc-backref" href=
"#id72"><span class=
"sectnum">2.18</span> Container
</a></h2>
867 <div class=
"custom docutils container">
872 <div class=
"section" id=
"colspanning-tables">
873 <h2><a class=
"toc-backref" href=
"#id73"><span class=
"sectnum">2.19</span> Colspanning tables
</a></h2>
874 <p>This table has a cell spanning two columns:
</p>
877 <col style=
"width: 31%" />
878 <col style=
"width: 31%" />
879 <col style=
"width: 38%" />
882 <tr><th class=
"head" colspan=
"2"><p>Inputs
</p></th>
883 <th class=
"head"><p>Output
</p></th>
885 <tr><th class=
"head"><p>A
</p></th>
886 <th class=
"head"><p>B
</p></th>
887 <th class=
"head"><p>A or B
</p></th>
891 <tr><td><p>False
</p></td>
892 <td><p>False
</p></td>
893 <td><p>False
</p></td>
895 <tr><td><p>True
</p></td>
896 <td><p>False
</p></td>
899 <tr><td><p>False
</p></td>
903 <tr><td><p>True
</p></td>
910 <div class=
"section" id=
"rowspanning-tables">
911 <h2><a class=
"toc-backref" href=
"#id74"><span class=
"sectnum">2.20</span> Rowspanning tables
</a></h2>
912 <p>Here's a table with cells spanning several rows:
</p>
915 <col style=
"width: 44%" />
916 <col style=
"width: 22%" />
917 <col style=
"width: 33%" />
920 <tr><th class=
"head"><p>Header row, column
1
921 (header rows optional)
</p></th>
922 <th class=
"head"><p>Header
2</p></th>
923 <th class=
"head"><p>Header
3</p></th>
927 <tr><td><p>body row
1, column
1</p></td>
928 <td><p>column
2</p></td>
929 <td><p>column
3</p></td>
931 <tr><td><p>body row
2</p></td>
932 <td rowspan=
"2"><p>Cells may
934 <td rowspan=
"2"><p>Another
938 <tr><td><p>body row
3</p></td>
943 <div class=
"section" id=
"complex-tables">
944 <h2><a class=
"toc-backref" href=
"#id75"><span class=
"sectnum">2.21</span> Complex tables
</a></h2>
945 <p>Here's a complex table, which should test all features.
</p>
948 <col style=
"width: 43%" />
949 <col style=
"width: 21%" />
950 <col style=
"width: 18%" />
951 <col style=
"width: 18%" />
954 <tr><th class=
"head"><p>Header row, column
1
955 (header rows optional)
</p></th>
956 <th class=
"head"><p>Header
2</p></th>
957 <th class=
"head"><p>Header
3</p></th>
958 <th class=
"head"><p>Header
4</p></th>
962 <tr><td><p>body row
1, column
1</p></td>
963 <td><p>column
2</p></td>
964 <td><p>column
3</p></td>
965 <td><p>column
4</p></td>
967 <tr><td><p>body row
2</p></td>
968 <td colspan=
"3"><p>Cells may span columns.
</p></td>
970 <tr><td><p>body row
3</p></td>
971 <td rowspan=
"2"><p>Cells may
975 <td colspan=
"2" rowspan=
"2"><ul class=
"simple">
976 <li><p>Table cells
</p></li>
977 <li><p>contain
</p></li>
978 <li><p>body elements.
</p></li>
982 <tr><td><p>body row
4</p></td>
984 <tr><td><p>body row
5</p></td>
985 <td colspan=
"2"><p>Cells may also be
986 empty:
<span class=
"docutils literal"><span class=
"pre">--
></span></span></p></td>
992 <div class=
"section" id=
"list-tables">
993 <h2><a class=
"toc-backref" href=
"#id76"><span class=
"sectnum">2.22</span> List Tables
</a></h2>
994 <p>Here's a list table exercising all features:
</p>
996 <caption>list table with integral header
</caption>
998 <col style=
"width: 17%" />
999 <col style=
"width: 33%" />
1000 <col style=
"width: 50%" />
1003 <tr><th class=
"head stub"><p>Treat
</p></th>
1004 <th class=
"head"><p>Quantity
</p></th>
1005 <th class=
"head"><p>Description
</p></th>
1009 <tr><th class=
"stub"><p>Albatross
</p></th>
1010 <td><p>2.99</p></td>
1011 <td><p>On a stick!
</p></td>
1013 <tr><th class=
"stub"><p>Crunchy Frog
</p></th>
1014 <td><p>1.49</p></td>
1015 <td><p>If we took the bones out, it wouldn't be
1016 crunchy, now would it?
</p></td>
1018 <tr><th class=
"stub"><p>Gannet Ripple
</p></th>
1019 <td><p>1.99</p></td>
1020 <td><p>On a stick!
</p></td>
1025 <div class=
"section" id=
"custom-roles">
1026 <h2><a class=
"toc-backref" href=
"#id77"><span class=
"sectnum">2.23</span> Custom Roles
</a></h2>
1028 <li><p>A role based on an existing role.
</p>
1029 <p><span class=
"custom docutils literal">one
</span> <span class=
"custom docutils literal">two
</span> <span class=
"custom docutils literal">three
</span></p>
1031 <li><p>A new role.
</p>
1032 <p><span class=
"customnew">one two three
</span></p>
1034 <li><p>A role with class attribute.
</p>
1035 <p><span class=
"special">interpreted text
</span></p>
1037 <li><p>A language-switching role:
</p>
1038 <p>Let's count in German
<span lang=
"de">eins zwei drei
</span>.
</p>
1040 <li><p>A role with multiple class attributes, styled with raw directives:
</p>
1041 <p>The following works in most browsers but does not validate
1042 (
<span class=
"docutils literal"><style
></span> is only allowed in the document head):
</p>
1043 <pre class=
"literal-block">.. raw:: html
1045 <style type=
"text/css
"><!--
1046 .green {color: green;}
1047 .sc {font-variant: small-caps;}
1048 --
></style
></pre>
1049 <p><span class=
"green sc" lang=
"en-gb">British colourful text in small-caps
</span>.
</p>
1053 <div class=
"section" id=
"svg-images">
1054 <h2><a class=
"toc-backref" href=
"#id78"><span class=
"sectnum">2.24</span> SVG Images
</a></h2>
1055 <img alt=
"../../../docs/user/rst/images/biohazard.svg" class=
"align-left" src=
"../../../docs/user/rst/images/biohazard.svg" style=
"width: 48px; height: 48px;" />
1056 <p>Scalable vector graphics (SVG) images are the only standards-compliable way
1057 to include vector graphics in HTML documents. However, they are not
1058 supported by all backends/output formats. (E.g., LaTeX supports the
1059 PDF or Postscript formats for vector graphics instead.)
</p>
1060 <p>Rendering behaviour varies, depending on
</p>
1061 <ol class=
"loweralpha">
1062 <li><p>The SVG image itself, e.g. fixed-size vs. scaling:
</p>
1063 <pre class=
"literal-block">width=
"280" viewBox=
"0 0 280 27"
1064 height=
"27" width=
"100%
"
1065 height=
"100%
"</pre>
1067 <li><p>The method used to put the image in the document.
</p>
1068 <p>For HTML, there are several alternatives including:
</p>
1070 <li><p>using the HTML
<span class=
"docutils literal"><img
></span> tag (not for interactive/animated SVG),
</p></li>
1071 <li><p>using the HTML
<span class=
"docutils literal"><object
></span> tag,
</p></li>
1072 <li><p>including within SVG using the SVG
<span class=
"docutils literal"><image
></span> tag,
</p></li>
1073 <li><p>embedd the SVG code within HTML (inlining).
</p></li>
1075 <p>The
<cite>html4css1
</cite> writer uses
<span class=
"docutils literal"><object
></span> tags, the
<cite>html-base
</cite> and
<cite>xhtml11
</cite>
1076 writers use
<span class=
"docutils literal"><img
></span> tags.
</p>
1077 <!-- cf. http://edutechwiki.unige.ch/en/Using_SVG_with_HTML5_tutorial -->
1079 <li><p>The viewing agent.
</p>
1080 <p>All up-to-date HTML browsers support SVG, however not all do this fully
1081 and in the same manner. Many older versions, especially IE
< 9, have
1082 deficiencies or require plug-ins (i.e. don't support the
<span class=
"docutils literal"><img
></span> tag).
</p>
1085 <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
1086 <span class=
"docutils literal">viewBox
</span> declaration inside the images root
<span class=
"docutils literal"><svg
></span> element whether an
1087 SVG image is scaled or clipped/padded. Images wrapped in
<span class=
"docutils literal"><img
></span> are
1090 <li><img alt=
"../../../docs/user/rst/images/title-scaling.svg" class=
"align-right" src=
"../../../docs/user/rst/images/title-scaling.svg" style=
"width: 50%;" />
1091 <p>A scaling image (scales with the browser window), occupying
50% of the line
1092 width. The
<span class=
"docutils literal">viewBox
</span> setting in the image file enables auto-scaling also in
1093 <span class=
"docutils literal"><object
></span> tags and embedded SVG (if width and hight are set to
100% in the
1094 SVG
<image
> tag).
</p>
1096 <li><img alt=
"../../../docs/user/rst/images/title.svg" class=
"align-right" src=
"../../../docs/user/rst/images/title.svg" style=
"width: 50%; height: 15px;" />
1097 <p>A fixed-size image in a box
50% wide and
15 pixles high. This image is
1098 scaled, if wrapped in an
<span class=
"docutils literal"><img
></span> tag but clipped in an
<span class=
"docutils literal"><object
></span> tag
1101 <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;" />
1102 <p>A right aligned, scaling image
50% wide and
1.5 em high. (This SVG image
1103 keeps the aspect ratio.)
</p>
1105 <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>
1107 <li><img alt=
"../../../docs/user/rst/images/biohazard-scaling.svg" class=
"align-right" src=
"../../../docs/user/rst/images/biohazard-scaling.svg" style=
"height: 1em;" />
1108 <p>A scaling image
1 em high, right aligned:
</p>
1110 <li><p>A scaling image
5 mm x
5 mm, centered, with hyperlink reference:
</p>
1111 <a class=
"reference external image-reference" href=
"SVGImages_"><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>
1113 <li><img alt=
"../../../docs/user/rst/images/biohazard.svg" class=
"align-right" src=
"../../../docs/user/rst/images/biohazard.svg" style=
"width: 4cm; height: 2em;" />
1114 <p>A fixed-size image in a
4 cm x
2 em box.
</p>
1117 <p>Older versions of
<cite>webkit
</cite> based browsers (chromium, safari, midori,
1118 konqueror) support the
<span class=
"docutils literal"><img
></span> tag but don't display contained bitmap
1119 images in this case.
</p>
1121 <li><img alt=
"../../../docs/user/rst/images/biohazard-bitmap.svg" class=
"align-right" src=
"../../../docs/user/rst/images/biohazard-bitmap.svg" style=
"width: 3em;" />
1122 <p>A small, fixed-size SVG image with embedded bitmap, The
<span class=
"docutils literal">:width:
</span> is
1123 set to
3 em in the rST source. Does not scale if wrapped in
<span class=
"docutils literal"><object
></span>
1126 <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;" />
1127 <p>A scaling SVG image with embedded bitmap,
3 em wide.
</p>
1130 <p>SVG images can also be put in figures:
</p>
1132 <div class=
"figure align-center">
1133 <img alt=
"reStructuredText, the markup syntax" src=
"../../../docs/user/rst/images/title.svg" style=
"width: 290px; height: 28px;" />
1134 <p class=
"caption"><strong>Figure:
</strong> SVG image in a figure.
</p>
1138 <div class=
"section" id=
"swf-images">
1139 <h2><a class=
"toc-backref" href=
"#id79"><span class=
"sectnum">2.25</span> SWF Images
</a></h2>
1140 <p>Shockwave Flash is an image/movie format that most modern web browsers
1141 support via a plugin. It is sometimes blocked due to privacy/security
1143 <p>Images with extension
<span class=
"docutils literal">.swf
</span> are placed inside
<object
> elements.
1144 For complete control over display options use raw HTML.
</p>
1145 <object class=
"align-left" data=
"../../../docs/user/rst/images/biohazard.swf" style=
"width: 4cm; height: 2em;" type=
"application/x-shockwave-flash">
1146 [biohazard.swf]
</object>
1147 <p>An SWF image in a
4 cm x
2 em box, left aligned.
</p>
1148 <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>
1151 <div class=
"section" id=
"changes-to-the-html4css1-writer">
1152 <h1><a class=
"toc-backref" href=
"#id80"><span class=
"sectnum">3</span> Changes to the html4css1 writer
</a></h1>
1154 <li><p>Use only meta keywords recognized by HTML
5.
</p></li>
1155 <li><p>Style table column widths with CSS rule, not
"width
" argument.
</p></li>
1156 <li><p>Vertical alignment of table heads with CSS.
</p></li>
1157 <li><p>Field lists as styled definition lists.
</p></li>
1158 <li><p>Do not drop paragraph objects, use CSS rules to prevent unwanted vertical
1160 <li><p>Put subtitles in
<p
> elements.
</p></li>
1162 <div class=
"section" id=
"description-list">
1163 <h2><a class=
"toc-backref" href=
"#id81"><span class=
"sectnum">3.1</span> Description list
</a></h2>
1164 <p>Definition lists with the
<span class=
"docutils literal">description
</span> class argument:
</p>
1165 <dl class=
"description simple">
1166 <dt>description lists
</dt>
1167 <dd><p>Lists that are styled like in most dictionaries, encyclopedias
1168 etc. (as well as the LaTeX
<cite>description
</cite> environment).
</p>
1171 <dd><p>The term to be described. Put in boldface.
</p>
1174 <dd><p>starts on the same line and has a hanging indent.
</p>
1178 <div class=
"section" id=
"field-list-handling">
1179 <h2><a class=
"toc-backref" href=
"#id82"><span class=
"sectnum">3.2</span> Field list handling
</a></h2>
1180 <p>The following list demonstrates the problems with the html4css1
1181 approach: the
<cite>field-name-limit
</cite> setting is given in
"number of
1182 characters
" but the field name uses a proportional font.
</p>
1183 <dl class=
"field-list simple">
1184 <dt>The field name
</dt>
1185 <dd><p>is typeset on the same line, unless it is
"long
".
</p>
1187 <dt>this field name
</dt>
1188 <dd><p>is considered
"long
" in the html table rendering by
1189 the html4css1 writer with the default setting of
1190 <span class=
"docutils literal"><span class=
"pre">--field-name-limit=
14</span></span>.
</p>
1192 <dt>iiiiiiiiiiiiiii
</dt>
1193 <dd><p>a field name that is considered
"long
" by html4css1
1194 with the default setting of
<cite>field-name-limit:
14</cite>.
</p>
1196 <dt>MMMMMMMMMMMMMM
</dt>
1197 <dd><p>a field name that is actually longer than the
1198 previous one but regarded
"short
" by html4css1.
</p>
1201 <p>With
<cite>html4css2
</cite>, a
<cite>field list
</cite> is typeset as CSS-styled
<cite>definition
1202 list
</cite>. The default layout is similar to the look with
<cite>html4css1
</cite>:
</p>
1203 <dl class=
"open field-list">
1204 <dt>A long field name
</dt>
1205 <dd><p>sticks into the field body.
</p>
1206 <p>The field body is pushed to the next line (you can suppress
1207 this behaviour with the
<a class=
"reference internal" href=
"#run-in">run-in
</a> class argument).
</p>
1209 <dt>Customization
</dt>
1210 <dd><p>of the field name width is possible with CSS instead
1211 of the
<cite>field-name-limit
</cite> configuration setting, for
1213 <pre class=
"literal-block">dl.field-list
> dd { margin-left:
6em; }
</pre>
1216 <div class=
"section" id=
"styling-with-class-arguments">
1217 <h3><a class=
"toc-backref" href=
"#id83"><span class=
"sectnum">3.2.1</span> Styling with class arguments
</a></h3>
1218 <p>The
<span class=
"docutils literal">xhtml11.css
</span> style sheet supports the following class arguments
1219 for alternative styles:
</p>
1221 <dt><em>compact
</em></dt>
1222 <dd><dl class=
"compact field-list simple">
1224 <dd><p>No additional space between list items.
</p>
1227 <dd><p>The
<span class=
"docutils literal"><span class=
"pre">--compact-field-lists
</span></span> command line option (and the
1228 corresponding configuration setting) set the
<cite>compact
</cite>
1229 class argument on all
"simple
" field lists, if not
1230 overridden with
<cite>open
</cite>.
</p>
1233 <dd><p>For lists with short field body.
</p>
1237 <dt><em>open
</em></dt>
1238 <dd><dl class=
"open field-list">
1240 <dd><p>Additional space between list items also in
"simple
" lists.
1241 (Overrides the
<span class=
"docutils literal"><span class=
"pre">--compact-field-lists
</span></span> command line
1242 option and the corresponding configuration setting)
</p>
1245 <dd><p>For
"simple
" lists that should keep the space between list items.
</p>
1249 <dt><em>narrow
</em></dt>
1250 <dd><dl class=
"narrow field-list simple">
1252 <dd><p>Less indented field body.
</p>
1255 <dd><p>For lists with short field names.
</p>
1257 <dt>A long field name
</dt>
1258 <dd><p>sticks into the field body and the field body starts on a
1259 new line (if not combined with
<a class=
"reference internal" href=
"#run-in">run-in
</a>).
</p>
1264 <dl class=
"simple" id=
"run-in">
1265 <dt><em>run-in
</em></dt>
1266 <dd><dl class=
"run-in field-list simple">
1268 <dd><p>Field body starts on the same line also after long field
1271 <dt>A long field name
</dt>
1272 <dd><p>sticks into the field body which continues on
1275 <dt>The next field name
</dt>
1276 <dd><p>and field body should align. Long text in the field
1277 body is wrapped and aligns with other fields.
</p>
1284 <div class=
"section" id=
"table-styling-with-class-arguments">
1285 <h2><a class=
"toc-backref" href=
"#id84"><span class=
"sectnum">3.3</span> Table styling with class arguments
</a></h2>
1286 <p>The
<span class=
"docutils literal"><span class=
"pre">html-base.css
</span></span> style sheet provides rules for easy styling of tables
1287 with the
"class
" directive or directive argument.
</p>
1288 <p>Numbered tables can be achieved with the
<span class=
"docutils literal">numbered
</span> class option
</p>
1289 <table class=
"numbered">
1290 <caption>truth values
</caption>
1292 <col style=
"width: 29%" />
1293 <col style=
"width: 29%" />
1294 <col style=
"width: 42%" />
1297 <tr><th class=
"head"><p>A
</p></th>
1298 <th class=
"head"><p>B
</p></th>
1299 <th class=
"head"><p>A or B
</p></th>
1303 <tr><td><p>False
</p></td>
1304 <td><p>False
</p></td>
1305 <td><p>False
</p></td>
1307 <tr><td><p>True
</p></td>
1308 <td><p>False
</p></td>
1309 <td><p>True
</p></td>
1311 <tr><td><p>False
</p></td>
1312 <td><p>True
</p></td>
1313 <td><p>True
</p></td>
1315 <tr><td><p>True
</p></td>
1316 <td><p>True
</p></td>
1317 <td><p>True
</p></td>
1321 <p>Currently, referencing to the table by number is not supported. This is a
1322 common request and already on the
<cite>TODO list
</cite>.
</p>
1323 <p>In addition to the
"borderless
" <a class=
"reference external" href=
"http://docutils.sourceforge.net/docs/user/config.html#table-style">table-style
</a> <a class=
"footnote-reference" href=
"#id31" id=
"id32">[
7]
</a>, the style sheet also
1324 defines
"booktabs
", that will be rendered similar to the style from
1325 the
<a class=
"reference external" href=
"http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf">booktabs
</a> <a class=
"footnote-reference" href=
"#id33" id=
"id34">[
8]
</a> LaTeX package.
</p>
1326 <table class=
"booktabs">
1328 <col style=
"width: 31%" />
1329 <col style=
"width: 31%" />
1330 <col style=
"width: 38%" />
1333 <tr><td><p>False
</p></td>
1334 <td><p>False
</p></td>
1335 <td><p>False
</p></td>
1337 <tr><td><p>True
</p></td>
1338 <td><p>False
</p></td>
1339 <td><p>True
</p></td>
1341 <tr><td><p>False
</p></td>
1342 <td><p>True
</p></td>
1343 <td><p>True
</p></td>
1345 <tr><td><p>True
</p></td>
1346 <td><p>True
</p></td>
1347 <td><p>True
</p></td>
1351 <p>This table also uses the
"align-left
" class argument, to left-align
1353 <table class=
"booktabs align-left">
1355 <col style=
"width: 29%" />
1356 <col style=
"width: 29%" />
1357 <col style=
"width: 41%" />
1360 <tr><th class=
"head"><p>A
</p></th>
1361 <th class=
"head"><p>B
</p></th>
1362 <th class=
"head"><p>A or B
</p></th>
1366 <tr><td><p>False
</p></td>
1367 <td><p>False
</p></td>
1368 <td><p>False
</p></td>
1370 <tr><td><p>True
</p></td>
1371 <td><p>False
</p></td>
1372 <td><p>True
</p></td>
1374 <tr><td><p>False
</p></td>
1375 <td><p>True
</p></td>
1376 <td><p>True
</p></td>
1378 <tr><td><p>True
</p></td>
1379 <td><p>True
</p></td>
1380 <td><p>True
</p></td>
1384 <p>Of course, also
"booktabs
" style tables can be numbered:
</p>
1385 <table class=
"numbered booktabs">
1386 <caption>I/O values
</caption>
1388 <col style=
"width: 31%" />
1389 <col style=
"width: 31%" />
1390 <col style=
"width: 38%" />
1393 <tr><th class=
"head" colspan=
"2"><p>Inputs
</p></th>
1394 <th class=
"head"><p>Output
</p></th>
1396 <tr><th class=
"head"><p>A
</p></th>
1397 <th class=
"head"><p>B
</p></th>
1398 <th class=
"head"><p>A or B
</p></th>
1402 <tr><td><p>False
</p></td>
1403 <td><p>False
</p></td>
1404 <td><p>False
</p></td>
1406 <tr><td><p>True
</p></td>
1407 <td><p>False
</p></td>
1408 <td><p>True
</p></td>
1410 <tr><td><p>False
</p></td>
1411 <td><p>True
</p></td>
1412 <td><p>True
</p></td>
1414 <tr><td><p>True
</p></td>
1415 <td><p>True
</p></td>
1416 <td><p>True
</p></td>
1421 <div class=
"section" id=
"maths">
1422 <h2><a class=
"toc-backref" href=
"#id85"><span class=
"sectnum">3.4</span> Maths
</a></h2>
1423 <p>For maximal compatibility, the
<span class=
"docutils literal"><span class=
"pre">html-output
</span></span> setting defaults to »HTML«.
1424 (HTML
5 accepts also MathML and SVG as nested languages.)
</p>
1425 <p>The linear mapping
<span class=
"formula"><i>f
</i> : ℂ
<sup><i>N
</i></sup>⟼ℂ
<sup><i>N
</i></sup></span>
1427 <div class=
"formula">
1428 <i>c
</i><sub><i>k
</i></sub> =
<i>F
</i>(
<i>kf
</i><sub>0</sub>) =
<i>T
</i><sub><span class=
"text">A
</span></sub><span class=
"limits"><sup class=
"limit"> +
<i>N
</i> ⁄
2</sup><span class=
"limit">⎲
</span><span class=
"limit">⎳
</span><sub class=
"limit"><i>n
</i> = −
<i>N
</i> ⁄
2</sub></span><i>f
</i>(
<i>x
</i><sub><i>n
</i></sub>)
<span class=
"text">e
</span><sup> −
2<i>π
</i><span class=
"text">i
</span><span class=
"fraction"><span class=
"ignored">(
</span><span class=
"numerator"><i>nk
</i></span><span class=
"ignored">)/(
</span><span class=
"denominator"><i>N
</i></span><span class=
"ignored">)
</span></span></sup>
1430 <p>for all
<span class=
"formula"><i>a
</i> ∈ ℂ
<sup><i>N
</i></sup></span> is called discrete Fourier
1431 transformation (DFT).
</p>
1434 <div class=
"section" id=
"error-handling">
1435 <h1><a class=
"toc-backref" href=
"#id86"><span class=
"sectnum">4</span> Error Handling
</a></h1>
1436 <p>Any errors caught during processing will generate system messages.
</p>
1437 <p>There should be five messages in the following, auto-generated
1438 section,
"Docutils System Messages
":
</p>
1439 <!-- section should be added by Docutils automatically -->
1441 <div class=
"system-messages section">
1442 <h1>Docutils System Messages
</h1>
1443 <div class=
"system-message" id=
"id23">
1444 <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>
1445 <p>Undefined substitution referenced:
"problematic
".
</p>
1447 <div class=
"system-message" id=
"id96">
1448 <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>
1449 <p>Unknown target name:
"5".
</p>
1451 <div class=
"system-message" id=
"id98">
1452 <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>
1453 <p>Unknown target name:
"nonexistent
".
</p>
1455 <div class=
"system-message" id=
"id100">
1456 <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>
1457 <p>Unknown target name:
"hyperlink reference without a target
".
</p>
1459 <div class=
"system-message" id=
"id102">
1460 <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>
1461 <p>Duplicate target name, cannot be used as a unique reference:
"duplicate target names
".
</p>
1465 <div class=
"footer">
1466 <hr class=
"footer" />
1467 <p>Document footer
</p>
1468 <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>