diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2020-04-03 16:58:35 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2020-04-03 16:58:35 +0000 |
| commit | 1dbbbd935f010db9a8dc94d1c0ed62c1be27aa33 (patch) | |
| tree | a74ed6cc83bc69341f72897eb981bed79e7c1549 | |
| parent | 882f7dd77eb99a82646e1b5dd22392b05ae12bec (diff) | |
| download | docutils-1dbbbd935f010db9a8dc94d1c0ed62c1be27aa33.tar.gz | |
functional tests: add section heading
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8514 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
7 files changed, 292 insertions, 243 deletions
diff --git a/docutils/test/functional/expected/standalone_rst_docutils_xml.xml b/docutils/test/functional/expected/standalone_rst_docutils_xml.xml index f5ae8de3c..87bc55574 100644 --- a/docutils/test/functional/expected/standalone_rst_docutils_xml.xml +++ b/docutils/test/functional/expected/standalone_rst_docutils_xml.xml @@ -148,56 +148,59 @@ They are transformed from section titles after parsing.</comment> <paragraph><reference ids="toc-entry-24" refid="images-and-figures"><generated classes="sectnum">2.14.2 </generated>Images and Figures</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-25" refid="admonitions"><generated classes="sectnum">2.14.3 </generated>Admonitions</reference></paragraph> + <paragraph><reference ids="toc-entry-25" refid="tables"><generated classes="sectnum">2.14.3 </generated>Tables</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-26" refid="topics-sidebars-and-rubrics"><generated classes="sectnum">2.14.4 </generated>Topics, Sidebars, and Rubrics</reference></paragraph> + <paragraph><reference ids="toc-entry-26" refid="admonitions"><generated classes="sectnum">2.14.4 </generated>Admonitions</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-27" refid="target-footnotes"><generated classes="sectnum">2.14.5 </generated>Target Footnotes</reference></paragraph> + <paragraph><reference ids="toc-entry-27" refid="topics-sidebars-and-rubrics"><generated classes="sectnum">2.14.5 </generated>Topics, Sidebars, and Rubrics</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-28" refid="replacement-text"><generated classes="sectnum">2.14.6 </generated>Replacement Text</reference></paragraph> + <paragraph><reference ids="toc-entry-28" refid="target-footnotes"><generated classes="sectnum">2.14.6 </generated>Target Footnotes</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-29" refid="compound-paragraph"><generated classes="sectnum">2.14.7 </generated>Compound Paragraph</reference></paragraph> + <paragraph><reference ids="toc-entry-29" refid="replacement-text"><generated classes="sectnum">2.14.7 </generated>Replacement Text</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-30" refid="parsed-literal-blocks"><generated classes="sectnum">2.14.8 </generated>Parsed Literal Blocks</reference></paragraph> + <paragraph><reference ids="toc-entry-30" refid="compound-paragraph"><generated classes="sectnum">2.14.8 </generated>Compound Paragraph</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-31" refid="code"><generated classes="sectnum">2.14.9 </generated>Code</reference></paragraph> + <paragraph><reference ids="toc-entry-31" refid="parsed-literal-blocks"><generated classes="sectnum">2.14.9 </generated>Parsed Literal Blocks</reference></paragraph> + </list_item> + <list_item> + <paragraph><reference ids="toc-entry-32" refid="code"><generated classes="sectnum">2.14.10 </generated>Code</reference></paragraph> </list_item> </bullet_list> </list_item> <list_item> - <paragraph><reference ids="toc-entry-32" refid="substitution-definitions"><generated classes="sectnum">2.15 </generated>Substitution Definitions</reference></paragraph> + <paragraph><reference ids="toc-entry-33" refid="substitution-definitions"><generated classes="sectnum">2.15 </generated>Substitution Definitions</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-33" refid="comments"><generated classes="sectnum">2.16 </generated>Comments</reference></paragraph> + <paragraph><reference ids="toc-entry-34" refid="comments"><generated classes="sectnum">2.16 </generated>Comments</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-34" refid="raw-text"><generated classes="sectnum">2.17 </generated>Raw text</reference></paragraph> + <paragraph><reference ids="toc-entry-35" refid="raw-text"><generated classes="sectnum">2.17 </generated>Raw text</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-35" refid="container"><generated classes="sectnum">2.18 </generated>Container</reference></paragraph> + <paragraph><reference ids="toc-entry-36" refid="container"><generated classes="sectnum">2.18 </generated>Container</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-36" refid="colspanning-tables"><generated classes="sectnum">2.19 </generated>Colspanning tables</reference></paragraph> + <paragraph><reference ids="toc-entry-37" refid="colspanning-tables"><generated classes="sectnum">2.19 </generated>Colspanning tables</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-37" refid="rowspanning-tables"><generated classes="sectnum">2.20 </generated>Rowspanning tables</reference></paragraph> + <paragraph><reference ids="toc-entry-38" refid="rowspanning-tables"><generated classes="sectnum">2.20 </generated>Rowspanning tables</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-38" refid="complex-tables"><generated classes="sectnum">2.21 </generated>Complex tables</reference></paragraph> + <paragraph><reference ids="toc-entry-39" refid="complex-tables"><generated classes="sectnum">2.21 </generated>Complex tables</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-39" refid="list-tables"><generated classes="sectnum">2.22 </generated>List Tables</reference></paragraph> + <paragraph><reference ids="toc-entry-40" refid="list-tables"><generated classes="sectnum">2.22 </generated>List Tables</reference></paragraph> </list_item> </bullet_list> </list_item> <list_item> - <paragraph><reference ids="toc-entry-40" refid="error-handling"><generated classes="sectnum">3 </generated>Error Handling</reference></paragraph> + <paragraph><reference ids="toc-entry-41" refid="error-handling"><generated classes="sectnum">3 </generated>Error Handling</reference></paragraph> </list_item> </bullet_list> </topic> @@ -752,31 +755,34 @@ Python-specific usage examples; begun with ">>>" <topic classes="contents local" ids="contents" names="contents"> <bullet_list classes="auto-toc"> <list_item> - <paragraph><reference ids="toc-entry-41" refid="document-parts"><generated classes="sectnum">2.14.1 </generated>Document Parts</reference></paragraph> + <paragraph><reference ids="toc-entry-42" refid="document-parts"><generated classes="sectnum">2.14.1 </generated>Document Parts</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-42" refid="images-and-figures"><generated classes="sectnum">2.14.2 </generated>Images and Figures</reference></paragraph> + <paragraph><reference ids="toc-entry-43" refid="images-and-figures"><generated classes="sectnum">2.14.2 </generated>Images and Figures</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-43" refid="admonitions"><generated classes="sectnum">2.14.3 </generated>Admonitions</reference></paragraph> + <paragraph><reference ids="toc-entry-44" refid="tables"><generated classes="sectnum">2.14.3 </generated>Tables</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-44" refid="topics-sidebars-and-rubrics"><generated classes="sectnum">2.14.4 </generated>Topics, Sidebars, and Rubrics</reference></paragraph> + <paragraph><reference ids="toc-entry-45" refid="admonitions"><generated classes="sectnum">2.14.4 </generated>Admonitions</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-45" refid="target-footnotes"><generated classes="sectnum">2.14.5 </generated>Target Footnotes</reference></paragraph> + <paragraph><reference ids="toc-entry-46" refid="topics-sidebars-and-rubrics"><generated classes="sectnum">2.14.5 </generated>Topics, Sidebars, and Rubrics</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-46" refid="replacement-text"><generated classes="sectnum">2.14.6 </generated>Replacement Text</reference></paragraph> + <paragraph><reference ids="toc-entry-47" refid="target-footnotes"><generated classes="sectnum">2.14.6 </generated>Target Footnotes</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-47" refid="compound-paragraph"><generated classes="sectnum">2.14.7 </generated>Compound Paragraph</reference></paragraph> + <paragraph><reference ids="toc-entry-48" refid="replacement-text"><generated classes="sectnum">2.14.7 </generated>Replacement Text</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-48" refid="parsed-literal-blocks"><generated classes="sectnum">2.14.8 </generated>Parsed Literal Blocks</reference></paragraph> + <paragraph><reference ids="toc-entry-49" refid="compound-paragraph"><generated classes="sectnum">2.14.8 </generated>Compound Paragraph</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-49" refid="code"><generated classes="sectnum">2.14.9 </generated>Code</reference></paragraph> + <paragraph><reference ids="toc-entry-50" refid="parsed-literal-blocks"><generated classes="sectnum">2.14.9 </generated>Parsed Literal Blocks</reference></paragraph> + </list_item> + <list_item> + <paragraph><reference ids="toc-entry-51" refid="code"><generated classes="sectnum">2.14.10 </generated>Code</reference></paragraph> </list_item> </bullet_list> </topic> @@ -784,13 +790,13 @@ Python-specific usage examples; begun with ">>>" others, please see <reference refuri="http://docutils.sourceforge.net/docs/ref/rst/directives.html">http://docutils.sourceforge.net/docs/ref/rst/directives.html</reference>.</paragraph> <section ids="document-parts" names="document\ parts"> - <title auto="1" refid="toc-entry-41"><generated classes="sectnum">2.14.1 </generated>Document Parts</title> + <title auto="1" refid="toc-entry-42"><generated classes="sectnum">2.14.1 </generated>Document Parts</title> <paragraph>An example of the "contents" directive can be seen above this section (a local, untitled table of <reference name="contents" refid="contents">contents</reference>) and at the beginning of the document (a document-wide <reference name="table of contents" refid="table-of-contents">table of contents</reference>).</paragraph> </section> <section ids="images-and-figures" names="images\ and\ figures"> - <title auto="1" refid="toc-entry-42"><generated classes="sectnum">2.14.2 </generated>Images and Figures</title> + <title auto="1" refid="toc-entry-43"><generated classes="sectnum">2.14.2 </generated>Images and Figures</title> <paragraph>An image directive (also clickable -- a hyperlink reference):</paragraph> <reference name="directives" refid="directives"><image classes="class1 class2" uri="../../../docs/user/rst/images/title.png"></image></reference> <paragraph>Image with multiple IDs:</paragraph> @@ -897,6 +903,9 @@ Python-specific usage examples; begun with ">>>" </figure> <paragraph>This paragraph might flow around the figure. The specific behavior depends upon the style sheet and the browser or rendering software used.</paragraph> + </section> + <section ids="tables" names="tables"> + <title auto="1" refid="toc-entry-44"><generated classes="sectnum">2.14.3 </generated>Tables</title> <paragraph>Tables may be given titles and additional arguments with the <emphasis>table</emphasis> directive:</paragraph> <table align="left"> @@ -1077,7 +1086,7 @@ Python-specific usage examples; begun with ">>>" </table> </section> <section ids="admonitions" names="admonitions"> - <title auto="1" refid="toc-entry-43"><generated classes="sectnum">2.14.3 </generated>Admonitions</title> + <title auto="1" refid="toc-entry-45"><generated classes="sectnum">2.14.4 </generated>Admonitions</title> <attention> <paragraph>Directives at large.</paragraph> </attention> @@ -1126,7 +1135,7 @@ Python-specific usage examples; begun with ">>>" </admonition> </section> <section ids="topics-sidebars-and-rubrics" names="topics,\ sidebars,\ and\ rubrics"> - <title auto="1" refid="toc-entry-44"><generated classes="sectnum">2.14.4 </generated>Topics, Sidebars, and Rubrics</title> + <title auto="1" refid="toc-entry-46"><generated classes="sectnum">2.14.5 </generated>Topics, Sidebars, and Rubrics</title> <paragraph><emphasis>Sidebars</emphasis> are like miniature, parallel documents.</paragraph> <sidebar> <title>Sidebar Title</title> @@ -1150,7 +1159,7 @@ Python-specific usage examples; begun with ">>>" allowed (e.g. inside a directive).</paragraph> </section> <section ids="target-footnotes" names="target\ footnotes"> - <title auto="1" refid="toc-entry-45"><generated classes="sectnum">2.14.5 </generated>Target Footnotes</title> + <title auto="1" refid="toc-entry-47"><generated classes="sectnum">2.14.6 </generated>Target Footnotes</title> <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</label> <paragraph><reference refuri="http://www.python.org/">http://www.python.org/</reference></paragraph> @@ -1165,12 +1174,12 @@ Python-specific usage examples; begun with ">>>" </footnote> </section> <section ids="replacement-text" names="replacement\ text"> - <title auto="1" refid="toc-entry-46"><generated classes="sectnum">2.14.6 </generated>Replacement Text</title> + <title auto="1" refid="toc-entry-48"><generated classes="sectnum">2.14.7 </generated>Replacement Text</title> <paragraph>I recommend you try <reference refuri="http://www.python.org/">Python, <emphasis>the</emphasis> best language around</reference> <footnote_reference auto="1" ids="footnote-reference-12" refid="footnote-6">5</footnote_reference>.</paragraph> <substitution_definition names="Python">Python, <emphasis>the</emphasis> best language around</substitution_definition> </section> <section ids="compound-paragraph" names="compound\ paragraph"> - <title auto="1" refid="toc-entry-47"><generated classes="sectnum">2.14.7 </generated>Compound Paragraph</title> + <title auto="1" refid="toc-entry-49"><generated classes="sectnum">2.14.8 </generated>Compound Paragraph</title> <paragraph>The <emphasis>compound</emphasis> directive is used to create a "compound paragraph", which is a single logical paragraph containing multiple physical body elements. For example:</paragraph> @@ -1304,7 +1313,7 @@ This one starts with a literal block.</literal_block> </compound> </section> <section ids="parsed-literal-blocks" names="parsed\ literal\ blocks"> - <title auto="1" refid="toc-entry-48"><generated classes="sectnum">2.14.8 </generated>Parsed Literal Blocks</title> + <title auto="1" refid="toc-entry-50"><generated classes="sectnum">2.14.9 </generated>Parsed Literal Blocks</title> <literal_block xml:space="preserve">This is a parsed literal block. This line is indented. The next line is blank. @@ -1314,7 +1323,7 @@ inline formulas: <math>A = 2 \pi r^2</math>, footnotes <footnote_reference ids="footnote-reference-9" refid="footnote-1">1</footnote_reference>, <target ids="hyperlink-targets" names="hyperlink\ targets">hyperlink targets</target>, and <reference name="references" refuri="http://www.python.org/">references</reference><target ids="references" names="references" refuri="http://www.python.org/"></target>.</literal_block> </section> <section ids="code" names="code"> - <title auto="1" refid="toc-entry-49"><generated classes="sectnum">2.14.9 </generated>Code</title> + <title auto="1" refid="toc-entry-51"><generated classes="sectnum">2.14.10 </generated>Code</title> <paragraph>Blocks of source code can be set with the <title_reference>code</title_reference> directive. If the code language is specified, the content is parsed and tagged by the <reference name="Pygments" refuri="http://pygments.org/">Pygments</reference> <footnote_reference auto="1" ids="footnote-reference-13" refid="footnote-7">6</footnote_reference> syntax highlighter and can be formatted with a style sheet. (Code parsing @@ -1341,7 +1350,7 @@ footnotes <footnote_reference ids="footnote-reference-9" refid="footnote-1">1</f </section> </section> <section ids="substitution-definitions" names="substitution\ definitions"> - <title auto="1" refid="toc-entry-32"><generated classes="sectnum">2.15 </generated>Substitution Definitions</title> + <title auto="1" refid="toc-entry-33"><generated classes="sectnum">2.15 </generated>Substitution Definitions</title> <paragraph>An inline image (<image alt="EXAMPLE" uri="../../../docs/user/rst/images/biohazard.png"></image>) example:</paragraph> <substitution_definition names="EXAMPLE"><image alt="EXAMPLE" uri="../../../docs/user/rst/images/biohazard.png"></image></substitution_definition> <paragraph>A Unicode example:</paragraph> @@ -1349,7 +1358,7 @@ footnotes <footnote_reference ids="footnote-reference-9" refid="footnote-1">1</f <paragraph>(Substitution definitions are not visible in the HTML source.)</paragraph> </section> <section ids="comments" names="comments"> - <title auto="1" refid="toc-entry-33"><generated classes="sectnum">2.16 </generated>Comments</title> + <title auto="1" refid="toc-entry-34"><generated classes="sectnum">2.16 </generated>Comments</title> <paragraph>Here's one:</paragraph> <comment xml:space="preserve">Comments begin with two dots and a space. Anything may follow, except for the syntax of footnotes, hyperlink @@ -1361,7 +1370,7 @@ Comments may contain non-ASCII characters: ä ö ü æ ø å</comment> <paragraph>(View the HTML source to see the comment.)</paragraph> </section> <section ids="raw-text" names="raw\ text"> - <title auto="1" refid="toc-entry-34"><generated classes="sectnum">2.17 </generated>Raw text</title> + <title auto="1" refid="toc-entry-35"><generated classes="sectnum">2.17 </generated>Raw text</title> <paragraph>This does not necessarily look nice, because there may be missing white space.</paragraph> <paragraph>It's just there to freeze the behavior.</paragraph> <raw format="html latex" xml:space="preserve">A test.</raw> @@ -1372,14 +1381,14 @@ Comments may contain non-ASCII characters: ä ö ü æ ø å</comment> <raw format="latex" xml:space="preserve">Fifth test in LaTeX.\\Line two.</raw> </section> <section ids="container" names="container"> - <title auto="1" refid="toc-entry-35"><generated classes="sectnum">2.18 </generated>Container</title> + <title auto="1" refid="toc-entry-36"><generated classes="sectnum">2.18 </generated>Container</title> <container classes="custom"> <paragraph>paragraph 1</paragraph> <paragraph>paragraph 2</paragraph> </container> </section> <section ids="colspanning-tables" names="colspanning\ tables"> - <title auto="1" refid="toc-entry-36"><generated classes="sectnum">2.19 </generated>Colspanning tables</title> + <title auto="1" refid="toc-entry-37"><generated classes="sectnum">2.19 </generated>Colspanning tables</title> <paragraph>This table has a cell spanning two columns:</paragraph> <table> <tgroup cols="3"> @@ -1457,7 +1466,7 @@ Comments may contain non-ASCII characters: ä ö ü æ ø å</comment> </table> </section> <section ids="rowspanning-tables" names="rowspanning\ tables"> - <title auto="1" refid="toc-entry-37"><generated classes="sectnum">2.20 </generated>Rowspanning tables</title> + <title auto="1" refid="toc-entry-38"><generated classes="sectnum">2.20 </generated>Rowspanning tables</title> <paragraph>Here's a table with cells spanning several rows:</paragraph> <table> <tgroup cols="3"> @@ -1514,7 +1523,7 @@ Comments may contain non-ASCII characters: ä ö ü æ ø å</comment> </table> </section> <section ids="complex-tables" names="complex\ tables"> - <title auto="1" refid="toc-entry-38"><generated classes="sectnum">2.21 </generated>Complex tables</title> + <title auto="1" refid="toc-entry-39"><generated classes="sectnum">2.21 </generated>Complex tables</title> <paragraph>Here's a complex table, which should test all features.</paragraph> <table> <tgroup cols="4"> @@ -1606,7 +1615,7 @@ Comments may contain non-ASCII characters: ä ö ü æ ø å</comment> </table> </section> <section ids="list-tables" names="list\ tables"> - <title auto="1" refid="toc-entry-39"><generated classes="sectnum">2.22 </generated>List Tables</title> + <title auto="1" refid="toc-entry-40"><generated classes="sectnum">2.22 </generated>List Tables</title> <paragraph>Here's a list table exercising all features:</paragraph> <table classes="colwidths-given test" width="40em"> <title>list table with integral header</title> @@ -1701,7 +1710,7 @@ Comments may contain non-ASCII characters: ä ö ü æ ø å</comment> </section> </section> <section ids="error-handling" names="error\ handling"> - <title auto="1" refid="toc-entry-40"><generated classes="sectnum">3 </generated>Error Handling</title> + <title auto="1" refid="toc-entry-41"><generated classes="sectnum">3 </generated>Error Handling</title> <paragraph>Any errors caught during processing will generate system messages.</paragraph> <paragraph>There should be five messages in the following, auto-generated section, "Docutils System Messages":</paragraph> @@ -1739,16 +1748,16 @@ Comments may contain non-ASCII characters: ä ö ü æ ø å</comment> <system_message level="1" line="476" source="functional/input/data/standard.txt" type="INFO"> <paragraph>Hyperlink target "image-target-3" is not referenced.</paragraph> </system_message> - <system_message level="1" line="640" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="643" source="functional/input/data/standard.txt" type="INFO"> <paragraph>Hyperlink target "target1" is not referenced.</paragraph> </system_message> - <system_message level="1" line="641" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="644" source="functional/input/data/standard.txt" type="INFO"> <paragraph>Hyperlink target "target2" is not referenced.</paragraph> </system_message> - <system_message level="1" line="686" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="689" source="functional/input/data/standard.txt" type="INFO"> <paragraph>Hyperlink target "docutils" is not referenced.</paragraph> </system_message> - <system_message level="1" line="852" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="855" source="functional/input/data/standard.txt" type="INFO"> <paragraph>Hyperlink target "hyperlink targets" is not referenced.</paragraph> </system_message> </section> diff --git a/docutils/test/functional/expected/standalone_rst_html4css1.html b/docutils/test/functional/expected/standalone_rst_html4css1.html index b21855989..a21d18fc0 100644 --- a/docutils/test/functional/expected/standalone_rst_html4css1.html +++ b/docutils/test/functional/expected/standalone_rst_html4css1.html @@ -116,29 +116,30 @@ They are transformed from section titles after parsing. --> <li><a class="reference internal" href="#directives" id="toc-entry-22">2.14 Directives</a><ul class="auto-toc"> <li><a class="reference internal" href="#document-parts" id="toc-entry-23">2.14.1 Document Parts</a></li> <li><a class="reference internal" href="#images-and-figures" id="toc-entry-24">2.14.2 Images and Figures</a></li> -<li><a class="reference internal" href="#admonitions" id="toc-entry-25">2.14.3 Admonitions</a></li> -<li><a class="reference internal" href="#topics-sidebars-and-rubrics" id="toc-entry-26">2.14.4 Topics, Sidebars, and Rubrics</a></li> -<li><a class="reference internal" href="#target-footnotes" id="toc-entry-27">2.14.5 Target Footnotes</a></li> -<li><a class="reference internal" href="#replacement-text" id="toc-entry-28">2.14.6 Replacement Text</a></li> -<li><a class="reference internal" href="#compound-paragraph" id="toc-entry-29">2.14.7 Compound Paragraph</a></li> -<li><a class="reference internal" href="#parsed-literal-blocks" id="toc-entry-30">2.14.8 Parsed Literal Blocks</a></li> -<li><a class="reference internal" href="#code" id="toc-entry-31">2.14.9 Code</a></li> +<li><a class="reference internal" href="#tables" id="toc-entry-25">2.14.3 Tables</a></li> +<li><a class="reference internal" href="#admonitions" id="toc-entry-26">2.14.4 Admonitions</a></li> +<li><a class="reference internal" href="#topics-sidebars-and-rubrics" id="toc-entry-27">2.14.5 Topics, Sidebars, and Rubrics</a></li> +<li><a class="reference internal" href="#target-footnotes" id="toc-entry-28">2.14.6 Target Footnotes</a></li> +<li><a class="reference internal" href="#replacement-text" id="toc-entry-29">2.14.7 Replacement Text</a></li> +<li><a class="reference internal" href="#compound-paragraph" id="toc-entry-30">2.14.8 Compound Paragraph</a></li> +<li><a class="reference internal" href="#parsed-literal-blocks" id="toc-entry-31">2.14.9 Parsed Literal Blocks</a></li> +<li><a class="reference internal" href="#code" id="toc-entry-32">2.14.10 Code</a></li> </ul> </li> -<li><a class="reference internal" href="#substitution-definitions" id="toc-entry-32">2.15 Substitution Definitions</a></li> -<li><a class="reference internal" href="#comments" id="toc-entry-33">2.16 Comments</a></li> -<li><a class="reference internal" href="#raw-text" id="toc-entry-34">2.17 Raw text</a></li> -<li><a class="reference internal" href="#container" id="toc-entry-35">2.18 Container</a></li> -<li><a class="reference internal" href="#colspanning-tables" id="toc-entry-36">2.19 Colspanning tables</a></li> -<li><a class="reference internal" href="#rowspanning-tables" id="toc-entry-37">2.20 Rowspanning tables</a></li> -<li><a class="reference internal" href="#complex-tables" id="toc-entry-38">2.21 Complex tables</a></li> -<li><a class="reference internal" href="#list-tables" id="toc-entry-39">2.22 List Tables</a></li> -<li><a class="reference internal" href="#custom-roles" id="toc-entry-40">2.23 Custom Roles</a></li> -<li><a class="reference internal" href="#svg-images" id="toc-entry-41">2.24 SVG Images</a></li> -<li><a class="reference internal" href="#swf-images" id="toc-entry-42">2.25 SWF Images</a></li> +<li><a class="reference internal" href="#substitution-definitions" id="toc-entry-33">2.15 Substitution Definitions</a></li> +<li><a class="reference internal" href="#comments" id="toc-entry-34">2.16 Comments</a></li> +<li><a class="reference internal" href="#raw-text" id="toc-entry-35">2.17 Raw text</a></li> +<li><a class="reference internal" href="#container" id="toc-entry-36">2.18 Container</a></li> +<li><a class="reference internal" href="#colspanning-tables" id="toc-entry-37">2.19 Colspanning tables</a></li> +<li><a class="reference internal" href="#rowspanning-tables" id="toc-entry-38">2.20 Rowspanning tables</a></li> +<li><a class="reference internal" href="#complex-tables" id="toc-entry-39">2.21 Complex tables</a></li> +<li><a class="reference internal" href="#list-tables" id="toc-entry-40">2.22 List Tables</a></li> +<li><a class="reference internal" href="#custom-roles" id="toc-entry-41">2.23 Custom Roles</a></li> +<li><a class="reference internal" href="#svg-images" id="toc-entry-42">2.24 SVG Images</a></li> +<li><a class="reference internal" href="#swf-images" id="toc-entry-43">2.25 SWF Images</a></li> </ul> </li> -<li><a class="reference internal" href="#error-handling" id="toc-entry-43">3 Error Handling</a></li> +<li><a class="reference internal" href="#error-handling" id="toc-entry-44">3 Error Handling</a></li> </ul> </div> <div class="section" id="structural-elements"> @@ -553,28 +554,29 @@ this: <a href="#system-message-5"><span class="problematic" id="problematic-3">` <h2><a class="toc-backref" href="#toc-entry-22">2.14 Directives</a></h2> <div class="contents local topic" id="contents"> <ul class="auto-toc simple"> -<li><a class="reference internal" href="#document-parts" id="toc-entry-44">2.14.1 Document Parts</a></li> -<li><a class="reference internal" href="#images-and-figures" id="toc-entry-45">2.14.2 Images and Figures</a></li> -<li><a class="reference internal" href="#admonitions" id="toc-entry-46">2.14.3 Admonitions</a></li> -<li><a class="reference internal" href="#topics-sidebars-and-rubrics" id="toc-entry-47">2.14.4 Topics, Sidebars, and Rubrics</a></li> -<li><a class="reference internal" href="#target-footnotes" id="toc-entry-48">2.14.5 Target Footnotes</a></li> -<li><a class="reference internal" href="#replacement-text" id="toc-entry-49">2.14.6 Replacement Text</a></li> -<li><a class="reference internal" href="#compound-paragraph" id="toc-entry-50">2.14.7 Compound Paragraph</a></li> -<li><a class="reference internal" href="#parsed-literal-blocks" id="toc-entry-51">2.14.8 Parsed Literal Blocks</a></li> -<li><a class="reference internal" href="#code" id="toc-entry-52">2.14.9 Code</a></li> +<li><a class="reference internal" href="#document-parts" id="toc-entry-45">2.14.1 Document Parts</a></li> +<li><a class="reference internal" href="#images-and-figures" id="toc-entry-46">2.14.2 Images and Figures</a></li> +<li><a class="reference internal" href="#tables" id="toc-entry-47">2.14.3 Tables</a></li> +<li><a class="reference internal" href="#admonitions" id="toc-entry-48">2.14.4 Admonitions</a></li> +<li><a class="reference internal" href="#topics-sidebars-and-rubrics" id="toc-entry-49">2.14.5 Topics, Sidebars, and Rubrics</a></li> +<li><a class="reference internal" href="#target-footnotes" id="toc-entry-50">2.14.6 Target Footnotes</a></li> +<li><a class="reference internal" href="#replacement-text" id="toc-entry-51">2.14.7 Replacement Text</a></li> +<li><a class="reference internal" href="#compound-paragraph" id="toc-entry-52">2.14.8 Compound Paragraph</a></li> +<li><a class="reference internal" href="#parsed-literal-blocks" id="toc-entry-53">2.14.9 Parsed Literal Blocks</a></li> +<li><a class="reference internal" href="#code" id="toc-entry-54">2.14.10 Code</a></li> </ul> </div> <p>These are just a sample of the many reStructuredText Directives. For others, please see <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> <div class="section" id="document-parts"> -<h3><a class="toc-backref" href="#toc-entry-44">2.14.1 Document Parts</a></h3> +<h3><a class="toc-backref" href="#toc-entry-45">2.14.1 Document Parts</a></h3> <p>An example of the "contents" directive can be seen above this section (a local, untitled table of <a class="reference internal" href="#contents">contents</a>) and at the beginning of the document (a document-wide <a class="reference internal" href="#table-of-contents">table of contents</a>).</p> </div> <div class="section" id="images-and-figures"> -<h3><a class="toc-backref" href="#toc-entry-45">2.14.2 Images and Figures</a></h3> +<h3><a class="toc-backref" href="#toc-entry-46">2.14.2 Images and Figures</a></h3> <p>An image directive (also clickable -- a hyperlink reference):</p> <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> <p>Image with multiple IDs:</p> @@ -663,6 +665,9 @@ rendering software used.</p> </div> <p>This paragraph might flow around the figure. The specific behavior depends upon the style sheet and the browser or rendering software used.</p> +</div> +<div class="section" id="tables"> +<h3><a class="toc-backref" href="#toc-entry-47">2.14.3 Tables</a></h3> <p>Tables may be given titles and additional arguments with the <em>table</em> directive:</p> <table border="1" class="docutils align-left"> @@ -756,7 +761,7 @@ writer/backend).</p> </table> </div> <div class="section" id="admonitions"> -<h3><a class="toc-backref" href="#toc-entry-46">2.14.3 Admonitions</a></h3> +<h3><a class="toc-backref" href="#toc-entry-48">2.14.4 Admonitions</a></h3> <div class="admonition attention"> <p class="first admonition-title">Attention!</p> <p class="last">Directives at large.</p> @@ -805,7 +810,7 @@ Reader discretion is strongly advised.</p> </div> </div> <div class="section" id="topics-sidebars-and-rubrics"> -<h3><a class="toc-backref" href="#toc-entry-47">2.14.4 Topics, Sidebars, and Rubrics</a></h3> +<h3><a class="toc-backref" href="#toc-entry-49">2.14.5 Topics, Sidebars, and Rubrics</a></h3> <p><em>Sidebars</em> are like miniature, parallel documents.</p> <div class="sidebar"> <p class="first sidebar-title">Sidebar Title</p> @@ -829,7 +834,7 @@ document's structure. It is typically highlighted in red (hence the name).</p> allowed (e.g. inside a directive).</p> </div> <div class="section" id="target-footnotes"> -<h3><a class="toc-backref" href="#toc-entry-48">2.14.5 Target Footnotes</a></h3> +<h3><a class="toc-backref" href="#toc-entry-50">2.14.6 Target Footnotes</a></h3> <table class="docutils footnote" frame="void" id="footnote-6" rules="none"> <colgroup><col class="label" /><col /></colgroup> <tbody valign="top"> @@ -850,11 +855,11 @@ allowed (e.g. inside a directive).</p> </table> </div> <div class="section" id="replacement-text"> -<h3><a class="toc-backref" href="#toc-entry-49">2.14.6 Replacement Text</a></h3> +<h3><a class="toc-backref" href="#toc-entry-51">2.14.7 Replacement Text</a></h3> <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="#footnote-6" id="footnote-reference-12">[5]</a>.</p> </div> <div class="section" id="compound-paragraph"> -<h3><a class="toc-backref" href="#toc-entry-50">2.14.7 Compound Paragraph</a></h3> +<h3><a class="toc-backref" href="#toc-entry-52">2.14.8 Compound Paragraph</a></h3> <p>The <em>compound</em> directive is used to create a "compound paragraph", which is a single logical paragraph containing multiple physical body elements. For example:</p> @@ -974,7 +979,7 @@ a quote and</blockquote> </div> </div> <div class="section" id="parsed-literal-blocks"> -<h3><a class="toc-backref" href="#toc-entry-51">2.14.8 Parsed Literal Blocks</a></h3> +<h3><a class="toc-backref" href="#toc-entry-53">2.14.9 Parsed Literal Blocks</a></h3> <pre class="literal-block"> This is a parsed literal block. This line is indented. The next line is blank. @@ -986,7 +991,7 @@ footnotes <a class="footnote-reference" href="#footnote-1" id="footnote-referenc </pre> </div> <div class="section" id="code"> -<h3><a class="toc-backref" href="#toc-entry-52">2.14.9 Code</a></h3> +<h3><a class="toc-backref" href="#toc-entry-54">2.14.10 Code</a></h3> <p>Blocks of source code can be set with the <cite>code</cite> directive. If the code language is specified, the content is parsed and tagged by the <a class="reference external" href="http://pygments.org/">Pygments</a> <a class="footnote-reference" href="#footnote-7" id="footnote-reference-13">[6]</a> syntax highlighter and can be formatted with a style sheet. (Code parsing @@ -1018,13 +1023,13 @@ as a code block, here the rst file <tt class="docutils literal">header_footer.tx </div> </div> <div class="section" id="substitution-definitions"> -<h2><a class="toc-backref" href="#toc-entry-32">2.15 Substitution Definitions</a></h2> +<h2><a class="toc-backref" href="#toc-entry-33">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> </div> <div class="section" id="comments"> -<h2><a class="toc-backref" href="#toc-entry-33">2.16 Comments</a></h2> +<h2><a class="toc-backref" href="#toc-entry-34">2.16 Comments</a></h2> <p>Here's one:</p> <!-- Comments begin with two dots and a space. Anything may follow, except for the syntax of footnotes, hyperlink @@ -1036,20 +1041,20 @@ Comments may contain non-ASCII characters: ä ö ü æ ø å --> <p>(View the HTML source to see the comment.)</p> </div> <div class="section" id="raw-text"> -<h2><a class="toc-backref" href="#toc-entry-34">2.17 Raw text</a></h2> +<h2><a class="toc-backref" href="#toc-entry-35">2.17 Raw text</a></h2> <p>This does not necessarily look nice, because there may be missing white space.</p> <p>It's just there to freeze the behavior.</p> 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> Fifth test in HTML.<br />Line two.</div> <div class="section" id="container"> -<h2><a class="toc-backref" href="#toc-entry-35">2.18 Container</a></h2> +<h2><a class="toc-backref" href="#toc-entry-36">2.18 Container</a></h2> <div class="custom docutils container"> <p>paragraph 1</p> <p>paragraph 2</p> </div> </div> <div class="section" id="colspanning-tables"> -<h2><a class="toc-backref" href="#toc-entry-36">2.19 Colspanning tables</a></h2> +<h2><a class="toc-backref" href="#toc-entry-37">2.19 Colspanning tables</a></h2> <p>This table has a cell spanning two columns:</p> <table border="1" class="docutils"> <colgroup> @@ -1087,7 +1092,7 @@ Fifth test in HTML.<br />Line two.</div> </table> </div> <div class="section" id="rowspanning-tables"> -<h2><a class="toc-backref" href="#toc-entry-37">2.20 Rowspanning tables</a></h2> +<h2><a class="toc-backref" href="#toc-entry-38">2.20 Rowspanning tables</a></h2> <p>Here's a table with cells spanning several rows:</p> <table border="1" class="docutils"> <colgroup> @@ -1120,7 +1125,7 @@ cell.</td> </table> </div> <div class="section" id="complex-tables"> -<h2><a class="toc-backref" href="#toc-entry-38">2.21 Complex tables</a></h2> +<h2><a class="toc-backref" href="#toc-entry-39">2.21 Complex tables</a></h2> <p>Here's a complex table, which should test all features.</p> <table border="1" class="docutils"> <colgroup> @@ -1169,7 +1174,7 @@ empty: <tt class="docutils literal"><span class="pre">--></span></tt></td> </table> </div> <div class="section" id="list-tables"> -<h2><a class="toc-backref" href="#toc-entry-39">2.22 List Tables</a></h2> +<h2><a class="toc-backref" href="#toc-entry-40">2.22 List Tables</a></h2> <p>Here's a list table exercising all features:</p> <table border="1" class="colwidths-given test docutils" style="width: 40em"> <caption>list table with integral header</caption> @@ -1216,7 +1221,7 @@ crunchy, now would it?</td> </table> </div> <div class="section" id="custom-roles"> -<h2><a class="toc-backref" href="#toc-entry-40">2.23 Custom Roles</a></h2> +<h2><a class="toc-backref" href="#toc-entry-41">2.23 Custom Roles</a></h2> <ul> <li><p class="first">A role based on an existing role.</p> <p><tt class="custom docutils literal">one</tt> <tt class="custom docutils literal">two</tt> <tt class="custom docutils literal">three</tt></p> @@ -1246,7 +1251,7 @@ crunchy, now would it?</td> </ul> </div> <div class="section" id="svg-images"> -<h2><a class="toc-backref" href="#toc-entry-41">2.24 SVG Images</a></h2> +<h2><a class="toc-backref" href="#toc-entry-42">2.24 SVG Images</a></h2> <object class="align-left" data="../../../docs/user/rst/images/biohazard.svg" style="width: 48px; height: 48px;" type="image/svg+xml">../../../docs/user/rst/images/biohazard.svg</object> <p>Scalable vector graphics (SVG) images are the only standards-compliable way to include vector graphics in HTML documents. However, they are not @@ -1333,7 +1338,7 @@ tags.</p> </blockquote> </div> <div class="section" id="swf-images"> -<h2><a class="toc-backref" href="#toc-entry-42">2.25 SWF Images</a></h2> +<h2><a class="toc-backref" href="#toc-entry-43">2.25 SWF Images</a></h2> <p>Shockwave Flash is an image/movie format that most modern web browsers support via a plugin. It is sometimes blocked due to privacy/security concerns.</p> @@ -1345,7 +1350,7 @@ For complete control over display options use raw HTML.</p> </div> </div> <div class="section" id="error-handling"> -<h1><a class="toc-backref" href="#toc-entry-43">3 Error Handling</a></h1> +<h1><a class="toc-backref" href="#toc-entry-44">3 Error Handling</a></h1> <p>Any errors caught during processing will generate system messages.</p> <p>There should be five messages in the following, auto-generated section, "Docutils System Messages":</p> diff --git a/docutils/test/functional/expected/standalone_rst_html5.html b/docutils/test/functional/expected/standalone_rst_html5.html index 76e8906de..c32777173 100644 --- a/docutils/test/functional/expected/standalone_rst_html5.html +++ b/docutils/test/functional/expected/standalone_rst_html5.html @@ -119,47 +119,48 @@ They are transformed from section titles after parsing. --> <ul class="auto-toc"> <li><p><a class="reference internal" href="#document-parts" id="toc-entry-23"><span class="sectnum">2.14.1</span> Document Parts</a></p></li> <li><p><a class="reference internal" href="#images-and-figures" id="toc-entry-24"><span class="sectnum">2.14.2</span> Images and Figures</a></p></li> -<li><p><a class="reference internal" href="#admonitions" id="toc-entry-25"><span class="sectnum">2.14.3</span> Admonitions</a></p></li> -<li><p><a class="reference internal" href="#topics-sidebars-and-rubrics" id="toc-entry-26"><span class="sectnum">2.14.4</span> Topics, Sidebars, and Rubrics</a></p></li> -<li><p><a class="reference internal" href="#target-footnotes" id="toc-entry-27"><span class="sectnum">2.14.5</span> Target Footnotes</a></p></li> -<li><p><a class="reference internal" href="#replacement-text" id="toc-entry-28"><span class="sectnum">2.14.6</span> Replacement Text</a></p></li> -<li><p><a class="reference internal" href="#compound-paragraph" id="toc-entry-29"><span class="sectnum">2.14.7</span> Compound Paragraph</a></p></li> -<li><p><a class="reference internal" href="#parsed-literal-blocks" id="toc-entry-30"><span class="sectnum">2.14.8</span> Parsed Literal Blocks</a></p></li> -<li><p><a class="reference internal" href="#code" id="toc-entry-31"><span class="sectnum">2.14.9</span> Code</a></p></li> +<li><p><a class="reference internal" href="#tables" id="toc-entry-25"><span class="sectnum">2.14.3</span> Tables</a></p></li> +<li><p><a class="reference internal" href="#admonitions" id="toc-entry-26"><span class="sectnum">2.14.4</span> Admonitions</a></p></li> +<li><p><a class="reference internal" href="#topics-sidebars-and-rubrics" id="toc-entry-27"><span class="sectnum">2.14.5</span> Topics, Sidebars, and Rubrics</a></p></li> +<li><p><a class="reference internal" href="#target-footnotes" id="toc-entry-28"><span class="sectnum">2.14.6</span> Target Footnotes</a></p></li> +<li><p><a class="reference internal" href="#replacement-text" id="toc-entry-29"><span class="sectnum">2.14.7</span> Replacement Text</a></p></li> +<li><p><a class="reference internal" href="#compound-paragraph" id="toc-entry-30"><span class="sectnum">2.14.8</span> Compound Paragraph</a></p></li> +<li><p><a class="reference internal" href="#parsed-literal-blocks" id="toc-entry-31"><span class="sectnum">2.14.9</span> Parsed Literal Blocks</a></p></li> +<li><p><a class="reference internal" href="#code" id="toc-entry-32"><span class="sectnum">2.14.10</span> Code</a></p></li> </ul> </li> -<li><p><a class="reference internal" href="#substitution-definitions" id="toc-entry-32"><span class="sectnum">2.15</span> Substitution Definitions</a></p></li> -<li><p><a class="reference internal" href="#comments" id="toc-entry-33"><span class="sectnum">2.16</span> Comments</a></p></li> -<li><p><a class="reference internal" href="#raw-text" id="toc-entry-34"><span class="sectnum">2.17</span> Raw text</a></p></li> -<li><p><a class="reference internal" href="#container" id="toc-entry-35"><span class="sectnum">2.18</span> Container</a></p></li> -<li><p><a class="reference internal" href="#colspanning-tables" id="toc-entry-36"><span class="sectnum">2.19</span> Colspanning tables</a></p></li> -<li><p><a class="reference internal" href="#rowspanning-tables" id="toc-entry-37"><span class="sectnum">2.20</span> Rowspanning tables</a></p></li> -<li><p><a class="reference internal" href="#complex-tables" id="toc-entry-38"><span class="sectnum">2.21</span> Complex tables</a></p></li> -<li><p><a class="reference internal" href="#list-tables" id="toc-entry-39"><span class="sectnum">2.22</span> List Tables</a></p></li> -<li><p><a class="reference internal" href="#custom-roles" id="toc-entry-40"><span class="sectnum">2.23</span> Custom Roles</a></p></li> +<li><p><a class="reference internal" href="#substitution-definitions" id="toc-entry-33"><span class="sectnum">2.15</span> Substitution Definitions</a></p></li> +<li><p><a class="reference internal" href="#comments" id="toc-entry-34"><span class="sectnum">2.16</span> Comments</a></p></li> +<li><p><a class="reference internal" href="#raw-text" id="toc-entry-35"><span class="sectnum">2.17</span> Raw text</a></p></li> +<li><p><a class="reference internal" href="#container" id="toc-entry-36"><span class="sectnum">2.18</span> Container</a></p></li> +<li><p><a class="reference internal" href="#colspanning-tables" id="toc-entry-37"><span class="sectnum">2.19</span> Colspanning tables</a></p></li> +<li><p><a class="reference internal" href="#rowspanning-tables" id="toc-entry-38"><span class="sectnum">2.20</span> Rowspanning tables</a></p></li> +<li><p><a class="reference internal" href="#complex-tables" id="toc-entry-39"><span class="sectnum">2.21</span> Complex tables</a></p></li> +<li><p><a class="reference internal" href="#list-tables" id="toc-entry-40"><span class="sectnum">2.22</span> List Tables</a></p></li> +<li><p><a class="reference internal" href="#custom-roles" id="toc-entry-41"><span class="sectnum">2.23</span> Custom Roles</a></p></li> </ul> </li> -<li><p><a class="reference internal" href="#html-specific" id="toc-entry-41"><span class="sectnum">3</span> HTML specific</a></p> +<li><p><a class="reference internal" href="#html-specific" id="toc-entry-42"><span class="sectnum">3</span> HTML specific</a></p> <ul class="auto-toc"> -<li><p><a class="reference internal" href="#svg-images" id="toc-entry-42"><span class="sectnum">3.1</span> SVG Images</a></p></li> -<li><p><a class="reference internal" href="#swf-images" id="toc-entry-43"><span class="sectnum">3.2</span> SWF Images</a></p></li> -<li><p><a class="reference internal" href="#text-level-semantics" id="toc-entry-44"><span class="sectnum">3.3</span> Text-level semantics</a></p></li> -<li><p><a class="reference internal" href="#indicating-edits" id="toc-entry-45"><span class="sectnum">3.4</span> Indicating Edits</a></p></li> +<li><p><a class="reference internal" href="#svg-images" id="toc-entry-43"><span class="sectnum">3.1</span> SVG Images</a></p></li> +<li><p><a class="reference internal" href="#swf-images" id="toc-entry-44"><span class="sectnum">3.2</span> SWF Images</a></p></li> +<li><p><a class="reference internal" href="#text-level-semantics" id="toc-entry-45"><span class="sectnum">3.3</span> Text-level semantics</a></p></li> +<li><p><a class="reference internal" href="#indicating-edits" id="toc-entry-46"><span class="sectnum">3.4</span> Indicating Edits</a></p></li> </ul> </li> -<li><p><a class="reference internal" href="#changes-to-the-html4css1-writer" id="toc-entry-46"><span class="sectnum">4</span> Changes to the html4css1 writer</a></p> +<li><p><a class="reference internal" href="#changes-to-the-html4css1-writer" id="toc-entry-47"><span class="sectnum">4</span> Changes to the html4css1 writer</a></p> <ul class="auto-toc"> -<li><p><a class="reference internal" href="#field-list-handling" id="toc-entry-47"><span class="sectnum">4.1</span> Field list handling</a></p></li> -<li><p><a class="reference internal" href="#styling-with-class-arguments" id="toc-entry-48"><span class="sectnum">4.2</span> Styling with class arguments</a></p> +<li><p><a class="reference internal" href="#field-list-handling" id="toc-entry-48"><span class="sectnum">4.1</span> Field list handling</a></p></li> +<li><p><a class="reference internal" href="#styling-with-class-arguments" id="toc-entry-49"><span class="sectnum">4.2</span> Styling with class arguments</a></p> <ul class="auto-toc"> -<li><p><a class="reference internal" href="#description-lists" id="toc-entry-49"><span class="sectnum">4.2.1</span> Description lists</a></p></li> -<li><p><a class="reference internal" href="#field-list-variants" id="toc-entry-50"><span class="sectnum">4.2.2</span> Field list variants</a></p></li> -<li><p><a class="reference internal" href="#table-variants" id="toc-entry-51"><span class="sectnum">4.2.3</span> Table variants</a></p></li> +<li><p><a class="reference internal" href="#description-lists" id="toc-entry-50"><span class="sectnum">4.2.1</span> Description lists</a></p></li> +<li><p><a class="reference internal" href="#field-list-variants" id="toc-entry-51"><span class="sectnum">4.2.2</span> Field list variants</a></p></li> +<li><p><a class="reference internal" href="#table-variants" id="toc-entry-52"><span class="sectnum">4.2.3</span> Table variants</a></p></li> </ul> </li> </ul> </li> -<li><p><a class="reference internal" href="#error-handling" id="toc-entry-52"><span class="sectnum">5</span> Error Handling</a></p></li> +<li><p><a class="reference internal" href="#error-handling" id="toc-entry-53"><span class="sectnum">5</span> Error Handling</a></p></li> </ul> </div> <section id="structural-elements"> @@ -544,28 +545,29 @@ this: <a href="#system-message-5"><span class="problematic" id="problematic-3">` <h2><a class="toc-backref" href="#toc-entry-22"><span class="sectnum">2.14</span> Directives</a></h2> <div class="contents local topic" id="contents"> <ul class="auto-toc simple"> -<li><p><a class="reference internal" href="#document-parts" id="toc-entry-53"><span class="sectnum">2.14.1</span> Document Parts</a></p></li> -<li><p><a class="reference internal" href="#images-and-figures" id="toc-entry-54"><span class="sectnum">2.14.2</span> Images and Figures</a></p></li> -<li><p><a class="reference internal" href="#admonitions" id="toc-entry-55"><span class="sectnum">2.14.3</span> Admonitions</a></p></li> -<li><p><a class="reference internal" href="#topics-sidebars-and-rubrics" id="toc-entry-56"><span class="sectnum">2.14.4</span> Topics, Sidebars, and Rubrics</a></p></li> -<li><p><a class="reference internal" href="#target-footnotes" id="toc-entry-57"><span class="sectnum">2.14.5</span> Target Footnotes</a></p></li> -<li><p><a class="reference internal" href="#replacement-text" id="toc-entry-58"><span class="sectnum">2.14.6</span> Replacement Text</a></p></li> -<li><p><a class="reference internal" href="#compound-paragraph" id="toc-entry-59"><span class="sectnum">2.14.7</span> Compound Paragraph</a></p></li> -<li><p><a class="reference internal" href="#parsed-literal-blocks" id="toc-entry-60"><span class="sectnum">2.14.8</span> Parsed Literal Blocks</a></p></li> -<li><p><a class="reference internal" href="#code" id="toc-entry-61"><span class="sectnum">2.14.9</span> Code</a></p></li> +<li><p><a class="reference internal" href="#document-parts" id="toc-entry-54"><span class="sectnum">2.14.1</span> Document Parts</a></p></li> +<li><p><a class="reference internal" href="#images-and-figures" id="toc-entry-55"><span class="sectnum">2.14.2</span> Images and Figures</a></p></li> +<li><p><a class="reference internal" href="#tables" id="toc-entry-56"><span class="sectnum">2.14.3</span> Tables</a></p></li> +<li><p><a class="reference internal" href="#admonitions" id="toc-entry-57"><span class="sectnum">2.14.4</span> Admonitions</a></p></li> +<li><p><a class="reference internal" href="#topics-sidebars-and-rubrics" id="toc-entry-58"><span class="sectnum">2.14.5</span> Topics, Sidebars, and Rubrics</a></p></li> +<li><p><a class="reference internal" href="#target-footnotes" id="toc-entry-59"><span class="sectnum">2.14.6</span> Target Footnotes</a></p></li> +<li><p><a class="reference internal" href="#replacement-text" id="toc-entry-60"><span class="sectnum">2.14.7</span> Replacement Text</a></p></li> +<li><p><a class="reference internal" href="#compound-paragraph" id="toc-entry-61"><span class="sectnum">2.14.8</span> Compound Paragraph</a></p></li> +<li><p><a class="reference internal" href="#parsed-literal-blocks" id="toc-entry-62"><span class="sectnum">2.14.9</span> Parsed Literal Blocks</a></p></li> +<li><p><a class="reference internal" href="#code" id="toc-entry-63"><span class="sectnum">2.14.10</span> Code</a></p></li> </ul> </div> <p>These are just a sample of the many reStructuredText Directives. For others, please see <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> <section id="document-parts"> -<h3><a class="toc-backref" href="#toc-entry-53"><span class="sectnum">2.14.1</span> Document Parts</a></h3> +<h3><a class="toc-backref" href="#toc-entry-54"><span class="sectnum">2.14.1</span> Document Parts</a></h3> <p>An example of the "contents" directive can be seen above this section (a local, untitled table of <a class="reference internal" href="#contents">contents</a>) and at the beginning of the document (a document-wide <a class="reference internal" href="#table-of-contents">table of contents</a>).</p> </section> <section id="images-and-figures"> -<h3><a class="toc-backref" href="#toc-entry-54"><span class="sectnum">2.14.2</span> Images and Figures</a></h3> +<h3><a class="toc-backref" href="#toc-entry-55"><span class="sectnum">2.14.2</span> Images and Figures</a></h3> <p>An image directive (also clickable -- a hyperlink reference):</p> <p class="image-wrapper"><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></p> <p>Image with multiple IDs:</p> @@ -662,6 +664,9 @@ rendering software used.</p> </figure> <p>This paragraph might flow around the figure. The specific behavior depends upon the style sheet and the browser or rendering software used.</p> +</section> +<section id="tables"> +<h3><a class="toc-backref" href="#toc-entry-56"><span class="sectnum">2.14.3</span> Tables</a></h3> <p>Tables may be given titles and additional arguments with the <em>table</em> directive:</p> <table class="align-left"> @@ -755,7 +760,7 @@ writer/backend).</p> </table> </section> <section id="admonitions"> -<h3><a class="toc-backref" href="#toc-entry-55"><span class="sectnum">2.14.3</span> Admonitions</a></h3> +<h3><a class="toc-backref" href="#toc-entry-57"><span class="sectnum">2.14.4</span> Admonitions</a></h3> <div class="admonition attention"> <p class="admonition-title">Attention!</p> <p>Directives at large.</p> @@ -804,7 +809,7 @@ Reader discretion is strongly advised.</p> </div> </section> <section id="topics-sidebars-and-rubrics"> -<h3><a class="toc-backref" href="#toc-entry-56"><span class="sectnum">2.14.4</span> Topics, Sidebars, and Rubrics</a></h3> +<h3><a class="toc-backref" href="#toc-entry-58"><span class="sectnum">2.14.5</span> Topics, Sidebars, and Rubrics</a></h3> <p><em>Sidebars</em> are like miniature, parallel documents.</p> <aside class="sidebar"> <p class="sidebar-title">Sidebar Title</p> @@ -828,7 +833,7 @@ document's structure. It is typically highlighted in red (hence the name).</p> allowed (e.g. inside a directive).</p> </section> <section id="target-footnotes"> -<h3><a class="toc-backref" href="#toc-entry-57"><span class="sectnum">2.14.5</span> Target Footnotes</a></h3> +<h3><a class="toc-backref" href="#toc-entry-59"><span class="sectnum">2.14.6</span> Target Footnotes</a></h3> <dl class="footnote brackets"> <dt class="label" id="footnote-7"><span class="brackets">7</span><span class="fn-backref">(<a href="#footnote-reference-18">1</a>,<a href="#footnote-reference-19">2</a>,<a href="#footnote-reference-20">3</a>,<a href="#footnote-reference-25">4</a>)</span></dt> <dd><p><a class="reference external" href="http://www.python.org/">http://www.python.org/</a></p> @@ -857,11 +862,11 @@ allowed (e.g. inside a directive).</p> </dl> </section> <section id="replacement-text"> -<h3><a class="toc-backref" href="#toc-entry-58"><span class="sectnum">2.14.6</span> Replacement Text</a></h3> +<h3><a class="toc-backref" href="#toc-entry-60"><span class="sectnum">2.14.7</span> Replacement Text</a></h3> <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 brackets" href="#footnote-7" id="footnote-reference-20">7</a>.</p> </section> <section id="compound-paragraph"> -<h3><a class="toc-backref" href="#toc-entry-59"><span class="sectnum">2.14.7</span> Compound Paragraph</a></h3> +<h3><a class="toc-backref" href="#toc-entry-61"><span class="sectnum">2.14.8</span> Compound Paragraph</a></h3> <p>The <em>compound</em> directive is used to create a "compound paragraph", which is a single logical paragraph containing multiple physical body elements. For example:</p> @@ -972,7 +977,7 @@ by</p> </div> </section> <section id="parsed-literal-blocks"> -<h3><a class="toc-backref" href="#toc-entry-60"><span class="sectnum">2.14.8</span> Parsed Literal Blocks</a></h3> +<h3><a class="toc-backref" href="#toc-entry-62"><span class="sectnum">2.14.9</span> Parsed Literal Blocks</a></h3> <pre class="literal-block">This is a parsed literal block. This line is indented. The next line is blank. @@ -982,7 +987,7 @@ inline formulas: <span class="formula"><i>A</i> = 2<i>π</i><i>r</i><sup>2</ footnotes <a class="footnote-reference brackets" href="#footnote-1" id="footnote-reference-9">1</a>, <span class="target" id="hyperlink-targets">hyperlink targets</span>, and <a class="reference external" href="http://www.python.org/">references</a>.</pre> </section> <section id="code"> -<h3><a class="toc-backref" href="#toc-entry-61"><span class="sectnum">2.14.9</span> Code</a></h3> +<h3><a class="toc-backref" href="#toc-entry-63"><span class="sectnum">2.14.10</span> Code</a></h3> <p>Blocks of source code can be set with the <cite>code</cite> directive. If the code language is specified, the content is parsed and tagged by the <a class="reference external" href="http://pygments.org/">Pygments</a> <a class="footnote-reference brackets" href="#footnote-8" id="footnote-reference-21">8</a> syntax highlighter and can be formatted with a style sheet. (Code parsing @@ -1008,13 +1013,13 @@ as a code block, here the rst file <span class="docutils literal">header_footer. </section> </section> <section id="substitution-definitions"> -<h2><a class="toc-backref" href="#toc-entry-32"><span class="sectnum">2.15</span> Substitution Definitions</a></h2> +<h2><a class="toc-backref" href="#toc-entry-33"><span class="sectnum">2.15</span> 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> </section> <section id="comments"> -<h2><a class="toc-backref" href="#toc-entry-33"><span class="sectnum">2.16</span> Comments</a></h2> +<h2><a class="toc-backref" href="#toc-entry-34"><span class="sectnum">2.16</span> Comments</a></h2> <p>Here's one:</p> <!-- Comments begin with two dots and a space. Anything may follow, except for the syntax of footnotes, hyperlink @@ -1026,20 +1031,20 @@ Comments may contain non-ASCII characters: ä ö ü æ ø å --> <p>(View the HTML source to see the comment.)</p> </section> <section id="raw-text"> -<h2><a class="toc-backref" href="#toc-entry-34"><span class="sectnum">2.17</span> Raw text</a></h2> +<h2><a class="toc-backref" href="#toc-entry-35"><span class="sectnum">2.17</span> Raw text</a></h2> <p>This does not necessarily look nice, because there may be missing white space.</p> <p>It's just there to freeze the behavior.</p> 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> Fifth test in HTML.<br />Line two.</section> <section id="container"> -<h2><a class="toc-backref" href="#toc-entry-35"><span class="sectnum">2.18</span> Container</a></h2> +<h2><a class="toc-backref" href="#toc-entry-36"><span class="sectnum">2.18</span> Container</a></h2> <div class="custom docutils container"> <p>paragraph 1</p> <p>paragraph 2</p> </div> </section> <section id="colspanning-tables"> -<h2><a class="toc-backref" href="#toc-entry-36"><span class="sectnum">2.19</span> Colspanning tables</a></h2> +<h2><a class="toc-backref" href="#toc-entry-37"><span class="sectnum">2.19</span> Colspanning tables</a></h2> <p>This table has a cell spanning two columns:</p> <table> <colgroup> @@ -1077,7 +1082,7 @@ Fifth test in HTML.<br />Line two.</section> </table> </section> <section id="rowspanning-tables"> -<h2><a class="toc-backref" href="#toc-entry-37"><span class="sectnum">2.20</span> Rowspanning tables</a></h2> +<h2><a class="toc-backref" href="#toc-entry-38"><span class="sectnum">2.20</span> Rowspanning tables</a></h2> <p>Here's a table with cells spanning several rows:</p> <table> <colgroup> @@ -1110,7 +1115,7 @@ cell.</p></td> </table> </section> <section id="complex-tables"> -<h2><a class="toc-backref" href="#toc-entry-38"><span class="sectnum">2.21</span> Complex tables</a></h2> +<h2><a class="toc-backref" href="#toc-entry-39"><span class="sectnum">2.21</span> Complex tables</a></h2> <p>Here's a complex table, which should test all features.</p> <table> <colgroup> @@ -1159,7 +1164,7 @@ empty: <span class="docutils literal"><span class="pre">--></span></span></p> </table> </section> <section id="list-tables"> -<h2><a class="toc-backref" href="#toc-entry-39"><span class="sectnum">2.22</span> List Tables</a></h2> +<h2><a class="toc-backref" href="#toc-entry-40"><span class="sectnum">2.22</span> List Tables</a></h2> <p>Here's a list table exercising all features:</p> <table class="colwidths-given test" style="width: 40em"> <caption>list table with integral header</caption> @@ -1206,7 +1211,7 @@ crunchy, now would it?</p></td> </table> </section> <section id="custom-roles"> -<h2><a class="toc-backref" href="#toc-entry-40"><span class="sectnum">2.23</span> Custom Roles</a></h2> +<h2><a class="toc-backref" href="#toc-entry-41"><span class="sectnum">2.23</span> Custom Roles</a></h2> <ul> <li><p>A role based on an existing role.</p> <p><span class="custom docutils literal">one</span> <span class="custom docutils literal">two</span> <span class="custom docutils literal">three</span></p> @@ -1235,9 +1240,9 @@ crunchy, now would it?</p></td> </section> </section> <section id="html-specific"> -<h1><a class="toc-backref" href="#toc-entry-41"><span class="sectnum">3</span> HTML specific</a></h1> +<h1><a class="toc-backref" href="#toc-entry-42"><span class="sectnum">3</span> HTML specific</a></h1> <section id="svg-images"> -<h2><a class="toc-backref" href="#toc-entry-42"><span class="sectnum">3.1</span> SVG Images</a></h2> +<h2><a class="toc-backref" href="#toc-entry-43"><span class="sectnum">3.1</span> SVG Images</a></h2> <p class="image-wrapper"><img alt="../../../docs/user/rst/images/biohazard.svg" class="align-left" src="../../../docs/user/rst/images/biohazard.svg" style="width: 48px; height: 48px;" /></p> <p>Scalable vector graphics (SVG) images are the only standards-compliable way to include vector graphics in HTML documents. However, they are not @@ -1324,7 +1329,7 @@ tags.</p> </blockquote> </section> <section id="swf-images"> -<h2><a class="toc-backref" href="#toc-entry-43"><span class="sectnum">3.2</span> SWF Images</a></h2> +<h2><a class="toc-backref" href="#toc-entry-44"><span class="sectnum">3.2</span> SWF Images</a></h2> <p>Shockwave Flash is an image/movie format that most modern web browsers support via a plugin. It is sometimes blocked due to privacy/security concerns.</p> @@ -1335,7 +1340,7 @@ For complete control over display options use raw HTML.</p> <p>An inline SWF image <object data="../../../docs/user/rst/images/biohazard.swf" style="width: 0.8em; height: 0.8em;" type="application/x-shockwave-flash">inline-swf</object> scaled to 0.8 em x 0.8 em.</p> </section> <section id="text-level-semantics"> -<h2><a class="toc-backref" href="#toc-entry-44"><span class="sectnum">3.3</span> Text-level semantics</a></h2> +<h2><a class="toc-backref" href="#toc-entry-45"><span class="sectnum">3.3</span> Text-level semantics</a></h2> <p><a class="reference external" href="https://html.spec.whatwg.org/#text-level-semantics">HTML 5 tags for representation of text-level semantics</a> <a class="footnote-reference brackets" href="#footnote-13" id="footnote-reference-27">13</a> and their reStructuredText equivalents.</p> <dl class="narrow field-list"> @@ -1540,7 +1545,7 @@ a substitution.</p> </dl> </section> <section id="indicating-edits"> -<h2><a class="toc-backref" href="#toc-entry-45"><span class="sectnum">3.4</span> Indicating Edits</a></h2> +<h2><a class="toc-backref" href="#toc-entry-46"><span class="sectnum">3.4</span> Indicating Edits</a></h2> <p><a class="reference external" href="https://html.spec.whatwg.org/multipage/edits.html">HTML tags for representation of edits to the document</a> <a class="footnote-reference brackets" href="#footnote-14" id="footnote-reference-28">14</a> and their reStructuredText equivalents.</p> <dl class="field-list"> @@ -1576,7 +1581,7 @@ roles to make sense.</p> </section> </section> <section id="changes-to-the-html4css1-writer"> -<h1><a class="toc-backref" href="#toc-entry-46"><span class="sectnum">4</span> Changes to the html4css1 writer</a></h1> +<h1><a class="toc-backref" href="#toc-entry-47"><span class="sectnum">4</span> Changes to the html4css1 writer</a></h1> <ul class="simple"> <li><p>Use only meta keywords recognized by HTML 5.</p></li> <li><p>Set table column widths with <style="width: ...">, not "width" argument.</p></li> @@ -1587,7 +1592,7 @@ space.</p></li> <li><p>Put subtitles in <p> elements.</p></li> </ul> <section id="field-list-handling"> -<h2><a class="toc-backref" href="#toc-entry-47"><span class="sectnum">4.1</span> Field list handling</a></h2> +<h2><a class="toc-backref" href="#toc-entry-48"><span class="sectnum">4.1</span> Field list handling</a></h2> <p>The following list demonstrates the problems with the html4css1 approach: the <cite>field-name-limit</cite> setting is given in "number of characters" but the field name uses a proportional font.</p> @@ -1631,11 +1636,11 @@ example:</p> </dl> </section> <section id="styling-with-class-arguments"> -<h2><a class="toc-backref" href="#toc-entry-48"><span class="sectnum">4.2</span> Styling with class arguments</a></h2> +<h2><a class="toc-backref" href="#toc-entry-49"><span class="sectnum">4.2</span> Styling with class arguments</a></h2> <p>The <span class="docutils literal">plain.css</span> style sheet comes with some pre-defined style variants that can be choosen via a class argument.</p> <section id="description-lists"> -<h3><a class="toc-backref" href="#toc-entry-49"><span class="sectnum">4.2.1</span> Description lists</a></h3> +<h3><a class="toc-backref" href="#toc-entry-50"><span class="sectnum">4.2.1</span> Description lists</a></h3> <p>Definition lists with the "description" class argument:</p> <dl class="description simple"> <dt>description lists</dt> @@ -1651,7 +1656,7 @@ encyclopedias etc. (as well as the LaTeX <cite>description</cite> environment).< </dl> </section> <section id="field-list-variants"> -<h3><a class="toc-backref" href="#toc-entry-50"><span class="sectnum">4.2.2</span> Field list variants</a></h3> +<h3><a class="toc-backref" href="#toc-entry-51"><span class="sectnum">4.2.2</span> Field list variants</a></h3> <p>For field lists, the "compact/open", "narrow" and "run-in" styles are defined in the style sheet <span class="docutils literal">plain.css</span>.</p> <dl class="simple"> @@ -1718,7 +1723,7 @@ body is wrapped and aligns with other fields.</p> </dl> </section> <section id="table-variants"> -<h3><a class="toc-backref" href="#toc-entry-51"><span class="sectnum">4.2.3</span> Table variants</a></h3> +<h3><a class="toc-backref" href="#toc-entry-52"><span class="sectnum">4.2.3</span> Table variants</a></h3> <p>The following styles can be applied to individual tables via a class argument or as document wide setting with the <a class="reference external" href="http://docutils.sourceforge.net/docs/user/config.html#table-style">table-style</a> <a class="footnote-reference brackets" href="#footnote-10" id="footnote-reference-23">10</a> configuration setting (or command line argument).</p> @@ -1800,7 +1805,7 @@ from the <a class="reference external" href="http://tug.ctan.org/tex-archive/mac </section> </section> <section id="error-handling"> -<h1><a class="toc-backref" href="#toc-entry-52"><span class="sectnum">5</span> Error Handling</a></h1> +<h1><a class="toc-backref" href="#toc-entry-53"><span class="sectnum">5</span> Error Handling</a></h1> <p>Any errors caught during processing will generate system messages.</p> <p>There should be five messages in the following, auto-generated section, "Docutils System Messages":</p> diff --git a/docutils/test/functional/expected/standalone_rst_latex.tex b/docutils/test/functional/expected/standalone_rst_latex.tex index a39cf46c6..0c455097f 100644 --- a/docutils/test/functional/expected/standalone_rst_latex.tex +++ b/docutils/test/functional/expected/standalone_rst_latex.tex @@ -974,6 +974,11 @@ The legend may consist of several paragraphs. This paragraph might flow around the figure. The specific behavior depends upon the style sheet and the browser or rendering software used. + +\subsubsection{2.14.3 Tables% + \label{tables}% +} + Tables may be given titles and additional arguments with the \emph{table} directive: @@ -1116,7 +1121,7 @@ True & True & True \\ \label{target2}\label{target1} -\subsubsection{2.14.3 Admonitions% +\subsubsection{2.14.4 Admonitions% \label{admonitions}% } @@ -1190,7 +1195,7 @@ You can make up your own admonition too. } -\subsubsection{2.14.4 Topics, Sidebars, and Rubrics% +\subsubsection{2.14.5 Topics, Sidebars, and Rubrics% \label{topics-sidebars-and-rubrics}% } @@ -1230,7 +1235,7 @@ Topics and rubrics can be used at places where a \hyperref[section-title]{sectio allowed (e.g. inside a directive). -\subsubsection{2.14.5 Target Footnotes% +\subsubsection{2.14.6 Target Footnotes% \label{target-footnotes}% } % @@ -1255,14 +1260,14 @@ allowed (e.g. inside a directive). } -\subsubsection{2.14.6 Replacement Text% +\subsubsection{2.14.7 Replacement Text% \label{replacement-text}% } I recommend you try \href{http://www.python.org/}{Python, \emph{the} best language around}\DUfootnotemark{footnote-reference-12}{footnote-6}{5}. -\subsubsection{2.14.7 Compound Paragraph% +\subsubsection{2.14.8 Compound Paragraph% \label{compound-paragraph}% } @@ -1399,7 +1404,7 @@ and the final paragraph of the compound 7. \end{DUclass} -\subsubsection{2.14.8 Parsed Literal Blocks% +\subsubsection{2.14.9 Parsed Literal Blocks% \label{parsed-literal-blocks}% } @@ -1416,7 +1421,7 @@ footnotes\DUfootnotemark{footnote-reference-9}{footnote-1}{1},~% \end{quote} -\subsubsection{2.14.9 Code% +\subsubsection{2.14.10 Code% \label{code}% } diff --git a/docutils/test/functional/expected/standalone_rst_pseudoxml.txt b/docutils/test/functional/expected/standalone_rst_pseudoxml.txt index fcf23fedb..55f0e5099 100644 --- a/docutils/test/functional/expected/standalone_rst_pseudoxml.txt +++ b/docutils/test/functional/expected/standalone_rst_pseudoxml.txt @@ -242,97 +242,103 @@ Images and Figures <list_item> <paragraph> - <reference ids="toc-entry-25" refid="admonitions"> + <reference ids="toc-entry-25" refid="tables"> <generated classes="sectnum"> 2.14.3 - Admonitions + Tables <list_item> <paragraph> - <reference ids="toc-entry-26" refid="topics-sidebars-and-rubrics"> + <reference ids="toc-entry-26" refid="admonitions"> <generated classes="sectnum"> 2.14.4 - Topics, Sidebars, and Rubrics + Admonitions <list_item> <paragraph> - <reference ids="toc-entry-27" refid="target-footnotes"> + <reference ids="toc-entry-27" refid="topics-sidebars-and-rubrics"> <generated classes="sectnum"> 2.14.5 - Target Footnotes + Topics, Sidebars, and Rubrics <list_item> <paragraph> - <reference ids="toc-entry-28" refid="replacement-text"> + <reference ids="toc-entry-28" refid="target-footnotes"> <generated classes="sectnum"> 2.14.6 - Replacement Text + Target Footnotes <list_item> <paragraph> - <reference ids="toc-entry-29" refid="compound-paragraph"> + <reference ids="toc-entry-29" refid="replacement-text"> <generated classes="sectnum"> 2.14.7 - Compound Paragraph + Replacement Text <list_item> <paragraph> - <reference ids="toc-entry-30" refid="parsed-literal-blocks"> + <reference ids="toc-entry-30" refid="compound-paragraph"> <generated classes="sectnum"> 2.14.8 - Parsed Literal Blocks + Compound Paragraph <list_item> <paragraph> - <reference ids="toc-entry-31" refid="code"> + <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-32" refid="substitution-definitions"> + <reference ids="toc-entry-33" refid="substitution-definitions"> <generated classes="sectnum"> 2.15 Substitution Definitions <list_item> <paragraph> - <reference ids="toc-entry-33" refid="comments"> + <reference ids="toc-entry-34" refid="comments"> <generated classes="sectnum"> 2.16 Comments <list_item> <paragraph> - <reference ids="toc-entry-34" refid="raw-text"> + <reference ids="toc-entry-35" refid="raw-text"> <generated classes="sectnum"> 2.17 Raw text <list_item> <paragraph> - <reference ids="toc-entry-35" refid="container"> + <reference ids="toc-entry-36" refid="container"> <generated classes="sectnum"> 2.18 Container <list_item> <paragraph> - <reference ids="toc-entry-36" refid="colspanning-tables"> + <reference ids="toc-entry-37" refid="colspanning-tables"> <generated classes="sectnum"> 2.19 Colspanning tables <list_item> <paragraph> - <reference ids="toc-entry-37" refid="rowspanning-tables"> + <reference ids="toc-entry-38" refid="rowspanning-tables"> <generated classes="sectnum"> 2.20 Rowspanning tables <list_item> <paragraph> - <reference ids="toc-entry-38" refid="complex-tables"> + <reference ids="toc-entry-39" refid="complex-tables"> <generated classes="sectnum"> 2.21 Complex tables <list_item> <paragraph> - <reference ids="toc-entry-39" refid="list-tables"> + <reference ids="toc-entry-40" refid="list-tables"> <generated classes="sectnum"> 2.22 List Tables <list_item> <paragraph> - <reference ids="toc-entry-40" refid="error-handling"> + <reference ids="toc-entry-41" refid="error-handling"> <generated classes="sectnum"> 3 Error Handling @@ -1159,57 +1165,63 @@ <bullet_list classes="auto-toc"> <list_item> <paragraph> - <reference ids="toc-entry-41" refid="document-parts"> + <reference ids="toc-entry-42" refid="document-parts"> <generated classes="sectnum"> 2.14.1 Document Parts <list_item> <paragraph> - <reference ids="toc-entry-42" refid="images-and-figures"> + <reference ids="toc-entry-43" refid="images-and-figures"> <generated classes="sectnum"> 2.14.2 Images and Figures <list_item> <paragraph> - <reference ids="toc-entry-43" refid="admonitions"> + <reference ids="toc-entry-44" refid="tables"> <generated classes="sectnum"> 2.14.3 - Admonitions + Tables <list_item> <paragraph> - <reference ids="toc-entry-44" refid="topics-sidebars-and-rubrics"> + <reference ids="toc-entry-45" refid="admonitions"> <generated classes="sectnum"> 2.14.4 - Topics, Sidebars, and Rubrics + Admonitions <list_item> <paragraph> - <reference ids="toc-entry-45" refid="target-footnotes"> + <reference ids="toc-entry-46" refid="topics-sidebars-and-rubrics"> <generated classes="sectnum"> 2.14.5 - Target Footnotes + Topics, Sidebars, and Rubrics <list_item> <paragraph> - <reference ids="toc-entry-46" refid="replacement-text"> + <reference ids="toc-entry-47" refid="target-footnotes"> <generated classes="sectnum"> 2.14.6 - Replacement Text + Target Footnotes <list_item> <paragraph> - <reference ids="toc-entry-47" refid="compound-paragraph"> + <reference ids="toc-entry-48" refid="replacement-text"> <generated classes="sectnum"> 2.14.7 - Compound Paragraph + Replacement Text <list_item> <paragraph> - <reference ids="toc-entry-48" refid="parsed-literal-blocks"> + <reference ids="toc-entry-49" refid="compound-paragraph"> <generated classes="sectnum"> 2.14.8 - Parsed Literal Blocks + Compound Paragraph <list_item> <paragraph> - <reference ids="toc-entry-49" refid="code"> + <reference ids="toc-entry-50" refid="parsed-literal-blocks"> <generated classes="sectnum"> 2.14.9 + Parsed Literal Blocks + <list_item> + <paragraph> + <reference ids="toc-entry-51" refid="code"> + <generated classes="sectnum"> + 2.14.10 Code <paragraph> These are just a sample of the many reStructuredText Directives. For @@ -1218,7 +1230,7 @@ http://docutils.sourceforge.net/docs/ref/rst/directives.html . <section ids="document-parts" names="document\ parts"> - <title auto="1" refid="toc-entry-41"> + <title auto="1" refid="toc-entry-42"> <generated classes="sectnum"> 2.14.1 Document Parts @@ -1233,7 +1245,7 @@ table of contents ). <section ids="images-and-figures" names="images\ and\ figures"> - <title auto="1" refid="toc-entry-42"> + <title auto="1" refid="toc-entry-43"> <generated classes="sectnum"> 2.14.2 Images and Figures @@ -1369,6 +1381,11 @@ <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-44"> + <generated classes="sectnum"> + 2.14.3 + Tables <paragraph> Tables may be given titles and additional arguments with the <emphasis> @@ -1526,9 +1543,9 @@ <paragraph> True <section ids="admonitions" names="admonitions"> - <title auto="1" refid="toc-entry-43"> + <title auto="1" refid="toc-entry-45"> <generated classes="sectnum"> - 2.14.3 + 2.14.4 Admonitions <attention> <paragraph> @@ -1576,9 +1593,9 @@ You can make up your own admonition too. <target ids="docutils" names="docutils" refuri="http://docutils.sourceforge.net/"> <section ids="topics-sidebars-and-rubrics" names="topics,\ sidebars,\ and\ rubrics"> - <title auto="1" refid="toc-entry-44"> + <title auto="1" refid="toc-entry-46"> <generated classes="sectnum"> - 2.14.4 + 2.14.5 Topics, Sidebars, and Rubrics <paragraph> <emphasis> @@ -1623,9 +1640,9 @@ is not allowed (e.g. inside a directive). <section ids="target-footnotes" names="target\ footnotes"> - <title auto="1" refid="toc-entry-45"> + <title auto="1" refid="toc-entry-47"> <generated classes="sectnum"> - 2.14.5 + 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> @@ -1646,9 +1663,9 @@ <reference refuri="http://docutils.sourceforge.net/"> http://docutils.sourceforge.net/ <section ids="replacement-text" names="replacement\ text"> - <title auto="1" refid="toc-entry-46"> + <title auto="1" refid="toc-entry-48"> <generated classes="sectnum"> - 2.14.6 + 2.14.7 Replacement Text <paragraph> I recommend you try @@ -1667,9 +1684,9 @@ the best language around <section ids="compound-paragraph" names="compound\ paragraph"> - <title auto="1" refid="toc-entry-47"> + <title auto="1" refid="toc-entry-49"> <generated classes="sectnum"> - 2.14.7 + 2.14.8 Compound Paragraph <paragraph> The @@ -1822,9 +1839,9 @@ <paragraph> and the final paragraph of the compound 7. <section ids="parsed-literal-blocks" names="parsed\ literal\ blocks"> - <title auto="1" refid="toc-entry-48"> + <title auto="1" refid="toc-entry-50"> <generated classes="sectnum"> - 2.14.8 + 2.14.9 Parsed Literal Blocks <literal_block xml:space="preserve"> This is a parsed literal block. @@ -1863,9 +1880,9 @@ <target ids="references" names="references" refuri="http://www.python.org/"> . <section ids="code" names="code"> - <title auto="1" refid="toc-entry-49"> + <title auto="1" refid="toc-entry-51"> <generated classes="sectnum"> - 2.14.9 + 2.14.10 Code <paragraph> Blocks of source code can be set with the @@ -1941,7 +1958,7 @@ .. footer:: Document footer <target ids="pygments" names="pygments" refuri="http://pygments.org/"> <section ids="substitution-definitions" names="substitution\ definitions"> - <title auto="1" refid="toc-entry-32"> + <title auto="1" refid="toc-entry-33"> <generated classes="sectnum"> 2.15 Substitution Definitions @@ -1958,7 +1975,7 @@ <paragraph> (Substitution definitions are not visible in the HTML source.) <section ids="comments" names="comments"> - <title auto="1" refid="toc-entry-33"> + <title auto="1" refid="toc-entry-34"> <generated classes="sectnum"> 2.16 Comments @@ -1975,7 +1992,7 @@ <paragraph> (View the HTML source to see the comment.) <section ids="raw-text" names="raw\ text"> - <title auto="1" refid="toc-entry-34"> + <title auto="1" refid="toc-entry-35"> <generated classes="sectnum"> 2.17 Raw text @@ -1999,7 +2016,7 @@ <raw format="latex" xml:space="preserve"> Fifth test in LaTeX.\\Line two. <section ids="container" names="container"> - <title auto="1" refid="toc-entry-35"> + <title auto="1" refid="toc-entry-36"> <generated classes="sectnum"> 2.18 Container @@ -2009,7 +2026,7 @@ <paragraph> paragraph 2 <section ids="colspanning-tables" names="colspanning\ tables"> - <title auto="1" refid="toc-entry-36"> + <title auto="1" refid="toc-entry-37"> <generated classes="sectnum"> 2.19 Colspanning tables @@ -2080,7 +2097,7 @@ <paragraph> True <section ids="rowspanning-tables" names="rowspanning\ tables"> - <title auto="1" refid="toc-entry-37"> + <title auto="1" refid="toc-entry-38"> <generated classes="sectnum"> 2.20 Rowspanning tables @@ -2132,7 +2149,7 @@ <paragraph> body row 3 <section ids="complex-tables" names="complex\ tables"> - <title auto="1" refid="toc-entry-38"> + <title auto="1" refid="toc-entry-39"> <generated classes="sectnum"> 2.21 Complex tables @@ -2217,7 +2234,7 @@ --> <entry> <section ids="list-tables" names="list\ tables"> - <title auto="1" refid="toc-entry-39"> + <title auto="1" refid="toc-entry-40"> <generated classes="sectnum"> 2.22 List Tables @@ -2302,7 +2319,7 @@ <paragraph> 1.99 <section ids="error-handling" names="error\ handling"> - <title auto="1" refid="toc-entry-40"> + <title auto="1" refid="toc-entry-41"> <generated classes="sectnum"> 3 Error Handling @@ -2346,15 +2363,15 @@ <system_message level="1" line="476" source="functional/input/data/standard.txt" type="INFO"> <paragraph> Hyperlink target "image-target-3" is not referenced. - <system_message level="1" line="640" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="643" source="functional/input/data/standard.txt" type="INFO"> <paragraph> Hyperlink target "target1" is not referenced. - <system_message level="1" line="641" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="644" source="functional/input/data/standard.txt" type="INFO"> <paragraph> Hyperlink target "target2" is not referenced. - <system_message level="1" line="686" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="689" source="functional/input/data/standard.txt" type="INFO"> <paragraph> Hyperlink target "docutils" is not referenced. - <system_message level="1" line="852" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="855" source="functional/input/data/standard.txt" type="INFO"> <paragraph> Hyperlink target "hyperlink targets" is not referenced. diff --git a/docutils/test/functional/expected/standalone_rst_xetex.tex b/docutils/test/functional/expected/standalone_rst_xetex.tex index b23c81fa5..c02b9c7aa 100644 --- a/docutils/test/functional/expected/standalone_rst_xetex.tex +++ b/docutils/test/functional/expected/standalone_rst_xetex.tex @@ -976,6 +976,11 @@ The legend may consist of several paragraphs. This paragraph might flow around the figure. The specific behavior depends upon the style sheet and the browser or rendering software used. + +\subsubsection{2.14.3 Tables% + \label{tables}% +} + Tables may be given titles and additional arguments with the \emph{table} directive: @@ -1118,7 +1123,7 @@ True & True & True \\ \label{target2}\label{target1} -\subsubsection{2.14.3 Admonitions% +\subsubsection{2.14.4 Admonitions% \label{admonitions}% } @@ -1192,7 +1197,7 @@ You can make up your own admonition too. } -\subsubsection{2.14.4 Topics, Sidebars, and Rubrics% +\subsubsection{2.14.5 Topics, Sidebars, and Rubrics% \label{topics-sidebars-and-rubrics}% } @@ -1232,7 +1237,7 @@ Topics and rubrics can be used at places where a \hyperref[section-title]{sectio allowed (e.g. inside a directive). -\subsubsection{2.14.5 Target Footnotes% +\subsubsection{2.14.6 Target Footnotes% \label{target-footnotes}% } % @@ -1261,14 +1266,14 @@ allowed (e.g. inside a directive). } -\subsubsection{2.14.6 Replacement Text% +\subsubsection{2.14.7 Replacement Text% \label{replacement-text}% } I recommend you try \href{http://www.python.org/}{Python, \emph{the} best language around}\DUfootnotemark{footnote-reference-12}{footnote-6}{5}. -\subsubsection{2.14.7 Compound Paragraph% +\subsubsection{2.14.8 Compound Paragraph% \label{compound-paragraph}% } @@ -1405,7 +1410,7 @@ and the final paragraph of the compound 7. \end{DUclass} -\subsubsection{2.14.8 Parsed Literal Blocks% +\subsubsection{2.14.9 Parsed Literal Blocks% \label{parsed-literal-blocks}% } @@ -1422,7 +1427,7 @@ footnotes\DUfootnotemark{footnote-reference-9}{footnote-1}{1},~% \end{quote} -\subsubsection{2.14.9 Code% +\subsubsection{2.14.10 Code% \label{code}% } diff --git a/docutils/test/functional/input/data/standard.txt b/docutils/test/functional/input/data/standard.txt index 8bd1d99f0..3d2844955 100644 --- a/docutils/test/functional/input/data/standard.txt +++ b/docutils/test/functional/input/data/standard.txt @@ -598,6 +598,9 @@ This paragraph might flow around the figure. The specific behavior depends upon the style sheet and the browser or rendering software used. +Tables +`````` + Tables may be given titles and additional arguments with the *table* directive: |
