SF.net SVN: docutils:[9939 ] trunk/docutils/test/funct ional
milde--- via Docutils-checkins <[email protected]>
| Newsgroups | gmane.text.docutils.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 9939
http://sourceforge.net/p/docutils/code/9939
Author: milde
Date: 2024-09-23 22:37:00 +0000 (Mon, 23 Sep 2024)
Log Message:
-----------
Update/fix "standard" functional test sample.
Fix a factual error
(footnotes must be indented at least 1 space, not 3).
Reword HTML-centric descriptions -- we use the sample for several
writer tests.
Revert change of expected pseudo-xml sample extension from "txt" to "rst"
(side-effect of the switch to "rst" extension for rst sources).
Modified Paths:
--------------
trunk/docutils/test/functional/expected/footnotes_html5.html
trunk/docutils/test/functional/expected/latex_memoir.tex
trunk/docutils/test/functional/expected/odt_footnotes.odt
trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/functional/expected/standalone_rst_latex.tex
trunk/docutils/test/functional/expected/standalone_rst_xetex.tex
trunk/docutils/test/functional/input/data/standard.rst
trunk/docutils/test/functional/input/odt_footnotes.rst
trunk/docutils/test/functional/tests/standalone_rst_pseudoxml.py
Added Paths:
-----------
trunk/docutils/test/functional/expected/standalone_rst_pseudoxml.txt
Removed Paths:
-------------
trunk/docutils/test/functional/expected/standalone_rst_pseudoxml.rst
Modified: trunk/docutils/test/functional/expected/footnotes_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/footnotes_html5.html 2024-09-23 22:36:47 UTC (rev 9938)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2024-09-23 22:37:00 UTC (rev 9939)
@@ -19,7 +19,7 @@
<span class="label"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></span>
<span class="backrefs">(<a role="doc-backlink" href="#footnote-reference-1">1</a>,<a role="doc-backlink" href="#footnote-reference-5">2</a>)</span>
<p>A footnote contains body elements, consistently indented by at
-least 3 spaces.</p>
+least 1 space.</p>
<p>This is the footnote's second paragraph.</p>
</aside>
<aside class="footnote superscript" id="label" role="doc-footnote">
Modified: trunk/docutils/test/functional/expected/latex_memoir.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_memoir.tex 2024-09-23 22:36:47 UTC (rev 9938)
+++ trunk/docutils/test/functional/expected/latex_memoir.tex 2024-09-23 22:37:00 UTC (rev 9939)
@@ -708,7 +708,7 @@
%
\DUfootnotetext{footnote-1}{footnote-reference-1}{1}{%
A footnote contains body elements, consistently indented by at
-least 3 spaces.
+least 1 space.
This is the footnote's second paragraph.
}
@@ -1481,7 +1481,7 @@
A Unicode example:
-(Substitution definitions are not visible in the HTML source.)
+(Substitution definitions are only visible in the rST source.)
\section{2.16 Comments%
@@ -1498,7 +1498,7 @@
%
% Comments may contain non-ASCII characters: ä ö ü æ ø å
-(View the HTML source to see the comment.)
+(View the HTML/LaTeX/... source to see the comment.)
\section{2.17 Raw text%
Modified: trunk/docutils/test/functional/expected/odt_footnotes.odt
===================================================================
(Binary files differ)
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2024-09-23 22:36:47 UTC (rev 9938)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2024-09-23 22:37:00 UTC (rev 9939)
@@ -693,7 +693,7 @@
<footnote backrefs="footnote-reference-1 footnote-reference-5 footnote-reference-9" ids="footnote-1" names="1">
<label>1</label>
<paragraph>A footnote contains body elements, consistently indented by at
- least 3 spaces.</paragraph>
+ least 1 space.</paragraph>
<paragraph>This is the footnote's second paragraph.</paragraph>
</footnote>
<footnote auto="1" backrefs="footnote-reference-3 footnote-reference-6" ids="label" names="label">
@@ -1387,7 +1387,7 @@
<substitution_definition names="EXAMPLE"><image alt="EXAMPLE" uri="../../../docs/user/rst/images/biohazard.png"></image></substitution_definition>
<paragraph>A Unicode example:</paragraph>
<substitution_definition ltrim="1" names="heart" rtrim="1">♥</substitution_definition>
- <paragraph>(Substitution definitions are not visible in the HTML source.)</paragraph>
+ <paragraph>(Substitution definitions are only visible in the rST source.)</paragraph>
</section>
<section ids="comments" names="comments">
<title auto="1" refid="toc-entry-35"><generated classes="sectnum">2.16 </generated>Comments</title>
@@ -1399,7 +1399,7 @@
Double-dashes -- "--" -- must be escaped somehow in HTML output.
Comments may contain non-ASCII characters: ä ö ü æ ø å</comment>
- <paragraph>(View the HTML source to see the comment.)</paragraph>
+ <paragraph>(View the HTML/LaTeX/... source to see the comment.)</paragraph>
</section>
<section ids="raw-text" names="raw\ text">
<title auto="1" refid="toc-entry-36"><generated classes="sectnum">2.17 </generated>Raw text</title>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2024-09-23 22:36:47 UTC (rev 9938)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2024-09-23 22:37:00 UTC (rev 9939)
@@ -476,7 +476,7 @@
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label">[1]</td><td><em>(<a class="fn-backref" href="#footnote-reference-1">1</a>, <a class="fn-backref" href="#footnote-reference-5">2</a>, <a class="fn-backref" href="#footnote-reference-9">3</a>)</em> <p>A footnote contains body elements, consistently indented by at
-least 3 spaces.</p>
+least 1 space.</p>
<p class="last">This is the footnote's second paragraph.</p>
</td></tr>
</tbody>
@@ -1053,7 +1053,7 @@
<h2><a class="toc-backref" href="#toc-entry-34">2.15 Substitution Definitions</a></h2>
<p>An inline image (<img alt="EXAMPLE" src="../../../docs/user/rst/images/biohazard.png" />) example:</p>
<p>A Unicode example:</p>
-<p>(Substitution definitions are not visible in the HTML source.)</p>
+<p>(Substitution definitions are only visible in the rST source.)</p>
</div>
<div class="section" id="comments">
<h2><a class="toc-backref" href="#toc-entry-35">2.16 Comments</a></h2>
@@ -1065,7 +1065,7 @@
Double-dashes - - "- -" - - must be escaped somehow in HTML output.
Comments may contain non-ASCII characters: ä ö ü æ ø å -->
-<p>(View the HTML source to see the comment.)</p>
+<p>(View the HTML/LaTeX/... source to see the comment.)</p>
</div>
<div class="section" id="raw-text">
<h2><a class="toc-backref" href="#toc-entry-36">2.17 Raw text</a></h2>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2024-09-23 22:36:47 UTC (rev 9938)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2024-09-23 22:37:00 UTC (rev 9939)
@@ -483,7 +483,7 @@
<span class="label"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></span>
<span class="backrefs">(<a role="doc-backlink" href="#footnote-reference-1">1</a>,<a role="doc-backlink" href="#footnote-reference-5">2</a>,<a role="doc-backlink" href="#footnote-reference-9">3</a>)</span>
<p>A footnote contains body elements, consistently indented by at
-least 3 spaces.</p>
+least 1 space.</p>
<p>This is the footnote's second paragraph.</p>
</aside>
<aside class="footnote brackets" id="label" role="doc-footnote">
@@ -1065,7 +1065,7 @@
<h3><a class="toc-backref" href="#toc-entry-34" role="doc-backlink"><span class="sectnum">2.15 </span>Substitution Definitions</a></h3>
<p>An inline image (<img alt="EXAMPLE" src="../../../docs/user/rst/images/biohazard.png" />) example:</p>
<p>A Unicode example:</p>
-<p>(Substitution definitions are not visible in the HTML source.)</p>
+<p>(Substitution definitions are only visible in the rST source.)</p>
</section>
<section id="comments">
<h3><a class="toc-backref" href="#toc-entry-35" role="doc-backlink"><span class="sectnum">2.16 </span>Comments</a></h3>
@@ -1077,7 +1077,7 @@
Double-dashes - - "- -" - - must be escaped somehow in HTML output.
Comments may contain non-ASCII characters: ä ö ü æ ø å -->
-<p>(View the HTML source to see the comment.)</p>
+<p>(View the HTML/LaTeX/... source to see the comment.)</p>
</section>
<section id="raw-text">
<h3><a class="toc-backref" href="#toc-entry-36" role="doc-backlink"><span class="sectnum">2.17 </span>Raw text</a></h3>
Modified: trunk/docutils/test/functional/expected/standalone_rst_latex.tex
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_latex.tex 2024-09-23 22:36:47 UTC (rev 9938)
+++ trunk/docutils/test/functional/expected/standalone_rst_latex.tex 2024-09-23 22:37:00 UTC (rev 9939)
@@ -710,7 +710,7 @@
%
\DUfootnotetext{footnote-1}{footnote-reference-1}{1}{%
A footnote contains body elements, consistently indented by at
-least 3 spaces.
+least 1 space.
This is the footnote’s second paragraph.
}
@@ -1504,7 +1504,7 @@
A Unicode example:
-(Substitution definitions are not visible in the HTML source.)
+(Substitution definitions are only visible in the rST source.)
\subsection{2.16 Comments%
@@ -1521,7 +1521,7 @@
%
% Comments may contain non-ASCII characters: ä ö ü æ ø å
-(View the HTML source to see the comment.)
+(View the HTML/LaTeX/… source to see the comment.)
\subsection{2.17 Raw text%
Deleted: trunk/docutils/test/functional/expected/standalone_rst_pseudoxml.rst
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_pseudoxml.rst 2024-09-23 22:36:47 UTC (rev 9938)
+++ trunk/docutils/test/functional/expected/standalone_rst_pseudoxml.rst 2024-09-23 22:37:00 UTC (rev 9939)
@@ -1,2439 +0,0 @@
-<document ids="restructuredtext-test-document doctitle" names="restructuredtext\ test\ document doctitle" source="functional/input/standalone_rst_pseudoxml.rst" title="reStructuredText Test Document">
- <title>
- reStructuredText Test Document
- <subtitle ids="examples-of-syntax-constructs subtitle" names="examples\ of\ syntax\ constructs subtitle">
- Examples of Syntax Constructs
- <meta content="reStructuredText, test, parser" name="keywords">
- <meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description">
- <decoration>
- <header>
- <paragraph>
- Document header
- <footer>
- <paragraph>
- Document footer
- <docinfo>
- <author>
- David Goodger
- <address xml:space="preserve">
- 123 Example Street
- Example, EX Canada
- A1B 2C3
- <contact>
- <reference refuri="mailto:[email protected]">
- [email protected]
- <authors>
- <author>
- Me
- <author>
- Myself
- <author>
- I
- <organization>
- humankind
- <date>
- Now, or yesterday. Or maybe even
- <emphasis>
- before
- yesterday.
- <status>
- This is a "work in progress"
- <revision>
- is managed by a version control system.
- <version>
- 1
- <copyright>
- 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.
- <field classes="field-name">
- <field_name>
- field name
- <field_body>
- <paragraph>
- This is a "generic bibliographic field".
- <field classes="field-name-2">
- <field_name>
- field name "2"
- <field_body>
- <paragraph>
- Generic bibliographic fields may contain multiple body elements.
- <paragraph>
- Like this.
- <topic classes="dedication">
- <title>
- Dedication
- <paragraph>
- For Docutils users & co-developers.
- <topic classes="abstract">
- <title>
- Abstract
- <paragraph>
- This is a test document, containing at least one example of each
- reStructuredText construct.
- <comment xml:space="preserve">
- This is a comment. Note how any initial comments are moved by
- transforms to after the document title, subtitle, and docinfo.
- <target refid="doctitle">
- <comment xml:space="preserve">
- Above is the document title, and below is the subtitle.
- They are transformed from section titles after parsing.
- <target refid="subtitle">
- <comment xml:space="preserve">
- bibliographic fields (which also require a transform):
- <raw format="latex" xml:space="preserve">
- \pagebreak[4] % start ToC on new page
- <topic classes="contents" ids="table-of-contents" names="table\ of\ contents">
- <title>
- Table of Contents
- <bullet_list classes="auto-toc">
- <list_item>
- <paragraph>
- <reference ids="toc-entry-1" refid="structural-elements">
- <generated classes="sectnum">
- 1
- Structural Elements
- <bullet_list classes="auto-toc">
- <list_item>
- <paragraph>
- <reference ids="toc-entry-2" refid="section-title">
- <generated classes="sectnum">
- 1.1
- Section Title
- <list_item>
- <paragraph>
- <reference ids="toc-entry-3" refid="empty-section">
- <generated classes="sectnum">
- 1.2
- Empty Section
- <list_item>
- <paragraph>
- <reference ids="toc-entry-4" refid="transitions">
- <generated classes="sectnum">
- 1.3
- Transitions
- <list_item>
- <paragraph>
- <reference ids="toc-entry-5" refid="body-elements">
- <generated classes="sectnum">
- 2
- Body Elements
- <bullet_list classes="auto-toc">
- <list_item>
- <paragraph>
- <reference ids="toc-entry-6" refid="paragraphs">
- <generated classes="sectnum">
- 2.1
- Paragraphs
- <bullet_list classes="auto-toc">
- <list_item>
- <paragraph>
- <reference ids="toc-entry-7" refid="inline-markup">
- <generated classes="sectnum">
- 2.1.1
- Inline Markup
- <list_item>
- <paragraph>
- <reference ids="toc-entry-8" refid="bullet-lists">
- <generated classes="sectnum">
- 2.2
- Bullet Lists
- <list_item>
- <paragraph>
- <reference ids="toc-entry-9" refid="enumerated-lists">
- <generated classes="sectnum">
- 2.3
- Enumerated Lists
- <list_item>
- <paragraph>
- <reference ids="toc-entry-10" refid="definition-lists">
- <generated classes="sectnum">
- 2.4
- Definition Lists
- <list_item>
- <paragraph>
- <reference ids="toc-entry-11" refid="field-lists">
- <generated classes="sectnum">
- 2.5
- Field Lists
- <list_item>
- <paragraph>
- <reference ids="toc-entry-12" refid="option-lists">
- <generated classes="sectnum">
- 2.6
- Option Lists
- <list_item>
- <paragraph>
- <reference ids="toc-entry-13" refid="literal-blocks">
- <generated classes="sectnum">
- 2.7
- Literal Blocks
- <list_item>
- <paragraph>
- <reference ids="toc-entry-14" refid="line-blocks">
- <generated classes="sectnum">
- 2.8
- Line Blocks
- <list_item>
- <paragraph>
- <reference ids="toc-entry-15" refid="block-quotes">
- <generated classes="sectnum">
- 2.9
- Block Quotes
- <list_item>
- <paragraph>
- <reference ids="toc-entry-16" refid="doctest-blocks">
- <generated classes="sectnum">
- 2.10
- Doctest Blocks
- <list_item>
- <paragraph>
- <reference ids="toc-entry-17" refid="footnotes">
- <generated classes="sectnum">
- 2.11
- Footnotes
- <list_item>
- <paragraph>
- <reference ids="toc-entry-18" refid="citations">
- <generated classes="sectnum">
- 2.12
- Citations
- <list_item>
- <paragraph>
- <reference ids="toc-entry-19" refid="targets">
- <generated classes="sectnum">
- 2.13
- Targets
- <bullet_list classes="auto-toc">
- <list_item>
- <paragraph>
- <reference ids="toc-entry-20" refid="duplicate-target-names">
- <generated classes="sectnum">
- 2.13.1
- Duplicate Target Names
- <list_item>
- <paragraph>
- <reference ids="toc-entry-21" refid="duplicate-target-names-1">
- <generated classes="sectnum">
- 2.13.2
- Duplicate Target Names
- <list_item>
- <paragraph>
- <reference ids="toc-entry-22" refid="directives">
- <generated classes="sectnum">
- 2.14
- Directives
- <bullet_list classes="auto-toc">
- <list_item>
- <paragraph>
- <reference ids="toc-entry-23" refid="document-parts">
- <generated classes="sectnum">
- 2.14.1
- Document Parts
- <list_item>
- <paragraph>
- <reference ids="toc-entry-24" refid="images-and-figures">
- <generated classes="sectnum">
- 2.14.2
- Images and Figures
- <list_item>
- <paragraph>
- <reference ids="toc-entry-25" refid="tables">
- <generated classes="sectnum">
- 2.14.3
- Tables
- <list_item>
- <paragraph>
- <reference ids="toc-entry-26" refid="admonitions">
- <generated classes="sectnum">
- 2.14.4
- Admonitions
- <list_item>
- <paragraph>
- <reference ids="toc-entry-27" refid="topics-sidebars-and-rubrics">
- <generated classes="sectnum">
- 2.14.5
- Topics, Sidebars, and Rubrics
- <list_item>
- <paragraph>
- <reference ids="toc-entry-28" refid="target-footnotes">
- <generated classes="sectnum">
- 2.14.6
- Target Footnotes
- <list_item>
- <paragraph>
- <reference ids="toc-entry-29" refid="replacement-text">
- <generated classes="sectnum">
- 2.14.7
- Replacement Text
- <list_item>
- <paragraph>
- <reference ids="toc-entry-30" refid="compound-paragraph">
- <generated classes="sectnum">
- 2.14.8
- Compound Paragraph
- <list_item>
- <paragraph>
- <reference ids="toc-entry-31" refid="parsed-literal-blocks">
- <generated classes="sectnum">
- 2.14.9
- Parsed Literal Blocks
- <list_item>
- <paragraph>
- <reference ids="toc-entry-32" refid="code">
- <generated classes="sectnum">
- 2.14.10
- Code
- <list_item>
- <paragraph>
- <reference ids="toc-entry-33" refid="meta">
- <generated classes="sectnum">
- 2.14.11
- Meta
- <list_item>
- <paragraph>
- <reference ids="toc-entry-34" refid="substitution-definitions">
- <generated classes="sectnum">
- 2.15
- Substitution Definitions
- <list_item>
- <paragraph>
- <reference ids="toc-entry-35" refid="comments">
- <generated classes="sectnum">
- 2.16
- Comments
- <list_item>
- <paragraph>
- <reference ids="toc-entry-36" refid="raw-text">
- <generated classes="sectnum">
- 2.17
- Raw text
- <list_item>
- <paragraph>
- <reference ids="toc-entry-37" refid="container">
- <generated classes="sectnum">
- 2.18
- Container
- <list_item>
- <paragraph>
- <reference ids="toc-entry-38" refid="colspanning-tables">
- <generated classes="sectnum">
- 2.19
- Colspanning tables
- <list_item>
- <paragraph>
- <reference ids="toc-entry-39" refid="rowspanning-tables">
- <generated classes="sectnum">
- 2.20
- Rowspanning tables
- <list_item>
- <paragraph>
- <reference ids="toc-entry-40" refid="complex-tables">
- <generated classes="sectnum">
- 2.21
- Complex tables
- <list_item>
- <paragraph>
- <reference ids="toc-entry-41" refid="list-tables">
- <generated classes="sectnum">
- 2.22
- List Tables
- <list_item>
- <paragraph>
- <reference ids="toc-entry-42" refid="error-handling">
- <generated classes="sectnum">
- 3
- Error Handling
- <section ids="structural-elements" names="structural\ elements">
- <title auto="1" refid="toc-entry-1">
- <generated classes="sectnum">
- 1
- Structural Elements
- <section ids="section-title" names="section\ title">
- <title auto="1" refid="toc-entry-2">
- <generated classes="sectnum">
- 1.1
- Section Title
- <subtitle ids="section-subtitle" names="section\ subtitle">
- Section Subtitle
- <paragraph>
- Lone subsections are converted to a section subtitle by a transform
- activated with the
- <literal>
- --section-subtitles
- command line option or the
- <literal>
- sectsubtitle-xform
- configuration value.
- <section ids="empty-section" names="empty\ section">
- <title auto="1" refid="toc-entry-3">
- <generated classes="sectnum">
- 1.2
- Empty Section
- <section ids="transitions" names="transitions">
- <title auto="1" refid="toc-entry-4">
- <generated classes="sectnum">
- 1.3
- Transitions
- <paragraph>
- Here's a transition:
- <transition>
- <paragraph>
- It divides the section. Transitions may also occur between sections:
- <transition>
- <section ids="body-elements" names="body\ elements">
- <title auto="1" refid="toc-entry-5">
- <generated classes="sectnum">
- 2
- Body Elements
- <section ids="paragraphs" names="paragraphs">
- <title auto="1" refid="toc-entry-6">
- <generated classes="sectnum">
- 2.1
- Paragraphs
- <paragraph>
- A paragraph.
- <section ids="inline-markup" names="inline\ markup">
- <title auto="1" refid="toc-entry-7">
- <generated classes="sectnum">
- 2.1.1
- Inline Markup
- <paragraph>
- Paragraphs contain text and may contain inline markup:
- <emphasis>
- emphasis
- ,
- <strong>
- strong emphasis
- ,
- <literal>
- inline literals
- , standalone hyperlinks
- (
- <reference refuri="http://www.python.org">
- http://www.python.org
- ), external hyperlinks (
- <reference name="Python" refuri="http://www.python.org/">
- Python
-
- <footnote_reference auto="1" ids="footnote-reference-10" refid="footnote-6">
- 5
- ), internal
- cross-references (
- <reference name="example" refid="example">
- example
- ), external hyperlinks with embedded URIs
- (
- <reference name="Python web site" refuri="http://www.python.org">
- Python web site
- ),
- <reference anonymous="1" name="anonymous hyperlink references" refuri="http://www.python.org/">
- anonymous hyperlink
- references
-
- <footnote_reference auto="1" ids="footnote-reference-14" refid="footnote-6">
- 5
- (
- <reference anonymous="1" name="a second reference" refuri="https://docutils.sourceforge.io/">
- a second reference
-
- <footnote_reference auto="1" ids="footnote-reference-15" refid="footnote-8">
- 7
- ), footnote references (manually
- numbered
- <footnote_reference ids="footnote-reference-1" refid="footnote-1">
- 1
- , anonymous auto-numbered
- <footnote_reference auto="1" ids="footnote-reference-2" refid="footnote-2">
- 3
- , labeled auto-numbered
- <footnote_reference auto="1" ids="footnote-reference-3" refid="label">
- 2
- , or symbolic
- <footnote_reference auto="*" ids="footnote-reference-4" refid="footnote-3">
- *
- ), citation references (see
- <citation_reference ids="citation-reference-1" refid="cit2002">
- CIT2002
- ),
- substitution references (
- <image alt="EXAMPLE" uri="../../../docs/user/rst/images/biohazard.png">
- &
- a
- <emphasis>
- trimmed heart
-
- <literal>
- (U+2665):
- ♥
- ), and
- <target ids="inline-hyperlink-targets" names="inline\ hyperlink\ targets">
- inline hyperlink targets
-
- (see
- <reference name="Targets" refid="targets">
- Targets
- below for a reference back to here). Character-level
- inline markup is also possible (although exceedingly ugly!) in
- <emphasis>
- re
- <literal>
- Structured
- <emphasis>
- Text
- . Problems are indicated by
- <problematic ids="problematic-1" refid="system-message-1">
- |problematic|
- text
- (generated by processing errors; this one is intentional). Here is a
- reference to the
- <reference name="doctitle" refid="doctitle">
- doctitle
- and the
- <reference name="subtitle" refid="subtitle">
- subtitle
- .
- <target anonymous="1" ids="target-1" refuri="http://www.python.org/">
- <target anonymous="1" ids="target-2" refuri="https://docutils.sourceforge.io/">
- <paragraph>
- The default role for interpreted text is
- <title_reference>
- Title Reference
- . Here are
- some explicit interpreted text roles: a PEP reference (
- <reference refuri="https://peps.python.org/pep-0287">
- PEP 287
- ); an
- RFC reference (
- <reference refuri="https://tools.ietf.org/html/rfc2822.html">
- RFC 2822
- ); an abbreviation (
- <abbreviation>
- abb.
- ), an acronym
- (
- <acronym>
- reST
- ), code (
- <literal classes="code">
- print "hello world"
- ); a
- <subscript>
- subscript
- ;
- a
- <superscript>
- superscript
- and explicit roles for
- <title_reference>
- Docutils
- '
- <emphasis>
- standard
-
- <strong>
- inline
-
- <literal>
- markup
- .
- <comment xml:space="preserve">
- DO NOT RE-WRAP THE FOLLOWING PARAGRAPH!
- <paragraph>
- Let's test wrapping and whitespace significance in inline literals:
- <literal>
- This is an example of --inline-literal --text, --including some--
- strangely--hyphenated-words. Adjust-the-width-of-your-browser-window
- to see how the text is wrapped. -- ---- -------- Now note the
- spacing between the words of this sentence (words
- should be grouped in pairs).
- <paragraph>
- If the
- <literal>
- --pep-references
- option was supplied, there should be a
- live link to PEP 258 here.
- <section ids="bullet-lists" names="bullet\ lists">
- <title auto="1" refid="toc-entry-8">
- <generated classes="sectnum">
- 2.2
- Bullet Lists
- <bullet_list bullet="-">
- <list_item>
- <paragraph>
- A bullet list
- <bullet_list bullet="+">
- <list_item>
- <paragraph>
- Nested bullet list.
- <list_item>
- <paragraph>
- Nested item 2.
- <list_item>
- <paragraph>
- Item 2.
- <paragraph>
- Paragraph 2 of item 2.
- <bullet_list bullet="*">
- <list_item>
- <paragraph>
- Nested bullet list.
- <list_item>
- <paragraph>
- Nested item 2.
- <bullet_list bullet="-">
- <list_item>
- <paragraph>
- Third level.
- <list_item>
- <paragraph>
- Item 2.
- <list_item>
- <paragraph>
- Nested item 3.
- <list_item>
- <paragraph>
- This nested list should be compacted by the HTML writer.
- <target ids="target" names="target">
- <comment xml:space="preserve">
- Even if this item contains a target and a comment.
- <section ids="enumerated-lists" names="enumerated\ lists">
- <title auto="1" refid="toc-entry-9">
- <generated classes="sectnum">
- 2.3
- Enumerated Lists
- <enumerated_list enumtype="arabic" prefix="" suffix=".">
- <list_item>
- <paragraph>
- Arabic numerals.
- <enumerated_list enumtype="loweralpha" prefix="" suffix=")">
- <list_item>
- <paragraph>
- lower alpha)
- <enumerated_list enumtype="lowerroman" prefix="(" suffix=")">
- <list_item>
- <paragraph>
- (lower roman)
- <enumerated_list enumtype="upperalpha" prefix="" suffix=".">
- <list_item>
- <paragraph>
- upper alpha.
- <enumerated_list enumtype="upperroman" prefix="" suffix=")">
- <list_item>
- <paragraph>
- upper roman)
- <list_item>
- <paragraph>
- Lists that don't start at 1:
- <enumerated_list enumtype="arabic" prefix="" start="3" suffix=".">
- <list_item>
- <paragraph>
- Three
- <list_item>
- <paragraph>
- Four
- <system_message level="1" line="8" source="functional/input/data/standard.rst" type="INFO">
- <paragraph>
- Enumerated list start value not ordinal-1: "3" (ordinal 3)
- <enumerated_list enumtype="upperalpha" prefix="" start="3" suffix=".">
- <list_item>
- <paragraph>
- C
- <list_item>
- <paragraph>
- D
- <system_message level="1" line="8" source="functional/input/data/standard.rst" type="INFO">
- <paragraph>
- Enumerated list start value not ordinal-1: "C" (ordinal 3)
- <enumerated_list enumtype="lowerroman" prefix="" start="3" suffix=".">
- <list_item>
- <paragraph>
- iii
- <list_item>
- <paragraph>
- iv
- <system_message level="1" line="8" source="functional/input/data/standard.rst" type="INFO">
- <paragraph>
- Enumerated list start value not ordinal-1: "iii" (ordinal 3)
- <section ids="definition-lists" names="definition\ lists">
- <title auto="1" refid="toc-entry-10">
- <generated classes="sectnum">
- 2.4
- Definition Lists
- <definition_list>
- <definition_list_item>
- <term>
- Term
- <definition>
- <paragraph>
- Definition
- <definition_list_item>
- <term>
- Term
- <classifier>
- classifier
- <definition>
- <paragraph>
- Definition paragraph 1.
- <paragraph>
- Definition paragraph 2.
- <definition_list_item>
- <term>
- Term
- <definition>
- <paragraph>
- Definition
- <definition_list_item>
- <term>
- Term
- <classifier>
- classifier one
- <classifier>
- classifier two
- <definition>
- <paragraph>
- Definition
- <section ids="field-lists" names="field\ lists">
- <title auto="1" refid="toc-entry-11">
- <generated classes="sectnum">
- 2.5
- Field Lists
- <field_list>
- <field>
- <field_name>
- what
- <field_body>
- <paragraph>
- Field lists map field names to field bodies, like database
- records. They are often part of an extension syntax. They are
- an unambiguous variant of RFC 2822 fields.
- <field>
- <field_name>
- how arg1 arg2
- <field_body>
- <paragraph>
- The field marker is a colon, the field name, and a colon.
- <paragraph>
- The field body may contain one or more body elements, indented
- relative to the field marker.
- <field>
- <field_name>
- credits
- <field_body>
- <paragraph classes="credits">
- This paragraph has the
- <title_reference>
- credits
- class set. (This is actually not
- about credits but just for ensuring that the class attribute
- doesn't get stripped away.)
- <section ids="option-lists" names="option\ lists">
- <title auto="1" refid="toc-entry-12">
- <generated classes="sectnum">
- 2.6
- Option Lists
- <paragraph>
- For listing command-line options:
- <option_list>
- <option_list_item>
- <option_group>
- <option>
- <option_string>
- -a
- <description>
- <paragraph>
- command-line option "a"
- <option_list_item>
- <option_group>
- <option>
- <option_string>
- -b
- <option_argument delimiter=" ">
- file
- <description>
- <paragraph>
- options can have arguments
- and long descriptions
- <option_list_item>
- <option_group>
- <option>
- <option_string>
- --long
- <description>
- <paragraph>
- options can be long, too
- <option_list_item>
- <option_group>
- <option>
- <option_string>
- --input
- <option_argument delimiter="=">
- file
- <description>
- <paragraph>
- long options can also have arguments
- <option_list_item>
- <option_group>
- <option>
- <option_string>
- /V
- <description>
- <paragraph>
- DOS/VMS-style option
- <option_list_item>
- <option_group>
- <option>
- <option_string>
- --very-long-option
- <description>
- <paragraph>
- The description can also start on the next line.
- <paragraph>
- The description may contain multiple body elements,
- regardless of where it starts.
- <option_list_item>
- <option_group>
- <option>
- <option_string>
- -x
- <option>
- <option_string>
- -y
- <option>
- <option_string>
- -z
- <description>
- <paragraph>
- Multiple options are an "option group".
- <option_list_item>
- <option_group>
- <option>
- <option_string>
- -v
- <option>
- <option_string>
- --verbose
- <description>
- <paragraph>
- Commonly-seen: short & long options.
- <option_list_item>
- <option_group>
- <option>
- <option_string>
- -1
- <option_argument delimiter=" ">
- file
- <option>
- <option_string>
- --one
- <option_argument delimiter="=">
- file
- <option>
- <option_string>
- --two
- <option_argument delimiter=" ">
- file
- <description>
- <paragraph>
- Multiple options with arguments.
- <option_list_item>
- <option_group>
- <option>
- <option_string>
- -f
- <option_argument delimiter=" ">
- <[path]file>
- <description>
- <paragraph>
- Option argumens must start with a letter
- or be wrapped in angle brackets.
- <option_list_item>
- <option_group>
- <option>
- <option_string>
- -d
- <option_argument delimiter=" ">
- <src dest>
- <description>
- <paragraph>
- Angle brackets are also required if an
- option expects more than one argument.
- <paragraph>
- There must be at least two spaces between the option and the
- description.
- <section ids="literal-blocks" names="literal\ blocks">
- <title auto="1" refid="toc-entry-13">
- <generated classes="sectnum">
- 2.7
- Literal Blocks
- <paragraph>
- Literal blocks are indicated with a double-colon ("::") at the end of
- the preceding paragraph (over there
- <literal>
- -->
- ). They can be indented:
- <literal_block xml:space="preserve">
- if literal_block:
- text = 'is left as-is'
- spaces_and_linebreaks = 'are preserved'
- markup_processing = None
- <paragraph>
- Or they can be quoted without indentation:
- <literal_block xml:space="preserve">
- >> Great idea!
- >
- > Why didn't I think of that?
- <section ids="line-blocks" names="line\ blocks">
- <title auto="1" refid="toc-entry-14">
- <generated classes="sectnum">
- 2.8
- Line Blocks
- <paragraph>
- This section tests line blocks. Line blocks are body elements which
- consist of lines and other line blocks. Nested line blocks cause
- indentation.
- <line_block>
- <line>
- This is a line block. It ends with a blank line.
- <line_block>
- <line>
- New lines begin with a vertical bar ("|").
- <line>
- Line breaks and initial indent are significant, and preserved.
- <line_block>
- <line>
- Continuation lines are also possible. A long line that is intended
- to wrap should begin with a space in place of the vertical bar.
- <line>
- The left edge of a continuation line need not be aligned with
- the left edge of the text above it.
- <line_block>
- <line>
- This is a second line block.
- <line>
- <line>
- Blank lines are permitted internally, but they must begin with a "|".
- <paragraph>
- Another line block, surrounded by paragraphs:
- <line_block>
- <line>
- And it's no good waiting by the window
- <line>
- It's no good waiting for the sun
- <line>
- Please believe me, the things you dream of
- <line>
- They don't fall in the lap of no-one
- <paragraph>
- Take it away, Eric the Orchestra Leader!
- <block_quote>
- <line_block>
- <line>
- A one, two, a one two three four
- <line>
- <line>
- Half a bee, philosophically,
- <line_block>
- <line>
- must,
- <emphasis>
- ipso facto
- , half not be.
- <line>
- But half the bee has got to be,
- <line_block>
- <line>
- <emphasis>
- vis a vis
- its entity. D'you see?
- <line>
- <line>
- But can a bee be said to be
- <line_block>
- <line>
- or not to be an entire bee,
- <line_block>
- <line>
- when half the bee is not a bee,
- <line_block>
- <line>
- due to some ancient injury?
- <line>
- <line>
- Singing...
- <paragraph>
- A line block, like the following poem by Christian Morgenstern, can
- also be centre-aligned:
- <line_block classes="language-de align-center">
- <line>
- <strong>
- Die Trichter
- <line>
- <line>
- Zwei Trichter wandeln durch die Nacht.
- <line>
- Durch ihres Rumpfs verengten Schacht
- <line>
- fließt weißes Mondlicht
- <line>
- still und heiter
- <line>
- auf ihren
- <line>
- Waldweg
- <line>
- u. s.
- <line>
- w.
- <line>
- <section ids="block-quotes" names="block\ quotes">
- <title auto="1" refid="toc-entry-15">
- <generated classes="sectnum">
- 2.9
- Block Quotes
- <paragraph>
- Block quotes consist of indented body elements:
- <block_quote>
- <paragraph>
- My theory by A. Elk. Brackets Miss, brackets. This theory goes
- as follows and begins now. All brontosauruses are thin at one
- end, much much thicker in the middle and then thin again at the
- far end. That is my theory, it is mine, and belongs to me and I
- own it, and what it is too.
- <attribution>
- Anne Elk (Miss)
- <paragraph>
- The language of a quote (like any other object) can be specified by
- a class attribute:
- <comment xml:space="preserve">
- <block_quote classes="language-fr">
- <paragraph>
- ReStructuredText est un langage de balisage léger utilisé
- notamment dans la documentation du langage Python.
- <section ids="doctest-blocks" names="doctest\ blocks">
- <title auto="1" refid="toc-entry-16">
- <generated classes="sectnum">
- 2.10
- Doctest Blocks
- <doctest_block xml:space="preserve">
- >>> print 'Python-specific usage examples; begun with ">>>"'
- Python-specific usage examples; begun with ">>>"
- >>> print '(cut and pasted from interactive Python sessions)'
- (cut and pasted from interactive Python sessions)
- <section ids="footnotes" names="footnotes">
- <title auto="1" refid="toc-entry-17">
- <generated classes="sectnum">
- 2.11
- Footnotes
- <footnote backrefs="footnote-reference-1 footnote-reference-5 footnote-reference-9" ids="footnote-1" names="1">
- <label>
- 1
- <paragraph>
- A footnote contains body elements, consistently indented by at
- least 3 spaces.
- <paragraph>
- This is the footnote's second paragraph.
- <footnote auto="1" backrefs="footnote-reference-3 footnote-reference-6" ids="label" names="label">
- <label>
- 2
- <paragraph>
- Footnotes may be numbered, either manually (as in
- <footnote_reference ids="footnote-reference-5" refid="footnote-1">
- 1
- ) or
- automatically using a "#"-prefixed label. This footnote has a
- label so it can be referred to from multiple places, both as a
- footnote reference (
- <footnote_reference auto="1" ids="footnote-reference-6" refid="label">
- 2
- ) and as a
- <reference anonymous="1" name="hyperlink reference" refid="label">
- hyperlink reference
- .
- <target anonymous="1" ids="target-3" refid="label">
- <footnote auto="1" backrefs="footnote-reference-2" ids="footnote-2" names="3">
- <label>
- 3
- <paragraph>
- This footnote is numbered automatically and anonymously using a
- label of "#" only.
- <paragraph>
- This is the second paragraph.
- <paragraph>
- And this is the third paragraph.
- <footnote auto="*" backrefs="footnote-reference-4" ids="footnote-3">
- <label>
- *
- <paragraph>
- Footnotes may also use symbols, specified with a "*" label.
- Here's a reference to the next footnote:
- <footnote_reference auto="*" ids="footnote-reference-7" refid="footnote-4">
- †
- .
- <footnote auto="*" backrefs="footnote-reference-7" ids="footnote-4">
- <label>
- †
- <paragraph>
- This footnote shows the next symbol in the sequence.
- <footnote ids="footnote-5" names="4">
- <label>
- 4
- <paragraph>
- Here's an unreferenced footnote, with a reference to a
- nonexistent footnote:
- <problematic ids="footnote-reference-8" refid="system-message-2">
- [5]_
- .
- <section ids="citations" names="citations">
- <title auto="1" refid="toc-entry-18">
- <generated classes="sectnum">
- 2.12
- Citations
- <citation backrefs="citation-reference-1 citation-reference-2" ids="cit2002" names="cit2002">
- <label>
- CIT2002
- <paragraph>
- Citations are text-labeled footnotes. They may be
- rendered separately and differently from footnotes.
- <paragraph>
- Here's a reference to the above,
- <citation_reference ids="citation-reference-2" refid="cit2002">
- CIT2002
- , and a
- <problematic ids="citation-reference-3" refid="system-message-3">
- [nonexistent]_
-
- citation.
- <target refid="another-target">
- <section ids="targets another-target" names="targets another\ target">
- <title auto="1" refid="toc-entry-19">
- <generated classes="sectnum">
- 2.13
- Targets
- <target refid="example">
- <paragraph ids="example" names="example">
- This paragraph is pointed to by the explicit "example" target. A
- reference can be found under
- <reference name="Inline Markup" refid="inline-markup">
- Inline Markup
- , above.
- <reference name="Inline hyperlink targets" refid="inline-hyperlink-targets">
- Inline
- hyperlink targets
- are also possible.
- <paragraph>
- Section headers are implicit targets, referred to by name. See
- <reference name="Targets" refid="targets">
- Targets
- , which is a subsection of
- <reference name="Body Elements" refid="body-elements">
- Body Elements
- .
- <paragraph>
- Explicit external targets are interpolated into references such as
- "
- <reference name="Python" refuri="http://www.python.org/">
- Python
-
- <footnote_reference auto="1" ids="footnote-reference-11" refid="footnote-6">
- 5
- ".
- <target ids="python" names="python" refuri="http://www.python.org/">
- <paragraph>
- Targets may be indirect and anonymous. Thus
- <reference anonymous="1" name="this phrase" refid="targets">
- this phrase
- may also
- refer to the
- <reference name="Targets" refid="targets">
- Targets
- section.
- <target anonymous="1" ids="target-4" refid="targets">
- <paragraph>
- Here's a
- <problematic ids="problematic-2" refid="system-message-4">
- `hyperlink reference without a target`_
- , which generates an
- error.
- <section dupnames="duplicate\ target\ names" ids="duplicate-target-names">
- <title auto="1" refid="toc-entry-20">
- <generated classes="sectnum">
- 2.13.1
- Duplicate Target Names
- <paragraph>
- Duplicate names in section headers or other implicit targets will
- generate "info" (level-1) system messages. Duplicate names in
- explicit targets will generate "warning" (level-2) system messages.
- <section dupnames="duplicate\ target\ names" ids="duplicate-target-names-1">
- <title auto="1" refid="toc-entry-21">
- <generated classes="sectnum">
- 2.13.2
- Duplicate Target Names
- <system_message backrefs="duplicate-target-names-1" level="1" line="437" source="functional/input/data/standard.rst" type="INFO">
- <paragraph>
- Duplicate implicit target name: "duplicate target names".
- <paragraph>
- Since there are two "Duplicate Target Names" section headers, we
- cannot uniquely refer to either of them by name. If we try to (like
- this:
- <problematic ids="problematic-3" refid="system-message-5">
- `Duplicate Target Names`_
- ), an error is generated.
- <section ids="directives" names="directives">
- <title auto="1" refid="toc-entry-22">
- <generated classes="sectnum">
- 2.14
- Directives
- <topic classes="contents local" ids="contents" names="contents">
- <bullet_list classes="auto-toc">
- <list_item>
- <paragraph>
- <reference ids="toc-entry-43" refid="document-parts">
- <generated classes="sectnum">
- 2.14.1
- Document Parts
- <list_item>
- <paragraph>
- <reference ids="toc-entry-44" refid="images-and-figures">
- <generated classes="sectnum">
- 2.14.2
- Images and Figures
- <list_item>
- <paragraph>
- <reference ids="toc-entry-45" refid="tables">
- <generated classes="sectnum">
- 2.14.3
- Tables
- <list_item>
- <paragraph>
- <reference ids="toc-entry-46" refid="admonitions">
- <generated classes="sectnum">
- 2.14.4
- Admonitions
- <list_item>
- <paragraph>
- <reference ids="toc-entry-47" refid="topics-sidebars-and-rubrics">
- <generated classes="sectnum">
- 2.14.5
- Topics, Sidebars, and Rubrics
- <list_item>
- <paragraph>
- <reference ids="toc-entry-48" refid="target-footnotes">
- <generated classes="sectnum">
- 2.14.6
- Target Footnotes
- <list_item>
- <paragraph>
- <reference ids="toc-entry-49" refid="replacement-text">
- <generated classes="sectnum">
- 2.14.7
- Replacement Text
- <list_item>
- <paragraph>
- <reference ids="toc-entry-50" refid="compound-paragraph">
- <generated classes="sectnum">
- 2.14.8
- Compound Paragraph
- <list_item>
- <paragraph>
- <reference ids="toc-entry-51" refid="parsed-literal-blocks">
- <generated classes="sectnum">
- 2.14.9
- Parsed Literal Blocks
- <list_item>
- <paragraph>
- <reference ids="toc-entry-52" refid="code">
- <generated classes="sectnum">
- 2.14.10
- Code
- <list_item>
- <paragraph>
- <reference ids="toc-entry-53" refid="meta">
- <generated classes="sectnum">
- 2.14.11
- Meta
- <paragraph>
- These are just a sample of the many reStructuredText Directives. For
- others, please see
- <reference anonymous="1" name="reStructuredText Directives" refuri="https://docutils.sourceforge.io/docs/ref/rst/directives.html">
- reStructuredText Directives
-
- <footnote_reference auto="1" ids="footnote-reference-16" refid="footnote-9">
- 8
- .
- <target anonymous="1" ids="target-5" refuri="https://docutils.sourceforge.io/docs/ref/rst/directives.html">
- <section ids="document-parts" names="document\ parts">
- <title auto="1" refid="toc-entry-43">
- <generated classes="sectnum">
- 2.14.1
- Document Parts
- <paragraph>
- An example of the "contents" directive can be seen above this section
- (a local, untitled table of
- <reference name="contents" refid="contents">
- contents
- ) and at the beginning of the
- document (a document-wide
- <reference name="table of contents" refid="table-of-contents">
- table of contents
- ).
- <section ids="images-and-figures" names="images\ and\ figures">
- <title auto="1" refid="toc-entry-44">
- <generated classes="sectnum">
- 2.14.2
- Images and Figures
- <paragraph>
- An image directive (also clickable -- a hyperlink reference):
- <reference name="directives" refid="directives">
- <image classes="class1 class2" uri="../../../docs/user/rst/images/title.png" width="70%">
- <paragraph>
- Image with multiple IDs:
- <target refid="image-target-1">
- <target refid="image-target-2">
- <target refid="image-target-3">
- <image ids="image-target-3 image-target-2 image-target-1" names="image\ target\ 3 image\ target\ 2 image\ target\ 1" uri="../../../docs/user/rst/images/biohazard.png">
- <paragraph>
- A centered image:
- <image align="center" uri="../../../docs/user/rst/images/biohazard.png">
- <paragraph>
- A left-aligned image:
- <image align="left" uri="../../../docs/user/rst/images/biohazard.png">
- <paragraph>
- This paragraph might flow around the image.
- The specific behavior depends upon the style sheet and
- the browser or rendering software used.
- <paragraph>
- A right-aligned image:
- <image align="right" uri="../../../docs/user/rst/images/biohazard.png">
- <paragraph>
- This paragraph might flow around the image.
- The specific behavior depends upon the style sheet and
- the browser or rendering software used.
- <paragraph>
- For inline images see
- <reference name="Substitution Definitions" refid="substitution-definitions">
- Substitution Definitions
- .
- <paragraph>
- Image size:
- <paragraph>
- An image 2 em wide:
- <image uri="../../../docs/user/rst/images/biohazard.png" width="2em">
- <paragraph>
- An image 2 cm wide and 15 pixel high:
- <image height="15px" uri="../../../docs/user/rst/images/biohazard.png" width="2cm">
- <paragraph>
- Relative units allow adaption of the image to the screen or paper size.
- An image occupying 50% of the line width:
- <image uri="../../../docs/user/rst/images/title.png" width="50%">
- <paragraph>
- A
- <emphasis>
- figure
- is an image with a caption and/or a legend. With page-based output
- media, figures might float to a different position if this helps the page
- layout.
- <figure classes="figclass1 figclass2">
- <image alt="reStructuredText, the markup syntax" classes="class1 class2" uri="../../../docs/user/rst/images/title.png" width="258">
- <caption>
- Plaintext markup syntax and parser system.
- <legend>
- <table>
- <tgroup cols="2">
- <colspec colwidth="12">
- <colspec colwidth="47">
- <tbody>
- <row>
- <entry>
- <paragraph>
- re
- <entry>
- <paragraph>
- Revised, revisited, based on 're' module.
- <row>
- <entry>
- <paragraph>
- Structured
- <entry>
- <paragraph>
- Structure-enhanced text, structuredtext.
- <row>
- <entry>
- <paragraph>
- Text
- <entry>
- <paragraph>
- Well it is, isn't it?
- <paragraph>
- This paragraph is also part of the legend.
- <paragraph>
- A left-aligned figure, 70% wide:
- <figure align="left" classes="figclass1 figclass2" width="70%">
- <image alt="reStructuredText, the markup syntax" classes="class1 class2" uri="../../../docs/user/rst/images/biohazard.png" width="40px">
- <caption>
- This is the caption.
- <legend>
- <paragraph>
- This is the legend.
- <paragraph>
- The legend may consist of several paragraphs.
- <paragraph>
- This paragraph might flow around the figure.
- <paragraph>
- The specific behavior depends upon the style sheet and the browser or
- rendering software used.
- <paragraph>
- A centred figure, 40% wide:
- <figure align="center" width="40%">
- <image uri="../../../docs/user/rst/images/biohazard.png" width="40px">
- <caption>
- This is the caption.
- <legend>
- <paragraph>
- This is the legend.
- <paragraph>
- The legend may consist of several paragraphs.
- <paragraph>
- This paragraph might flow around the figure.
- <paragraph>
- The specific behavior depends upon the style sheet and the browser or
- rendering software used.
- <paragraph>
- A right-aligned figure:
- <figure align="right">
- <image uri="../../../docs/user/rst/images/biohazard.png" width="40px">
- <caption>
- This is the caption.
- <legend>
- <paragraph>
- This is the legend.
- <paragraph>
- The legend may consist of several paragraphs.
- <paragraph>
- This paragraph might flow around the figure. The specific behavior depends
- upon the style sheet and the browser or rendering software used.
- <section ids="tables" names="tables">
- <title auto="1" refid="toc-entry-45">
- <generated classes="sectnum">
- 2.14.3
- Tables
- <paragraph>
- Tables may be given titles and additional arguments with the
- <emphasis>
- table
-
- directive:
- <table align="left">
- <title>
- left-aligned table
- <tgroup cols="2">
- <colspec colwidth="5">
- <colspec colwidth="5">
- <thead>
- <row>
- <entry>
- <paragraph>
- A
- <entry>
- <paragraph>
- not A
- <tbody>
- <row>
- <entry>
- <paragraph>
- False
- <entry>
- <paragraph>
- True
- <row>
- <entry>
- <paragraph>
- True
- <entry>
- <paragraph>
- False
- <table align="center">
- <title>
- center-aligned table
- <tgroup cols="2">
- <colspec colwidth="5">
- <colspec colwidth="5">
- <thead>
- <row>
- <entry>
- <paragraph>
- A
- <entry>
- <paragraph>
- not A
- <tbody>
- <row>
- <entry>
- <paragraph>
- False
- <entry>
- <paragraph>
- True
- <row>
- <entry>
- <paragraph>
- True
- <entry>
- <paragraph>
- False
- <table align="right">
- <title>
- right-aligned table
- <tgroup cols="2">
- <colspec colwidth="5">
- <colspec colwidth="5">
- <thead>
- <row>
- <entry>
- <paragraph>
- A
- <entry>
- <paragraph>
- not A
- <tbody>
- <row>
- <entry>
- <paragraph>
- False
- <entry>
- <paragraph>
- True
- <row>
- <entry>
- <paragraph>
- True
- <entry>
- <paragraph>
- False
- <paragraph>
- With the "widths" argument "auto" (or "class" value "colwidths-auto"),
- column widths are determined by the backend (if supported by the
- writer/backend).
- <target refid="target1">
- <target refid="target2">
- <table classes="colwidths-auto" ids="target2 target1" names="target2 target1">
- <tgroup cols="3">
- <colspec colwidth="7">
- <colspec colwidth="7">
- <colspec colwidth="10">
- <thead>
- <row>
- <entry>
- <paragraph>
- A
- <entry>
- <paragraph>
- B
- <entry>
- <paragraph>
- A or B
- <tbody>
- <row>
- <entry>
- <paragraph>
- False
- <entry>
- <paragraph>
- False
- <entry>
- <paragraph>
- False
- <row>
- <entry>
- <paragraph>
- True
- <entry>
- <paragraph>
- False
- <entry>
- <paragraph>
- True
- <row>
- <entry>
- <paragraph>
- False
- <entry>
- <paragraph>
- True
- <entry>
- <paragraph>
- True
- <row>
- <entry>
- <paragraph>
- True
- <entry>
- <paragraph>
- True
- <entry>
- <paragraph>
- True
- <section ids="admonitions" names="admonitions">
- <title auto="1" refid="toc-entry-46">
- <generated classes="sectnum">
- 2.14.4
- Admonitions
- <attention>
- <paragraph>
- Directives at large.
- <caution>
- <paragraph>
- Don't take any wooden nickels.
- <danger>
- <paragraph>
- Mad scientist at work!
- <error>
- <paragraph>
- Does not compute.
- <hint>
- <paragraph>
- It's bigger than a bread box.
- <important>
- <bullet_list bullet="-">
- <list_item>
- <paragraph>
- Wash behind your ears.
- <list_item>
- <paragraph>
- Clean up your room.
- <list_item>
- <paragraph>
- Call your mother.
- <list_item>
- <paragraph>
- Back up your data.
- <note>
- <paragraph>
- This is a note.
- <tip>
- <paragraph>
- 15% if the service is good.
- <warning>
- <paragraph>
- Strong prose may provoke extreme mental exertion.
- Reader discretion is strongly advised.
- <admonition classes="admonition-and-by-the-way">
- <title>
- And, by the way...
- <paragraph>
- You can make up your own admonition too.
- <target ids="docutils" names="docutils" refuri="https://docutils.sourceforge.io/">
- <section ids="topics-sidebars-and-rubrics" names="topics,\ sidebars,\ and\ rubrics">
- <title auto="1" refid="toc-entry-47">
- <generated classes="sectnum">
- 2.14.5
- Topics, Sidebars, and Rubrics
- <paragraph>
- <emphasis>
- Sidebars
- are like miniature, parallel documents.
- <sidebar>
- <title>
- Optional Sidebar Title
- <subtitle>
- Optional Subtitle
- <paragraph>
- This is a sidebar. It is for text outside the flow of the main
- text.
- <rubric>
- This is a rubric inside a sidebar
- <paragraph>
- Sidebars often appear beside the main text with a border and a different
- background or font color.
- <paragraph>
- A
- <emphasis>
- topic
- is like a block quote with a title, or a self-contained section
- with no subsections.
- <topic>
- <title>
- Topic Title
- <paragraph>
- This is a topic.
- <paragraph>
- A
- <emphasis>
- rubric
- is like an informal heading that doesn't correspond to the
- document's structure. It is typically highlighted in red (hence the name).
- <rubric>
- This is a rubric
- <paragraph>
- Topics and rubrics can be used at places where a
- <reference name="section title" refid="section-title">
- section title
- is not
- allowed (e.g. inside a directive).
- <section ids="target-footnotes" names="target\ footnotes">
- <title auto="1" refid="toc-entry-48">
- <generated classes="sectnum">
- 2.14.6
- Target Footnotes
- <footnote auto="1" backrefs="footnote-reference-10 footnote-reference-11 footnote-reference-12 footnote-reference-14" ids="footnote-6" names="TARGET_NOTE:\ footnote-6">
- <label>
- 5
- <paragraph>
- <reference refuri="http://www.python.org/">
- http://www.python.org/
- <footnote auto="1" backrefs="footnote-reference-13" ids="footnote-7" names="TARGET_NOTE:\ footnote-7">
- <label>
- 6
- <paragraph>
- <reference refuri="http://pygments.org/">
- http://pygments.org/
- <footnote auto="1" backrefs="footnote-reference-15" ids="footnote-8" names="TARGET_NOTE:\ footnote-8">
- <label>
- 7
- <paragraph>
- <reference refuri="https://docutils.sourceforge.io/">
- https://docutils.sourceforge.io/
- <footnote auto="1" backrefs="footnote-reference-16" ids="footnote-9" names="TARGET_NOTE:\ footnote-9">
- <label>
- 8
- <paragraph>
- <reference refuri="https://docutils.sourceforge.io/docs/ref/rst/directives.html">
- https://docutils.sourceforge.io/docs/ref/rst/directives.html
- <footnote auto="1" backrefs="footnote-reference-17" ids="footnote-10" names="TARGET_NOTE:\ footnote-10">
- <label>
- 9
- <paragraph>
- <reference refuri="https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata">
- https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata
- <section ids="replacement-text" names="replacement\ text">
- <title auto="1" refid="toc-entry-49">
- <generated classes="sectnum">
- 2.14.7
- Replacement Text
- <paragraph>
- I recommend you try
- <reference refuri="http://www.python.org/">
- Python,
- <emphasis>
- the
- best language around
-
- <footnote_reference auto="1" ids="footnote-reference-12" refid="footnote-6">
- 5
- .
- <substitution_definition names="Python">
- Python,
- <emphasis>
- the
- best language around
- <section ids="compound-paragraph" names="compound\ paragraph">
- <title auto="1" refid="toc-entry-50">
- <generated classes="sectnum">
- 2.14.8
- Compound Paragraph
- <paragraph>
- The
- <emphasis>
- compound
- directive is used to create a "compound paragraph", which
- is a single logical paragraph containing multiple physical body
- elements. For example:
- <compound>
- <paragraph>
- The 'rm' command is very dangerous. If you are logged
- in as root and enter
- <literal_block xml:space="preserve">
- cd /
- rm -rf *
- <paragraph>
- you will erase the entire contents of your file system.
- <paragraph>
- Test the handling and display of compound paragraphs:
- <compound classes="some-class">
- <paragraph>
- Compound 2, paragraph 1,
- <paragraph>
- compound 2, paragraph 2,
- <bullet_list bullet="*">
- <list_item>
- <paragraph>
- list item 1,
- <list_item>
- <paragraph>
- list item 2,
- <paragraph>
- compound 2, paragraph 3.
- <compound>
- <paragraph>
- Compound 3, only consisting of one paragraph.
- <compound>
- <literal_block xml:space="preserve">
- Compound 4.
- This one starts with a literal block.
- <paragraph>
- Compound 4, paragraph following the literal block.
- <paragraph>
- Now something
- <emphasis>
- really
- perverted -- a nested compound block. This is
- just to test that it works at all; the results don't have to be
- meaningful.
- <compound>
- <paragraph>
- Compound 5, block 1 (a paragraph).
- <compound>
- <paragraph>
- Compound 6 is block 2 in compound 5.
- <paragraph>
- Compound 6, another paragraph.
- <paragraph>
- Compound 5, block 3 (a paragraph).
- <compound>
- <paragraph>
- Compound 7, tests the inclusion of various block-level
- elements in one logical paragraph. First a table,
- <table>
- <tgroup cols="3">
- <colspec colwidth="20">
- <colspec colwidth="20">
- <colspec colwidth="20">
- <tbody>
- <row>
- <entry>
- <paragraph>
- Left cell, first
- paragraph.
- <paragraph>
- Left cell, second
- paragraph.
- <entry>
- <paragraph>
- Middle cell,
- consisting of
- exactly one
- paragraph.
- <entry>
- <paragraph>
- Right cell.
- <paragraph>
- Paragraph 2.
- <paragraph>
- Paragraph 3.
- <paragraph>
- followed by a paragraph. This physical paragraph is
- actually a continuation of the paragraph before the table. It is followed
- by
- <block_quote>
- <paragraph>
- a quote and
- <enumerated_list enumtype="arabic" prefix="" suffix=".">
- <list_item>
- <paragraph>
- an enumerated list,
- <paragraph>
- a paragraph,
- <option_list>
- <option_list_item>
- <option_group>
- <option>
- <option_string>
- --an
- <description>
- <paragraph>
- option list,
- <paragraph>
- a paragraph,
- <field_list>
- <field>
- <field_name>
- a field
- <field_body>
- <paragraph>
- list,
- <paragraph>
- a paragraph,
- <definition_list>
- <definition_list_item>
- <term>
- a definition
- <definition>
- <paragraph>
- list,
- <paragraph>
- a paragraph, an image:
- <image uri="../../../docs/user/rst/images/biohazard.png">
- <paragraph>
- a paragraph,
- <line_block>
- <line>
- a line
- <line>
- block,
- <paragraph>
- a paragraph followed by a comment,
- <comment xml:space="preserve">
- this is a comment
- <paragraph>
- a paragraph, a
- <note>
- <paragraph>
- with content
- <paragraph>
- and the final paragraph of the compound 7.
- <section ids="parsed-literal-blocks" names="parsed\ literal\ blocks">
- <title auto="1" refid="toc-entry-51">
- <generated classes="sectnum">
- 2.14.9
- Parsed Literal Blocks
- <literal_block xml:space="preserve">
- This is a parsed literal block.
- This line is indented. The next line is blank.
-
- Inline markup is supported, e.g.
- <emphasis>
- emphasis
- ,
- <strong>
- strong
- ,
- <literal>
- literal
- text
- ,
- <subscript>
- sub-
- and
- <superscript>
- super
- scripts,
- inline formulas:
- <math>
- A = 2 \pi r^2
- ,
- footnotes
- <footnote_reference ids="footnote-reference-9" refid="footnote-1">
- 1
- ,
- <target ids="hyperlink-targets" names="hyperlink\ targets">
- hyperlink targets
- , and
- <reference name="references" refuri="http://www.python.org/">
- references
- <target ids="references" names="references" refuri="http://www.python.org/">
- .
- <section ids="code" names="code">
- <title auto="1" refid="toc-entry-52">
- <generated classes="sectnum">
- 2.14.10
- Code
- <paragraph>
- Blocks of source code can be set with the
- <title_reference>
- code
- directive. If the code
- language is specified, the content is parsed and tagged by the
- <reference name="Pygments" refuri="http://pygments.org/">
- Pygments
-
- <footnote_reference auto="1" ids="footnote-reference-13" refid="footnote-7">
- 6
-
- syntax highlighter and can be formatted with a style sheet. (Code parsing
- is turned off using the
- <literal>
- syntax-highlight
- config setting in the test
- conversions in order to get identical results with/without installed
- Pygments highlighter.)
- <literal_block classes="code python" xml:space="preserve">
- print 'This is Python code.'
- <paragraph>
- The
- <literal>
- :number-lines:
- option (with optional start value) generates line
- numbers:
@@ Diff output truncated at 100000 characters. @@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
_______________________________________________
Docutils-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/docutils-checkins