Documentation update.
[docutils.git] / sandbox / html4strict / data / standalone_rst_html4strict.xhtml
blobf3e755a2cb58ce10c30b815073adf7292ce4b4df
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">
4 <head>
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)
19 :Id: $Id$
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 {
30 border: 0 }
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 }
37 .first {
38 /* Override more specific margin styles with "! important". */
39 margin-top: 0 ! important }
41 .last, .with-subtitle {
42 margin-bottom: 0 ! important }
44 .hidden {
45 display: none }
47 a.toc-backref {
48 text-decoration: none ;
49 color: black }
51 blockquote.epigraph {
52 margin: 2em 5em ; }
54 dl.docutils dd {
55 margin-bottom: 0.5em }
57 object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
58 overflow: hidden;
61 /* Uncomment (and remove this text!) to get bold-faced definition list terms
62 dl.docutils dt {
63 font-weight: bold }
66 div.abstract {
67 margin: 2em 5em }
69 div.abstract p.topic-title {
70 font-weight: bold ;
71 text-align: center }
73 div.admonition, div.attention, div.caution, div.danger, div.error,
74 div.hint, div.important, div.note, div.tip, div.warning {
75 margin: 2em ;
76 border: medium outset ;
77 padding: 1em }
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 {
82 font-weight: bold ;
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 {
88 color: red ;
89 font-weight: bold ;
90 font-family: sans-serif }
92 /* Uncomment (and remove this text!) to get reduced vertical space in
93 compound paragraphs.
94 div.compound .compound-first, div.compound .compound-middle {
95 margin-bottom: 0.5em }
97 div.compound .compound-last, div.compound .compound-middle {
98 margin-top: 0.5em }
101 div.dedication {
102 margin: 2em 5em ;
103 text-align: center ;
104 font-style: italic }
106 div.dedication p.topic-title {
107 font-weight: bold ;
108 font-style: normal }
110 div.figure {
111 margin-left: 2em ;
112 margin-right: 2em }
114 div.footer, div.header {
115 clear: both;
116 font-size: smaller }
118 div.line-block {
119 display: block ;
120 margin-top: 1em ;
121 margin-bottom: 1em }
123 div.line-block div.line-block {
124 margin-top: 0 ;
125 margin-bottom: 0 ;
126 margin-left: 1.5em }
128 div.sidebar {
129 margin: 0 0 0.5em 1em ;
130 border: medium outset ;
131 padding: 1em ;
132 background-color: #ffffee ;
133 width: 40% ;
134 float: right ;
135 clear: right }
137 div.sidebar p.rubric {
138 font-family: sans-serif ;
139 font-size: medium }
141 div.system-messages {
142 margin: 5em }
144 div.system-messages h1 {
145 color: red }
147 div.system-message {
148 border: medium outset ;
149 padding: 1em }
151 div.system-message p.system-message-title {
152 color: red ;
153 font-weight: bold }
155 div.topic {
156 margin: 2em }
158 h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
159 h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
160 margin-top: 0.4em }
162 h1.title {
163 text-align: center }
165 h2.subtitle {
166 text-align: center }
168 hr.docutils {
169 width: 75% }
171 img.align-left, .figure.align-left, object.align-left {
172 clear: left ;
173 float: left ;
174 margin-right: 1em }
176 img.align-right, .figure.align-right, object.align-right {
177 clear: right ;
178 float: right ;
179 margin-left: 1em }
181 img.align-center, .figure.align-center, object.align-center {
182 display: block;
183 margin-left: auto;
184 margin-right: auto;
187 .align-left {
188 text-align: left }
190 .align-center {
191 clear: both ;
192 text-align: center }
194 .align-right {
195 text-align: right }
197 /* reset inner alignment in figures */
198 div.align-right {
199 text-align: left }
201 /* div.align-center * { */
202 /* text-align: left } */
204 ol.simple, ul.simple {
205 margin-bottom: 1em }
207 ol.arabic {
208 list-style: decimal }
210 ol.loweralpha {
211 list-style: lower-alpha }
213 ol.upperalpha {
214 list-style: upper-alpha }
216 ol.lowerroman {
217 list-style: lower-roman }
219 ol.upperroman {
220 list-style: upper-roman }
222 p.attribution {
223 text-align: right ;
224 margin-left: 50% }
226 p.caption {
227 font-style: italic }
229 p.credits {
230 font-style: italic ;
231 font-size: smaller }
233 p.label {
234 white-space: nowrap }
236 p.rubric {
237 font-weight: bold ;
238 font-size: larger ;
239 color: maroon ;
240 text-align: center }
242 p.sidebar-title {
243 font-family: sans-serif ;
244 font-weight: bold ;
245 font-size: larger }
247 p.sidebar-subtitle {
248 font-family: sans-serif ;
249 font-weight: bold }
251 p.topic-title {
252 font-weight: bold }
254 pre.address {
255 margin-bottom: 0 ;
256 margin-top: 0 ;
257 font: inherit }
259 pre.literal-block, pre.doctest-block {
260 margin-left: 2em ;
261 margin-right: 2em }
263 span.classifier {
264 font-family: sans-serif ;
265 font-style: oblique }
267 span.classifier-delimiter {
268 font-family: sans-serif ;
269 font-weight: bold }
271 span.interpreted {
272 font-family: sans-serif }
274 span.option {
275 white-space: nowrap }
277 span.pre {
278 white-space: pre }
280 span.problematic {
281 color: red }
283 span.section-subtitle {
284 /* font-size relative to parent (h1..h6 element) */
285 font-size: 80% }
287 table.citation {
288 border-left: solid 1px gray;
289 margin-left: 1px }
291 table.docinfo {
292 margin: 2em 4em }
294 table.docutils {
295 margin-top: 0.5em ;
296 margin-bottom: 0.5em }
298 table.footnote {
299 border-left: solid 1px black;
300 margin-left: 1px }
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 {
309 font-weight: bold ;
310 text-align: left ;
311 white-space: nowrap ;
312 padding-left: 0 }
314 h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
315 h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
316 font-size: 100% }
318 ul.auto-toc {
319 list-style-type: none }
321 </style>
322 <style type="text/css">
324 /* html4css2.css: Cascading style sheet for Docutils' html4strict writer. */
325 /* */
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 */
331 /* */
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 */
334 /* browsers). */
336 /* General rules */
337 /* ============= */
339 body {
340 padding: 0 5%;
341 margin: 8px 0;
342 line-height:1.3;
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, */
349 div.document {
350 max-width: 45em;
351 margin: auto;
354 /* separate items except for compact lists */
355 dl > dd {
356 margin-bottom: 1em;
358 .compact li, .compact p, .compact ul, .compact ol
359 dl.simple > dd, .simple li, .simple p, .simple ul, .simple ol {
360 margin-top: 0;
361 margin-bottom: 0;
362 /* background: magenta; */
364 dl.simple, dl.compact, dl.simple > dd, dl.compact > dd {
365 margin-top: 0;
366 margin-bottom: 0;
367 /* background: lightgreen; */
370 /* space around paragraphs */
371 dl > dd p:first-child {
372 margin: 0;
375 /* Sidebar */
376 /* ------- */
378 div.sidebar {
379 margin-right: -5%;
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 {
388 clear: left;
389 float: left;
390 margin: 0;
391 padding: 0;
392 padding-right: 0.5em;
393 font-weight: bold;
395 /* except for these */
396 dl.option-list > dt, dl.footnote > dt {
397 font-weight: normal;
402 /* Field Lists */
403 /* ----------- */
405 /* field names followed by a colon */
406 dl.field-list > dt:after, dl.docinfo > dt:after {
407 content: ":";
410 /* Offset for field content (corresponds to the --field-name-limit option) */
411 dl.field-list > dd {
412 margin-left: 9em; /* ca. 14 chars in the test examples */
413 padding-left: 0.5em;
416 /* start field-body on a new line after long field names */
417 dl.field-list > dd p {
418 width: 100%;
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 {
434 margin-left: 5em;
437 /* start field-body on same line after long field names */
438 dl.field-list.run-in > dd p {
439 display: block;
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 */
445 overflow: hidden;
447 dl.field-list.fix-labelwidth > dd:after {
448 /* a "stopper" to prevent next dd floating up too far */
449 content: '';
450 display: block;
451 clear: left;
454 /* docinfo */
456 dl.docinfo > dd {
457 margin-left: 8em;
458 /* margin-bottom: 0.5em; */
462 /* option list */
464 dl.option-list {
465 margin-left: 1em;
466 padding-left: 0;
469 dl.option-list > dd {
470 margin-left: 8em;
471 /* margin-bottom: 0.5em; */
474 /* start description on a new line after long options */
475 dl.option-list > dd p {
476 width: 100%;
477 display: inline-block;
480 /* footnotes */
482 a.footnote-reference, a.fn-backref {
483 text-decoration: inherit; /* do not underline footnote links */
486 dl.footnote {
487 /* line on the left */
488 padding-left: 1ex;
489 border-left: solid;
490 border-left-width: thin;
491 /* border-color: black; */
494 /* paragraph on same line as backrefs */
495 dd > em {
496 /* background: green; */
497 float: left;
498 margin-right: 1ex
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 */
511 ol {
512 counter-reset: item;
513 list-style-type: none ! important;
516 /* Set the negative indent of the list label as feature of the list item */
517 ol > li {
518 text-indent: -40px; /* Mozillas default indent */
521 /* Label */
522 ol > li:before {
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;
528 text-align: right;
529 vertical-align: top;
530 /* sum must match ol>li {text-indent:} (40px is Mozillas default) */
531 width: 35px;
532 padding-right: 5px;
533 /* background: yellow; */
536 /* objects nested in an ol */
537 ol > li > p,
538 ol > li > ol,
539 ol > li > ul,
540 ol > li > dl {
541 text-indent: 0;
542 margin-top: 0;
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` */
580 /* Tables */
581 /* ====== */
583 /* borders for "normal" tables */
584 table {
585 margin-top: 0.5em ;
586 margin-bottom: 0.5em;
587 border-style: outset;
588 border-width: thin;
589 /* border-collapse: collapse; */
592 td, th {
593 border-style: inset;
594 border-width: thin;
595 /* text-align: left; */
596 padding: 0 1ex;
599 td > p:first-child, th > p:first-child {
600 margin-top: 0;
602 td > p, th > p {
603 margin-bottom: 0;
606 /* no borders for "borderless" tables */
607 table.borderless, table.borderless * {
608 border-style: none;
611 /* "booktabs" style (no vertical lines) */
612 table.booktabs {
613 border: 0;
614 border-top: 2px solid;
615 border-bottom: 2px solid;
616 border-collapse: collapse;
619 table.booktabs * {
620 border: 0;
622 table.booktabs th {
623 border-bottom: thin solid;
626 table > caption {
627 text-align: left;
628 /* padding: 2em 0 1em 0; */
631 /* numbered tables and figures*/
632 body {
633 counter-reset: table;
634 /* counter-reset: figure; */
637 table.numbered > caption:before {
638 counter-increment: table;
639 content: "Table " counter(table) ": ";
640 font-weight: bold;
644 /* whitespace and line-wrapping in inline literals
645 -----------------------------------------------
647 /* possible values: normal, nowrap, pre, pre-wrap, pre-line */
648 tt.literal {
649 white-space: pre-wrap;
653 /* Table of Contents */
655 /* don't indent like a topic */
656 div.topic.contents {
657 margin: 0;
659 /* div.topic.contents ul { */
660 /* list-style: none; */
661 /* } */
663 div.topic.contents a {
664 text-decoration: none; /* no underline for links */
667 /* section numbers */
669 span.sectnum {
670 padding-right: 1ex;
673 /* admonitions */
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 {
678 padding: 0px 1em }
680 </style>
681 </head>
682 <body>
683 <div class="header">
684 <p>Document header</p>
686 <hr class="header"/>
687 </div>
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>
693 <dl class="docinfo">
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">
698 123 Example Street
699 Example, EX Canada
700 A1B 2C3
701 </pre>
702 </dd>
703 <dt class="contact">Contact</dt>
704 <dd class="contact"><a class="reference external" href="mailto:goodger&#64;python.org">goodger&#64;python.org</a></dd>
705 <dt class="authors">Authors</dt>
706 <dd class="authors">Me
707 <br />Myself
708 <br />I</dd>
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 &quot;work in progress&quot;</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
726 desires.</dd>
727 <dt>field name</dt>
728 <dd><p>This is a &quot;generic bibliographic field&quot;.</p>
729 </dd>
730 <dt>field name &quot;2&quot;</dt>
731 <dd><p>Generic bibliographic fields may contain multiple body elements.</p>
732 <p>Like this.</p>
733 </dd>
734 </dl>
735 <div class="dedication topic">
736 <p class="topic-title first">Dedication</p>
737 <p>For Docutils users &amp; co-developers.</p>
738 </div>
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>
743 </div>
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>
757 </ul>
758 </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>
764 </ul>
765 </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>
781 </ul>
782 </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>
793 </ul>
794 </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>
806 </ul>
807 </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>
815 </ul>
816 </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>
820 </ul>
821 </li>
822 <li><p><a class="reference internal" href="#math" id="id85"><span class="sectnum">3.5</span> Math</a></p></li>
823 </ul>
824 </li>
825 <li><p><a class="reference internal" href="#error-handling" id="id86"><span class="sectnum">4</span> Error Handling</a></p></li>
826 </ul>
827 </div>
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>
836 </div>
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>
839 </div>
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>
845 </div>
846 </div>
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>
852 <p>A paragraph.</p>
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>
877 </div>
878 </div>
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>
881 <ul>
882 <li><p>A bullet list</p>
883 <ul class="simple">
884 <li><p>Nested bullet list.</p></li>
885 <li><p>Nested item 2.</p></li>
886 </ul>
887 </li>
888 <li><p>Item 2.</p>
889 <p>Paragraph 2 of item 2.</p>
890 <ul class="simple">
891 <li><p>Nested bullet list.</p></li>
892 <li><p>Nested item 2.</p>
893 <ul>
894 <li><p>Third level.</p></li>
895 <li><p>Item 2.</p></li>
896 </ul>
897 </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. -->
901 </li>
902 </ul>
903 </li>
904 </ul>
905 </div>
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>
908 <ol class="arabic">
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>
918 </ol>
919 </li>
920 </ol>
921 </li>
922 </ol>
923 </li>
924 </ol>
925 </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>
929 <li><p>Four</p></li>
930 </ol>
931 <ol class="upperalpha simple" style="counter-reset: item 2;">
932 <li><p>C</p></li>
933 <li><p>D</p></li>
934 </ol>
935 <ol class="lowerroman simple" style="counter-reset: item 2;">
936 <li><p>iii</p></li>
937 <li><p>iv</p></li>
938 </ol>
939 </li>
940 </ol>
941 </div>
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">
945 <dt>Term</dt>
946 <dd><p>Definition</p>
947 </dd>
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>
951 </dd>
952 <dt>Term</dt>
953 <dd><p>Definition</p>
954 </dd>
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>
957 </dd>
958 </dl>
959 </div>
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">
963 <dt>what</dt>
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>
967 </dd>
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>
972 </dd>
973 <dt>credits</dt>
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>
977 </dd>
978 </dl>
979 </div>
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 &quot;a&quot;</p>
986 </dd>
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>
990 </dd>
991 <dt><kbd><span class="option">--long</span></kbd></dt>
992 <dd><p>options can be long also</p>
993 </dd>
994 <dt><kbd><span class="option">--input=<var>file</var></span></kbd></dt>
995 <dd><p>long options can also have
996 arguments</p>
997 </dd>
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>
1002 </dd>
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 &quot;option group&quot;.</p>
1005 </dd>
1006 <dt><kbd><span class="option">-v</span>, <span class="option">--verbose</span></kbd></dt>
1007 <dd><p>Commonly-seen: short &amp; long options.</p>
1008 </dd>
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>
1011 </dd>
1012 <dt><kbd><span class="option">/V</span></kbd></dt>
1013 <dd><p>DOS/VMS-style options too</p>
1014 </dd>
1015 </dl>
1016 <p>There must be at least two spaces between the option and the
1017 description.</p>
1018 </div>
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 (&quot;::&quot;) at the end of
1022 the preceding paragraph (over there <tt class="literal"><span class="pre">--&gt;</span></tt>). They can be indented:</p>
1023 <pre class="literal-block">
1024 if literal_block:
1025 text = 'is left as-is'
1026 spaces_and_linebreaks = 'are preserved'
1027 markup_processing = None
1028 </pre>
1029 <p>Or they can be quoted without indentation:</p>
1030 <pre class="literal-block">
1031 &gt;&gt; Great idea!
1032 &gt;
1033 &gt; Why didn't I think of that?
1034 </pre>
1035 </div>
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
1040 indentation.</p>
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 (&quot;|&quot;).</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>
1049 </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>
1052 </div>
1053 </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 &quot;|&quot;.</div>
1058 </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>
1065 </div>
1066 <p>Take it away, Eric the Orchestra Leader!</p>
1067 <blockquote>
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>
1074 </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>
1079 </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>
1088 </div>
1089 </div>
1090 </div>
1091 <div class="line">Singing...</div>
1092 </div>
1093 </blockquote>
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 &nbsp; 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>
1108 </div>
1109 </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>
1113 <blockquote>
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">&mdash;Anne Elk (Miss)</p>
1120 </blockquote>
1121 <p>The language of a quote (like any other object) can be specified by
1122 a class attribute:</p>
1123 <!-- -->
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>
1127 </blockquote>
1128 </div>
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 &gt;&gt;&gt; print 'Python-specific usage examples; begun with &quot;&gt;&gt;&gt;&quot;'
1133 Python-specific usage examples; begun with &quot;&gt;&gt;&gt;&quot;
1134 &gt;&gt;&gt; print '(cut and pasted from interactive Python sessions)'
1135 (cut and pasted from interactive Python sessions)
1136 </pre>
1137 </div>
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>
1141 <dd id="id8">
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
1143 least 3 spaces.</p>
1144 <p class="last">This is the footnote's second paragraph.</p>
1145 </dd>
1146 <dt class="label">2</dt>
1147 <dd id="label">
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 &quot;#&quot;-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>
1152 </dd>
1153 <dt class="label"><a class="fn-backref" href="#id2">3</a></dt>
1154 <dd id="id12">
1155 <p class="first">This footnote is numbered automatically and anonymously using a
1156 label of &quot;#&quot; only.</p>
1157 <p>This is the second paragraph.</p>
1158 <p class="last">And this is the third paragraph.</p>
1159 </dd>
1160 <dt class="label"><a class="fn-backref" href="#id4">*</a></dt>
1161 <dd id="id13">
1162 <p class="first last">Footnotes may also use symbols, specified with a &quot;*&quot; label.
1163 Here's a reference to the next footnote:<a class="footnote-reference" href="#id15" id="id14"><sup></sup></a>.</p>
1164 </dd>
1165 <dt class="label"><a class="fn-backref" href="#id14"></a></dt>
1166 <dd id="id15">
1167 <p class="first last">This footnote shows the next symbol in the sequence.</p>
1168 </dd>
1169 <dt class="label">4</dt>
1170 <dd id="id16">
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>
1173 </dd>
1174 </dl>
1175 </div>
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>
1179 <dd id="cit2002">
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>
1182 </dd>
1183 </dl>
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>
1185 citation.</p>
1186 </div>
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 &quot;example&quot; 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 &quot;<a class="reference external" href="http://www.python.org/">Python</a><a class="footnote-reference" href="#id26" id="id28"><sup>5</sup></a>&quot;.</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
1199 error.</p>
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 &quot;info&quot; (level-1) system messages. Duplicate names in
1204 explicit targets will generate &quot;warning&quot; (level-2) system messages.</p>
1205 </div>
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 &quot;Duplicate Target Names&quot; 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>
1211 </div>
1212 </div>
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>
1225 </ul>
1226 </div>
1227 <p>These are just a sample of the many reStructuredText Directives. For
1228 others, please see
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 &quot;contents&quot; 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>
1235 </div>
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>
1255 <p>Image size:</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
1266 layout.</p>
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">
1271 <table>
1272 <colgroup>
1273 <col width="20%" />
1274 <col width="80%" />
1275 </colgroup>
1276 <tbody valign="top">
1277 <tr><td><p>re</p></td>
1278 <td><p>Revised, revisited, based on 're' module.</p></td>
1279 </tr>
1280 <tr><td><p>Structured</p></td>
1281 <td><p>Structure-enhanced text, structuredtext.</p></td>
1282 </tr>
1283 <tr><td><p>Text</p></td>
1284 <td><p>Well it is, isn't it?</p></td>
1285 </tr>
1286 </tbody>
1287 </table>
1288 <p>This paragraph is also part of the legend.</p>
1289 </div>
1290 </div>
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>
1298 </div>
1299 </div>
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>
1310 </div>
1311 </div>
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>
1322 </div>
1323 </div>
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>
1326 </div>
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>
1332 </div>
1333 <div class="caution">
1334 <p class="admonition-title">Caution!</p>
1335 <p>Don't take any wooden nickels.</p>
1336 </div>
1337 <div class="danger">
1338 <p class="admonition-title">!DANGER!</p>
1339 <p>Mad scientist at work!</p>
1340 </div>
1341 <div class="error">
1342 <p class="admonition-title">Error</p>
1343 <p>Does not compute.</p>
1344 </div>
1345 <div class="hint">
1346 <p class="admonition-title">Hint</p>
1347 <p>It's bigger than a bread box.</p>
1348 </div>
1349 <div class="important">
1350 <p class="admonition-title">Important</p>
1351 <ul class="simple">
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>
1356 </ul>
1357 </div>
1358 <div class="note">
1359 <p class="admonition-title">Note</p>
1360 <p>This is a note.</p>
1361 </div>
1362 <div class="tip">
1363 <p class="admonition-title">Tip</p>
1364 <p>15% if the service is good.</p>
1365 </div>
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>
1370 </div>
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>
1374 </div>
1375 </div>
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
1383 text.</p>
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>
1387 </div>
1388 <p>A <em>topic</em> is like a block quote with a title, or a self-contained section
1389 with no subsections.</p>
1390 <div class="topic">
1391 <p class="topic-title first">Topic Title</p>
1392 <p>This is a topic.</p>
1393 </div>
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>
1399 </div>
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>
1403 <dd id="id26">
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>
1405 </dd>
1406 <dt class="label"><a class="fn-backref" href="#id31">6</a></dt>
1407 <dd id="id30">
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>
1409 </dd>
1410 <dt class="label"><a class="fn-backref" href="#id33">7</a></dt>
1411 <dd id="id32">
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>
1413 </dd>
1414 <dt class="label"><a class="fn-backref" href="#id36">8</a></dt>
1415 <dd id="id35">
1416 <p class="first last"><a class="reference external" href="http://docutils.sourceforge.net/">http://docutils.sourceforge.net/</a></p>
1417 </dd>
1418 </dl>
1419 </div>
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>
1423 </div>
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>
1432 </ul>
1433 </div>
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.
1439 </pre>
1440 <p class="compound-last">Compound 2, this is a test.</p>
1441 </div>
1442 <div class="compound">
1443 <p>Compound 3, only consisting of one paragraph.</p>
1444 </div>
1445 <div class="compound">
1446 <pre class="compound-first literal-block">
1447 Compound 4.
1448 This one starts with a literal block.
1449 </pre>
1450 <p class="compound-last">Compound 4, a paragraph.</p>
1451 </div>
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
1454 meaningful.</p>
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>
1460 </div>
1461 <p class="compound-last">Compound 5, block 3 (a paragraph).</p>
1462 </div>
1463 <div class="compound">
1464 <p class="compound-first">Compound 7, with a table inside:</p>
1465 <table class="compound-middle">
1466 <colgroup>
1467 <col width="33%" />
1468 <col width="33%" />
1469 <col width="33%" />
1470 </colgroup>
1471 <tbody valign="top">
1472 <tr><td><p>Left cell, first
1473 paragraph.</p>
1474 <p>Left cell, second
1475 paragraph.</p>
1476 </td>
1477 <td><p>Middle cell,
1478 consisting of
1479 exactly one
1480 paragraph.</p></td>
1481 <td><p>Right cell.</p>
1482 <p>Paragraph 2.</p>
1483 <p>Paragraph 3.</p>
1484 </td>
1485 </tr>
1486 </tbody>
1487 </table>
1488 <p class="compound-middle">Compound 7, a paragraph after the table.</p>
1489 <p class="compound-last">Compound 7, another paragraph.</p>
1490 </div>
1491 </div>
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>.
1500 </pre>
1501 </div>
1502 </div>
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>
1507 </div>
1508 <div class="section" id="comments">
1509 <h2><a class="toc-backref" href="#id68"><span class="sectnum">2.16</span> Comments</a></h2>
1510 <p>Here's one:</p>
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>
1519 </div>
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">
1529 <p>paragraph 1</p>
1530 <p>paragraph 2</p>
1531 </div>
1532 </div>
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>
1536 <table>
1537 <colgroup>
1538 <col width="31%" />
1539 <col width="31%" />
1540 <col width="38%" />
1541 </colgroup>
1542 <thead valign="bottom">
1543 <tr><th class="head" colspan="2"><p>Inputs</p></th>
1544 <th class="head"><p>Output</p></th>
1545 </tr>
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>
1549 </tr>
1550 </thead>
1551 <tbody valign="top">
1552 <tr><td><p>False</p></td>
1553 <td><p>False</p></td>
1554 <td><p>False</p></td>
1555 </tr>
1556 <tr><td><p>True</p></td>
1557 <td><p>False</p></td>
1558 <td><p>True</p></td>
1559 </tr>
1560 <tr><td><p>False</p></td>
1561 <td><p>True</p></td>
1562 <td><p>True</p></td>
1563 </tr>
1564 <tr><td><p>True</p></td>
1565 <td><p>True</p></td>
1566 <td><p>True</p></td>
1567 </tr>
1568 </tbody>
1569 </table>
1570 </div>
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>
1574 <table>
1575 <colgroup>
1576 <col width="44%" />
1577 <col width="22%" />
1578 <col width="33%" />
1579 </colgroup>
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>
1585 </tr>
1586 </thead>
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>
1591 </tr>
1592 <tr><td><p>body row 2</p></td>
1593 <td rowspan="2"><p>Cells may
1594 span rows.</p></td>
1595 <td rowspan="2"><p>Another
1596 rowspanning
1597 cell.</p></td>
1598 </tr>
1599 <tr><td><p>body row 3</p></td>
1600 </tr>
1601 </tbody>
1602 </table>
1603 </div>
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>
1607 <table>
1608 <colgroup>
1609 <col width="43%" />
1610 <col width="21%" />
1611 <col width="18%" />
1612 <col width="18%" />
1613 </colgroup>
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>
1620 </tr>
1621 </thead>
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>
1627 </tr>
1628 <tr><td><p>body row 2</p></td>
1629 <td colspan="3"><p>Cells may span columns.</p></td>
1630 </tr>
1631 <tr><td><p>body row 3</p></td>
1632 <td rowspan="2"><p>Cells may
1633 span rows.</p>
1634 <p>Paragraph.</p>
1635 </td>
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>
1640 </ul>
1641 </td>
1642 </tr>
1643 <tr><td><p>body row 4</p></td>
1644 </tr>
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">--&gt;</span></tt></p></td>
1648 <td>&nbsp;</td>
1649 </tr>
1650 </tbody>
1651 </table>
1652 </div>
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>
1658 <colgroup>
1659 <col width="17%" />
1660 <col width="33%" />
1661 <col width="50%" />
1662 </colgroup>
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>
1667 </tr>
1668 </thead>
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>
1673 </tr>
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>
1678 </tr>
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>
1682 </tr>
1683 </tbody>
1684 </table>
1685 </div>
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>
1688 <ul>
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>
1691 </li>
1692 <li><p>A new role.</p>
1693 <p><span class="customnew">one two three</span></p>
1694 </li>
1695 <li><p>A role with class attribute.</p>
1696 <p><span class="special">interpreted text</span></p>
1697 </li>
1698 <li><p>A language-switching role:</p>
1699 <p>Let's count in German <span xml:lang="de">eins zwei drei</span>.</p>
1700 </li>
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">&lt;style&gt;</tt> is only allowed in the document head):</p>
1704 <pre class="literal-block">
1705 .. raw:: html
1707 &lt;style type=&quot;text/css&quot;&gt;&lt;!--
1708 .green {color: green;}
1709 .sc {font-variant: small-caps;}
1710 --&gt;&lt;/style&gt;
1711 </pre>
1712 <p><span class="green sc" xml:lang="en-gb">British colourful text in small-caps</span>.</p>
1713 </li>
1714 </ul>
1715 </div>
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 &lt;svg&gt; 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>
1750 </div>
1751 </div>
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
1756 concerns.</p>
1757 <p>Images with extension <tt class="literal">.swf</tt> are placed inside &lt;object&gt; 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>
1763 </div>
1764 </div>
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>
1771 <ol class="arabic">
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>
1777 </ol>
1778 </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>
1781 </ol>
1782 <ul class="simple">
1783 <li><p>Unordered list nested in enumeration.</p></li>
1784 </ul>
1785 <dl class="docutils">
1786 <dt>Definition list</dt>
1787 <dd><p>nested in top-level enumeration</p>
1788 </dd>
1789 </dl>
1790 </li>
1791 <li><p>second top-level point</p></li>
1792 </ol>
1793 </div>
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">
1800 <dt>The label</dt>
1801 <dd><p>is bold.</p>
1802 </dd>
1803 <dt>The description</dt>
1804 <dd><p>starts on the same line. If it is longer, you will see that it has a
1805 hanging indent.</p>
1806 </dd>
1807 </dl>
1808 </div>
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 &quot;number of
1813 characters&quot; 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 &quot;long&quot;.</p>
1817 </dd>
1818 <dt>this field name</dt>
1819 <dd><p>is considered &quot;long&quot; 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>
1822 </dd>
1823 <dt>iiiiiiiiiiiiiii</dt>
1824 <dd><p>a field name that is considered &quot;long&quot; by html4css1
1825 with the default setting of <cite>field-name-limit: 14</cite>.</p>
1826 </dd>
1827 <dt>MMMMMMMMMMMMMM</dt>
1828 <dd><p>a field name that is actually longer than the
1829 previous one but regarded &quot;short&quot; by html4css1.</p>
1830 </dd>
1831 </dl>
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>
1840 </dd>
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
1844 example:</p>
1845 <pre class="literal-block">
1846 dl.field-list &gt; dd { margin-left: 6em; }
1847 </pre>
1848 </dd>
1849 </dl>
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">
1857 <dt>Feature</dt>
1858 <dd><p>No additional space between list items.</p>
1859 </dd>
1860 <dt>Option</dt>
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 &quot;simple&quot; field lists, if not
1864 overridden with <cite>open</cite>.</p>
1865 </dd>
1866 <dt>Use</dt>
1867 <dd><p>For lists with short field body.</p>
1868 </dd>
1869 </dl>
1870 </dd>
1871 <dt><em>open</em></dt>
1872 <dd><dl class="open field-list">
1873 <dt>Feature</dt>
1874 <dd><p>Additional space between list items also in &quot;simple&quot; 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>
1877 </dd>
1878 <dt>Use</dt>
1879 <dd><p>For &quot;simple&quot; lists that should keep the space between list items.</p>
1880 </dd>
1881 </dl>
1882 </dd>
1883 <dt><em>narrow</em></dt>
1884 <dd><dl class="narrow field-list simple">
1885 <dt>Feature</dt>
1886 <dd><p>Less indented field body.</p>
1887 </dd>
1888 <dt>Use</dt>
1889 <dd><p>For lists with short field names.</p>
1890 </dd>
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>
1894 </dd>
1895 </dl>
1896 </dd>
1897 </dl>
1898 <dl class="docutils" id="run-in">
1899 <dt><em>run-in</em></dt>
1900 <dd><dl class="run-in field-list simple">
1901 <dt>Feature</dt>
1902 <dd><p>Field body starts on the same line also after long field
1903 names.</p>
1904 </dd>
1905 <dt>A long field name</dt>
1906 <dd><p>sticks into the field body which continues on
1907 the same line.</p>
1908 </dd>
1909 <dt>The next field name</dt>
1910 <dd><p>and field body should align.</p>
1911 </dd>
1912 </dl>
1913 </dd>
1914 </dl>
1915 <dl class="docutils" id="fix-labelwidth">
1916 <dt><em>fix-labelwidth</em></dt>
1917 <dd><dl class="fix-labelwidth field-list simple">
1918 <dt>Feature</dt>
1919 <dd><p>The width of the field name (label) is fixed. Long labels
1920 wrap.</p>
1921 </dd>
1922 <dt>Problem</dt>
1923 <dd><p>Non-wrappable field names are truncated.</p>
1924 </dd>
1925 <dt>a_very_long_field_name</dt>
1926 <dd><p>is truncated if it can not wrap.</p>
1927 </dd>
1928 <dt>this long field name</dt>
1929 <dd><p>will wrap.</p>
1930 </dd>
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. -->
1936 </dd>
1937 </dl>
1938 </dd>
1939 </dl>
1940 </div>
1941 </div>
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 &quot;formal&quot; class option</p>
1945 <table class="numbered">
1946 <caption>truth values</caption>
1947 <colgroup>
1948 <col width="29%" />
1949 <col width="29%" />
1950 <col width="42%" />
1951 </colgroup>
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>
1956 </tr>
1957 </thead>
1958 <tbody valign="top">
1959 <tr><td><p>False</p></td>
1960 <td><p>False</p></td>
1961 <td><p>False</p></td>
1962 </tr>
1963 <tr><td><p>True</p></td>
1964 <td><p>False</p></td>
1965 <td><p>True</p></td>
1966 </tr>
1967 <tr><td><p>False</p></td>
1968 <td><p>True</p></td>
1969 <td><p>True</p></td>
1970 </tr>
1971 <tr><td><p>True</p></td>
1972 <td><p>True</p></td>
1973 <td><p>True</p></td>
1974 </tr>
1975 </tbody>
1976 </table>
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 &quot;borderless&quot; <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 &quot;booktabs&quot;, 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">
1983 <colgroup>
1984 <col width="31%" />
1985 <col width="31%" />
1986 <col width="38%" />
1987 </colgroup>
1988 <tbody valign="top">
1989 <tr><td><p>False</p></td>
1990 <td><p>False</p></td>
1991 <td><p>False</p></td>
1992 </tr>
1993 <tr><td><p>True</p></td>
1994 <td><p>False</p></td>
1995 <td><p>True</p></td>
1996 </tr>
1997 <tr><td><p>False</p></td>
1998 <td><p>True</p></td>
1999 <td><p>True</p></td>
2000 </tr>
2001 <tr><td><p>True</p></td>
2002 <td><p>True</p></td>
2003 <td><p>True</p></td>
2004 </tr>
2005 </tbody>
2006 </table>
2007 <p>This table also uses the &quot;align-left&quot; class argument, to left-align
2008 the headers:</p>
2009 <table class="booktabs align-left">
2010 <colgroup>
2011 <col width="29%" />
2012 <col width="29%" />
2013 <col width="41%" />
2014 </colgroup>
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>
2019 </tr>
2020 </thead>
2021 <tbody valign="top">
2022 <tr><td><p>False</p></td>
2023 <td><p>False</p></td>
2024 <td><p>False</p></td>
2025 </tr>
2026 <tr><td><p>True</p></td>
2027 <td><p>False</p></td>
2028 <td><p>True</p></td>
2029 </tr>
2030 <tr><td><p>False</p></td>
2031 <td><p>True</p></td>
2032 <td><p>True</p></td>
2033 </tr>
2034 <tr><td><p>True</p></td>
2035 <td><p>True</p></td>
2036 <td><p>True</p></td>
2037 </tr>
2038 </tbody>
2039 </table>
2040 <p>Of course, also booktabs style tables can be numbered:</p>
2041 <table class="numbered booktabs">
2042 <caption>I/O values</caption>
2043 <colgroup>
2044 <col width="31%" />
2045 <col width="31%" />
2046 <col width="38%" />
2047 </colgroup>
2048 <thead valign="bottom">
2049 <tr><th class="head" colspan="2"><p>Inputs</p></th>
2050 <th class="head"><p>Output</p></th>
2051 </tr>
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>
2055 </tr>
2056 </thead>
2057 <tbody valign="top">
2058 <tr><td><p>False</p></td>
2059 <td><p>False</p></td>
2060 <td><p>False</p></td>
2061 </tr>
2062 <tr><td><p>True</p></td>
2063 <td><p>False</p></td>
2064 <td><p>True</p></td>
2065 </tr>
2066 <tr><td><p>False</p></td>
2067 <td><p>True</p></td>
2068 <td><p>True</p></td>
2069 </tr>
2070 <tr><td><p>True</p></td>
2071 <td><p>True</p></td>
2072 <td><p>True</p></td>
2073 </tr>
2074 </tbody>
2075 </table>
2076 </div>
2077 </div>
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>
2086 with</p>
2087 <math xmlns="http://www.w3.org/1998/Math/MathML" mode="display">
2088 <mtable>
2089 <mtr>
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>
2104 </div>
2105 </div>
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, &quot;Docutils System Messages&quot;:</p>
2111 <!-- section should be added by Docutils automatically -->
2112 </div>
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: &quot;problematic&quot;.</p>
2118 </div>
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: &quot;5&quot;.</p>
2122 </div>
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: &quot;nonexistent&quot;.</p>
2126 </div>
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: &quot;hyperlink reference without a target&quot;.</p>
2130 </div>
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: &quot;duplicate target names&quot;.</p>
2134 </div>
2135 </div>
2136 </div>
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>
2142 </div>
2143 </body>
2144 </html>