1 <document ids="restructuredtext-test-document doctitle" names="restructuredtext\ test\ document doctitle" source="functional/input/standalone_rst_pseudoxml.txt" title="reStructuredText Test Document">
3 reStructuredText Test Document
4 <subtitle ids="examples-of-syntax-constructs subtitle" names="examples\ of\ syntax\ constructs subtitle">
5 Examples of Syntax Constructs
16 <address xml:space="preserve">
21 <reference refuri="mailto:goodger@python.org">
33 Now, or yesterday. Or maybe even
38 This is a "work in progress"
40 is managed by a version control system.
44 This document has been placed in the public domain. You
45 may do with it as you wish. You may copy, modify,
46 redistribute, reattribute, sell, buy, rent, lease,
47 destroy, or improve it, quote it at length, excerpt,
48 incorporate, collate, fold, staple, or mutilate it, or do
49 anything else to it that your or anyone else's heart
56 This is a "generic bibliographic field".
62 Generic bibliographic fields may contain multiple body elements.
65 <topic classes="dedication">
69 For Docutils users & co-developers.
70 <topic classes="abstract">
74 This is a test document, containing at least one example of each
75 reStructuredText construct.
76 <comment xml:space="preserve">
77 This is a comment. Note how any initial comments are moved by
78 transforms to after the document title, subtitle, and docinfo.
79 <target refid="doctitle">
80 <comment xml:space="preserve">
81 Above is the document title, and below is the subtitle.
82 They are transformed from section titles after parsing.
83 <target refid="subtitle">
84 <comment xml:space="preserve">
85 bibliographic fields (which also require a transform):
86 <meta content="reStructuredText, test, parser" name="keywords">
87 <meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description">
88 <raw format="latex" xml:space="preserve">
89 \pagebreak[4] % start ToC on new page
90 <topic classes="contents" ids="table-of-contents" names="table\ of\ contents">
93 <bullet_list classes="auto-toc">
96 <reference ids="id34" refid="structural-elements">
97 <generated classes="sectnum">
100 <bullet_list classes="auto-toc">
103 <reference ids="id35" refid="section-title">
104 <generated classes="sectnum">
109 <reference ids="id36" refid="empty-section">
110 <generated classes="sectnum">
115 <reference ids="id37" refid="transitions">
116 <generated classes="sectnum">
121 <reference ids="id38" refid="body-elements">
122 <generated classes="sectnum">
125 <bullet_list classes="auto-toc">
128 <reference ids="id39" refid="paragraphs">
129 <generated classes="sectnum">
132 <bullet_list classes="auto-toc">
135 <reference ids="id40" refid="inline-markup">
136 <generated classes="sectnum">
141 <reference ids="id41" refid="bullet-lists">
142 <generated classes="sectnum">
147 <reference ids="id42" refid="enumerated-lists">
148 <generated classes="sectnum">
153 <reference ids="id43" refid="definition-lists">
154 <generated classes="sectnum">
159 <reference ids="id44" refid="field-lists">
160 <generated classes="sectnum">
165 <reference ids="id45" refid="option-lists">
166 <generated classes="sectnum">
171 <reference ids="id46" refid="literal-blocks">
172 <generated classes="sectnum">
177 <reference ids="id47" refid="line-blocks">
178 <generated classes="sectnum">
183 <reference ids="id48" refid="block-quotes">
184 <generated classes="sectnum">
189 <reference ids="id49" refid="doctest-blocks">
190 <generated classes="sectnum">
195 <reference ids="id50" refid="footnotes">
196 <generated classes="sectnum">
201 <reference ids="id51" refid="citations">
202 <generated classes="sectnum">
207 <reference ids="id52" refid="targets">
208 <generated classes="sectnum">
211 <bullet_list classes="auto-toc">
214 <reference ids="id53" refid="duplicate-target-names">
215 <generated classes="sectnum">
217 Duplicate Target Names
220 <reference ids="id54" refid="id21">
221 <generated classes="sectnum">
223 Duplicate Target Names
226 <reference ids="id55" refid="directives">
227 <generated classes="sectnum">
230 <bullet_list classes="auto-toc">
233 <reference ids="id56" refid="document-parts">
234 <generated classes="sectnum">
239 <reference ids="id57" refid="images-and-figures">
240 <generated classes="sectnum">
245 <reference ids="id58" refid="admonitions">
246 <generated classes="sectnum">
251 <reference ids="id59" refid="topics-sidebars-and-rubrics">
252 <generated classes="sectnum">
254 Topics, Sidebars, and Rubrics
257 <reference ids="id60" refid="target-footnotes">
258 <generated classes="sectnum">
263 <reference ids="id61" refid="replacement-text">
264 <generated classes="sectnum">
269 <reference ids="id62" refid="compound-paragraph">
270 <generated classes="sectnum">
275 <reference ids="id63" refid="parsed-literal-blocks">
276 <generated classes="sectnum">
278 Parsed Literal Blocks
281 <reference ids="id64" refid="code">
282 <generated classes="sectnum">
287 <reference ids="id65" refid="substitution-definitions">
288 <generated classes="sectnum">
290 Substitution Definitions
293 <reference ids="id66" refid="comments">
294 <generated classes="sectnum">
299 <reference ids="id67" refid="raw-text">
300 <generated classes="sectnum">
305 <reference ids="id68" refid="container">
306 <generated classes="sectnum">
311 <reference ids="id69" refid="colspanning-tables">
312 <generated classes="sectnum">
317 <reference ids="id70" refid="rowspanning-tables">
318 <generated classes="sectnum">
323 <reference ids="id71" refid="complex-tables">
324 <generated classes="sectnum">
329 <reference ids="id72" refid="list-tables">
330 <generated classes="sectnum">
335 <reference ids="id73" refid="error-handling">
336 <generated classes="sectnum">
339 <section ids="structural-elements" names="structural\ elements">
340 <title auto="1" refid="id34">
341 <generated classes="sectnum">
344 <section ids="section-title" names="section\ title">
345 <title auto="1" refid="id35">
346 <generated classes="sectnum">
349 <subtitle ids="section-subtitle" names="section\ subtitle">
352 Lone subsections are converted to a section subtitle by a transform
356 command line option or the
360 <section ids="empty-section" names="empty\ section">
361 <title auto="1" refid="id36">
362 <generated classes="sectnum">
365 <section ids="transitions" names="transitions">
366 <title auto="1" refid="id37">
367 <generated classes="sectnum">
374 It divides the section. Transitions may also occur between sections:
376 <section ids="body-elements" names="body\ elements">
377 <title auto="1" refid="id38">
378 <generated classes="sectnum">
381 <section ids="paragraphs" names="paragraphs">
382 <title auto="1" refid="id39">
383 <generated classes="sectnum">
388 <section ids="inline-markup" names="inline\ markup">
389 <title auto="1" refid="id40">
390 <generated classes="sectnum">
394 Paragraphs contain text and may contain inline markup:
403 , standalone hyperlinks
405 <reference refuri="http://www.python.org">
406 http://www.python.org
407 ), external hyperlinks (
408 <reference name="Python" refuri="http://www.python.org/">
411 <footnote_reference auto="1" ids="id26" refid="id25">
415 <reference name="example" refid="example">
417 ), external hyperlinks with embedded URIs
419 <reference name="Python web site" refuri="http://www.python.org">
422 <reference anonymous="1" name="anonymous hyperlink references" refuri="http://www.python.org/">
426 <footnote_reference auto="1" ids="id31" refid="id25">
429 <reference anonymous="1" name="a second reference" refuri="http://docutils.sourceforge.net/">
432 <footnote_reference auto="1" ids="id33" refid="id32">
434 ), footnote references (manually
436 <footnote_reference ids="id1" refid="id8">
438 , anonymous auto-numbered
439 <footnote_reference auto="1" ids="id2" refid="id12">
441 , labeled auto-numbered
442 <footnote_reference auto="1" ids="id3" refid="label">
445 <footnote_reference auto="*" ids="id4" refid="id13">
447 ), citation references (
448 <citation_reference ids="id5" refid="cit2002">
451 substitution references (
452 <image alt="EXAMPLE" uri="../../../docs/user/rst/images/biohazard.png">
454 <target ids="inline-hyperlink-targets" names="inline\ hyperlink\ targets">
455 inline hyperlink targets
458 <reference name="Targets" refid="targets">
460 below for a reference back to here). Character-level
461 inline markup is also possible (although exceedingly ugly!) in
468 . Problems are indicated by
469 <problematic ids="id24" refid="id23">
472 (generated by processing errors; this one is intentional). Here is a
474 <reference name="doctitle" refid="doctitle">
477 <reference name="subtitle" refid="subtitle">
480 <target anonymous="1" ids="id6" refuri="http://www.python.org/">
481 <target anonymous="1" ids="id7" refuri="http://docutils.sourceforge.net/">
483 The default role for interpreted text is
487 some explicit interpreted text roles: a PEP reference (
488 <reference refuri="http://www.python.org/dev/peps/pep-0287">
492 <reference refuri="http://www.faqs.org/rfcs/rfc2822.html">
502 <literal classes="code">
511 and explicit roles for
524 <comment xml:space="preserve">
525 DO NOT RE-WRAP THE FOLLOWING PARAGRAPH!
527 Let's test wrapping and whitespace significance in inline literals:
529 This is an example of --inline-literal --text, --including some--
530 strangely--hyphenated-words. Adjust-the-width-of-your-browser-window
531 to see how the text is wrapped. -- ---- -------- Now note the
532 spacing between the words of this sentence (words
533 should be grouped in pairs).
538 option was supplied, there should be a
539 live link to PEP 258 here.
540 <section ids="bullet-lists" names="bullet\ lists">
541 <title auto="1" refid="id41">
542 <generated classes="sectnum">
545 <bullet_list bullet="-">
549 <bullet_list bullet="+">
560 Paragraph 2 of item 2.
561 <bullet_list bullet="*">
568 <bullet_list bullet="-">
580 This nested list should be compacted by the HTML writer.
581 <target ids="target" names="target">
582 <comment xml:space="preserve">
583 Even if this item contains a target and a comment.
584 <section ids="enumerated-lists" names="enumerated\ lists">
585 <title auto="1" refid="id42">
586 <generated classes="sectnum">
589 <enumerated_list enumtype="arabic" prefix="" suffix=".">
593 <enumerated_list enumtype="loweralpha" prefix="" suffix=")">
597 <enumerated_list enumtype="lowerroman" prefix="(" suffix=")">
601 <enumerated_list enumtype="upperalpha" prefix="" suffix=".">
605 <enumerated_list enumtype="upperroman" prefix="" suffix=")">
611 Lists that don't start at 1:
612 <enumerated_list enumtype="arabic" prefix="" start="3" suffix=".">
619 <enumerated_list enumtype="upperalpha" prefix="" start="3" suffix=".">
626 <enumerated_list enumtype="lowerroman" prefix="" start="3" suffix=".">
633 <section ids="definition-lists" names="definition\ lists">
634 <title auto="1" refid="id43">
635 <generated classes="sectnum">
639 <definition_list_item>
645 <definition_list_item>
652 Definition paragraph 1.
654 Definition paragraph 2.
655 <definition_list_item>
661 <definition_list_item>
671 <section ids="field-lists" names="field\ lists">
672 <title auto="1" refid="id44">
673 <generated classes="sectnum">
682 Field lists map field names to field bodies, like database
683 records. They are often part of an extension syntax. They are
684 an unambiguous variant of RFC 2822 fields.
690 The field marker is a colon, the field name, and a colon.
692 The field body may contain one or more body elements, indented
693 relative to the field marker.
698 <paragraph classes="credits">
699 This paragraph has the
702 class set. (This is actually not
703 about credits but just for ensuring that the class attribute
704 doesn't get stripped away.)
705 <section ids="option-lists" names="option\ lists">
706 <title auto="1" refid="id45">
707 <generated classes="sectnum">
711 For listing command-line options:
720 command-line option "a"
726 <option_argument delimiter=" ">
730 options can have arguments
731 and long descriptions
739 options can be long also
745 <option_argument delimiter="=">
749 long options can also have
758 The description can also start on the next line.
760 The description may contain multiple body elements,
761 regardless of where it starts.
775 Multiple options are an "option group".
786 Commonly-seen: short & long options.
792 <option_argument delimiter=" ">
797 <option_argument delimiter="=">
802 <option_argument delimiter=" ">
806 Multiple options with arguments.
814 DOS/VMS-style options too
816 There must be at least two spaces between the option and the
818 <section ids="literal-blocks" names="literal\ blocks">
819 <title auto="1" refid="id46">
820 <generated classes="sectnum">
824 Literal blocks are indicated with a double-colon ("::") at the end of
825 the preceding paragraph (over there
828 ). They can be indented:
829 <literal_block xml:space="preserve">
831 text = 'is left as-is'
832 spaces_and_linebreaks = 'are preserved'
833 markup_processing = None
835 Or they can be quoted without indentation:
836 <literal_block xml:space="preserve">
839 > Why didn't I think of that?
840 <section ids="line-blocks" names="line\ blocks">
841 <title auto="1" refid="id47">
842 <generated classes="sectnum">
846 This section tests line blocks. Line blocks are body elements which
847 consist of lines and other line blocks. Nested line blocks cause
851 This is a line block. It ends with a blank line.
854 New lines begin with a vertical bar ("|").
856 Line breaks and initial indent are significant, and preserved.
859 Continuation lines are also possible. A long line that is intended
860 to wrap should begin with a space in place of the vertical bar.
862 The left edge of a continuation line need not be aligned with
863 the left edge of the text above it.
866 This is a second line block.
869 Blank lines are permitted internally, but they must begin with a "|".
871 Another line block, surrounded by paragraphs:
874 And it's no good waiting by the window
876 It's no good waiting for the sun
878 Please believe me, the things you dream of
880 They don't fall in the lap of no-one
882 Take it away, Eric the Orchestra Leader!
886 A one, two, a one two three four
889 Half a bee, philosophically,
897 But half the bee has got to be,
902 its entity. D'you see?
905 But can a bee be said to be
908 or not to be an entire bee,
911 when half the bee is not a bee,
914 due to some ancient injury?
919 A line block, like the following poem by Christian Morgenstern, can
920 also be centre-aligned:
921 <line_block classes="language-de align-center">
927 Zwei Trichter wandeln durch die Nacht.
929 Durch ihres Rumpfs verengten Schacht
931 fließt weißes Mondlicht
943 <section ids="block-quotes" names="block\ quotes">
944 <title auto="1" refid="id48">
945 <generated classes="sectnum">
949 Block quotes consist of indented body elements:
952 My theory by A. Elk. Brackets Miss, brackets. This theory goes
953 as follows and begins now. All brontosauruses are thin at one
954 end, much much thicker in the middle and then thin again at the
955 far end. That is my theory, it is mine, and belongs to me and I
956 own it, and what it is too.
960 The language of a quote (like any other object) can be specified by
962 <comment xml:space="preserve">
963 <block_quote classes="language-fr">
965 ReStructuredText est un langage de balisage léger utilisé
966 notamment dans la documentation du langage Python.
967 <section ids="doctest-blocks" names="doctest\ blocks">
968 <title auto="1" refid="id49">
969 <generated classes="sectnum">
972 <doctest_block xml:space="preserve">
973 >>> print 'Python-specific usage examples; begun with ">>>"'
974 Python-specific usage examples; begun with ">>>"
975 >>> print '(cut and pasted from interactive Python sessions)'
976 (cut and pasted from interactive Python sessions)
977 <section ids="footnotes" names="footnotes">
978 <title auto="1" refid="id50">
979 <generated classes="sectnum">
982 <footnote backrefs="id1 id9 id22" ids="id8" names="1">
986 A footnote contains body elements, consistently indented by at
989 This is the footnote's second paragraph.
990 <footnote auto="1" backrefs="id3 id10" ids="label" names="label">
994 Footnotes may be numbered, either manually (as in
995 <footnote_reference ids="id9" refid="id8">
998 automatically using a "#"-prefixed label. This footnote has a
999 label so it can be referred to from multiple places, both as a
1000 footnote reference (
1001 <footnote_reference auto="1" ids="id10" refid="label">
1004 <reference anonymous="1" name="hyperlink reference" refid="label">
1007 <target anonymous="1" ids="id11" refid="label">
1008 <footnote auto="1" backrefs="id2" ids="id12" names="3">
1012 This footnote is numbered automatically and anonymously using a
1015 This is the second paragraph.
1017 And this is the third paragraph.
1018 <footnote auto="*" backrefs="id4" ids="id13">
1022 Footnotes may also use symbols, specified with a "*" label.
1023 Here's a reference to the next footnote:
1024 <footnote_reference auto="*" ids="id14" refid="id15">
1027 <footnote auto="*" backrefs="id14" ids="id15">
1031 This footnote shows the next symbol in the sequence.
1032 <footnote ids="id16" names="4">
1036 Here's an unreferenced footnote, with a reference to a
1037 nonexistent footnote:
1038 <problematic ids="id84 id17" refid="id83">
1041 <section ids="citations" names="citations">
1042 <title auto="1" refid="id51">
1043 <generated classes="sectnum">
1046 <citation backrefs="id5 id18" ids="cit2002" names="cit2002">
1050 Citations are text-labeled footnotes. They may be
1051 rendered separately and differently from footnotes.
1053 Here's a reference to the above,
1054 <citation_reference ids="id18" refid="cit2002">
1057 <problematic ids="id86 id19" refid="id85">
1061 <target refid="another-target">
1062 <section ids="targets another-target" names="targets another\ target">
1063 <title auto="1" refid="id52">
1064 <generated classes="sectnum">
1067 <target refid="example">
1068 <paragraph ids="example" names="example">
1069 This paragraph is pointed to by the explicit "example" target. A
1070 reference can be found under
1071 <reference name="Inline Markup" refid="inline-markup">
1074 <reference name="Inline hyperlink targets" refid="inline-hyperlink-targets">
1079 Section headers are implicit targets, referred to by name. See
1080 <reference name="Targets" refid="targets">
1082 , which is a subsection of
1083 <reference name="Body Elements" refid="body-elements">
1087 Explicit external targets are interpolated into references such as
1089 <reference name="Python" refuri="http://www.python.org/">
1092 <footnote_reference auto="1" ids="id27" refid="id25">
1095 <target ids="python" names="python" refuri="http://www.python.org/">
1097 Targets may be indirect and anonymous. Thus
1098 <reference anonymous="1" name="this phrase" refid="targets">
1102 <reference name="Targets" refid="targets">
1105 <target anonymous="1" ids="id20" refid="targets">
1108 <problematic ids="id88" refid="id87">
1109 `hyperlink reference without a target`_
1110 , which generates an
1112 <section dupnames="duplicate\ target\ names" ids="duplicate-target-names">
1113 <title auto="1" refid="id53">
1114 <generated classes="sectnum">
1116 Duplicate Target Names
1118 Duplicate names in section headers or other implicit targets will
1119 generate "info" (level-1) system messages. Duplicate names in
1120 explicit targets will generate "warning" (level-2) system messages.
1121 <section dupnames="duplicate\ target\ names" ids="id21">
1122 <title auto="1" refid="id54">
1123 <generated classes="sectnum">
1125 Duplicate Target Names
1127 Since there are two "Duplicate Target Names" section headers, we
1128 cannot uniquely refer to either of them by name. If we try to (like
1130 <problematic ids="id90" refid="id89">
1131 `Duplicate Target Names`_
1132 ), an error is generated.
1133 <section ids="directives" names="directives">
1134 <title auto="1" refid="id55">
1135 <generated classes="sectnum">
1138 <topic classes="contents local" ids="contents" names="contents">
1139 <bullet_list classes="auto-toc">
1142 <reference ids="id74" refid="document-parts">
1143 <generated classes="sectnum">
1148 <reference ids="id75" refid="images-and-figures">
1149 <generated classes="sectnum">
1154 <reference ids="id76" refid="admonitions">
1155 <generated classes="sectnum">
1160 <reference ids="id77" refid="topics-sidebars-and-rubrics">
1161 <generated classes="sectnum">
1163 Topics, Sidebars, and Rubrics
1166 <reference ids="id78" refid="target-footnotes">
1167 <generated classes="sectnum">
1172 <reference ids="id79" refid="replacement-text">
1173 <generated classes="sectnum">
1178 <reference ids="id80" refid="compound-paragraph">
1179 <generated classes="sectnum">
1184 <reference ids="id81" refid="parsed-literal-blocks">
1185 <generated classes="sectnum">
1187 Parsed Literal Blocks
1190 <reference ids="id82" refid="code">
1191 <generated classes="sectnum">
1195 These are just a sample of the many reStructuredText Directives. For
1197 <reference refuri="http://docutils.sourceforge.net/docs/ref/rst/directives.html">
1198 http://docutils.sourceforge.net/docs/ref/rst/directives.html
1200 <section ids="document-parts" names="document\ parts">
1201 <title auto="1" refid="id74">
1202 <generated classes="sectnum">
1206 An example of the "contents" directive can be seen above this section
1207 (a local, untitled table of
1208 <reference name="contents" refid="contents">
1210 ) and at the beginning of the
1211 document (a document-wide
1212 <reference name="table of contents" refid="table-of-contents">
1215 <section ids="images-and-figures" names="images\ and\ figures">
1216 <title auto="1" refid="id75">
1217 <generated classes="sectnum">
1221 An image directive (also clickable -- a hyperlink reference):
1222 <reference name="directives" refid="directives">
1223 <image classes="class1 class2" uri="../../../docs/user/rst/images/title.png">
1225 Image with multiple IDs:
1226 <target refid="image-target-1">
1227 <target refid="image-target-2">
1228 <target refid="image-target-3">
1229 <image ids="image-target-3 image-target-2 image-target-1" names="image\ target\ 3 image\ target\ 2 image\ target\ 1" uri="../../../docs/user/rst/images/title.png">
1232 <image align="center" uri="../../../docs/user/rst/images/biohazard.png">
1234 A left-aligned image:
1235 <image align="left" uri="../../../docs/user/rst/images/biohazard.png">
1237 This paragraph might flow around the image.
1238 The specific behavior depends upon the style sheet and
1239 the browser or rendering software used.
1241 A right-aligned image:
1242 <image align="right" uri="../../../docs/user/rst/images/biohazard.png">
1244 This paragraph might flow around the image.
1245 The specific behavior depends upon the style sheet and
1246 the browser or rendering software used.
1248 For inline images see
1249 <reference name="Substitution Definitions" refid="substitution-definitions">
1250 Substitution Definitions
1256 <image uri="../../../docs/user/rst/images/biohazard.png" width="2em">
1258 An image 2 em wide and 15 pixel high:
1259 <image height="15px" uri="../../../docs/user/rst/images/biohazard.png" width="2em">
1261 An image occupying 50% of the line width:
1262 <image uri="../../../docs/user/rst/images/title.png" width="50%">
1265 <image height="2cm" uri="../../../docs/user/rst/images/biohazard.png">
1270 is an image with a caption and/or a legend. With page-based output
1271 media, figures might float to a different position if this helps the page
1273 <figure classes="figclass1 figclass2">
1274 <image alt="reStructuredText, the markup syntax" classes="class1 class2" uri="../../../docs/user/rst/images/title.png" width="258">
1276 Plaintext markup syntax and parser system.
1280 <colspec colwidth="12">
1281 <colspec colwidth="47">
1289 Revised, revisited, based on 're' module.
1296 Structure-enhanced text, structuredtext.
1303 Well it is, isn't it?
1305 This paragraph is also part of the legend.
1307 A left-aligned figure:
1308 <figure align="left" classes="figclass1 figclass2" width="70%">
1309 <image alt="reStructuredText, the markup syntax" classes="class1 class2" uri="../../../docs/user/rst/images/biohazard.png" width="40px">
1311 This is the caption.
1316 The legend may consist of several paragraphs.
1318 This paragraph might flow around the figure.
1320 The specific behavior depends upon the style sheet and the browser or
1321 rendering software used.
1324 <figure align="center">
1325 <image uri="../../../docs/user/rst/images/biohazard.png" width="40px">
1327 This is the caption.
1332 The legend may consist of several paragraphs.
1334 This paragraph might flow around the figure.
1336 The specific behavior depends upon the style sheet and the browser or
1337 rendering software used.
1339 A right-aligned figure:
1340 <figure align="right">
1341 <image uri="../../../docs/user/rst/images/biohazard.png" width="40px">
1343 This is the caption.
1348 The legend may consist of several paragraphs.
1350 This paragraph might flow around the figure. The specific behavior depends
1351 upon the style sheet and the browser or rendering software used.
1352 <section ids="admonitions" names="admonitions">
1353 <title auto="1" refid="id76">
1354 <generated classes="sectnum">
1359 Directives at large.
1362 Don't take any wooden nickels.
1365 Mad scientist at work!
1371 It's bigger than a bread box.
1373 <bullet_list bullet="-">
1376 Wash behind your ears.
1391 15% if the service is good.
1394 Strong prose may provoke extreme mental exertion.
1395 Reader discretion is strongly advised.
1396 <admonition classes="admonition-and-by-the-way">
1400 You can make up your own admonition too.
1401 <target ids="docutils" names="docutils" refuri="http://docutils.sourceforge.net/">
1402 <section ids="topics-sidebars-and-rubrics" names="topics,\ sidebars,\ and\ rubrics">
1403 <title auto="1" refid="id77">
1404 <generated classes="sectnum">
1406 Topics, Sidebars, and Rubrics
1410 are like miniature, parallel documents.
1417 This is a sidebar. It is for text outside the flow of the main
1420 This is a rubric inside a sidebar
1422 Sidebars often appear beside the main text with a border and a different
1423 background or font color.
1428 is like a block quote with a title, or a self-contained section
1429 with no subsections.
1439 is like an informal heading that doesn't correspond to the
1440 document's structure. It is typically highlighted in red (hence the name).
1444 Topics and rubrics can be used at places where a
1445 <reference name="section title" refid="section-title">
1448 allowed (e.g. inside a directive).
1449 <section ids="target-footnotes" names="target\ footnotes">
1450 <title auto="1" refid="id78">
1451 <generated classes="sectnum">
1454 <footnote auto="1" backrefs="id26 id27 id28 id31" ids="id25" names="TARGET_NOTE:\ id25">
1458 <reference refuri="http://www.python.org/">
1459 http://www.python.org/
1460 <footnote auto="1" backrefs="id30" ids="id29" names="TARGET_NOTE:\ id29">
1464 <reference refuri="http://pygments.org/">
1465 http://pygments.org/
1466 <footnote auto="1" backrefs="id33" ids="id32" names="TARGET_NOTE:\ id32">
1470 <reference refuri="http://docutils.sourceforge.net/">
1471 http://docutils.sourceforge.net/
1472 <section ids="replacement-text" names="replacement\ text">
1473 <title auto="1" refid="id79">
1474 <generated classes="sectnum">
1479 <reference refuri="http://www.python.org/">
1483 best language around
1485 <footnote_reference auto="1" ids="id28" refid="id25">
1488 <substitution_definition names="Python">
1492 best language around
1493 <section ids="compound-paragraph" names="compound\ paragraph">
1494 <title auto="1" refid="id80">
1495 <generated classes="sectnum">
1498 <compound classes="some-class">
1500 Compound 1, paragraph 1.
1502 Compound 1, paragraph 2.
1503 <bullet_list bullet="*">
1506 Compound 1, list item one.
1509 Compound 1, list item two.
1511 Another compound statement:
1514 Compound 2, a literal block:
1515 <literal_block xml:space="preserve">
1516 Compound 2, literal.
1518 Compound 2, this is a test.
1521 Compound 3, only consisting of one paragraph.
1523 <literal_block xml:space="preserve">
1525 This one starts with a literal block.
1527 Compound 4, a paragraph.
1532 perverted -- a nested compound block. This is
1533 just to test that it works at all; the results don't have to be
1537 Compound 5, block 1 (a paragraph).
1540 Compound 6, block 2 in compound 5.
1542 Compound 6, another paragraph.
1544 Compound 5, block 3 (a paragraph).
1547 Compound 7, with a table inside:
1550 <colspec colwidth="20">
1551 <colspec colwidth="20">
1552 <colspec colwidth="20">
1576 Compound 7, a paragraph after the table.
1578 Compound 7, another paragraph.
1579 <section ids="parsed-literal-blocks" names="parsed\ literal\ blocks">
1580 <title auto="1" refid="id81">
1581 <generated classes="sectnum">
1583 Parsed Literal Blocks
1584 <literal_block xml:space="preserve">
1585 This is a parsed literal block.
1586 This line is indented. The next line is blank.
1588 Inline markup is supported, e.g.
1599 <footnote_reference ids="id22" refid="id8">
1602 <target ids="hyperlink-targets" names="hyperlink\ targets">
1605 <reference name="references" refuri="http://www.python.org/">
1607 <target ids="references" names="references" refuri="http://www.python.org/">
1609 <section ids="code" names="code">
1610 <title auto="1" refid="id82">
1611 <generated classes="sectnum">
1615 Blocks of source code can be set with the
1618 directive. If the code
1619 language is specified, the content is parsed and tagged by the
1620 <reference name="Pygments" refuri="http://pygments.org/">
1623 <footnote_reference auto="1" ids="id30" refid="id29">
1626 syntax highlighter and can be formatted with a style sheet. (Code parsing
1627 is turned off using the
1630 config setting in the test
1631 conversions in order to get identical results with/without installed
1632 Pygments highlighter.)
1633 <literal_block classes="code python" xml:space="preserve">
1634 print 'This is Python code.'
1636 There is an option for line numbers with optional start value:
1637 <literal_block classes="code python" xml:space="preserve">
1638 <inline classes="ln">
1640 # print integers from 0 to 9:
1641 <inline classes="ln">
1644 <inline classes="ln">
1648 For inline code snippets, there is the
1651 role, which can be used
1652 directly (the code will not be parsed/tagged, as the language is not
1653 known) or as base for special code roles, e.g.,
1654 <comment xml:space="preserve">
1657 Docutils uses LaTeX syntax for math directives and roles:
1658 <literal classes="code latex tex">
1664 <target ids="pygments" names="pygments" refuri="http://pygments.org/">
1665 <section ids="substitution-definitions" names="substitution\ definitions">
1666 <title auto="1" refid="id65">
1667 <generated classes="sectnum">
1669 Substitution Definitions
1672 <image alt="EXAMPLE" uri="../../../docs/user/rst/images/biohazard.png">
1674 <substitution_definition names="EXAMPLE">
1675 <image alt="EXAMPLE" uri="../../../docs/user/rst/images/biohazard.png">
1677 (Substitution definitions are not visible in the HTML source.)
1678 <section ids="comments" names="comments">
1679 <title auto="1" refid="id66">
1680 <generated classes="sectnum">
1685 <comment xml:space="preserve">
1686 Comments begin with two dots and a space. Anything may
1687 follow, except for the syntax of footnotes, hyperlink
1688 targets, directives, or substitution definitions.
1690 Double-dashes -- "--" -- must be escaped somehow in HTML output.
1692 Comments may contain non-ASCII characters: ä ö ü æ ø å
1694 (View the HTML source to see the comment.)
1695 <section ids="raw-text" names="raw\ text">
1696 <title auto="1" refid="id67">
1697 <generated classes="sectnum">
1701 This does not necessarily look nice, because there may be missing white space.
1703 It's just there to freeze the behavior.
1704 <raw format="html latex" xml:space="preserve">
1706 <raw format="html latex" xml:space="preserve">
1708 <raw classes="myclass" format="html latex" xml:space="preserve">
1709 Another test with myclass set.
1712 <raw classes="myrawroleclass" format="html latex" xml:space="preserve">
1714 with myrawroleclass set.
1715 <raw format="html" xml:space="preserve">
1716 Fifth test in HTML.<br />Line two.
1717 <raw format="latex" xml:space="preserve">
1718 Fifth test in LaTeX.\\Line two.
1719 <section ids="container" names="container">
1720 <title auto="1" refid="id68">
1721 <generated classes="sectnum">
1724 <container classes="custom">
1729 <section ids="colspanning-tables" names="colspanning\ tables">
1730 <title auto="1" refid="id69">
1731 <generated classes="sectnum">
1735 This table has a cell spanning two columns:
1738 <colspec colwidth="5">
1739 <colspec colwidth="5">
1740 <colspec colwidth="6">
1743 <entry morecols="1">
1800 <section ids="rowspanning-tables" names="rowspanning\ tables">
1801 <title auto="1" refid="id70">
1802 <generated classes="sectnum">
1806 Here's a table with cells spanning several rows:
1809 <colspec colwidth="24">
1810 <colspec colwidth="12">
1811 <colspec colwidth="18">
1816 Header row, column 1
1817 (header rows optional)
1828 body row 1, column 1
1839 <entry morerows="1">
1843 <entry morerows="1">
1852 <section ids="complex-tables" names="complex\ tables">
1853 <title auto="1" refid="id71">
1854 <generated classes="sectnum">
1858 Here's a complex table, which should test all features.
1861 <colspec colwidth="24">
1862 <colspec colwidth="12">
1863 <colspec colwidth="10">
1864 <colspec colwidth="10">
1869 Header row, column 1
1870 (header rows optional)
1884 body row 1, column 1
1898 <entry morecols="2">
1900 Cells may span columns.
1905 <entry morerows="1">
1911 <entry morecols="1" morerows="1">
1912 <bullet_list bullet="-">
1930 <entry morecols="1">
1937 <section ids="list-tables" names="list\ tables">
1938 <title auto="1" refid="id72">
1939 <generated classes="sectnum">
1943 Here's a list table exercising all features:
1944 <table classes="test">
1946 list table with integral header
1948 <colspec colwidth="10" stub="1">
1949 <colspec colwidth="20">
1950 <colspec colwidth="30">
1982 If we took the bones out, it wouldn't be
1983 crunchy, now would it?
1994 <section ids="error-handling" names="error\ handling">
1995 <title auto="1" refid="id73">
1996 <generated classes="sectnum">
2000 Any errors caught during processing will generate system messages.
2002 There should be five messages in the following, auto-generated
2003 section, "Docutils System Messages":
2004 <comment xml:space="preserve">
2005 section should be added by Docutils automatically
2006 <section classes="system-messages">
2008 Docutils System Messages
2009 <system_message backrefs="id24" ids="id23" level="3" line="104" source="functional/input/data/standard.txt" type="ERROR">
2011 Undefined substitution referenced: "problematic".
2012 <system_message backrefs="id84" ids="id83" level="3" line="391" source="functional/input/data/standard.txt" type="ERROR">
2014 Unknown target name: "5".
2015 <system_message backrefs="id86" ids="id85" level="3" line="400" source="functional/input/data/standard.txt" type="ERROR">
2017 Unknown target name: "nonexistent".
2018 <system_message backrefs="id88" ids="id87" level="3" line="427" source="functional/input/data/standard.txt" type="ERROR">
2020 Unknown target name: "hyperlink reference without a target".
2021 <system_message backrefs="id90" ids="id89" level="3" line="440" source="functional/input/data/standard.txt" type="ERROR">
2023 Duplicate target name, cannot be used as a unique reference: "duplicate target names".