1 <?xml version=
"1.0" encoding=
"utf-8" ?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en">
5 <meta http-equiv=
"Content-Type" content=
"application/xhtml+xml; charset=utf-8" />
6 <meta name=
"generator" content=
"Docutils 0.8: http://docutils.sourceforge.net/" />
7 <title>reStructuredText Test Document
</title>
8 <meta name=
"author" content=
"David Goodger" />
9 <meta name=
"authors" content=
"Me Myself I" />
10 <meta name=
"organization" content=
"humankind" />
11 <meta name=
"date" content=
"Now, or yesterday. Or maybe even before yesterday." />
12 <meta name=
"copyright" content=
"This document has been placed in the public domain. You may do with it as you wish. You may copy, modify, redistribute, reattribute, sell, buy, rent, lease, destroy, or improve it, quote it at length, excerpt, incorporate, collate, fold, staple, or mutilate it, or do anything else to it that your or anyone else's heart desires." />
13 <meta content=
"reStructuredText, test, parser" name=
"keywords" />
14 <meta content=
"A test document, containing at least one example of each reStructuredText construct." name=
"description" xml:
lang=
"en" />
15 <style type=
"text/css">
18 :Author: David Goodger (goodger@python.org)
20 :Copyright: This stylesheet has been placed in the public domain.
22 Default cascading style sheet for the HTML output of Docutils.
24 See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
25 customize this style sheet.
28 /* used to remove borders from tables and images */
29 .borderless, table.borderless td, table.borderless th {
32 table.borderless td, table.borderless th {
33 /* Override padding for
"table.docutils td" with
"! important".
34 The right padding separates the table cells. */
35 padding:
0 0.5em
0 0 ! important }
38 /* Override more specific margin styles with
"! important". */
39 margin-top:
0 ! important }
41 .last, .with-subtitle {
42 margin-bottom:
0 ! important }
48 text-decoration: none ;
55 margin-bottom:
0.5em }
57 object[
type=
"image/svg+xml"], object[
type=
"application/x-shockwave-flash"] {
61 /* Uncomment (and remove this text!) to get bold-faced definition list terms
69 div.abstract p.topic-title {
73 div.admonition, div.attention, div.caution, div.danger, div.error,
74 div.hint, div.important, div.note, div.tip, div.warning {
76 border: medium outset ;
79 div.admonition p.admonition-title, div.hint p.admonition-title,
80 div.important p.admonition-title, div.note p.admonition-title,
81 div.tip p.admonition-title {
83 font-family: sans-serif }
85 div.attention p.admonition-title, div.caution p.admonition-title,
86 div.danger p.admonition-title, div.error p.admonition-title,
87 div.warning p.admonition-title {
90 font-family: sans-serif }
92 /* Uncomment (and remove this text!) to get reduced vertical space in
94 div.compound .compound-first, div.compound .compound-middle {
95 margin-bottom:
0.5em }
97 div.compound .compound-last, div.compound .compound-middle {
106 div.dedication p.topic-title {
114 div.footer, div.header {
123 div.line-block div.line-block {
129 margin:
0 0 0.5em
1em ;
130 border: medium outset ;
132 background-color: #ffffee ;
137 div.sidebar p.rubric {
138 font-family: sans-serif ;
141 div.system-messages {
144 div.system-messages h1 {
148 border: medium outset ;
151 div.system-message p.system-message-title {
158 h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
159 h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
171 img.align-left, .figure.align-left, object.align-left {
176 img.align-right, .figure.align-right, object.align-right {
181 img.align-center, .figure.align-center, object.align-center {
197 /* reset inner alignment in figures */
201 /* div.align-center * { */
202 /* text-align: left } */
204 ol.simple, ul.simple {
208 list-style: decimal }
211 list-style: lower-alpha }
214 list-style: upper-alpha }
217 list-style: lower-roman }
220 list-style: upper-roman }
234 white-space: nowrap }
243 font-family: sans-serif ;
248 font-family: sans-serif ;
259 pre.literal-block, pre.doctest-block {
264 font-family: sans-serif ;
265 font-style: oblique }
267 span.classifier-delimiter {
268 font-family: sans-serif ;
272 font-family: sans-serif }
275 white-space: nowrap }
283 span.section-subtitle {
284 /* font-size relative to parent (h1..h6 element) */
288 border-left: solid
1px gray;
296 margin-bottom:
0.5em }
299 border-left: solid
1px black;
302 table.docutils td, table.docutils th,
303 table.docinfo td, table.docinfo th {
304 padding-left:
0.5em ;
305 padding-right:
0.5em ;
306 vertical-align: top }
308 table.docutils th.field-name, table.docinfo th.docinfo-name {
311 white-space: nowrap ;
314 h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
315 h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
319 list-style-type: none }
322 <style type=
"text/css">
324 /* html4css2.css: Cascading style sheet for Docutils' html4strict writer. */
326 /* :Author: Günter Milde */
327 /* :Copyright: ©
2009 Günter Milde. */
328 /* Released without warranties or conditions of any kind */
329 /* under the terms of the Apache License, Version
2.0 */
330 /* http://www.apache.org/licenses/LICENSE-
2.0 */
332 /* This stylesheet supplements the Docutils standard style 'html4css1.css'. */
333 /* It uses CSS
2.1 elements (supported by up-to-date versions of popular */
343 /* http://ilovetypography.com/
2008/
02/
28/a-guide-to-web-typography/
344 recommends
"line-spacing that’s at least 140% of your text size" */
347 /* avoid long lines --> better reading */
348 /* OTOH: lines should not be too short because of missing hyphenation, */
354 /* separate items except for compact lists */
358 .compact li, .compact p, .compact ul, .compact ol
359 dl.simple
> dd, .simple li, .simple p, .simple ul, .simple ol {
362 /* background: magenta; */
364 dl.simple, dl.compact, dl.simple
> dd, dl.compact
> dd {
367 /* background: lightgreen; */
370 /* space around paragraphs */
371 dl
> dd p:first-child {
382 /* Special definition lists */
383 /* ======================== */
385 /* bold definition term on the same line as the label */
386 dl.field-list
> dt, dl.option-list
> dt, dl.docinfo
> dt,
387 dl.footnote
> dt, dl.citation
> dt, dl.description
> dt {
392 padding-right:
0.5em;
395 /* except for these */
396 dl.option-list
> dt, dl.footnote
> dt {
405 /* field names followed by a colon */
406 dl.field-list
> dt:after, dl.docinfo
> dt:after {
410 /* Offset for field content (corresponds to the --field-name-limit option) */
412 margin-left:
9em; /* ca.
14 chars in the test examples */
416 /* start field-body on a new line after long field names */
417 dl.field-list
> dd p {
419 /* display: inline-block; */
420 /* background: yellow; */
423 dl.field-list
> dd
> p:first-child,
424 /* dl.field-list
> dd
> ol:first-child, */
425 /* dl.field-list
> dd
> ul:first-child, */
426 dl.field-list
> dd
> dl:first-child {
427 display: inline-block;
430 /* field-list variants:: */
432 /* example for custom field-name width */
433 dl.field-list.narrow
> dd {
437 /* start field-body on same line after long field names */
438 dl.field-list.run-in
> dd p {
442 /* wrap or truncate long field names */
443 dl.field-list.fix-labelwidth
> dt {
444 width:
8em; /* set to dl.field-list
> dd margin-left - padding-left */
447 dl.field-list.fix-labelwidth
> dd:after {
448 /* a
"stopper" to prevent next dd floating up too far */
458 /* margin-bottom:
0.5em; */
469 dl.option-list
> dd {
471 /* margin-bottom:
0.5em; */
474 /* start description on a new line after long options */
475 dl.option-list
> dd p {
477 display: inline-block;
482 a.footnote-reference, a.fn-backref {
483 text-decoration: inherit; /* do not underline footnote links */
487 /* line on the left */
490 border-left-width: thin;
491 /* border-color: black; */
494 /* paragraph on same line as backrefs */
496 /* background: green; */
503 Ordered List (Enumeration)
504 --------------------------
506 Use counters to replace the deprecated start attribute. Make sure the
507 resulting list resembles the list-style 'outside' with a hanging indent.
510 /* New ordered list: reset counter, suppress the default label */
513 list-style-type: none ! important;
516 /* Set the negative indent of the list label as feature of the list item */
518 text-indent: -
40px; /* Mozillas default indent */
523 /* increment and typeset counter(s), */
524 counter-increment: item;
525 content: counter(item)
".";
526 /* display next to the content (aligned top-right), */
527 display: inline-block;
530 /* sum must match ol
>li {text-indent:} (
40px is Mozillas default) */
533 /* background: yellow; */
536 /* objects nested in an ol */
543 /* background: lightgreen; */
546 /* The list item's first line starts next to the label, without indent */
547 ol
> li
> p:first-child,
548 ol
> li
> ol:first-child,
549 ol
> li
> ul:first-child,
550 ol
> li
> dl:first-child {
551 display: inline-block;
552 /* background: lightblue; */
555 /* default separator variants */
556 ol.loweralpha
> li:before {
557 content: counter(item, lower-alpha)
")";
559 ol.upperalpha
> li:before {
560 content: counter(item, upper-alpha)
".";
562 ol.lowerroman
> li:before {
563 content:
"(" counter(item, lower-roman)
")";
565 ol.upperroman
> li:before {
566 content: counter(item, upper-roman)
")";
568 /* nested counters (
1,
1.1,
1.1.1, etc) */
569 /* nested enumerated lists
"inherit" the class attribute, other lists not */
570 ol.nested
> li:before, ol.nested ol
> li:before {
571 content: counters(item,
".")
" ";
574 /* TODO: prefix, suffix? */
576 /* smaller font for super- and subscripts */
577 /* sub, sup {font-size:
70%;} */ /* Mozilla default is `smaller` */
583 /* borders for
"normal" tables */
586 margin-bottom:
0.5em;
587 border-style: outset;
589 /* border-collapse: collapse; */
595 /* text-align: left; */
599 td
> p:first-child, th
> p:first-child {
606 /* no borders for
"borderless" tables */
607 table.borderless, table.borderless * {
611 /*
"booktabs" style (no vertical lines) */
614 border-top:
2px solid;
615 border-bottom:
2px solid;
616 border-collapse: collapse;
623 border-bottom: thin solid;
628 /* padding:
2em
0 1em
0; */
631 /* numbered tables and figures*/
633 counter-reset: table;
634 /* counter-reset: figure; */
637 table.numbered
> caption:before {
638 counter-increment: table;
639 content:
"Table " counter(table)
": ";
644 /* whitespace and line-wrapping in inline literals
645 -----------------------------------------------
647 /* possible values: normal, nowrap, pre, pre-wrap, pre-line */
649 white-space: pre-wrap;
653 /* Table of Contents */
655 /* don't indent like a topic */
659 /* div.topic.contents ul { */
660 /* list-style: none; */
663 div.topic.contents a {
664 text-decoration: none; /* no underline for links */
667 /* section numbers */
675 /* no padding for top and bottom */
676 div.admonition, div.attention, div.caution, div.danger, div.error,
677 div.hint, div.important, div.note, div.tip, div.warning {
684 <p>Document header
</p>
688 <div class=
"document" id=
"restructuredtext-test-document">
689 <span id=
"doctitle"></span>
690 <h1 class=
"title">reStructuredText Test Document
</h1>
691 <h2 class=
"subtitle" id=
"examples-of-syntax-constructs"><span id=
"subtitle"></span>Examples of Syntax Constructs
</h2>
694 <dt class=
"author">Author
</dt>
695 <dd class=
"author">David Goodger
</dd>
696 <dt class=
"address">Address
</dt>
697 <dd class=
"address"><pre class=
"address address">
703 <dt class=
"contact">Contact
</dt>
704 <dd class=
"contact"><a class=
"reference external" href=
"mailto:goodger@python.org">goodger
@python.org
</a></dd>
705 <dt class=
"authors">Authors
</dt>
706 <dd class=
"authors">Me
709 <dt class=
"organization">Organization
</dt>
710 <dd class=
"organization">humankind
</dd>
711 <dt class=
"date">Date
</dt>
712 <dd class=
"date">Now, or yesterday. Or maybe even
<em>before
</em> yesterday.
</dd>
713 <dt class=
"status">Status
</dt>
714 <dd class=
"status">This is a
"work in progress
"</dd>
715 <dt class=
"revision">Revision
</dt>
716 <dd class=
"revision">is managed by a version control system.
</dd>
717 <dt class=
"version">Version
</dt>
718 <dd class=
"version">1</dd>
719 <dt class=
"copyright">Copyright
</dt>
720 <dd class=
"copyright">This document has been placed in the public domain. You
721 may do with it as you wish. You may copy, modify,
722 redistribute, reattribute, sell, buy, rent, lease,
723 destroy, or improve it, quote it at length, excerpt,
724 incorporate, collate, fold, staple, or mutilate it, or do
725 anything else to it that your or anyone else's heart
728 <dd><p>This is a
"generic bibliographic field
".
</p>
730 <dt>field name
"2"</dt>
731 <dd><p>Generic bibliographic fields may contain multiple body elements.
</p>
735 <div class=
"dedication topic">
736 <p class=
"topic-title first">Dedication
</p>
737 <p>For Docutils users
& co-developers.
</p>
739 <div class=
"abstract topic">
740 <p class=
"topic-title first">Abstract
</p>
741 <p>This is a test document, containing at least one example of each
742 reStructuredText construct.
</p>
744 <!-- This is a comment. Note how any initial comments are moved by
745 transforms to after the document title, subtitle, and docinfo. -->
746 <!-- Above is the document title, and below is the subtitle.
747 They are transformed from section titles after parsing. -->
748 <!-- bibliographic fields (which also require a transform): -->
749 <div class=
"contents topic" id=
"table-of-contents">
750 <p class=
"topic-title first">Table of Contents
</p>
751 <ul class=
"auto-toc simple">
752 <li><p><a class=
"reference internal" href=
"#structural-elements" id=
"id37"><span class=
"sectnum">1</span> Structural Elements
</a></p>
753 <ul class=
"auto-toc">
754 <li><p><a class=
"reference internal" href=
"#section-title" id=
"id38"><span class=
"sectnum">1.1</span> Section Title
</a></p></li>
755 <li><p><a class=
"reference internal" href=
"#empty-section" id=
"id39"><span class=
"sectnum">1.2</span> Empty Section
</a></p></li>
756 <li><p><a class=
"reference internal" href=
"#transitions" id=
"id40"><span class=
"sectnum">1.3</span> Transitions
</a></p></li>
759 <li><p><a class=
"reference internal" href=
"#body-elements" id=
"id41"><span class=
"sectnum">2</span> Body Elements
</a></p>
760 <ul class=
"auto-toc">
761 <li><p><a class=
"reference internal" href=
"#paragraphs" id=
"id42"><span class=
"sectnum">2.1</span> Paragraphs
</a></p>
762 <ul class=
"auto-toc">
763 <li><p><a class=
"reference internal" href=
"#inline-markup" id=
"id43"><span class=
"sectnum">2.1.1</span> Inline Markup
</a></p></li>
766 <li><p><a class=
"reference internal" href=
"#bullet-lists" id=
"id44"><span class=
"sectnum">2.2</span> Bullet Lists
</a></p></li>
767 <li><p><a class=
"reference internal" href=
"#enumerated-lists" id=
"id45"><span class=
"sectnum">2.3</span> Enumerated Lists
</a></p></li>
768 <li><p><a class=
"reference internal" href=
"#definition-lists" id=
"id46"><span class=
"sectnum">2.4</span> Definition Lists
</a></p></li>
769 <li><p><a class=
"reference internal" href=
"#field-lists" id=
"id47"><span class=
"sectnum">2.5</span> Field Lists
</a></p></li>
770 <li><p><a class=
"reference internal" href=
"#option-lists" id=
"id48"><span class=
"sectnum">2.6</span> Option Lists
</a></p></li>
771 <li><p><a class=
"reference internal" href=
"#literal-blocks" id=
"id49"><span class=
"sectnum">2.7</span> Literal Blocks
</a></p></li>
772 <li><p><a class=
"reference internal" href=
"#line-blocks" id=
"id50"><span class=
"sectnum">2.8</span> Line Blocks
</a></p></li>
773 <li><p><a class=
"reference internal" href=
"#block-quotes" id=
"id51"><span class=
"sectnum">2.9</span> Block Quotes
</a></p></li>
774 <li><p><a class=
"reference internal" href=
"#doctest-blocks" id=
"id52"><span class=
"sectnum">2.10</span> Doctest Blocks
</a></p></li>
775 <li><p><a class=
"reference internal" href=
"#footnotes" id=
"id53"><span class=
"sectnum">2.11</span> Footnotes
</a></p></li>
776 <li><p><a class=
"reference internal" href=
"#citations" id=
"id54"><span class=
"sectnum">2.12</span> Citations
</a></p></li>
777 <li><p><a class=
"reference internal" href=
"#targets" id=
"id55"><span class=
"sectnum">2.13</span> Targets
</a></p>
778 <ul class=
"auto-toc">
779 <li><p><a class=
"reference internal" href=
"#duplicate-target-names" id=
"id56"><span class=
"sectnum">2.13.1</span> Duplicate Target Names
</a></p></li>
780 <li><p><a class=
"reference internal" href=
"#id21" id=
"id57"><span class=
"sectnum">2.13.2</span> Duplicate Target Names
</a></p></li>
783 <li><p><a class=
"reference internal" href=
"#directives" id=
"id58"><span class=
"sectnum">2.14</span> Directives
</a></p>
784 <ul class=
"auto-toc">
785 <li><p><a class=
"reference internal" href=
"#document-parts" id=
"id59"><span class=
"sectnum">2.14.1</span> Document Parts
</a></p></li>
786 <li><p><a class=
"reference internal" href=
"#images-and-figures" id=
"id60"><span class=
"sectnum">2.14.2</span> Images and Figures
</a></p></li>
787 <li><p><a class=
"reference internal" href=
"#admonitions" id=
"id61"><span class=
"sectnum">2.14.3</span> Admonitions
</a></p></li>
788 <li><p><a class=
"reference internal" href=
"#topics-sidebars-and-rubrics" id=
"id62"><span class=
"sectnum">2.14.4</span> Topics, Sidebars, and Rubrics
</a></p></li>
789 <li><p><a class=
"reference internal" href=
"#target-footnotes" id=
"id63"><span class=
"sectnum">2.14.5</span> Target Footnotes
</a></p></li>
790 <li><p><a class=
"reference internal" href=
"#replacement-text" id=
"id64"><span class=
"sectnum">2.14.6</span> Replacement Text
</a></p></li>
791 <li><p><a class=
"reference internal" href=
"#compound-paragraph" id=
"id65"><span class=
"sectnum">2.14.7</span> Compound Paragraph
</a></p></li>
792 <li><p><a class=
"reference internal" href=
"#parsed-literal-blocks" id=
"id66"><span class=
"sectnum">2.14.8</span> Parsed Literal Blocks
</a></p></li>
795 <li><p><a class=
"reference internal" href=
"#substitution-definitions" id=
"id67"><span class=
"sectnum">2.15</span> Substitution Definitions
</a></p></li>
796 <li><p><a class=
"reference internal" href=
"#comments" id=
"id68"><span class=
"sectnum">2.16</span> Comments
</a></p></li>
797 <li><p><a class=
"reference internal" href=
"#raw-text" id=
"id69"><span class=
"sectnum">2.17</span> Raw text
</a></p></li>
798 <li><p><a class=
"reference internal" href=
"#container" id=
"id70"><span class=
"sectnum">2.18</span> Container
</a></p></li>
799 <li><p><a class=
"reference internal" href=
"#colspanning-tables" id=
"id71"><span class=
"sectnum">2.19</span> Colspanning tables
</a></p></li>
800 <li><p><a class=
"reference internal" href=
"#rowspanning-tables" id=
"id72"><span class=
"sectnum">2.20</span> Rowspanning tables
</a></p></li>
801 <li><p><a class=
"reference internal" href=
"#complex-tables" id=
"id73"><span class=
"sectnum">2.21</span> Complex tables
</a></p></li>
802 <li><p><a class=
"reference internal" href=
"#list-tables" id=
"id74"><span class=
"sectnum">2.22</span> List Tables
</a></p></li>
803 <li><p><a class=
"reference internal" href=
"#custom-roles" id=
"id75"><span class=
"sectnum">2.23</span> Custom Roles
</a></p></li>
804 <li><p><a class=
"reference internal" href=
"#svg-images" id=
"id76"><span class=
"sectnum">2.24</span> SVG Images
</a></p></li>
805 <li><p><a class=
"reference internal" href=
"#swf-images" id=
"id77"><span class=
"sectnum">2.25</span> SWF Images
</a></p></li>
808 <li><p><a class=
"reference internal" href=
"#additional-html4-strict-features" id=
"id78"><span class=
"sectnum">3</span> Additional html4_strict features
</a></p>
809 <ul class=
"auto-toc">
810 <li><p><a class=
"reference internal" href=
"#enumerated-lists-with-nested-counters" id=
"id79"><span class=
"sectnum">3.1</span> Enumerated lists with nested counters
</a></p></li>
811 <li><p><a class=
"reference internal" href=
"#description-list" id=
"id80"><span class=
"sectnum">3.2</span> Description list
</a></p></li>
812 <li><p><a class=
"reference internal" href=
"#field-list-handling" id=
"id81"><span class=
"sectnum">3.3</span> Field list handling
</a></p>
813 <ul class=
"auto-toc">
814 <li><p><a class=
"reference internal" href=
"#styling-with-class-arguments" id=
"id82"><span class=
"sectnum">3.3.1</span> Styling with class arguments
</a></p></li>
817 <li><p><a class=
"reference internal" href=
"#tables" id=
"id83"><span class=
"sectnum">3.4</span> Tables
</a></p>
818 <ul class=
"auto-toc">
819 <li><p><a class=
"reference internal" href=
"#id23" id=
"id84"><span class=
"sectnum">3.4.1</span> Styling with class arguments
</a></p></li>
822 <li><p><a class=
"reference internal" href=
"#math" id=
"id85"><span class=
"sectnum">3.5</span> Math
</a></p></li>
825 <li><p><a class=
"reference internal" href=
"#error-handling" id=
"id86"><span class=
"sectnum">4</span> Error Handling
</a></p></li>
828 <div class=
"section" id=
"structural-elements">
829 <h1><a class=
"toc-backref" href=
"#id37"><span class=
"sectnum">1</span> Structural Elements
</a></h1>
830 <div class=
"section" id=
"section-title">
831 <h2 class=
"with-subtitle"><a class=
"toc-backref" href=
"#id38"><span class=
"sectnum">1.1</span> Section Title
</a></h2>
832 <h2 class=
"section-subtitle" id=
"section-subtitle"><span class=
"section-subtitle">Section Subtitle
</span></h2>
833 <p>Lone subsections are converted to a section subtitle by a transform
834 activated with the
<tt class=
"literal"><span class=
"pre">--section-subtitles
</span></tt> command line option or the
835 <tt class=
"literal"><span class=
"pre">sectsubtitle-xform
</span></tt> configuration value.
</p>
837 <div class=
"section" id=
"empty-section">
838 <h2><a class=
"toc-backref" href=
"#id39"><span class=
"sectnum">1.2</span> Empty Section
</a></h2>
840 <div class=
"section" id=
"transitions">
841 <h2><a class=
"toc-backref" href=
"#id40"><span class=
"sectnum">1.3</span> Transitions
</a></h2>
842 <p>Here's a transition:
</p>
843 <hr class=
"docutils" />
844 <p>It divides the section. Transitions may also occur between sections:
</p>
847 <hr class=
"docutils" />
848 <div class=
"section" id=
"body-elements">
849 <h1><a class=
"toc-backref" href=
"#id41"><span class=
"sectnum">2</span> Body Elements
</a></h1>
850 <div class=
"section" id=
"paragraphs">
851 <h2><a class=
"toc-backref" href=
"#id42"><span class=
"sectnum">2.1</span> Paragraphs
</a></h2>
853 <div class=
"section" id=
"inline-markup">
854 <h3><a class=
"toc-backref" href=
"#id43"><span class=
"sectnum">2.1.1</span> Inline Markup
</a></h3>
855 <p>Paragraphs contain text and may contain inline markup:
<em>emphasis
</em>,
856 <strong>strong emphasis
</strong>,
<tt class=
"literal">inline literals
</tt>, standalone hyperlinks
857 (
<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=
"#id26" id=
"id27"><sup>5</sup></a>), internal
858 cross-references (
<a class=
"reference internal" href=
"#example">example
</a>), external hyperlinks with embedded URIs
859 (
<a class=
"reference external" href=
"http://www.python.org">Python web site
</a>),
<a class=
"reference external" href=
"http://www.python.org/">anonymous hyperlink
860 references
</a><a class=
"footnote-reference" href=
"#id26" id=
"id34"><sup>5</sup></a> (
<a class=
"reference external" href=
"http://docutils.sourceforge.net/">a second reference
</a><a class=
"footnote-reference" href=
"#id35" id=
"id36"><sup>8</sup></a>), footnote references (manually
861 numbered
<a class=
"footnote-reference" href=
"#id8" id=
"id1"><sup>1</sup></a>, anonymous auto-numbered
<a class=
"footnote-reference" href=
"#id12" id=
"id2"><sup>3</sup></a>, labeled auto-numbered
<a class=
"footnote-reference" href=
"#label" id=
"id3"><sup>2</sup></a>, or symbolic
<a class=
"footnote-reference" href=
"#id13" id=
"id4"><sup>*
</sup></a>), citation references (
<a class=
"citation-reference" href=
"#cit2002" id=
"id5">[CIT2002]
</a>),
862 substitution references (
<img alt=
"EXAMPLE" src=
"../../../docs/user/rst/images/biohazard.png" />), and
<span class=
"target" id=
"inline-hyperlink-targets">inline hyperlink targets
</span>
863 (see
<a class=
"reference internal" href=
"#targets">Targets
</a> below for a reference back to here). Character-level
864 inline markup is also possible (although exceedingly ugly!) in
<em>re
</em><tt class=
"literal">Structured
</tt><em>Text
</em>. Problems are indicated by
<a href=
"#id24"><span class=
"problematic" id=
"id25">|problematic|
</span></a> text
865 (generated by processing errors; this one is intentional). Here is a
866 reference to the
<a class=
"reference internal" href=
"#doctitle">doctitle
</a> and the
<a class=
"reference internal" href=
"#subtitle">subtitle
</a>.
</p>
867 <p>The default role for interpreted text is
<cite>Title Reference
</cite>. Here are
868 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
869 RFC reference (
<a class=
"reference external" href=
"http://www.faqs.org/rfcs/rfc2822.html">RFC
2822</a>); a
<sub>subscript
</sub>; a
<sup>superscript
</sup>;
870 and explicit roles for
<em>standard
</em> <strong>inline
</strong>
871 <tt class=
"literal">markup
</tt>.
</p>
872 <!-- DO NOT RE-WRAP THE FOLLOWING PARAGRAPH! -->
873 <p>Let's test wrapping and whitespace significance in inline literals:
874 <tt class=
"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).
</tt></p>
875 <p>If the
<tt class=
"literal"><span class=
"pre">--pep-references
</span></tt> option was supplied, there should be a
876 live link to PEP
258 here.
</p>
879 <div class=
"section" id=
"bullet-lists">
880 <h2><a class=
"toc-backref" href=
"#id44"><span class=
"sectnum">2.2</span> Bullet Lists
</a></h2>
882 <li><p>A bullet list
</p>
884 <li><p>Nested bullet list.
</p></li>
885 <li><p>Nested item
2.
</p></li>
889 <p>Paragraph
2 of item
2.
</p>
891 <li><p>Nested bullet list.
</p></li>
892 <li><p>Nested item
2.
</p>
894 <li><p>Third level.
</p></li>
895 <li><p>Item
2.
</p></li>
898 <li><p>Nested item
3.
</p></li>
899 <li><p>This nested list should be compacted by the HTML writer.
</p>
900 <span class=
"target" id=
"target"></span><!-- Even if this item contains a target and a comment. -->
906 <div class=
"section" id=
"enumerated-lists">
907 <h2><a class=
"toc-backref" href=
"#id45"><span class=
"sectnum">2.3</span> Enumerated Lists
</a></h2>
909 <li><p>Arabic numerals.
</p>
910 <ol class=
"loweralpha simple">
911 <li><p>lower alpha)
</p>
912 <ol class=
"lowerroman simple">
913 <li><p>(lower roman)
</p>
914 <ol class=
"upperalpha simple">
915 <li><p>upper alpha.
</p>
916 <ol class=
"upperroman simple">
917 <li><p>upper roman)
</p></li>
926 <li><p>Lists that don't start at
1:
</p>
927 <ol class=
"arabic simple" style=
"counter-reset: item 2;">
928 <li><p>Three
</p></li>
931 <ol class=
"upperalpha simple" style=
"counter-reset: item 2;">
935 <ol class=
"lowerroman simple" style=
"counter-reset: item 2;">
942 <div class=
"section" id=
"definition-lists">
943 <h2><a class=
"toc-backref" href=
"#id46"><span class=
"sectnum">2.4</span> Definition Lists
</a></h2>
944 <dl class=
"docutils">
946 <dd><p>Definition
</p>
948 <dt>Term
<span class=
"classifier-delimiter">:
</span> <span class=
"classifier">classifier
</span></dt>
949 <dd><p>Definition paragraph
1.
</p>
950 <p>Definition paragraph
2.
</p>
953 <dd><p>Definition
</p>
955 <dt>Term
<span class=
"classifier-delimiter">:
</span> <span class=
"classifier">classifier one
</span> <span class=
"classifier-delimiter">:
</span> <span class=
"classifier">classifier two
</span></dt>
956 <dd><p>Definition
</p>
960 <div class=
"section" id=
"field-lists">
961 <h2><a class=
"toc-backref" href=
"#id47"><span class=
"sectnum">2.5</span> Field Lists
</a></h2>
962 <dl class=
"field-list">
964 <dd><p>Field lists map field names to field bodies, like database
965 records. They are often part of an extension syntax. They are
966 an unambiguous variant of RFC
2822 fields.
</p>
968 <dt>how arg1 arg2
</dt>
969 <dd><p>The field marker is a colon, the field name, and a colon.
</p>
970 <p>The field body may contain one or more body elements, indented
971 relative to the field marker.
</p>
974 <dd><p class=
"credits">This paragraph has the
<cite>credits
</cite> class set. (This is actually not
975 about credits but just for ensuring that the class attribute
976 doesn't get stripped away.)
</p>
980 <div class=
"section" id=
"option-lists">
981 <h2><a class=
"toc-backref" href=
"#id48"><span class=
"sectnum">2.6</span> Option Lists
</a></h2>
982 <p>For listing command-line options:
</p>
983 <dl class=
"option-list">
984 <dt><kbd><span class=
"option">-a
</span></kbd></dt>
985 <dd><p>command-line option
"a
"</p>
987 <dt><kbd><span class=
"option">-b
<var>file
</var></span></kbd></dt>
988 <dd><p>options can have arguments
989 and long descriptions
</p>
991 <dt><kbd><span class=
"option">--long
</span></kbd></dt>
992 <dd><p>options can be long also
</p>
994 <dt><kbd><span class=
"option">--input=
<var>file
</var></span></kbd></dt>
995 <dd><p>long options can also have
998 <dt><kbd><span class=
"option">--very-long-option
</span></kbd></dt>
999 <dd><p>The description can also start on the next line.
</p>
1000 <p>The description may contain multiple body elements,
1001 regardless of where it starts.
</p>
1003 <dt><kbd><span class=
"option">-x
</span>,
<span class=
"option">-y
</span>,
<span class=
"option">-z
</span></kbd></dt>
1004 <dd><p>Multiple options are an
"option group
".
</p>
1006 <dt><kbd><span class=
"option">-v
</span>,
<span class=
"option">--verbose
</span></kbd></dt>
1007 <dd><p>Commonly-seen: short
& long options.
</p>
1009 <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>
1010 <dd><p>Multiple options with arguments.
</p>
1012 <dt><kbd><span class=
"option">/V
</span></kbd></dt>
1013 <dd><p>DOS/VMS-style options too
</p>
1016 <p>There must be at least two spaces between the option and the
1019 <div class=
"section" id=
"literal-blocks">
1020 <h2><a class=
"toc-backref" href=
"#id49"><span class=
"sectnum">2.7</span> Literal Blocks
</a></h2>
1021 <p>Literal blocks are indicated with a double-colon (
"::
") at the end of
1022 the preceding paragraph (over there
<tt class=
"literal"><span class=
"pre">--
></span></tt>). They can be indented:
</p>
1023 <pre class=
"literal-block">
1025 text = 'is left as-is'
1026 spaces_and_linebreaks = 'are preserved'
1027 markup_processing = None
1029 <p>Or they can be quoted without indentation:
</p>
1030 <pre class=
"literal-block">
1031 >> Great idea!
1033 > Why didn't I think of that?
1036 <div class=
"section" id=
"line-blocks">
1037 <h2><a class=
"toc-backref" href=
"#id50"><span class=
"sectnum">2.8</span> Line Blocks
</a></h2>
1038 <p>This section tests line blocks. Line blocks are body elements which
1039 consist of lines and other line blocks. Nested line blocks cause
1041 <div class=
"line-block">
1042 <div class=
"line">This is a line block. It ends with a blank line.
</div>
1043 <div class=
"line-block">
1044 <div class=
"line">New lines begin with a vertical bar (
"|
").
</div>
1045 <div class=
"line">Line breaks and initial indent are significant, and preserved.
</div>
1046 <div class=
"line-block">
1047 <div class=
"line">Continuation lines are also possible. A long line that is intended
1048 to wrap should begin with a space in place of the vertical bar.
</div>
1050 <div class=
"line">The left edge of a continuation line need not be aligned with
1051 the left edge of the text above it.
</div>
1054 <div class=
"line-block">
1055 <div class=
"line">This is a second line block.
</div>
1056 <div class=
"line"><br /></div>
1057 <div class=
"line">Blank lines are permitted internally, but they must begin with a
"|
".
</div>
1059 <p>Another line block, surrounded by paragraphs:
</p>
1060 <div class=
"line-block">
1061 <div class=
"line">And it's no good waiting by the window
</div>
1062 <div class=
"line">It's no good waiting for the sun
</div>
1063 <div class=
"line">Please believe me, the things you dream of
</div>
1064 <div class=
"line">They don't fall in the lap of no-one
</div>
1066 <p>Take it away, Eric the Orchestra Leader!
</p>
1068 <div class=
"line-block">
1069 <div class=
"line">A one, two, a one two three four
</div>
1070 <div class=
"line"><br /></div>
1071 <div class=
"line">Half a bee, philosophically,
</div>
1072 <div class=
"line-block">
1073 <div class=
"line">must,
<em>ipso facto
</em>, half not be.
</div>
1075 <div class=
"line">But half the bee has got to be,
</div>
1076 <div class=
"line-block">
1077 <div class=
"line"><em>vis a vis
</em> its entity. D'you see?
</div>
1078 <div class=
"line"><br /></div>
1080 <div class=
"line">But can a bee be said to be
</div>
1081 <div class=
"line-block">
1082 <div class=
"line">or not to be an entire bee,
</div>
1083 <div class=
"line-block">
1084 <div class=
"line">when half the bee is not a bee,
</div>
1085 <div class=
"line-block">
1086 <div class=
"line">due to some ancient injury?
</div>
1087 <div class=
"line"><br /></div>
1091 <div class=
"line">Singing...
</div>
1094 <p>A line block, like the following poem by Christian Morgenstern, can
1095 also be centre-aligned:
</p>
1096 <div class=
"align-center line-block" xml:
lang=
"de">
1097 <div class=
"line"><strong>Die Trichter
</strong></div>
1098 <div class=
"line"><br /></div>
1099 <div class=
"line">Zwei Trichter wandeln durch die Nacht.
</div>
1100 <div class=
"line">Durch ihres Rumpfs verengten Schacht
</div>
1101 <div class=
"line">fließt weißes Mondlicht
</div>
1102 <div class=
"line">still und heiter
</div>
1103 <div class=
"line">auf
ihren
</div>
1104 <div class=
"line">Waldweg
</div>
1105 <div class=
"line">u. s.
</div>
1106 <div class=
"line">w.
</div>
1107 <div class=
"line"><br /></div>
1110 <div class=
"section" id=
"block-quotes">
1111 <h2><a class=
"toc-backref" href=
"#id51"><span class=
"sectnum">2.9</span> Block Quotes
</a></h2>
1112 <p>Block quotes consist of indented body elements:
</p>
1114 <p>My theory by A. Elk. Brackets Miss, brackets. This theory goes
1115 as follows and begins now. All brontosauruses are thin at one
1116 end, much much thicker in the middle and then thin again at the
1117 far end. That is my theory, it is mine, and belongs to me and I
1118 own it, and what it is too.
</p>
1119 <p class=
"attribution">—Anne Elk (Miss)
</p>
1121 <p>The language of a quote (like any other object) can be specified by
1122 a class attribute:
</p>
1124 <blockquote xml:
lang=
"fr">
1125 <p>ReStructuredText est un langage de balisage léger utilisé
1126 notamment dans la documentation du langage Python.
</p>
1129 <div class=
"section" id=
"doctest-blocks">
1130 <h2><a class=
"toc-backref" href=
"#id52"><span class=
"sectnum">2.10</span> Doctest Blocks
</a></h2>
1131 <pre class=
"doctest-block">
1132 >>> print 'Python-specific usage examples; begun with
">>>"'
1133 Python-specific usage examples; begun with
">>>"
1134 >>> print '(cut and pasted from interactive Python sessions)'
1135 (cut and pasted from interactive Python sessions)
1138 <div class=
"section" id=
"footnotes">
1139 <h2><a class=
"toc-backref" href=
"#id53"><span class=
"sectnum">2.11</span> Footnotes
</a></h2>
1140 <dl class=
"footnote"><dt class=
"label">1</dt>
1142 <em>(
<a class=
"fn-backref" href=
"#id1">1</a>,
<a class=
"fn-backref" href=
"#id9">2</a>,
<a class=
"fn-backref" href=
"#id22">3</a>)
</em> <p>A footnote contains body elements, consistently indented by at
1144 <p class=
"last">This is the footnote's second paragraph.
</p>
1146 <dt class=
"label">2</dt>
1148 <em>(
<a class=
"fn-backref" href=
"#id3">1</a>,
<a class=
"fn-backref" href=
"#id10">2</a>)
</em> <p>Footnotes may be numbered, either manually (as in
<a class=
"footnote-reference" href=
"#id8" id=
"id9"><sup>1</sup></a>) or
1149 automatically using a
"#
"-prefixed label. This footnote has a
1150 label so it can be referred to from multiple places, both as a
1151 footnote reference (
<a class=
"footnote-reference" href=
"#label" id=
"id10"><sup>2</sup></a>) and as a
<a class=
"reference internal" href=
"#label">hyperlink reference
</a>.
</p>
1153 <dt class=
"label"><a class=
"fn-backref" href=
"#id2">3</a></dt>
1155 <p class=
"first">This footnote is numbered automatically and anonymously using a
1156 label of
"#
" only.
</p>
1157 <p>This is the second paragraph.
</p>
1158 <p class=
"last">And this is the third paragraph.
</p>
1160 <dt class=
"label"><a class=
"fn-backref" href=
"#id4">*
</a></dt>
1162 <p class=
"first last">Footnotes may also use symbols, specified with a
"*
" label.
1163 Here's a reference to the next footnote:
<a class=
"footnote-reference" href=
"#id15" id=
"id14"><sup>†
</sup></a>.
</p>
1165 <dt class=
"label"><a class=
"fn-backref" href=
"#id14">†
</a></dt>
1167 <p class=
"first last">This footnote shows the next symbol in the sequence.
</p>
1169 <dt class=
"label">4</dt>
1171 <p class=
"first last">Here's an unreferenced footnote, with a reference to a
1172 nonexistent footnote:
<a href=
"#id95"><span class=
"problematic" id=
"id96"><span id=
"id17"></span>[
5]_
</span></a>.
</p>
1176 <div class=
"section" id=
"citations">
1177 <h2><a class=
"toc-backref" href=
"#id54"><span class=
"sectnum">2.12</span> Citations
</a></h2>
1178 <dl class=
"citation"><dt class=
"label">[CIT2002]
</dt>
1180 <em>(
<a class=
"fn-backref" href=
"#id5">1</a>,
<a class=
"fn-backref" href=
"#id18">2</a>)
</em> <p class=
"last">Citations are text-labeled footnotes. They may be
1181 rendered separately and differently from footnotes.
</p>
1184 <p>Here's a reference to the above,
<a class=
"citation-reference" href=
"#cit2002" id=
"id18">[CIT2002]
</a>, and a
<a href=
"#id97"><span class=
"problematic" id=
"id98"><span id=
"id19"></span>[nonexistent]_
</span></a>
1187 <div class=
"section" id=
"targets">
1188 <span id=
"another-target"></span><h2><a class=
"toc-backref" href=
"#id55"><span class=
"sectnum">2.13</span> Targets
</a></h2>
1189 <p id=
"example">This paragraph is pointed to by the explicit
"example
" target. A
1190 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
1191 hyperlink targets
</a> are also possible.
</p>
1192 <p>Section headers are implicit targets, referred to by name. See
1193 <a class=
"reference internal" href=
"#targets">Targets
</a>, which is a subsection of
<a class=
"reference internal" href=
"#body-elements">Body Elements
</a>.
</p>
1194 <p>Explicit external targets are interpolated into references such as
1195 "<a class=
"reference external" href=
"http://www.python.org/">Python
</a><a class=
"footnote-reference" href=
"#id26" id=
"id28"><sup>5</sup></a>".
</p>
1196 <p>Targets may be indirect and anonymous. Thus
<a class=
"reference internal" href=
"#targets">this phrase
</a> may also
1197 refer to the
<a class=
"reference internal" href=
"#targets">Targets
</a> section.
</p>
1198 <p>Here's a
<a href=
"#id99"><span class=
"problematic" id=
"id100">`hyperlink reference without a target`_
</span></a>, which generates an
1200 <div class=
"section" id=
"duplicate-target-names">
1201 <h3><a class=
"toc-backref" href=
"#id56"><span class=
"sectnum">2.13.1</span> Duplicate Target Names
</a></h3>
1202 <p>Duplicate names in section headers or other implicit targets will
1203 generate
"info
" (level-
1) system messages. Duplicate names in
1204 explicit targets will generate
"warning
" (level-
2) system messages.
</p>
1206 <div class=
"section" id=
"id21">
1207 <h3><a class=
"toc-backref" href=
"#id57"><span class=
"sectnum">2.13.2</span> Duplicate Target Names
</a></h3>
1208 <p>Since there are two
"Duplicate Target Names
" section headers, we
1209 cannot uniquely refer to either of them by name. If we try to (like
1210 this:
<a href=
"#id101"><span class=
"problematic" id=
"id102">`Duplicate Target Names`_
</span></a>), an error is generated.
</p>
1213 <div class=
"section" id=
"directives">
1214 <h2><a class=
"toc-backref" href=
"#id58"><span class=
"sectnum">2.14</span> Directives
</a></h2>
1215 <div class=
"contents local topic" id=
"contents">
1216 <ul class=
"auto-toc simple">
1217 <li><p><a class=
"reference internal" href=
"#document-parts" id=
"id87"><span class=
"sectnum">2.14.1</span> Document Parts
</a></p></li>
1218 <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>
1219 <li><p><a class=
"reference internal" href=
"#admonitions" id=
"id89"><span class=
"sectnum">2.14.3</span> Admonitions
</a></p></li>
1220 <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>
1221 <li><p><a class=
"reference internal" href=
"#target-footnotes" id=
"id91"><span class=
"sectnum">2.14.5</span> Target Footnotes
</a></p></li>
1222 <li><p><a class=
"reference internal" href=
"#replacement-text" id=
"id92"><span class=
"sectnum">2.14.6</span> Replacement Text
</a></p></li>
1223 <li><p><a class=
"reference internal" href=
"#compound-paragraph" id=
"id93"><span class=
"sectnum">2.14.7</span> Compound Paragraph
</a></p></li>
1224 <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>
1227 <p>These are just a sample of the many reStructuredText Directives. For
1229 <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>
1230 <div class=
"section" id=
"document-parts">
1231 <h3><a class=
"toc-backref" href=
"#id87"><span class=
"sectnum">2.14.1</span> Document Parts
</a></h3>
1232 <p>An example of the
"contents
" directive can be seen above this section
1233 (a local, untitled table of
<a class=
"reference internal" href=
"#contents">contents
</a>) and at the beginning of the
1234 document (a document-wide
<a class=
"reference internal" href=
"#table-of-contents">table of contents
</a>).
</p>
1236 <div class=
"section" id=
"images-and-figures">
1237 <h3><a class=
"toc-backref" href=
"#id88"><span class=
"sectnum">2.14.2</span> Images and Figures
</a></h3>
1238 <p>An image directive (also clickable -- a hyperlink reference):
</p>
1239 <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>
1240 <p>Image with multiple IDs:
</p>
1241 <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" />
1242 <p>A centered image:
</p>
1243 <img alt=
"../../../docs/user/rst/images/biohazard.png" class=
"align-center" src=
"../../../docs/user/rst/images/biohazard.png" />
1244 <p>A left-aligned image:
</p>
1245 <img alt=
"../../../docs/user/rst/images/biohazard.png" class=
"align-left" src=
"../../../docs/user/rst/images/biohazard.png" />
1246 <p>This paragraph might flow around the image.
1247 The specific behavior depends upon the style sheet and
1248 the browser or rendering software used.
</p>
1249 <p>A right-aligned image:
</p>
1250 <img alt=
"../../../docs/user/rst/images/biohazard.png" class=
"align-right" src=
"../../../docs/user/rst/images/biohazard.png" />
1251 <p>This paragraph might flow around the image.
1252 The specific behavior depends upon the style sheet and
1253 the browser or rendering software used.
</p>
1254 <p>For inline images see
<a class=
"reference internal" href=
"#substitution-definitions">Substitution Definitions
</a>.
</p>
1256 <p>An image
2 em wide:
</p>
1257 <img alt=
"../../../docs/user/rst/images/biohazard.png" src=
"../../../docs/user/rst/images/biohazard.png" style=
"width: 2em;" />
1258 <p>An image
2 em wide and
15 pixel high:
</p>
1259 <img alt=
"../../../docs/user/rst/images/biohazard.png" src=
"../../../docs/user/rst/images/biohazard.png" style=
"width: 2em; height: 15px;" />
1260 <p>An image occupying
50% of the line width:
</p>
1261 <img alt=
"../../../docs/user/rst/images/title.png" src=
"../../../docs/user/rst/images/title.png" style=
"width: 50%;" />
1262 <p>An image
2 cm high:
</p>
1263 <img alt=
"../../../docs/user/rst/images/biohazard.png" src=
"../../../docs/user/rst/images/biohazard.png" style=
"height: 2cm;" />
1264 <p>A
<em>figure
</em> is an image with a caption and/or a legend. With page-based output
1265 media, figures might float to a different position if this helps the page
1267 <div class=
"figclass1 figclass2 figure">
1268 <img alt=
"reStructuredText, the markup syntax" class=
"class1 class2" src=
"../../../docs/user/rst/images/title.png" style=
"width: 258px;" />
1269 <p class=
"caption">Plaintext markup syntax and parser system.
</p>
1270 <div class=
"legend">
1276 <tbody valign=
"top">
1277 <tr><td><p>re
</p></td>
1278 <td><p>Revised, revisited, based on 're' module.
</p></td>
1280 <tr><td><p>Structured
</p></td>
1281 <td><p>Structure-enhanced text, structuredtext.
</p></td>
1283 <tr><td><p>Text
</p></td>
1284 <td><p>Well it is, isn't it?
</p></td>
1288 <p>This paragraph is also part of the legend.
</p>
1291 <p>A left-aligned figure:
</p>
1292 <div class=
"figclass1 figclass2 figure align-left" style=
"width: 70%">
1293 <img alt=
"reStructuredText, the markup syntax" class=
"class1 class2" src=
"../../../docs/user/rst/images/biohazard.png" style=
"width: 40px;" />
1294 <p class=
"caption">This is the caption.
</p>
1295 <div class=
"legend">
1296 <p>This is the legend.
</p>
1297 <p>The legend may consist of several paragraphs.
</p>
1300 <p>This paragraph might flow around the figure.
</p>
1301 <p>The specific behavior depends upon the style sheet and the browser or
1302 rendering software used.
</p>
1303 <p>A centered figure:
</p>
1304 <div class=
"figure align-center">
1305 <img alt=
"../../../docs/user/rst/images/biohazard.png" src=
"../../../docs/user/rst/images/biohazard.png" style=
"width: 40px;" />
1306 <p class=
"caption">This is the caption.
</p>
1307 <div class=
"legend">
1308 <p>This is the legend.
</p>
1309 <p>The legend may consist of several paragraphs.
</p>
1312 <p>This paragraph might flow around the figure.
</p>
1313 <p>The specific behavior depends upon the style sheet and the browser or
1314 rendering software used.
</p>
1315 <p>A right-aligned figure:
</p>
1316 <div class=
"figure align-right">
1317 <img alt=
"../../../docs/user/rst/images/biohazard.png" src=
"../../../docs/user/rst/images/biohazard.png" style=
"width: 40px;" />
1318 <p class=
"caption">This is the caption.
</p>
1319 <div class=
"legend">
1320 <p>This is the legend.
</p>
1321 <p>The legend may consist of several paragraphs.
</p>
1324 <p>This paragraph might flow around the figure. The specific behavior depends
1325 upon the style sheet and the browser or rendering software used.
</p>
1327 <div class=
"section" id=
"admonitions">
1328 <h3><a class=
"toc-backref" href=
"#id89"><span class=
"sectnum">2.14.3</span> Admonitions
</a></h3>
1329 <div class=
"attention">
1330 <p class=
"admonition-title">Attention!
</p>
1331 <p>Directives at large.
</p>
1333 <div class=
"caution">
1334 <p class=
"admonition-title">Caution!
</p>
1335 <p>Don't take any wooden nickels.
</p>
1337 <div class=
"danger">
1338 <p class=
"admonition-title">!DANGER!
</p>
1339 <p>Mad scientist at work!
</p>
1342 <p class=
"admonition-title">Error
</p>
1343 <p>Does not compute.
</p>
1346 <p class=
"admonition-title">Hint
</p>
1347 <p>It's bigger than a bread box.
</p>
1349 <div class=
"important">
1350 <p class=
"admonition-title">Important
</p>
1352 <li><p>Wash behind your ears.
</p></li>
1353 <li><p>Clean up your room.
</p></li>
1354 <li><p>Call your mother.
</p></li>
1355 <li><p>Back up your data.
</p></li>
1359 <p class=
"admonition-title">Note
</p>
1360 <p>This is a note.
</p>
1363 <p class=
"admonition-title">Tip
</p>
1364 <p>15% if the service is good.
</p>
1366 <div class=
"warning">
1367 <p class=
"admonition-title">Warning
</p>
1368 <p>Strong prose may provoke extreme mental exertion.
1369 Reader discretion is strongly advised.
</p>
1371 <div class=
"admonition-and-by-the-way admonition">
1372 <p class=
"admonition-title">And, by the way...
</p>
1373 <p>You can make up your own admonition too.
</p>
1376 <div class=
"section" id=
"topics-sidebars-and-rubrics">
1377 <h3><a class=
"toc-backref" href=
"#id90"><span class=
"sectnum">2.14.4</span> Topics, Sidebars, and Rubrics
</a></h3>
1378 <p><em>Sidebars
</em> are like miniature, parallel documents.
</p>
1379 <div class=
"sidebar">
1380 <p class=
"sidebar-title">Sidebar Title
</p>
1381 <p class=
"sidebar-subtitle">Optional Subtitle
</p>
1382 <p>This is a sidebar. It is for text outside the flow of the main
1384 <p class=
"rubric">This is a rubric inside a sidebar
</p>
1385 <p>Sidebars often appear beside the main text with a border and a different
1386 background or font color.
</p>
1388 <p>A
<em>topic
</em> is like a block quote with a title, or a self-contained section
1389 with no subsections.
</p>
1391 <p class=
"topic-title first">Topic Title
</p>
1392 <p>This is a topic.
</p>
1394 <p>A
<em>rubric
</em> is like an informal heading that doesn't correspond to the
1395 document's structure. It is typically highlighted in red (hence the name).
</p>
1396 <p class=
"rubric">This is a rubric
</p>
1397 <p>Topics and rubrics can be used at places where a
<a class=
"reference internal" href=
"#section-title">section title
</a> is not
1398 allowed (e.g. inside a directive).
</p>
1400 <div class=
"section" id=
"target-footnotes">
1401 <h3><a class=
"toc-backref" href=
"#id91"><span class=
"sectnum">2.14.5</span> Target Footnotes
</a></h3>
1402 <dl class=
"footnote"><dt class=
"label">5</dt>
1404 <em>(
<a class=
"fn-backref" href=
"#id27">1</a>,
<a class=
"fn-backref" href=
"#id28">2</a>,
<a class=
"fn-backref" href=
"#id29">3</a>,
<a class=
"fn-backref" href=
"#id34">4</a>)
</em> <p class=
"last"><a class=
"reference external" href=
"http://www.python.org/">http://www.python.org/
</a></p>
1406 <dt class=
"label"><a class=
"fn-backref" href=
"#id31">6</a></dt>
1408 <p class=
"first last"><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>
1410 <dt class=
"label"><a class=
"fn-backref" href=
"#id33">7</a></dt>
1412 <p class=
"first last"><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>
1414 <dt class=
"label"><a class=
"fn-backref" href=
"#id36">8</a></dt>
1416 <p class=
"first last"><a class=
"reference external" href=
"http://docutils.sourceforge.net/">http://docutils.sourceforge.net/
</a></p>
1420 <div class=
"section" id=
"replacement-text">
1421 <h3><a class=
"toc-backref" href=
"#id92"><span class=
"sectnum">2.14.6</span> Replacement Text
</a></h3>
1422 <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=
"#id26" id=
"id29"><sup>5</sup></a>.
</p>
1424 <div class=
"section" id=
"compound-paragraph">
1425 <h3><a class=
"toc-backref" href=
"#id93"><span class=
"sectnum">2.14.7</span> Compound Paragraph
</a></h3>
1426 <div class=
"some-class compound">
1427 <p class=
"compound-first">Compound
1, paragraph
1.
</p>
1428 <p class=
"compound-middle">Compound
1, paragraph
2.
</p>
1429 <ul class=
"compound-last simple">
1430 <li><p>Compound
1, list item one.
</p></li>
1431 <li><p>Compound
1, list item two.
</p></li>
1434 <p>Another compound statement:
</p>
1435 <div class=
"compound">
1436 <p class=
"compound-first">Compound
2, a literal block:
</p>
1437 <pre class=
"compound-middle literal-block">
1438 Compound
2, literal.
1440 <p class=
"compound-last">Compound
2, this is a test.
</p>
1442 <div class=
"compound">
1443 <p>Compound
3, only consisting of one paragraph.
</p>
1445 <div class=
"compound">
1446 <pre class=
"compound-first literal-block">
1448 This one starts with a literal block.
1450 <p class=
"compound-last">Compound
4, a paragraph.
</p>
1452 <p>Now something
<em>really
</em> perverted -- a nested compound block. This is
1453 just to test that it works at all; the results don't have to be
1455 <div class=
"compound">
1456 <p class=
"compound-first">Compound
5, block
1 (a paragraph).
</p>
1457 <div class=
"compound-middle compound">
1458 <p class=
"compound-first">Compound
6, block
2 in compound
5.
</p>
1459 <p class=
"compound-last">Compound
6, another paragraph.
</p>
1461 <p class=
"compound-last">Compound
5, block
3 (a paragraph).
</p>
1463 <div class=
"compound">
1464 <p class=
"compound-first">Compound
7, with a table inside:
</p>
1465 <table class=
"compound-middle">
1471 <tbody valign=
"top">
1472 <tr><td><p>Left cell, first
1474 <p>Left cell, second
1481 <td><p>Right cell.
</p>
1488 <p class=
"compound-middle">Compound
7, a paragraph after the table.
</p>
1489 <p class=
"compound-last">Compound
7, another paragraph.
</p>
1492 <div class=
"section" id=
"parsed-literal-blocks">
1493 <h3><a class=
"toc-backref" href=
"#id94"><span class=
"sectnum">2.14.8</span> Parsed Literal Blocks
</a></h3>
1494 <pre class=
"literal-block">
1495 This is a parsed literal block.
1496 This line is indented. The next line is blank.
1498 Inline markup is supported, e.g.
<em>emphasis
</em>,
<strong>strong
</strong>,
<tt class=
"literal">literal
1499 text
</tt>, footnotes
<a class=
"footnote-reference" href=
"#id8" id=
"id22"><sup>1</sup></a>,
<span class=
"target" id=
"hyperlink-targets">hyperlink targets
</span>, and
<a class=
"reference external" href=
"http://www.python.org/">references
</a>.
1503 <div class=
"section" id=
"substitution-definitions">
1504 <h2><a class=
"toc-backref" href=
"#id67"><span class=
"sectnum">2.15</span> Substitution Definitions
</a></h2>
1505 <p>An inline image (
<img alt=
"EXAMPLE" src=
"../../../docs/user/rst/images/biohazard.png" />) example:
</p>
1506 <p>(Substitution definitions are not visible in the HTML source.)
</p>
1508 <div class=
"section" id=
"comments">
1509 <h2><a class=
"toc-backref" href=
"#id68"><span class=
"sectnum">2.16</span> Comments
</a></h2>
1511 <!-- Comments begin with two dots and a space. Anything may
1512 follow, except for the syntax of footnotes, hyperlink
1513 targets, directives, or substitution definitions.
1515 Double-dashes - - "- -" - - must be escaped somehow in HTML output.
1517 Comments may contain non-ASCII characters: ä ö ü æ ø å -->
1518 <p>(View the HTML source to see the comment.)
</p>
1520 <div class=
"section" id=
"raw-text">
1521 <h2><a class=
"toc-backref" href=
"#id69"><span class=
"sectnum">2.17</span> Raw text
</a></h2>
1522 <p>This does not necessarily look nice, because there may be missing white space.
</p>
1523 <p>It's just there to freeze the behavior.
</p>
1524 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>
1525 Fifth test in HTML.
<br />Line two.
</div>
1526 <div class=
"section" id=
"container">
1527 <h2><a class=
"toc-backref" href=
"#id70"><span class=
"sectnum">2.18</span> Container
</a></h2>
1528 <div class=
"custom container">
1533 <div class=
"section" id=
"colspanning-tables">
1534 <h2><a class=
"toc-backref" href=
"#id71"><span class=
"sectnum">2.19</span> Colspanning tables
</a></h2>
1535 <p>This table has a cell spanning two columns:
</p>
1542 <thead valign=
"bottom">
1543 <tr><th class=
"head" colspan=
"2"><p>Inputs
</p></th>
1544 <th class=
"head"><p>Output
</p></th>
1546 <tr><th class=
"head"><p>A
</p></th>
1547 <th class=
"head"><p>B
</p></th>
1548 <th class=
"head"><p>A or B
</p></th>
1551 <tbody valign=
"top">
1552 <tr><td><p>False
</p></td>
1553 <td><p>False
</p></td>
1554 <td><p>False
</p></td>
1556 <tr><td><p>True
</p></td>
1557 <td><p>False
</p></td>
1558 <td><p>True
</p></td>
1560 <tr><td><p>False
</p></td>
1561 <td><p>True
</p></td>
1562 <td><p>True
</p></td>
1564 <tr><td><p>True
</p></td>
1565 <td><p>True
</p></td>
1566 <td><p>True
</p></td>
1571 <div class=
"section" id=
"rowspanning-tables">
1572 <h2><a class=
"toc-backref" href=
"#id72"><span class=
"sectnum">2.20</span> Rowspanning tables
</a></h2>
1573 <p>Here's a table with cells spanning several rows:
</p>
1580 <thead valign=
"bottom">
1581 <tr><th class=
"head"><p>Header row, column
1
1582 (header rows optional)
</p></th>
1583 <th class=
"head"><p>Header
2</p></th>
1584 <th class=
"head"><p>Header
3</p></th>
1587 <tbody valign=
"top">
1588 <tr><td><p>body row
1, column
1</p></td>
1589 <td><p>column
2</p></td>
1590 <td><p>column
3</p></td>
1592 <tr><td><p>body row
2</p></td>
1593 <td rowspan=
"2"><p>Cells may
1595 <td rowspan=
"2"><p>Another
1599 <tr><td><p>body row
3</p></td>
1604 <div class=
"section" id=
"complex-tables">
1605 <h2><a class=
"toc-backref" href=
"#id73"><span class=
"sectnum">2.21</span> Complex tables
</a></h2>
1606 <p>Here's a complex table, which should test all features.
</p>
1614 <thead valign=
"bottom">
1615 <tr><th class=
"head"><p>Header row, column
1
1616 (header rows optional)
</p></th>
1617 <th class=
"head"><p>Header
2</p></th>
1618 <th class=
"head"><p>Header
3</p></th>
1619 <th class=
"head"><p>Header
4</p></th>
1622 <tbody valign=
"top">
1623 <tr><td><p>body row
1, column
1</p></td>
1624 <td><p>column
2</p></td>
1625 <td><p>column
3</p></td>
1626 <td><p>column
4</p></td>
1628 <tr><td><p>body row
2</p></td>
1629 <td colspan=
"3"><p>Cells may span columns.
</p></td>
1631 <tr><td><p>body row
3</p></td>
1632 <td rowspan=
"2"><p>Cells may
1636 <td colspan=
"2" rowspan=
"2"><ul class=
"simple">
1637 <li><p>Table cells
</p></li>
1638 <li><p>contain
</p></li>
1639 <li><p>body elements.
</p></li>
1643 <tr><td><p>body row
4</p></td>
1645 <tr><td><p>body row
5</p></td>
1646 <td colspan=
"2"><p>Cells may also be
1647 empty:
<tt class=
"literal"><span class=
"pre">--
></span></tt></p></td>
1653 <div class=
"section" id=
"list-tables">
1654 <h2><a class=
"toc-backref" href=
"#id74"><span class=
"sectnum">2.22</span> List Tables
</a></h2>
1655 <p>Here's a list table exercising all features:
</p>
1656 <table class=
"test">
1657 <caption>list table with integral header
</caption>
1663 <thead valign=
"bottom">
1664 <tr><th class=
"head stub"><p>Treat
</p></th>
1665 <th class=
"head"><p>Quantity
</p></th>
1666 <th class=
"head"><p>Description
</p></th>
1669 <tbody valign=
"top">
1670 <tr><th class=
"stub"><p>Albatross
</p></th>
1671 <td><p>2.99</p></td>
1672 <td><p>On a stick!
</p></td>
1674 <tr><th class=
"stub"><p>Crunchy Frog
</p></th>
1675 <td><p>1.49</p></td>
1676 <td><p>If we took the bones out, it wouldn't be
1677 crunchy, now would it?
</p></td>
1679 <tr><th class=
"stub"><p>Gannet Ripple
</p></th>
1680 <td><p>1.99</p></td>
1681 <td><p>On a stick!
</p></td>
1686 <div class=
"section" id=
"custom-roles">
1687 <h2><a class=
"toc-backref" href=
"#id75"><span class=
"sectnum">2.23</span> Custom Roles
</a></h2>
1689 <li><p>A role based on an existing role.
</p>
1690 <p><tt class=
"custom literal">one
</tt> <tt class=
"custom literal">two
</tt> <tt class=
"custom literal">three
</tt></p>
1692 <li><p>A new role.
</p>
1693 <p><span class=
"customnew">one two three
</span></p>
1695 <li><p>A role with class attribute.
</p>
1696 <p><span class=
"special">interpreted text
</span></p>
1698 <li><p>A language-switching role:
</p>
1699 <p>Let's count in German
<span xml:
lang=
"de">eins zwei drei
</span>.
</p>
1701 <li><p>A role with multiple class attributes, styled with raw directives:
</p>
1702 <p>The following works in most browsers but does not validate
1703 (
<tt class=
"literal"><style
></tt> is only allowed in the document head):
</p>
1704 <pre class=
"literal-block">
1707 <style type=
"text/css
"><!--
1708 .green {color: green;}
1709 .sc {font-variant: small-caps;}
1710 --
></style
>
1712 <p><span class=
"green sc" xml:
lang=
"en-gb">British colourful text in small-caps
</span>.
</p>
1716 <div class=
"section" id=
"svg-images">
1717 <h2><a class=
"toc-backref" href=
"#id76"><span class=
"sectnum">2.24</span> SVG Images
</a></h2>
1718 <object data=
"../../../docs/user/rst/images/biohazard.svg" style=
"width: 48px; height: 48px;" type=
"image/svg+xml">
1719 ../../../docs/user/rst/images/biohazard.svg
</object>
1720 <p>Scalable vector graphics (SVG) images are not supported by all backends.
1721 Rendering depends partially on the backend, especially if the size is
1722 not explicitely given.
</p>
1723 <object class=
"align-left" data=
"../../../docs/user/rst/images/title-scaling.svg" style=
"width: 50%;" type=
"image/svg+xml">
1724 ../../../docs/user/rst/images/title-scaling.svg
</object>
1725 <p>A scaling image occupying
50% of the line width (scales with the
1726 browser window).
</p>
1727 <p>Whether an SVG image is scaled or clipped/padded cannot be set in the
1728 containing HTML. It depends on the viewport declaration inside its
1729 root
<svg
> element.
</p>
1730 <p>An inline SVG image
<object data=
"../../../docs/user/rst/images/biohazard-scaling.svg" style=
"height: 0.8em;" type=
"image/svg+xml">inline-svg
</object> scaled to a height of
0.8 em.
</p>
1731 <object class=
"align-right" data=
"../../../docs/user/rst/images/title-scaling.svg" style=
"width: 50%; height: 1.2em;" type=
"image/svg+xml">
1732 ../../../docs/user/rst/images/title-scaling.svg
</object>
1733 <p>A scaling image occupying
50% of the line width and
1.2 em high,
1734 right aligned (this SVG image keeps the aspect ratio):
</p>
1735 <object class=
"align-left" data=
"../../../docs/user/rst/images/biohazard-scaling.svg" style=
"height: 1em;" type=
"image/svg+xml">
1736 ../../../docs/user/rst/images/biohazard-scaling.svg
</object>
1737 <p>A scaling image
1 em high, left aligned.
</p>
1738 <p>A scaling image
5 mm x
5 mm, centered, with hyperlink reference:
</p>
1739 <a class=
"reference internal image-reference" href=
"#directives"><object class=
"align-center" data=
"../../../docs/user/rst/images/biohazard-scaling.svg" style=
"width: 5mm; height: 5mm;" type=
"image/svg+xml">../../../docs/user/rst/images/biohazard-scaling.svg
</object></a>
1740 <object class=
"align-left" data=
"../../../docs/user/rst/images/biohazard.svg" style=
"width: 4cm; height: 2em;" type=
"image/svg+xml">
1741 ../../../docs/user/rst/images/biohazard.svg
</object>
1742 <p>A fixed-size image in a
4 cm x
2 em box.
</p>
1743 <object class=
"align-left" data=
"../../../docs/user/rst/images/title.svg" style=
"width: 50%; height: 15px;" type=
"image/svg+xml">
1744 ../../../docs/user/rst/images/title.svg
</object>
1745 <p>A fixed-size image in a box
50% the line width and
15 pixle high.
</p>
1746 <div class=
"figure">
1747 <object data=
"../../../docs/user/rst/images/title.svg" style=
"width: 290px; height: 28px;" type=
"image/svg+xml">
1748 reStructuredText, the markup syntax
</object>
1749 <p class=
"caption">SVG image in a figure.
</p>
1752 <div class=
"section" id=
"swf-images">
1753 <h2><a class=
"toc-backref" href=
"#id77"><span class=
"sectnum">2.25</span> SWF Images
</a></h2>
1754 <p>Shockwave Flash is an image/movie format that most modern web browsers
1755 support via a plugin. It is sometimes blocked due to privacy/security
1757 <p>Images with extension
<tt class=
"literal">.swf
</tt> are placed inside
<object
> elements.
1758 For complete control over display options use raw HTML.
</p>
1759 <object class=
"align-left" data=
"../../../docs/user/rst/images/biohazard.swf" style=
"width: 4cm; height: 2em;" type=
"application/x-shockwave-flash">
1760 [biohazard.swf]
</object>
1761 <p>An SWF image in a
4 cm x
2 em box, left aligned.
</p>
1762 <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
8.0 em x
0.8 em.
</p>
1765 <div class=
"section" id=
"additional-html4-strict-features">
1766 <h1><a class=
"toc-backref" href=
"#id78"><span class=
"sectnum">3</span> Additional html4_strict features
</a></h1>
1767 <div class=
"section" id=
"enumerated-lists-with-nested-counters">
1768 <h2><a class=
"toc-backref" href=
"#id79"><span class=
"sectnum">3.1</span> Enumerated lists with nested counters
</a></h2>
1769 <ol class=
"nested arabic">
1770 <li><p>first point
</p>
1772 <li><p>first sub-point
</p></li>
1773 <li><p>second sub-point
</p>
1774 <p>With a standard paragraph
</p>
1775 <ol class=
"arabic simple">
1776 <li><p>first sub-sub-point
</p></li>
1779 <li><p>third sub-point with a long and silly text just to test the line
1780 wrapping in this kind of lists.
</p></li>
1783 <li><p>Unordered list nested in enumeration.
</p></li>
1785 <dl class=
"docutils">
1786 <dt>Definition list
</dt>
1787 <dd><p>nested in top-level enumeration
</p>
1791 <li><p>second top-level point
</p></li>
1794 <div class=
"section" id=
"description-list">
1795 <h2><a class=
"toc-backref" href=
"#id80"><span class=
"sectnum">3.2</span> Description list
</a></h2>
1796 <p>Definition lists are styled like in most dictionaries, encyclopedias
1797 etc. (as well as the LaTeX
<cite>description
</cite> environment) if given the
1798 <tt class=
"literal">description
</tt> class argument:
</p>
1799 <dl class=
"description docutils">
1803 <dt>The description
</dt>
1804 <dd><p>starts on the same line. If it is longer, you will see that it has a
1809 <div class=
"section" id=
"field-list-handling">
1810 <h2><a class=
"toc-backref" href=
"#id81"><span class=
"sectnum">3.3</span> Field list handling
</a></h2>
1811 <p>The following list demonstrates the problems with the html4css1
1812 approach: the
<cite>field-name-limit
</cite> setting is given in
"number of
1813 characters
" but the field name uses a proportional font.
</p>
1814 <dl class=
"field-list simple">
1815 <dt>The field name
</dt>
1816 <dd><p>is typeset on the same line, unless it is
"long
".
</p>
1818 <dt>this field name
</dt>
1819 <dd><p>is considered
"long
" in the html table rendering by
1820 the html4css1 writer with the default setting of
1821 <tt class=
"literal"><span class=
"pre">--field-name-limit=
14</span></tt>.
</p>
1823 <dt>iiiiiiiiiiiiiii
</dt>
1824 <dd><p>a field name that is considered
"long
" by html4css1
1825 with the default setting of
<cite>field-name-limit:
14</cite>.
</p>
1827 <dt>MMMMMMMMMMMMMM
</dt>
1828 <dd><p>a field name that is actually longer than the
1829 previous one but regarded
"short
" by html4css1.
</p>
1832 <p>With
<cite>html4strict
</cite>, the field list is typeset as CSS-styled
<cite>definition
1833 list
</cite>. The default layout is similar to the look with
<cite>html4css1
</cite>:
</p>
1834 <dl class=
"open field-list">
1835 <dt>A long field name
</dt>
1836 <dd><p>sticks into the field body.
</p>
1837 <p>The field body is pushed to the next line (you can
1838 suppress this behaviour with the
<a class=
"reference internal" href=
"#run-in">run-in
</a> or
1839 <a class=
"reference internal" href=
"#fix-labelwidth">fix-labelwidth
</a> class arguments).
</p>
1841 <dt>Customization
</dt>
1842 <dd><p>of the field name width is possible with CSS instead
1843 of the
<cite>field-name-limit
</cite> configuration setting, for
1845 <pre class=
"literal-block">
1846 dl.field-list
> dd { margin-left:
6em; }
1850 <div class=
"section" id=
"styling-with-class-arguments">
1851 <h3><a class=
"toc-backref" href=
"#id82"><span class=
"sectnum">3.3.1</span> Styling with class arguments
</a></h3>
1852 <p>The default style sheet
<tt class=
"literal">html4css2.css
</tt> supports the following class
1853 arguments for alternative styles:
</p>
1854 <dl class=
"docutils">
1855 <dt><em>compact
</em></dt>
1856 <dd><dl class=
"compact field-list simple">
1858 <dd><p>No additional space between list items.
</p>
1861 <dd><p>The
<tt class=
"literal"><span class=
"pre">--compact-field-lists
</span></tt> command line option (and the
1862 corresponding configuration setting) set the
<cite>compact
</cite>
1863 class argument on all
"simple
" field lists, if not
1864 overridden with
<cite>open
</cite>.
</p>
1867 <dd><p>For lists with short field body.
</p>
1871 <dt><em>open
</em></dt>
1872 <dd><dl class=
"open field-list">
1874 <dd><p>Additional space between list items also in
"simple
" lists.
1875 (Overrides the
<tt class=
"literal"><span class=
"pre">--compact-field-lists
</span></tt> command line
1876 option and the corresponding configuration setting)
</p>
1879 <dd><p>For
"simple
" lists that should keep the space between list items.
</p>
1883 <dt><em>narrow
</em></dt>
1884 <dd><dl class=
"narrow field-list simple">
1886 <dd><p>Less indented field body.
</p>
1889 <dd><p>For lists with short field names.
</p>
1891 <dt>A long field name
</dt>
1892 <dd><p>sticks into the field body and the field body starts on a
1893 new line (if not combined with
<a class=
"reference internal" href=
"#run-in">run-in
</a> or
<a class=
"reference internal" href=
"#fix-labelwidth">fix-labelwidth
</a>).
</p>
1898 <dl class=
"docutils" id=
"run-in">
1899 <dt><em>run-in
</em></dt>
1900 <dd><dl class=
"run-in field-list simple">
1902 <dd><p>Field body starts on the same line also after long field
1905 <dt>A long field name
</dt>
1906 <dd><p>sticks into the field body which continues on
1909 <dt>The next field name
</dt>
1910 <dd><p>and field body should align.
</p>
1915 <dl class=
"docutils" id=
"fix-labelwidth">
1916 <dt><em>fix-labelwidth
</em></dt>
1917 <dd><dl class=
"fix-labelwidth field-list simple">
1919 <dd><p>The width of the field name (label) is fixed. Long labels
1923 <dd><p>Non-wrappable field names are truncated.
</p>
1925 <dt>a_very_long_field_name
</dt>
1926 <dd><p>is truncated if it can not wrap.
</p>
1928 <dt>this long field name
</dt>
1929 <dd><p>will wrap.
</p>
1931 <dt>the next field name
</dt>
1932 <dd><p>and field body should align.
</p>
1933 <!-- If the field name is wrapped but the field body just
1934 one line, following field bodies "float up" if not
1935 prevented by a dummy dd:after element in the CSS. -->
1942 <div class=
"section" id=
"tables">
1943 <h2><a class=
"toc-backref" href=
"#id83"><span class=
"sectnum">3.4</span> Tables
</a></h2>
1944 <p>Numbered tables can be achieved with the
"formal
" class option
</p>
1945 <table class=
"numbered">
1946 <caption>truth values
</caption>
1952 <thead valign=
"bottom">
1953 <tr><th class=
"head"><p>A
</p></th>
1954 <th class=
"head"><p>B
</p></th>
1955 <th class=
"head"><p>A or B
</p></th>
1958 <tbody valign=
"top">
1959 <tr><td><p>False
</p></td>
1960 <td><p>False
</p></td>
1961 <td><p>False
</p></td>
1963 <tr><td><p>True
</p></td>
1964 <td><p>False
</p></td>
1965 <td><p>True
</p></td>
1967 <tr><td><p>False
</p></td>
1968 <td><p>True
</p></td>
1969 <td><p>True
</p></td>
1971 <tr><td><p>True
</p></td>
1972 <td><p>True
</p></td>
1973 <td><p>True
</p></td>
1977 <div class=
"section" id=
"id23">
1978 <h3><a class=
"toc-backref" href=
"#id84"><span class=
"sectnum">3.4.1</span> Styling with class arguments
</a></h3>
1979 <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=
"#id30" id=
"id31"><sup>6</sup></a>, the style sheet also
1980 defines
"booktabs
", that will be rendered similar to the style from
1981 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=
"#id32" id=
"id33"><sup>7</sup></a> LaTeX package.
</p>
1982 <table class=
"booktabs">
1988 <tbody valign=
"top">
1989 <tr><td><p>False
</p></td>
1990 <td><p>False
</p></td>
1991 <td><p>False
</p></td>
1993 <tr><td><p>True
</p></td>
1994 <td><p>False
</p></td>
1995 <td><p>True
</p></td>
1997 <tr><td><p>False
</p></td>
1998 <td><p>True
</p></td>
1999 <td><p>True
</p></td>
2001 <tr><td><p>True
</p></td>
2002 <td><p>True
</p></td>
2003 <td><p>True
</p></td>
2007 <p>This table also uses the
"align-left
" class argument, to left-align
2009 <table class=
"booktabs align-left">
2015 <thead valign=
"bottom">
2016 <tr><th class=
"head"><p>A
</p></th>
2017 <th class=
"head"><p>B
</p></th>
2018 <th class=
"head"><p>A or B
</p></th>
2021 <tbody valign=
"top">
2022 <tr><td><p>False
</p></td>
2023 <td><p>False
</p></td>
2024 <td><p>False
</p></td>
2026 <tr><td><p>True
</p></td>
2027 <td><p>False
</p></td>
2028 <td><p>True
</p></td>
2030 <tr><td><p>False
</p></td>
2031 <td><p>True
</p></td>
2032 <td><p>True
</p></td>
2034 <tr><td><p>True
</p></td>
2035 <td><p>True
</p></td>
2036 <td><p>True
</p></td>
2040 <p>Of course, also booktabs style tables can be numbered:
</p>
2041 <table class=
"numbered booktabs">
2042 <caption>I/O values
</caption>
2048 <thead valign=
"bottom">
2049 <tr><th class=
"head" colspan=
"2"><p>Inputs
</p></th>
2050 <th class=
"head"><p>Output
</p></th>
2052 <tr><th class=
"head"><p>A
</p></th>
2053 <th class=
"head"><p>B
</p></th>
2054 <th class=
"head"><p>A or B
</p></th>
2057 <tbody valign=
"top">
2058 <tr><td><p>False
</p></td>
2059 <td><p>False
</p></td>
2060 <td><p>False
</p></td>
2062 <tr><td><p>True
</p></td>
2063 <td><p>False
</p></td>
2064 <td><p>True
</p></td>
2066 <tr><td><p>False
</p></td>
2067 <td><p>True
</p></td>
2068 <td><p>True
</p></td>
2070 <tr><td><p>True
</p></td>
2071 <td><p>True
</p></td>
2072 <td><p>True
</p></td>
2078 <div class=
"section" id=
"math">
2079 <h2><a class=
"toc-backref" href=
"#id85"><span class=
"sectnum">3.5</span> Math
</a></h2>
2080 <p>The W3C consortium provides a DTD for XHTML
1.1 plus MathML
2.0, so
2081 that documentd embedding formulas as MathML can be validated.
</p>
2082 <p>The linear mapping
<math xmlns=
"http://www.w3.org/1998/Math/MathML">
2083 <mrow><mi>f
</mi><mo>:
</mo><msup><mi>ℂ
</mi>
2084 <mrow><mi>N
</mi></mrow></msup><mo>⟼
</mo><msup><mi>ℂ
</mi>
2085 <mrow><mi>N
</mi></mrow></msup></mrow></math>
2087 <math xmlns=
"http://www.w3.org/1998/Math/MathML" mode=
"display">
2090 <mtd><msub><mi>c
</mi>
2091 <mrow><mi>k
</mi></mrow></msub><mo>=
</mo><mi>F
</mi><mo>(
</mo><mi>k
</mi><msub><mi>f
</mi>
2092 <mrow><mn>0</mn></mrow></msub><mo>)
</mo><mo>=
</mo><msub><mi>T
</mi>
2093 <mrow><mtext>A
</mtext></mrow></msub><munderover><mo>∑
</mo>
2094 <mrow><mi>n
</mi><mo>=
</mo><mo>-
</mo><mi>N
</mi><mo>/
</mo><mn>2</mn></mrow>
2095 <mrow><mo>+
</mo><mi>N
</mi><mo>/
</mo><mn>2</mn></mrow></munderover><mi>f
</mi><mo>(
</mo><msub><mi>x
</mi>
2096 <mrow><mi>n
</mi></mrow></msub><mo>)
</mo><msup><mtext>e
</mtext>
2097 <mrow><mo>-
</mo><mn>2</mn><mi>π
</mi><mtext>i
</mtext><mfrac>
2098 <mrow><mi>n
</mi><mi>k
</mi></mrow>
2099 <mrow><mi>N
</mi></mrow></mfrac></mrow></msup></mtd></mtr></mtable></math>
2100 <p>for all
<math xmlns=
"http://www.w3.org/1998/Math/MathML">
2101 <mrow><mi>a
</mi><mo>∈
</mo><msup><mi>ℂ
</mi>
2102 <mrow><mi>N
</mi></mrow></msup></mrow></math> is called discrete Fourier
2103 transformation (DFT).
</p>
2106 <div class=
"section" id=
"error-handling">
2107 <h1><a class=
"toc-backref" href=
"#id86"><span class=
"sectnum">4</span> Error Handling
</a></h1>
2108 <p>Any errors caught during processing will generate system messages.
</p>
2109 <p>There should be five messages in the following, auto-generated
2110 section,
"Docutils System Messages
":
</p>
2111 <!-- section should be added by Docutils automatically -->
2113 <div class=
"system-messages section">
2114 <h1>Docutils System Messages
</h1>
2115 <div class=
"system-message" id=
"id24">
2116 <p class=
"system-message-title">System Message: ERROR/
3 (
<tt class=
"docutils">data/standard.txt
</tt>, line
104);
<em><a href=
"#id25">backlink
</a></em></p>
2117 <p>Undefined substitution referenced:
"problematic
".
</p>
2119 <div class=
"system-message" id=
"id95">
2120 <p class=
"system-message-title">System Message: ERROR/
3 (
<tt class=
"docutils">data/standard.txt
</tt>, line
390);
<em><a href=
"#id96">backlink
</a></em></p>
2121 <p>Unknown target name:
"5".
</p>
2123 <div class=
"system-message" id=
"id97">
2124 <p class=
"system-message-title">System Message: ERROR/
3 (
<tt class=
"docutils">data/standard.txt
</tt>, line
399);
<em><a href=
"#id98">backlink
</a></em></p>
2125 <p>Unknown target name:
"nonexistent
".
</p>
2127 <div class=
"system-message" id=
"id99">
2128 <p class=
"system-message-title">System Message: ERROR/
3 (
<tt class=
"docutils">data/standard.txt
</tt>, line
426);
<em><a href=
"#id100">backlink
</a></em></p>
2129 <p>Unknown target name:
"hyperlink reference without a target
".
</p>
2131 <div class=
"system-message" id=
"id101">
2132 <p class=
"system-message-title">System Message: ERROR/
3 (
<tt class=
"docutils">data/standard.txt
</tt>, line
439);
<em><a href=
"#id102">backlink
</a></em></p>
2133 <p>Duplicate target name, cannot be used as a unique reference:
"duplicate target names
".
</p>
2137 <div class=
"footer">
2138 <hr class=
"footer" />
2139 <p>Document footer
</p>
2140 <p><a class=
"reference external" href=
"http://validator.w3.org/check?uri=referer"><img alt=
"Valid XHTML 1.1!" src=
"http://www.w3.org/Icons/valid-xhtml11" 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>