diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2021-02-23 12:47:48 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2021-02-23 12:47:48 +0000 |
| commit | b44148d9c152dec06b387f9c0930054e5f70192b (patch) | |
| tree | e92ccf5e055021e967be363d51111220b8b49a0e | |
| parent | ead4c2e9f99f0de34780d1e97707aaa6d6b4222f (diff) | |
| download | docutils-b44148d9c152dec06b387f9c0930054e5f70192b.tar.gz | |
Update functional test sample.
Update some links.
Describe "meta" directive.
Don't use too wide images and tables
to allow adaption to small screens (mobile).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8627 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
11 files changed, 779 insertions, 724 deletions
diff --git a/docutils/test/functional/expected/latex_memoir.tex b/docutils/test/functional/expected/latex_memoir.tex index 60d64eeaf..bdf49ec53 100644 --- a/docutils/test/functional/expected/latex_memoir.tex +++ b/docutils/test/functional/expected/latex_memoir.tex @@ -337,8 +337,8 @@ Paragraphs contain text and may contain inline markup: \emph{emphasis}, (\url{http://www.python.org}), external hyperlinks (\href{http://www.python.org/}{Python}\DUfootnotemark{footnote-reference-10}{footnote-6}{5}), internal cross-references (\hyperref[example]{example}), external hyperlinks with embedded URIs (\href{http://www.python.org}{Python web site}), \href{http://www.python.org/}{anonymous hyperlink -references}\DUfootnotemark{footnote-reference-16}{footnote-6}{5} (\href{http://docutils.sourceforge.net/}{a second reference}\DUfootnotemark{footnote-reference-17}{footnote-9}{8}), footnote references (manually -numbered\DUfootnotemark{footnote-reference-1}{footnote-1}{1}, anonymous auto-numbered\DUfootnotemark{footnote-reference-2}{footnote-2}{3}, labeled auto-numbered\DUfootnotemark{footnote-reference-3}{label}{2}, or symbolic\DUfootnotemark{footnote-reference-4}{footnote-3}{*}), citation references (\hyperlink{cit2002}{[CIT2002]}), +references}\DUfootnotemark{footnote-reference-16}{footnote-6}{5} (\href{https://docutils.sourceforge.io/}{a second reference}\DUfootnotemark{footnote-reference-17}{footnote-9}{8}), footnote references (manually +numbered\DUfootnotemark{footnote-reference-1}{footnote-1}{1}, anonymous auto-numbered\DUfootnotemark{footnote-reference-2}{footnote-2}{3}, labeled auto-numbered\DUfootnotemark{footnote-reference-3}{label}{2}, or symbolic\DUfootnotemark{footnote-reference-4}{footnote-3}{*}), citation references (see \hyperlink{cit2002}{[CIT2002]}), substitution references (\includegraphics{../../../docs/user/rst/images/biohazard.png} \& a \emph{trimmed heart} \texttt{(U+2665):}\ding{170}), and % \phantomsection\label{inline-hyperlink-targets}inline hyperlink targets @@ -810,8 +810,7 @@ this: % \phantomsection\label{contents} These are just a sample of the many reStructuredText Directives. For -others, please see -\url{http://docutils.sourceforge.net/docs/ref/rst/directives.html}. +others, please see \href{https://docutils.sourceforge.io/docs/ref/rst/directives.html}{reStructuredText Directives}\DUfootnotemark{footnote-reference-18}{footnote-10}{9}. \subsection{2.14.1 Document Parts% @@ -829,11 +828,11 @@ document (a document-wide \hyperref[table-of-contents]{table of contents}). An image directive (also clickable -{}- a hyperlink reference): -\hyperref[directives]{\includegraphics{../../../docs/user/rst/images/title.png}} +\hyperref[directives]{\includegraphics[width=0.700\linewidth]{../../../docs/user/rst/images/title.png}} Image with multiple IDs: -\includegraphics{../../../docs/user/rst/images/title.png} +\includegraphics{../../../docs/user/rst/images/biohazard.png} \phantomsection\label{image-target-3}\label{image-target-2}\label{image-target-1} A centered image: @@ -864,18 +863,15 @@ An image 2 em wide: \includegraphics[width=2em]{../../../docs/user/rst/images/biohazard.png} -An image 2 em wide and 15 pixel high: +An image 2 cm wide and 15 pixel high: -\includegraphics[height=15px,width=2em]{../../../docs/user/rst/images/biohazard.png} +\includegraphics[height=15px,width=2cm]{../../../docs/user/rst/images/biohazard.png} +Relative units allow adaption of the image to the screen or paper size. An image occupying 50\% of the line width: \includegraphics[width=0.500\linewidth]{../../../docs/user/rst/images/title.png} -An image 2 cm high: - -\includegraphics[height=2cm]{../../../docs/user/rst/images/biohazard.png} - A \emph{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. @@ -1246,10 +1242,18 @@ allowed (e.g. inside a directive). } % \DUfootnotetext{footnote-9}{footnote-reference-17}{8}{% -\url{http://docutils.sourceforge.net/} +\url{https://docutils.sourceforge.io/} } % \DUfootnotetext{footnote-10}{footnote-reference-18}{9}{% +\url{https://docutils.sourceforge.io/docs/ref/rst/directives.html} +} +% +\DUfootnotetext{footnote-11}{footnote-reference-19}{10}{% +\url{https://docutils.sourceforge.io/docs/ref/rst/directives.html\#metadata} +} +% +\DUfootnotetext{footnote-12}{footnote-reference-20}{11}{% \url{A:DOS\\path\\} } @@ -1472,6 +1476,14 @@ as a code block, here the rst file \texttt{header\_footer.txt} with line numbers \end{DUclass} +\subsection{2.14.11 Meta% + \label{meta}% +} + +The \href{https://docutils.sourceforge.io/docs/ref/rst/directives.html\#metadata}{“meta” directive}\DUfootnotemark{footnote-reference-19}{footnote-11}{10} is used to specify metadata to be stored in, +e.g., HTML META tags or ODT file properties. + + \section{2.15 Substitution Definitions% \label{substitution-definitions}% } @@ -1677,8 +1689,8 @@ body row 3 Here's a list table exercising all features: \begin{DUclass}{test} -\setlength{\DUtablewidth}{40em}% -\begin{longtable}{|p{0.133\DUtablewidth}|p{0.249\DUtablewidth}|p{0.365\DUtablewidth}|} +\setlength{\DUtablewidth}{0.950\linewidth}% +\begin{longtable}{|p{0.133\DUtablewidth}|p{0.110\DUtablewidth}|p{0.249\DUtablewidth}|} \caption{list table with integral header}\\ \hline \textbf{% @@ -2750,7 +2762,7 @@ Handling by the LaTeX writer: \url{http://www.w3.org/XML/Schema\#dev} \item[] \href{http://www.w3.org/XML/Schema\%dev}{URL with \%} \url{http://example.org/Schema\%dev} -\item[] \href{A:DOS\\path\\}{file with DOS path}\DUfootnotemark{footnote-reference-18}{footnote-10}{9} \url{A:DOS\\path\\}\DUfootnotemark{footnote-reference-19}{footnote-10}{9} +\item[] \href{A:DOS\\path\\}{file with DOS path}\DUfootnotemark{footnote-reference-20}{footnote-12}{11} \url{A:DOS\\path\\}\DUfootnotemark{footnote-reference-21}{footnote-12}{11} \end{DUlineblock} \DUadmonition[note]{ @@ -2761,7 +2773,7 @@ These URLs are typeset inside a LaTeX command without error. \begin{DUlineblock}{0em} \item[] \url{http://www.w3.org/XML/Schema\#dev} \item[] \url{http://example.org/Schema\%dev} -\item[] \url{A:DOS\\path\\}\DUfootnotemark{footnote-reference-20}{footnote-10}{9} +\item[] \url{A:DOS\\path\\}\DUfootnotemark{footnote-reference-22}{footnote-12}{11} \end{DUlineblock} } \end{itemize} @@ -2866,7 +2878,7 @@ section, \textquotedbl{}Docutils System Messages\textquotedbl{}: \DUtitle[system-message]{system-message \raisebox{1em}{\hypertarget{system-message-1}{}}} -{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~104 +{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~99 \hyperlink{problematic-1}{ Undefined substitution referenced: \textquotedbl{}problematic\textquotedbl{}. @@ -2876,7 +2888,7 @@ Undefined substitution referenced: \textquotedbl{}problematic\textquotedbl{}. \DUtitle[system-message]{system-message \raisebox{1em}{\hypertarget{system-message-2}{}}} -{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~392 +{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~387 \hyperlink{footnote-reference-8}{ Unknown target name: \textquotedbl{}5\textquotedbl{}. @@ -2886,7 +2898,7 @@ Unknown target name: \textquotedbl{}5\textquotedbl{}. \DUtitle[system-message]{system-message \raisebox{1em}{\hypertarget{system-message-3}{}}} -{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~401 +{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~396 \hyperlink{citation-reference-3}{ Unknown target name: \textquotedbl{}nonexistent\textquotedbl{}. @@ -2896,7 +2908,7 @@ Unknown target name: \textquotedbl{}nonexistent\textquotedbl{}. \DUtitle[system-message]{system-message \raisebox{1em}{\hypertarget{system-message-4}{}}} -{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~428 +{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~423 \hyperlink{problematic-2}{ Unknown target name: \textquotedbl{}hyperlink reference without a target\textquotedbl{}. @@ -2906,7 +2918,7 @@ Unknown target name: \textquotedbl{}hyperlink reference without a target\textquo \DUtitle[system-message]{system-message \raisebox{1em}{\hypertarget{system-message-5}{}}} -{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~441 +{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~436 \hyperlink{problematic-3}{ Duplicate target name, cannot be used as a unique reference: \textquotedbl{}duplicate target names\textquotedbl{}. diff --git a/docutils/test/functional/expected/standalone_rst_docutils_xml.xml b/docutils/test/functional/expected/standalone_rst_docutils_xml.xml index 3bdcf361c..ee874410d 100644 --- a/docutils/test/functional/expected/standalone_rst_docutils_xml.xml +++ b/docutils/test/functional/expected/standalone_rst_docutils_xml.xml @@ -171,36 +171,39 @@ They are transformed from section titles after parsing.</comment> <list_item> <paragraph><reference ids="toc-entry-32" refid="code"><generated classes="sectnum">2.14.10 </generated>Code</reference></paragraph> </list_item> + <list_item> + <paragraph><reference ids="toc-entry-33" refid="meta"><generated classes="sectnum">2.14.11 </generated>Meta</reference></paragraph> + </list_item> </bullet_list> </list_item> <list_item> - <paragraph><reference ids="toc-entry-33" refid="substitution-definitions"><generated classes="sectnum">2.15 </generated>Substitution Definitions</reference></paragraph> + <paragraph><reference ids="toc-entry-34" refid="substitution-definitions"><generated classes="sectnum">2.15 </generated>Substitution Definitions</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-34" refid="comments"><generated classes="sectnum">2.16 </generated>Comments</reference></paragraph> + <paragraph><reference ids="toc-entry-35" refid="comments"><generated classes="sectnum">2.16 </generated>Comments</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-35" refid="raw-text"><generated classes="sectnum">2.17 </generated>Raw text</reference></paragraph> + <paragraph><reference ids="toc-entry-36" refid="raw-text"><generated classes="sectnum">2.17 </generated>Raw text</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-36" refid="container"><generated classes="sectnum">2.18 </generated>Container</reference></paragraph> + <paragraph><reference ids="toc-entry-37" refid="container"><generated classes="sectnum">2.18 </generated>Container</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-37" refid="colspanning-tables"><generated classes="sectnum">2.19 </generated>Colspanning tables</reference></paragraph> + <paragraph><reference ids="toc-entry-38" refid="colspanning-tables"><generated classes="sectnum">2.19 </generated>Colspanning tables</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-38" refid="rowspanning-tables"><generated classes="sectnum">2.20 </generated>Rowspanning tables</reference></paragraph> + <paragraph><reference ids="toc-entry-39" refid="rowspanning-tables"><generated classes="sectnum">2.20 </generated>Rowspanning tables</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-39" refid="complex-tables"><generated classes="sectnum">2.21 </generated>Complex tables</reference></paragraph> + <paragraph><reference ids="toc-entry-40" refid="complex-tables"><generated classes="sectnum">2.21 </generated>Complex tables</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-40" refid="list-tables"><generated classes="sectnum">2.22 </generated>List Tables</reference></paragraph> + <paragraph><reference ids="toc-entry-41" 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-41" refid="error-handling"><generated classes="sectnum">3 </generated>Error Handling</reference></paragraph> + <paragraph><reference ids="toc-entry-42" refid="error-handling"><generated classes="sectnum">3 </generated>Error Handling</reference></paragraph> </list_item> </bullet_list> </topic> @@ -236,9 +239,9 @@ They are transformed from section titles after parsing.</comment> (<reference refuri="http://www.python.org">http://www.python.org</reference>), external hyperlinks (<reference name="Python" refuri="http://www.python.org/">Python</reference> <footnote_reference auto="1" ids="footnote-reference-10" refid="footnote-6">5</footnote_reference>), internal cross-references (<reference name="example" refid="example">example</reference>), external hyperlinks with embedded URIs (<reference name="Python web site" refuri="http://www.python.org">Python web site</reference>), <reference anonymous="1" name="anonymous hyperlink references" refuri="http://www.python.org/">anonymous hyperlink - references</reference> <footnote_reference auto="1" ids="footnote-reference-14" refid="footnote-6">5</footnote_reference> (<reference anonymous="1" name="a second reference" refuri="http://docutils.sourceforge.net/">a second reference</reference> <footnote_reference auto="1" ids="footnote-reference-15" refid="footnote-8">7</footnote_reference>), footnote references (manually + references</reference> <footnote_reference auto="1" ids="footnote-reference-14" refid="footnote-6">5</footnote_reference> (<reference anonymous="1" name="a second reference" refuri="https://docutils.sourceforge.io/">a second reference</reference> <footnote_reference auto="1" ids="footnote-reference-15" refid="footnote-8">7</footnote_reference>), footnote references (manually numbered <footnote_reference ids="footnote-reference-1" refid="footnote-1">1</footnote_reference>, anonymous auto-numbered <footnote_reference auto="1" ids="footnote-reference-2" refid="footnote-2">3</footnote_reference>, labeled auto-numbered - <footnote_reference auto="1" ids="footnote-reference-3" refid="label">2</footnote_reference>, or symbolic <footnote_reference auto="*" ids="footnote-reference-4" refid="footnote-3">*</footnote_reference>), citation references (<citation_reference ids="citation-reference-1" refid="cit2002">CIT2002</citation_reference>), + <footnote_reference auto="1" ids="footnote-reference-3" refid="label">2</footnote_reference>, or symbolic <footnote_reference auto="*" ids="footnote-reference-4" refid="footnote-3">*</footnote_reference>), citation references (see <citation_reference ids="citation-reference-1" refid="cit2002">CIT2002</citation_reference>), substitution references (<image alt="EXAMPLE" uri="../../../docs/user/rst/images/biohazard.png"></image> & a <emphasis>trimmed heart</emphasis> <literal>(U+2665):</literal>♥), and <target ids="inline-hyperlink-targets" names="inline\ hyperlink\ targets">inline hyperlink targets</target> (see <reference name="Targets" refid="targets">Targets</reference> below for a reference back to here). Character-level @@ -246,7 +249,7 @@ They are transformed from section titles after parsing.</comment> (generated by processing errors; this one is intentional). Here is a reference to the <reference name="doctitle" refid="doctitle">doctitle</reference> and the <reference name="subtitle" refid="subtitle">subtitle</reference>.</paragraph> <target anonymous="1" ids="target-1" refuri="http://www.python.org/"></target> - <target anonymous="1" ids="target-2" refuri="http://docutils.sourceforge.net/"></target> + <target anonymous="1" ids="target-2" refuri="https://docutils.sourceforge.io/"></target> <paragraph>The default role for interpreted text is <title_reference>Title Reference</title_reference>. Here are some explicit interpreted text roles: a PEP reference (<reference refuri="http://www.python.org/dev/peps/pep-0287">PEP 287</reference>); an RFC reference (<reference refuri="http://tools.ietf.org/html/rfc2822.html">RFC 2822</reference>); an abbreviation (<abbreviation>abb.</abbreviation>), an acronym @@ -742,7 +745,7 @@ Python-specific usage examples; begun with ">>>" </section> <section dupnames="duplicate\ target\ names" ids="duplicate-target-names-1"> <title auto="1" refid="toc-entry-21"><generated classes="sectnum">2.13.2 </generated>Duplicate Target Names</title> - <system_message backrefs="duplicate-target-names-1" level="1" line="439" source="functional/input/data/standard.txt" type="INFO"> + <system_message backrefs="duplicate-target-names-1" level="1" line="434" source="functional/input/data/standard.txt" type="INFO"> <paragraph>Duplicate implicit target name: "duplicate target names".</paragraph> </system_message> <paragraph>Since there are two "Duplicate Target Names" section headers, we @@ -755,55 +758,58 @@ 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-42" refid="document-parts"><generated classes="sectnum">2.14.1 </generated>Document Parts</reference></paragraph> + <paragraph><reference ids="toc-entry-43" refid="document-parts"><generated classes="sectnum">2.14.1 </generated>Document Parts</reference></paragraph> + </list_item> + <list_item> + <paragraph><reference ids="toc-entry-44" 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="images-and-figures"><generated classes="sectnum">2.14.2 </generated>Images and Figures</reference></paragraph> + <paragraph><reference ids="toc-entry-45" refid="tables"><generated classes="sectnum">2.14.3 </generated>Tables</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-44" refid="tables"><generated classes="sectnum">2.14.3 </generated>Tables</reference></paragraph> + <paragraph><reference ids="toc-entry-46" refid="admonitions"><generated classes="sectnum">2.14.4 </generated>Admonitions</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-45" refid="admonitions"><generated classes="sectnum">2.14.4 </generated>Admonitions</reference></paragraph> + <paragraph><reference ids="toc-entry-47" 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="topics-sidebars-and-rubrics"><generated classes="sectnum">2.14.5 </generated>Topics, Sidebars, and Rubrics</reference></paragraph> + <paragraph><reference ids="toc-entry-48" 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="target-footnotes"><generated classes="sectnum">2.14.6 </generated>Target Footnotes</reference></paragraph> + <paragraph><reference ids="toc-entry-49" 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="replacement-text"><generated classes="sectnum">2.14.7 </generated>Replacement Text</reference></paragraph> + <paragraph><reference ids="toc-entry-50" 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="compound-paragraph"><generated classes="sectnum">2.14.8 </generated>Compound Paragraph</reference></paragraph> + <paragraph><reference ids="toc-entry-51" 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-50" refid="parsed-literal-blocks"><generated classes="sectnum">2.14.9 </generated>Parsed Literal Blocks</reference></paragraph> + <paragraph><reference ids="toc-entry-52" refid="code"><generated classes="sectnum">2.14.10 </generated>Code</reference></paragraph> </list_item> <list_item> - <paragraph><reference ids="toc-entry-51" refid="code"><generated classes="sectnum">2.14.10 </generated>Code</reference></paragraph> + <paragraph><reference ids="toc-entry-53" refid="meta"><generated classes="sectnum">2.14.11 </generated>Meta</reference></paragraph> </list_item> </bullet_list> </topic> <paragraph>These are just a sample of the many reStructuredText Directives. For - 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> + others, please see <reference anonymous="1" name="reStructuredText Directives" refuri="https://docutils.sourceforge.io/docs/ref/rst/directives.html">reStructuredText Directives</reference> <footnote_reference auto="1" ids="footnote-reference-16" refid="footnote-9">8</footnote_reference>.</paragraph> + <target anonymous="1" ids="target-5" refuri="https://docutils.sourceforge.io/docs/ref/rst/directives.html"></target> <section ids="document-parts" names="document\ parts"> - <title auto="1" refid="toc-entry-42"><generated classes="sectnum">2.14.1 </generated>Document Parts</title> + <title auto="1" refid="toc-entry-43"><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-43"><generated classes="sectnum">2.14.2 </generated>Images and Figures</title> + <title auto="1" refid="toc-entry-44"><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> + <reference name="directives" refid="directives"><image classes="class1 class2" uri="../../../docs/user/rst/images/title.png" width="70%"></image></reference> <paragraph>Image with multiple IDs:</paragraph> <target refid="image-target-1"></target> <target refid="image-target-2"></target> <target refid="image-target-3"></target> - <image ids="image-target-3 image-target-2 image-target-1" names="image\ target\ 3 image\ target\ 2 image\ target\ 1" uri="../../../docs/user/rst/images/title.png"></image> + <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"></image> <paragraph>A centered image:</paragraph> <image align="center" uri="../../../docs/user/rst/images/biohazard.png"></image> <paragraph>A left-aligned image:</paragraph> @@ -820,12 +826,11 @@ Python-specific usage examples; begun with ">>>" <paragraph>Image size:</paragraph> <paragraph>An image 2 em wide:</paragraph> <image uri="../../../docs/user/rst/images/biohazard.png" width="2em"></image> - <paragraph>An image 2 em wide and 15 pixel high:</paragraph> - <image height="15px" uri="../../../docs/user/rst/images/biohazard.png" width="2em"></image> - <paragraph>An image occupying 50% of the line width:</paragraph> + <paragraph>An image 2 cm wide and 15 pixel high:</paragraph> + <image height="15px" uri="../../../docs/user/rst/images/biohazard.png" width="2cm"></image> + <paragraph>Relative units allow adaption of the image to the screen or paper size. + An image occupying 50% of the line width:</paragraph> <image uri="../../../docs/user/rst/images/title.png" width="50%"></image> - <paragraph>An image 2 cm high:</paragraph> - <image height="2cm" uri="../../../docs/user/rst/images/biohazard.png"></image> <paragraph>A <emphasis>figure</emphasis> 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.</paragraph> @@ -905,7 +910,7 @@ Python-specific usage examples; begun with ">>>" 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> + <title auto="1" refid="toc-entry-45"><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"> @@ -1086,7 +1091,7 @@ Python-specific usage examples; begun with ">>>" </table> </section> <section ids="admonitions" names="admonitions"> - <title auto="1" refid="toc-entry-45"><generated classes="sectnum">2.14.4 </generated>Admonitions</title> + <title auto="1" refid="toc-entry-46"><generated classes="sectnum">2.14.4 </generated>Admonitions</title> <attention> <paragraph>Directives at large.</paragraph> </attention> @@ -1131,11 +1136,11 @@ Python-specific usage examples; begun with ">>>" <admonition classes="admonition-and-by-the-way"> <title>And, by the way...</title> <paragraph>You can make up your own admonition too.</paragraph> - <target ids="docutils" names="docutils" refuri="http://docutils.sourceforge.net/"></target> + <target ids="docutils" names="docutils" refuri="https://docutils.sourceforge.io/"></target> </admonition> </section> <section ids="topics-sidebars-and-rubrics" names="topics,\ sidebars,\ and\ rubrics"> - <title auto="1" refid="toc-entry-46"><generated classes="sectnum">2.14.5 </generated>Topics, Sidebars, and Rubrics</title> + <title auto="1" refid="toc-entry-47"><generated classes="sectnum">2.14.5 </generated>Topics, Sidebars, and Rubrics</title> <paragraph><emphasis>Sidebars</emphasis> are like miniature, parallel documents.</paragraph> <sidebar> <title>Optional Sidebar Title</title> @@ -1159,7 +1164,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-47"><generated classes="sectnum">2.14.6 </generated>Target Footnotes</title> + <title auto="1" refid="toc-entry-48"><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> @@ -1170,16 +1175,24 @@ Python-specific usage examples; begun with ">>>" </footnote> <footnote auto="1" backrefs="footnote-reference-15" ids="footnote-8" names="TARGET_NOTE:\ footnote-8"> <label>7</label> - <paragraph><reference refuri="http://docutils.sourceforge.net/">http://docutils.sourceforge.net/</reference></paragraph> + <paragraph><reference refuri="https://docutils.sourceforge.io/">https://docutils.sourceforge.io/</reference></paragraph> + </footnote> + <footnote auto="1" backrefs="footnote-reference-16" ids="footnote-9" names="TARGET_NOTE:\ footnote-9"> + <label>8</label> + <paragraph><reference refuri="https://docutils.sourceforge.io/docs/ref/rst/directives.html">https://docutils.sourceforge.io/docs/ref/rst/directives.html</reference></paragraph> + </footnote> + <footnote auto="1" backrefs="footnote-reference-17" ids="footnote-10" names="TARGET_NOTE:\ footnote-10"> + <label>9</label> + <paragraph><reference refuri="https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata">https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata</reference></paragraph> </footnote> </section> <section ids="replacement-text" names="replacement\ text"> - <title auto="1" refid="toc-entry-48"><generated classes="sectnum">2.14.7 </generated>Replacement Text</title> + <title auto="1" refid="toc-entry-49"><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-49"><generated classes="sectnum">2.14.8 </generated>Compound Paragraph</title> + <title auto="1" refid="toc-entry-50"><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> @@ -1313,7 +1326,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-50"><generated classes="sectnum">2.14.9 </generated>Parsed Literal Blocks</title> + <title auto="1" refid="toc-entry-51"><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. @@ -1323,7 +1336,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-51"><generated classes="sectnum">2.14.10 </generated>Code</title> + <title auto="1" refid="toc-entry-52"><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 @@ -1348,9 +1361,15 @@ footnotes <footnote_reference ids="footnote-reference-9" refid="footnote-1">1</f <inline classes="ln">2 </inline>.. footer:: Document footer</literal_block> <target ids="pygments" names="pygments" refuri="http://pygments.org/"></target> </section> + <section ids="meta" names="meta"> + <title auto="1" refid="toc-entry-53"><generated classes="sectnum">2.14.11 </generated>Meta</title> + <paragraph>The <reference anonymous="1" name="“meta” directive" refuri="https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata">“meta” directive</reference> <footnote_reference auto="1" ids="footnote-reference-17" refid="footnote-10">9</footnote_reference> is used to specify metadata to be stored in, + e.g., HTML META tags or ODT file properties.</paragraph> + <target anonymous="1" ids="target-6" refuri="https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata"></target> + </section> </section> <section ids="substitution-definitions" names="substitution\ definitions"> - <title auto="1" refid="toc-entry-33"><generated classes="sectnum">2.15 </generated>Substitution Definitions</title> + <title auto="1" refid="toc-entry-34"><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> @@ -1358,7 +1377,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-34"><generated classes="sectnum">2.16 </generated>Comments</title> + <title auto="1" refid="toc-entry-35"><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 @@ -1370,7 +1389,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-35"><generated classes="sectnum">2.17 </generated>Raw text</title> + <title auto="1" refid="toc-entry-36"><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> @@ -1381,14 +1400,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-36"><generated classes="sectnum">2.18 </generated>Container</title> + <title auto="1" refid="toc-entry-37"><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-37"><generated classes="sectnum">2.19 </generated>Colspanning tables</title> + <title auto="1" refid="toc-entry-38"><generated classes="sectnum">2.19 </generated>Colspanning tables</title> <paragraph>This table has a cell spanning two columns:</paragraph> <table> <tgroup cols="3"> @@ -1466,7 +1485,7 @@ Comments may contain non-ASCII characters: ä ö ü æ ø å</comment> </table> </section> <section ids="rowspanning-tables" names="rowspanning\ tables"> - <title auto="1" refid="toc-entry-38"><generated classes="sectnum">2.20 </generated>Rowspanning tables</title> + <title auto="1" refid="toc-entry-39"><generated classes="sectnum">2.20 </generated>Rowspanning tables</title> <paragraph>Here's a table with cells spanning several rows:</paragraph> <table> <tgroup cols="3"> @@ -1523,7 +1542,7 @@ Comments may contain non-ASCII characters: ä ö ü æ ø å</comment> </table> </section> <section ids="complex-tables" names="complex\ tables"> - <title auto="1" refid="toc-entry-39"><generated classes="sectnum">2.21 </generated>Complex tables</title> + <title auto="1" refid="toc-entry-40"><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"> @@ -1615,14 +1634,14 @@ Comments may contain non-ASCII characters: ä ö ü æ ø å</comment> </table> </section> <section ids="list-tables" names="list\ tables"> - <title auto="1" refid="toc-entry-40"><generated classes="sectnum">2.22 </generated>List Tables</title> + <title auto="1" refid="toc-entry-41"><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"> + <table classes="colwidths-given test" width="95%"> <title>list table with integral header</title> <tgroup cols="3"> <colspec colwidth="10" stub="1"></colspec> + <colspec colwidth="8"></colspec> <colspec colwidth="20"></colspec> - <colspec colwidth="30"></colspec> <thead> <row> <entry> @@ -1710,7 +1729,7 @@ Comments may contain non-ASCII characters: ä ö ü æ ø å</comment> </section> </section> <section ids="error-handling" names="error\ handling"> - <title auto="1" refid="toc-entry-41"><generated classes="sectnum">3 </generated>Error Handling</title> + <title auto="1" refid="toc-entry-42"><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> @@ -1718,46 +1737,46 @@ Comments may contain non-ASCII characters: ä ö ü æ ø å</comment> </section> <section classes="system-messages"> <title>Docutils System Messages</title> - <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="104" source="functional/input/data/standard.txt" type="ERROR"> + <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="99" source="functional/input/data/standard.txt" type="ERROR"> <paragraph>Undefined substitution referenced: "problematic".</paragraph> </system_message> - <system_message backrefs="footnote-reference-8" ids="system-message-2" level="3" line="392" source="functional/input/data/standard.txt" type="ERROR"> + <system_message backrefs="footnote-reference-8" ids="system-message-2" level="3" line="387" source="functional/input/data/standard.txt" type="ERROR"> <paragraph>Unknown target name: "5".</paragraph> </system_message> - <system_message backrefs="citation-reference-3" ids="system-message-3" level="3" line="401" source="functional/input/data/standard.txt" type="ERROR"> + <system_message backrefs="citation-reference-3" ids="system-message-3" level="3" line="396" source="functional/input/data/standard.txt" type="ERROR"> <paragraph>Unknown target name: "nonexistent".</paragraph> </system_message> - <system_message backrefs="problematic-2" ids="system-message-4" level="3" line="428" source="functional/input/data/standard.txt" type="ERROR"> + <system_message backrefs="problematic-2" ids="system-message-4" level="3" line="423" source="functional/input/data/standard.txt" type="ERROR"> <paragraph>Unknown target name: "hyperlink reference without a target".</paragraph> </system_message> - <system_message backrefs="problematic-3" ids="system-message-5" level="3" line="441" source="functional/input/data/standard.txt" type="ERROR"> + <system_message backrefs="problematic-3" ids="system-message-5" level="3" line="436" source="functional/input/data/standard.txt" type="ERROR"> <paragraph>Duplicate target name, cannot be used as a unique reference: "duplicate target names".</paragraph> </system_message> - <system_message level="1" line="164" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="159" source="functional/input/data/standard.txt" type="INFO"> <paragraph>Hyperlink target "target" is not referenced.</paragraph> </system_message> - <system_message level="1" line="406" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="401" source="functional/input/data/standard.txt" type="INFO"> <paragraph>Hyperlink target "another-target" is not referenced.</paragraph> </system_message> - <system_message level="1" line="474" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="471" source="functional/input/data/standard.txt" type="INFO"> <paragraph>Hyperlink target "image-target-1" is not referenced.</paragraph> </system_message> - <system_message level="1" line="475" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="472" source="functional/input/data/standard.txt" type="INFO"> <paragraph>Hyperlink target "image-target-2" is not referenced.</paragraph> </system_message> - <system_message level="1" line="476" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="473" 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="643" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="636" source="functional/input/data/standard.txt" type="INFO"> <paragraph>Hyperlink target "target1" is not referenced.</paragraph> </system_message> - <system_message level="1" line="644" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="637" source="functional/input/data/standard.txt" type="INFO"> <paragraph>Hyperlink target "target2" is not referenced.</paragraph> </system_message> - <system_message level="1" line="689" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="682" source="functional/input/data/standard.txt" type="INFO"> <paragraph>Hyperlink target "docutils" is not referenced.</paragraph> </system_message> - <system_message level="1" line="855" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="848" 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 9e08ae3cc..557a6dabd 100644 --- a/docutils/test/functional/expected/standalone_rst_html4css1.html +++ b/docutils/test/functional/expected/standalone_rst_html4css1.html @@ -124,22 +124,23 @@ They are transformed from section titles after parsing. --> <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> +<li><a class="reference internal" href="#meta" id="toc-entry-33">2.14.11 Meta</a></li> </ul> </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> +<li><a class="reference internal" href="#substitution-definitions" id="toc-entry-34">2.15 Substitution Definitions</a></li> +<li><a class="reference internal" href="#comments" id="toc-entry-35">2.16 Comments</a></li> +<li><a class="reference internal" href="#raw-text" id="toc-entry-36">2.17 Raw text</a></li> +<li><a class="reference internal" href="#container" id="toc-entry-37">2.18 Container</a></li> +<li><a class="reference internal" href="#colspanning-tables" id="toc-entry-38">2.19 Colspanning tables</a></li> +<li><a class="reference internal" href="#rowspanning-tables" id="toc-entry-39">2.20 Rowspanning tables</a></li> +<li><a class="reference internal" href="#complex-tables" id="toc-entry-40">2.21 Complex tables</a></li> +<li><a class="reference internal" href="#list-tables" id="toc-entry-41">2.22 List Tables</a></li> +<li><a class="reference internal" href="#custom-roles" id="toc-entry-42">2.23 Custom Roles</a></li> +<li><a class="reference internal" href="#svg-images" id="toc-entry-43">2.24 SVG Images</a></li> +<li><a class="reference internal" href="#swf-images" id="toc-entry-44">2.25 SWF Images</a></li> </ul> </li> -<li><a class="reference internal" href="#error-handling" id="toc-entry-44">3 Error Handling</a></li> +<li><a class="reference internal" href="#error-handling" id="toc-entry-45">3 Error Handling</a></li> </ul> </div> <div class="section" id="structural-elements"> @@ -174,9 +175,9 @@ activated with the <tt class="docutils literal"><span class="pre">--section-subt (<a class="reference external" href="http://www.python.org">http://www.python.org</a>), external hyperlinks (<a class="reference external" href="http://www.python.org/">Python</a> <a class="footnote-reference" href="#footnote-6" id="footnote-reference-10">[5]</a>), internal cross-references (<a class="reference internal" href="#example">example</a>), external hyperlinks with embedded URIs (<a class="reference external" href="http://www.python.org">Python web site</a>), <a class="reference external" href="http://www.python.org/">anonymous hyperlink -references</a> <a class="footnote-reference" href="#footnote-6" id="footnote-reference-14">[5]</a> (<a class="reference external" href="http://docutils.sourceforge.net/">a second reference</a> <a class="footnote-reference" href="#footnote-8" id="footnote-reference-15">[7]</a>), footnote references (manually +references</a> <a class="footnote-reference" href="#footnote-6" id="footnote-reference-14">[5]</a> (<a class="reference external" href="https://docutils.sourceforge.io/">a second reference</a> <a class="footnote-reference" href="#footnote-8" id="footnote-reference-15">[7]</a>), footnote references (manually numbered <a class="footnote-reference" href="#footnote-1" id="footnote-reference-1">[1]</a>, anonymous auto-numbered <a class="footnote-reference" href="#footnote-2" id="footnote-reference-2">[3]</a>, labeled auto-numbered -<a class="footnote-reference" href="#label" id="footnote-reference-3">[2]</a>, or symbolic <a class="footnote-reference" href="#footnote-3" id="footnote-reference-4">[*]</a>), citation references (<a class="citation-reference" href="#cit2002" id="citation-reference-1">[CIT2002]</a>), +<a class="footnote-reference" href="#label" id="footnote-reference-3">[2]</a>, or symbolic <a class="footnote-reference" href="#footnote-3" id="footnote-reference-4">[*]</a>), citation references (see <a class="citation-reference" href="#cit2002" id="citation-reference-1">[CIT2002]</a>), substitution references (<img alt="EXAMPLE" src="../../../docs/user/rst/images/biohazard.png" /> & a <em>trimmed heart</em> <tt class="docutils literal">(U+2665):</tt>♥), and <span class="target" id="inline-hyperlink-targets">inline hyperlink targets</span> (see <a class="reference internal" href="#targets">Targets</a> below for a reference back to here). Character-level @@ -554,33 +555,33 @@ 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-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> +<li><a class="reference internal" href="#document-parts" id="toc-entry-46">2.14.1 Document Parts</a></li> +<li><a class="reference internal" href="#images-and-figures" id="toc-entry-47">2.14.2 Images and Figures</a></li> +<li><a class="reference internal" href="#tables" id="toc-entry-48">2.14.3 Tables</a></li> +<li><a class="reference internal" href="#admonitions" id="toc-entry-49">2.14.4 Admonitions</a></li> +<li><a class="reference internal" href="#topics-sidebars-and-rubrics" id="toc-entry-50">2.14.5 Topics, Sidebars, and Rubrics</a></li> +<li><a class="reference internal" href="#target-footnotes" id="toc-entry-51">2.14.6 Target Footnotes</a></li> +<li><a class="reference internal" href="#replacement-text" id="toc-entry-52">2.14.7 Replacement Text</a></li> +<li><a class="reference internal" href="#compound-paragraph" id="toc-entry-53">2.14.8 Compound Paragraph</a></li> +<li><a class="reference internal" href="#parsed-literal-blocks" id="toc-entry-54">2.14.9 Parsed Literal Blocks</a></li> +<li><a class="reference internal" href="#code" id="toc-entry-55">2.14.10 Code</a></li> +<li><a class="reference internal" href="#meta" id="toc-entry-56">2.14.11 Meta</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> +others, please see <a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html">reStructuredText Directives</a> <a class="footnote-reference" href="#footnote-9" id="footnote-reference-16">[8]</a>.</p> <div class="section" id="document-parts"> -<h3><a class="toc-backref" href="#toc-entry-45">2.14.1 Document Parts</a></h3> +<h3><a class="toc-backref" href="#toc-entry-46">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-46">2.14.2 Images and Figures</a></h3> +<h3><a class="toc-backref" href="#toc-entry-47">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> +<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" style="width: 70%;" /></a> <p>Image with multiple IDs:</p> -<span id="image-target-2"></span><span id="image-target-1"></span><img alt="../../../docs/user/rst/images/title.png" id="image-target-3" src="../../../docs/user/rst/images/title.png" /> +<span id="image-target-2"></span><span id="image-target-1"></span><img alt="../../../docs/user/rst/images/biohazard.png" id="image-target-3" src="../../../docs/user/rst/images/biohazard.png" /> <p>A centered image:</p> <img alt="../../../docs/user/rst/images/biohazard.png" class="align-center" src="../../../docs/user/rst/images/biohazard.png" /> <p>A left-aligned image:</p> @@ -597,12 +598,11 @@ the browser or rendering software used.</p> <p>Image size:</p> <p>An image 2 em wide:</p> <img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 2em;" /> -<p>An image 2 em wide and 15 pixel high:</p> -<img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 2em; height: 15px;" /> -<p>An image occupying 50% of the line width:</p> +<p>An image 2 cm wide and 15 pixel high:</p> +<img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 2cm; height: 15px;" /> +<p>Relative units allow adaption of the image to the screen or paper size. +An image occupying 50% of the line width:</p> <img alt="../../../docs/user/rst/images/title.png" src="../../../docs/user/rst/images/title.png" style="width: 50%;" /> -<p>An image 2 cm high:</p> -<img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="height: 2cm;" /> <p>A <em>figure</em> 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.</p> @@ -667,7 +667,7 @@ rendering software used.</p> 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> +<h3><a class="toc-backref" href="#toc-entry-48">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"> @@ -761,7 +761,7 @@ writer/backend).</p> </table> </div> <div class="section" id="admonitions"> -<h3><a class="toc-backref" href="#toc-entry-48">2.14.4 Admonitions</a></h3> +<h3><a class="toc-backref" href="#toc-entry-49">2.14.4 Admonitions</a></h3> <div class="admonition attention"> <p class="first admonition-title">Attention!</p> <p class="last">Directives at large.</p> @@ -810,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-49">2.14.5 Topics, Sidebars, and Rubrics</a></h3> +<h3><a class="toc-backref" href="#toc-entry-50">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">Optional Sidebar Title</p> @@ -834,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-50">2.14.6 Target Footnotes</a></h3> +<h3><a class="toc-backref" href="#toc-entry-51">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,16 +850,28 @@ allowed (e.g. inside a directive).</p> <table class="docutils footnote" frame="void" id="footnote-8" rules="none"> <colgroup><col class="label" /><col /></colgroup> <tbody valign="top"> -<tr><td class="label"><a class="fn-backref" href="#footnote-reference-15">[7]</a></td><td><a class="reference external" href="http://docutils.sourceforge.net/">http://docutils.sourceforge.net/</a></td></tr> +<tr><td class="label"><a class="fn-backref" href="#footnote-reference-15">[7]</a></td><td><a class="reference external" href="https://docutils.sourceforge.io/">https://docutils.sourceforge.io/</a></td></tr> +</tbody> +</table> +<table class="docutils footnote" frame="void" id="footnote-9" rules="none"> +<colgroup><col class="label" /><col /></colgroup> +<tbody valign="top"> +<tr><td class="label"><a class="fn-backref" href="#footnote-reference-16">[8]</a></td><td><a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html">https://docutils.sourceforge.io/docs/ref/rst/directives.html</a></td></tr> +</tbody> +</table> +<table class="docutils footnote" frame="void" id="footnote-10" rules="none"> +<colgroup><col class="label" /><col /></colgroup> +<tbody valign="top"> +<tr><td class="label"><a class="fn-backref" href="#footnote-reference-17">[9]</a></td><td><a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata">https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata</a></td></tr> </tbody> </table> </div> <div class="section" id="replacement-text"> -<h3><a class="toc-backref" href="#toc-entry-51">2.14.7 Replacement Text</a></h3> +<h3><a class="toc-backref" href="#toc-entry-52">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-52">2.14.8 Compound Paragraph</a></h3> +<h3><a class="toc-backref" href="#toc-entry-53">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> @@ -979,7 +991,7 @@ a quote and</blockquote> </div> </div> <div class="section" id="parsed-literal-blocks"> -<h3><a class="toc-backref" href="#toc-entry-53">2.14.9 Parsed Literal Blocks</a></h3> +<h3><a class="toc-backref" href="#toc-entry-54">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. @@ -991,7 +1003,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-54">2.14.10 Code</a></h3> +<h3><a class="toc-backref" href="#toc-entry-55">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 @@ -1021,15 +1033,20 @@ as a code block, here the rst file <tt class="docutils literal">header_footer.tx <span class="ln">2 </span>.. footer:: Document footer </pre> </div> +<div class="section" id="meta"> +<h3><a class="toc-backref" href="#toc-entry-56">2.14.11 Meta</a></h3> +<p>The <a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata">“meta” directive</a> <a class="footnote-reference" href="#footnote-10" id="footnote-reference-17">[9]</a> is used to specify metadata to be stored in, +e.g., HTML META tags or ODT file properties.</p> +</div> </div> <div class="section" id="substitution-definitions"> -<h2><a class="toc-backref" href="#toc-entry-33">2.15 Substitution Definitions</a></h2> +<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> </div> <div class="section" id="comments"> -<h2><a class="toc-backref" href="#toc-entry-34">2.16 Comments</a></h2> +<h2><a class="toc-backref" href="#toc-entry-35">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 @@ -1041,20 +1058,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-35">2.17 Raw text</a></h2> +<h2><a class="toc-backref" href="#toc-entry-36">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-36">2.18 Container</a></h2> +<h2><a class="toc-backref" href="#toc-entry-37">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-37">2.19 Colspanning tables</a></h2> +<h2><a class="toc-backref" href="#toc-entry-38">2.19 Colspanning tables</a></h2> <p>This table has a cell spanning two columns:</p> <table border="1" class="docutils"> <colgroup> @@ -1092,7 +1109,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-38">2.20 Rowspanning tables</a></h2> +<h2><a class="toc-backref" href="#toc-entry-39">2.20 Rowspanning tables</a></h2> <p>Here's a table with cells spanning several rows:</p> <table border="1" class="docutils"> <colgroup> @@ -1125,7 +1142,7 @@ cell.</td> </table> </div> <div class="section" id="complex-tables"> -<h2><a class="toc-backref" href="#toc-entry-39">2.21 Complex tables</a></h2> +<h2><a class="toc-backref" href="#toc-entry-40">2.21 Complex tables</a></h2> <p>Here's a complex table, which should test all features.</p> <table border="1" class="docutils"> <colgroup> @@ -1174,14 +1191,14 @@ 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-40">2.22 List Tables</a></h2> +<h2><a class="toc-backref" href="#toc-entry-41">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"> +<table border="1" class="colwidths-given test docutils" style="width: 95%"> <caption>list table with integral header</caption> <colgroup> -<col width="17%" /> -<col width="33%" /> -<col width="50%" /> +<col width="26%" /> +<col width="21%" /> +<col width="53%" /> </colgroup> <thead valign="bottom"> <tr><th class="head stub">Treat</th> @@ -1221,7 +1238,7 @@ crunchy, now would it?</td> </table> </div> <div class="section" id="custom-roles"> -<h2><a class="toc-backref" href="#toc-entry-41">2.23 Custom Roles</a></h2> +<h2><a class="toc-backref" href="#toc-entry-42">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> @@ -1251,7 +1268,7 @@ crunchy, now would it?</td> </ul> </div> <div class="section" id="svg-images"> -<h2><a class="toc-backref" href="#toc-entry-42">2.24 SVG Images</a></h2> +<h2><a class="toc-backref" href="#toc-entry-43">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 @@ -1338,7 +1355,7 @@ tags.</p> </blockquote> </div> <div class="section" id="swf-images"> -<h2><a class="toc-backref" href="#toc-entry-43">2.25 SWF Images</a></h2> +<h2><a class="toc-backref" href="#toc-entry-44">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> @@ -1350,7 +1367,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-44">3 Error Handling</a></h1> +<h1><a class="toc-backref" href="#toc-entry-45">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> @@ -1359,19 +1376,19 @@ section, "Docutils System Messages":</p> <div class="system-messages section"> <h1>Docutils System Messages</h1> <div class="system-message" id="system-message-1"> -<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">functional/input/data/standard.txt</tt>, line 104); <em><a href="#problematic-1">backlink</a></em></p> +<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">functional/input/data/standard.txt</tt>, line 99); <em><a href="#problematic-1">backlink</a></em></p> Undefined substitution referenced: "problematic".</div> <div class="system-message" id="system-message-2"> -<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">functional/input/data/standard.txt</tt>, line 392); <em><a href="#footnote-reference-8">backlink</a></em></p> +<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">functional/input/data/standard.txt</tt>, line 387); <em><a href="#footnote-reference-8">backlink</a></em></p> Unknown target name: "5".</div> <div class="system-message" id="system-message-3"> -<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">functional/input/data/standard.txt</tt>, line 401); <em><a href="#citation-reference-3">backlink</a></em></p> +<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">functional/input/data/standard.txt</tt>, line 396); <em><a href="#citation-reference-3">backlink</a></em></p> Unknown target name: "nonexistent".</div> <div class="system-message" id="system-message-4"> -<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">functional/input/data/standard.txt</tt>, line 428); <em><a href="#problematic-2">backlink</a></em></p> +<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">functional/input/data/standard.txt</tt>, line 423); <em><a href="#problematic-2">backlink</a></em></p> Unknown target name: "hyperlink reference without a target".</div> <div class="system-message" id="system-message-5"> -<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">functional/input/data/standard.txt</tt>, line 441); <em><a href="#problematic-3">backlink</a></em></p> +<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">functional/input/data/standard.txt</tt>, line 436); <em><a href="#problematic-3">backlink</a></em></p> Duplicate target name, cannot be used as a unique reference: "duplicate target names".</div> </div> </div> diff --git a/docutils/test/functional/expected/standalone_rst_html5.html b/docutils/test/functional/expected/standalone_rst_html5.html index eb7ac0182..56b143ade 100644 --- a/docutils/test/functional/expected/standalone_rst_html5.html +++ b/docutils/test/functional/expected/standalone_rst_html5.html @@ -127,41 +127,36 @@ They are transformed from section titles after parsing. --> <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> +<li><p><a class="reference internal" href="#meta" id="toc-entry-33"><span class="sectnum">2.14.11</span> Meta</a></p></li> </ul> </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> +<li><p><a class="reference internal" href="#substitution-definitions" id="toc-entry-34"><span class="sectnum">2.15</span> Substitution Definitions</a></p></li> +<li><p><a class="reference internal" href="#comments" id="toc-entry-35"><span class="sectnum">2.16</span> Comments</a></p></li> +<li><p><a class="reference internal" href="#raw-text" id="toc-entry-36"><span class="sectnum">2.17</span> Raw text</a></p></li> +<li><p><a class="reference internal" href="#container" id="toc-entry-37"><span class="sectnum">2.18</span> Container</a></p></li> +<li><p><a class="reference internal" href="#colspanning-tables" id="toc-entry-38"><span class="sectnum">2.19</span> Colspanning tables</a></p></li> +<li><p><a class="reference internal" href="#rowspanning-tables" id="toc-entry-39"><span class="sectnum">2.20</span> Rowspanning tables</a></p></li> +<li><p><a class="reference internal" href="#complex-tables" id="toc-entry-40"><span class="sectnum">2.21</span> Complex tables</a></p></li> +<li><p><a class="reference internal" href="#list-tables" id="toc-entry-41"><span class="sectnum">2.22</span> List Tables</a></p></li> +<li><p><a class="reference internal" href="#custom-roles" id="toc-entry-42"><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-42"><span class="sectnum">3</span> HTML Specific</a></p> +<li><p><a class="reference internal" href="#changes-to-the-html4css1-writer" id="toc-entry-43"><span class="sectnum">3</span> Changes to the <cite>html4css1</cite> Writer</a></p> <ul class="auto-toc"> -<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-47"><span class="sectnum">4</span> Changes to the <cite>html4css1</cite> Writer</a></p> +<li><p><a class="reference internal" href="#field-list-rendering" id="toc-entry-44"><span class="sectnum">3.1</span> Field List Rendering</a></p></li> +<li><p><a class="reference internal" href="#styling-with-class-arguments" id="toc-entry-45"><span class="sectnum">3.2</span> Styling with Class Arguments</a></p> <ul class="auto-toc"> -<li><p><a class="reference internal" href="#field-list-rendering" id="toc-entry-48"><span class="sectnum">4.1</span> Field List Rendering</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-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> -<li><p><a class="reference internal" href="#numbered-figures" id="toc-entry-53"><span class="sectnum">4.2.4</span> Numbered Figures</a></p></li> +<li><p><a class="reference internal" href="#description-lists" id="toc-entry-46"><span class="sectnum">3.2.1</span> Description Lists</a></p></li> +<li><p><a class="reference internal" href="#field-list-variants" id="toc-entry-47"><span class="sectnum">3.2.2</span> Field List Variants</a></p></li> +<li><p><a class="reference internal" href="#table-variants" id="toc-entry-48"><span class="sectnum">3.2.3</span> Table Variants</a></p></li> +<li><p><a class="reference internal" href="#numbered-figures" id="toc-entry-49"><span class="sectnum">3.2.4</span> Numbered Figures</a></p></li> </ul> </li> +<li><p><a class="reference internal" href="#text-level-semantics" id="toc-entry-50"><span class="sectnum">3.3</span> Text-Level Semantics</a></p></li> +<li><p><a class="reference internal" href="#indicating-edits" id="toc-entry-51"><span class="sectnum">3.4</span> Indicating Edits</a></p></li> </ul> </li> -<li><p><a class="reference internal" href="#error-handling" id="toc-entry-54"><span class="sectnum">5</span> Error Handling</a></p></li> +<li><p><a class="reference internal" href="#error-handling" id="toc-entry-52"><span class="sectnum">4</span> Error Handling</a></p></li> </ul> </div> <section id="structural-elements"> @@ -196,9 +191,9 @@ activated with the <span class="docutils literal"><span class="pre">--section-su (<a class="reference external" href="http://www.python.org">http://www.python.org</a>), external hyperlinks (<a class="reference external" href="http://www.python.org/">Python</a> <a class="footnote-reference brackets" href="#footnote-7" id="footnote-reference-18">7</a>), internal cross-references (<a class="reference internal" href="#example">example</a>), external hyperlinks with embedded URIs (<a class="reference external" href="http://www.python.org">Python web site</a>), <a class="reference external" href="http://www.python.org/">anonymous hyperlink -references</a> <a class="footnote-reference brackets" href="#footnote-7" id="footnote-reference-25">7</a> (<a class="reference external" href="http://docutils.sourceforge.net/">a second reference</a> <a class="footnote-reference brackets" href="#footnote-12" id="footnote-reference-26">12</a>), footnote references (manually +references</a> <a class="footnote-reference brackets" href="#footnote-7" id="footnote-reference-25">7</a> (<a class="reference external" href="https://docutils.sourceforge.io/">a second reference</a> <a class="footnote-reference brackets" href="#footnote-12" id="footnote-reference-26">12</a>), footnote references (manually numbered <a class="footnote-reference brackets" href="#footnote-1" id="footnote-reference-1">1</a>, anonymous auto-numbered <a class="footnote-reference brackets" href="#footnote-2" id="footnote-reference-2">3</a>, labeled auto-numbered -<a class="footnote-reference brackets" href="#label" id="footnote-reference-3">2</a>, or symbolic <a class="footnote-reference brackets" href="#footnote-3" id="footnote-reference-4">*</a>), citation references (<a class="citation-reference" href="#cit2002" id="citation-reference-1">[CIT2002]</a>), +<a class="footnote-reference brackets" href="#label" id="footnote-reference-3">2</a>, or symbolic <a class="footnote-reference brackets" href="#footnote-3" id="footnote-reference-4">*</a>), citation references (see <a class="citation-reference" href="#cit2002" id="citation-reference-1">[CIT2002]</a>), substitution references (<img alt="EXAMPLE" src="../../../docs/user/rst/images/biohazard.png" /> & a <em>trimmed heart</em> <span class="docutils literal">(U+2665):</span>♥), and <span class="target" id="inline-hyperlink-targets">inline hyperlink targets</span> (see <a class="reference internal" href="#targets">Targets</a> below for a reference back to here). Character-level @@ -546,33 +541,33 @@ this: <a href="#system-message-5"><span class="problematic" id="problematic-3">` <h3><a class="toc-backref" href="#toc-entry-22"><span class="sectnum">2.14</span> Directives</a></h3> <div class="contents local topic" id="contents"> <ul class="auto-toc simple"> -<li><p><a class="reference internal" href="#document-parts" id="toc-entry-55"><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-56"><span class="sectnum">2.14.2</span> Images and Figures</a></p></li> -<li><p><a class="reference internal" href="#tables" id="toc-entry-57"><span class="sectnum">2.14.3</span> Tables</a></p></li> -<li><p><a class="reference internal" href="#admonitions" id="toc-entry-58"><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-59"><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-60"><span class="sectnum">2.14.6</span> Target Footnotes</a></p></li> -<li><p><a class="reference internal" href="#replacement-text" id="toc-entry-61"><span class="sectnum">2.14.7</span> Replacement Text</a></p></li> -<li><p><a class="reference internal" href="#compound-paragraph" id="toc-entry-62"><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-63"><span class="sectnum">2.14.9</span> Parsed Literal Blocks</a></p></li> -<li><p><a class="reference internal" href="#code" id="toc-entry-64"><span class="sectnum">2.14.10</span> Code</a></p></li> +<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="#tables" id="toc-entry-55"><span class="sectnum">2.14.3</span> Tables</a></p></li> +<li><p><a class="reference internal" href="#admonitions" id="toc-entry-56"><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-57"><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-58"><span class="sectnum">2.14.6</span> Target Footnotes</a></p></li> +<li><p><a class="reference internal" href="#replacement-text" id="toc-entry-59"><span class="sectnum">2.14.7</span> Replacement Text</a></p></li> +<li><p><a class="reference internal" href="#compound-paragraph" id="toc-entry-60"><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-61"><span class="sectnum">2.14.9</span> Parsed Literal Blocks</a></p></li> +<li><p><a class="reference internal" href="#code" id="toc-entry-62"><span class="sectnum">2.14.10</span> Code</a></p></li> +<li><p><a class="reference internal" href="#meta" id="toc-entry-63"><span class="sectnum">2.14.11</span> Meta</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> +others, please see <a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html">reStructuredText Directives</a> <a class="footnote-reference brackets" href="#footnote-13" id="footnote-reference-27">13</a>.</p> <section id="document-parts"> -<h4><a class="toc-backref" href="#toc-entry-55"><span class="sectnum">2.14.1</span> Document Parts</a></h4> +<h4><a class="toc-backref" href="#toc-entry-53"><span class="sectnum">2.14.1</span> Document Parts</a></h4> <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"> -<h4><a class="toc-backref" href="#toc-entry-56"><span class="sectnum">2.14.2</span> Images and Figures</a></h4> +<h4><a class="toc-backref" href="#toc-entry-54"><span class="sectnum">2.14.2</span> Images and Figures</a></h4> <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> +<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" style="width: 70%;" /></a> <p>Image with multiple IDs:</p> -<span id="image-target-2"></span><span id="image-target-1"></span><img alt="../../../docs/user/rst/images/title.png" id="image-target-3" src="../../../docs/user/rst/images/title.png" /> +<span id="image-target-2"></span><span id="image-target-1"></span><img alt="../../../docs/user/rst/images/biohazard.png" id="image-target-3" src="../../../docs/user/rst/images/biohazard.png" /> <p>A centered image:</p> <img alt="../../../docs/user/rst/images/biohazard.png" class="align-center" src="../../../docs/user/rst/images/biohazard.png" /> <p>A left-aligned image:</p> @@ -589,12 +584,11 @@ the browser or rendering software used.</p> <p>Image size:</p> <p>An image 2 em wide:</p> <img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 2em;" /> -<p>An image 2 em wide and 15 pixel high:</p> -<img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 2em; height: 15px;" /> -<p>An image occupying 50% of the line width:</p> +<p>An image 2 cm wide and 15 pixel high:</p> +<img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 2cm; height: 15px;" /> +<p>Relative units allow adaption of the image to the screen or paper size. +An image occupying 50% of the line width:</p> <img alt="../../../docs/user/rst/images/title.png" src="../../../docs/user/rst/images/title.png" style="width: 50%;" /> -<p>An image 2 cm high:</p> -<img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="height: 2cm;" /> <p>A <em>figure</em> 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.</p> @@ -667,7 +661,7 @@ rendering software used.</p> upon the style sheet and the browser or rendering software used.</p> </section> <section id="tables"> -<h4><a class="toc-backref" href="#toc-entry-57"><span class="sectnum">2.14.3</span> Tables</a></h4> +<h4><a class="toc-backref" href="#toc-entry-55"><span class="sectnum">2.14.3</span> Tables</a></h4> <p>Tables may be given titles and additional arguments with the <em>table</em> directive:</p> <table class="align-left"> @@ -761,7 +755,7 @@ writer/backend).</p> </table> </section> <section id="admonitions"> -<h4><a class="toc-backref" href="#toc-entry-58"><span class="sectnum">2.14.4</span> Admonitions</a></h4> +<h4><a class="toc-backref" href="#toc-entry-56"><span class="sectnum">2.14.4</span> Admonitions</a></h4> <div class="admonition attention"> <p class="admonition-title">Attention!</p> <p>Directives at large.</p> @@ -810,7 +804,7 @@ Reader discretion is strongly advised.</p> </div> </section> <section id="topics-sidebars-and-rubrics"> -<h4><a class="toc-backref" href="#toc-entry-59"><span class="sectnum">2.14.5</span> Topics, Sidebars, and Rubrics</a></h4> +<h4><a class="toc-backref" href="#toc-entry-57"><span class="sectnum">2.14.5</span> Topics, Sidebars, and Rubrics</a></h4> <p><em>Sidebars</em> are like miniature, parallel documents.</p> <aside class="sidebar"> <p class="sidebar-title">Optional Sidebar Title</p> @@ -834,7 +828,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"> -<h4><a class="toc-backref" href="#toc-entry-60"><span class="sectnum">2.14.6</span> Target Footnotes</a></h4> +<h4><a class="toc-backref" href="#toc-entry-58"><span class="sectnum">2.14.6</span> Target Footnotes</a></h4> <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> @@ -843,31 +837,40 @@ allowed (e.g. inside a directive).</p> <dd><p><a class="reference external" href="http://pygments.org/">http://pygments.org/</a></p> </dd> <dt class="label" id="footnote-9"><span class="brackets"><a class="fn-backref" href="#footnote-reference-22">9</a></span></dt> -<dd><p><a class="reference external" href="http://docutils.sourceforge.net/docs/dev/todo.html#interpreted-text">http://docutils.sourceforge.net/docs/dev/todo.html#interpreted-text</a></p> +<dd><p><a class="reference external" href="http://docutils.sourceforge.net/docs/user/config.html#table-style">http://docutils.sourceforge.net/docs/user/config.html#table-style</a></p> </dd> <dt class="label" id="footnote-10"><span class="brackets"><a class="fn-backref" href="#footnote-reference-23">10</a></span></dt> -<dd><p><a class="reference external" href="http://docutils.sourceforge.net/docs/user/config.html#table-style">http://docutils.sourceforge.net/docs/user/config.html#table-style</a></p> +<dd><p><a class="reference external" href="http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf">http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf</a></p> </dd> <dt class="label" id="footnote-11"><span class="brackets"><a class="fn-backref" href="#footnote-reference-24">11</a></span></dt> -<dd><p><a class="reference external" href="http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf">http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf</a></p> +<dd><p><a class="reference external" href="http://docutils.sourceforge.net/docs/dev/todo.html#interpreted-text">http://docutils.sourceforge.net/docs/dev/todo.html#interpreted-text</a></p> </dd> <dt class="label" id="footnote-12"><span class="brackets"><a class="fn-backref" href="#footnote-reference-26">12</a></span></dt> -<dd><p><a class="reference external" href="http://docutils.sourceforge.net/">http://docutils.sourceforge.net/</a></p> +<dd><p><a class="reference external" href="https://docutils.sourceforge.io/">https://docutils.sourceforge.io/</a></p> </dd> <dt class="label" id="footnote-13"><span class="brackets"><a class="fn-backref" href="#footnote-reference-27">13</a></span></dt> -<dd><p><a class="reference external" href="https://html.spec.whatwg.org/#text-level-semantics">https://html.spec.whatwg.org/#text-level-semantics</a></p> +<dd><p><a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html">https://docutils.sourceforge.io/docs/ref/rst/directives.html</a></p> </dd> <dt class="label" id="footnote-14"><span class="brackets"><a class="fn-backref" href="#footnote-reference-28">14</a></span></dt> +<dd><p><a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata">https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata</a></p> +</dd> +<dt class="label" id="footnote-15"><span class="brackets"><a class="fn-backref" href="#footnote-reference-29">15</a></span></dt> +<dd><p><a class="reference external" href="https://stackoverflow.com/questions/39547412/same-font-size-for-h1-and-h2-in-article">https://stackoverflow.com/questions/39547412/same-font-size-for-h1-and-h2-in-article</a></p> +</dd> +<dt class="label" id="footnote-16"><span class="brackets"><a class="fn-backref" href="#footnote-reference-30">16</a></span></dt> +<dd><p><a class="reference external" href="https://html.spec.whatwg.org/#text-level-semantics">https://html.spec.whatwg.org/#text-level-semantics</a></p> +</dd> +<dt class="label" id="footnote-17"><span class="brackets"><a class="fn-backref" href="#footnote-reference-31">17</a></span></dt> <dd><p><a class="reference external" href="https://html.spec.whatwg.org/multipage/edits.html">https://html.spec.whatwg.org/multipage/edits.html</a></p> </dd> </dl> </section> <section id="replacement-text"> -<h4><a class="toc-backref" href="#toc-entry-61"><span class="sectnum">2.14.7</span> Replacement Text</a></h4> +<h4><a class="toc-backref" href="#toc-entry-59"><span class="sectnum">2.14.7</span> Replacement Text</a></h4> <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"> -<h4><a class="toc-backref" href="#toc-entry-62"><span class="sectnum">2.14.8</span> Compound Paragraph</a></h4> +<h4><a class="toc-backref" href="#toc-entry-60"><span class="sectnum">2.14.8</span> Compound Paragraph</a></h4> <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> @@ -978,7 +981,7 @@ by</p> </div> </section> <section id="parsed-literal-blocks"> -<h4><a class="toc-backref" href="#toc-entry-63"><span class="sectnum">2.14.9</span> Parsed Literal Blocks</a></h4> +<h4><a class="toc-backref" href="#toc-entry-61"><span class="sectnum">2.14.9</span> Parsed Literal Blocks</a></h4> <pre class="literal-block">This is a parsed literal block. This line is indented. The next line is blank. @@ -988,7 +991,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"> -<h4><a class="toc-backref" href="#toc-entry-64"><span class="sectnum">2.14.10</span> Code</a></h4> +<h4><a class="toc-backref" href="#toc-entry-62"><span class="sectnum">2.14.10</span> Code</a></h4> <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 @@ -1012,15 +1015,20 @@ as a code block, here the rst file <span class="docutils literal">header_footer. <pre class="code rst literal-block"><code><span class="ln">1 </span>.. header:: Document header <span class="ln">2 </span>.. footer:: Document footer</code></pre> </section> +<section id="meta"> +<h4><a class="toc-backref" href="#toc-entry-63"><span class="sectnum">2.14.11</span> Meta</a></h4> +<p>The <a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata">“meta” directive</a> <a class="footnote-reference brackets" href="#footnote-14" id="footnote-reference-28">14</a> is used to specify metadata to be stored in, +e.g., HTML META tags or ODT file properties.</p> +</section> </section> <section id="substitution-definitions"> -<h3><a class="toc-backref" href="#toc-entry-33"><span class="sectnum">2.15</span> Substitution Definitions</a></h3> +<h3><a class="toc-backref" href="#toc-entry-34"><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> </section> <section id="comments"> -<h3><a class="toc-backref" href="#toc-entry-34"><span class="sectnum">2.16</span> Comments</a></h3> +<h3><a class="toc-backref" href="#toc-entry-35"><span class="sectnum">2.16</span> Comments</a></h3> <p>Here's one:</p> <!-- Comments begin with two dots and a space. Anything may follow, except for the syntax of footnotes, hyperlink @@ -1032,20 +1040,20 @@ Comments may contain non-ASCII characters: ä ö ü æ ø å --> <p>(View the HTML source to see the comment.)</p> </section> <section id="raw-text"> -<h3><a class="toc-backref" href="#toc-entry-35"><span class="sectnum">2.17</span> Raw text</a></h3> +<h3><a class="toc-backref" href="#toc-entry-36"><span class="sectnum">2.17</span> Raw text</a></h3> <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"> -<h3><a class="toc-backref" href="#toc-entry-36"><span class="sectnum">2.18</span> Container</a></h3> +<h3><a class="toc-backref" href="#toc-entry-37"><span class="sectnum">2.18</span> Container</a></h3> <div class="custom docutils container"> <p>paragraph 1</p> <p>paragraph 2</p> </div> </section> <section id="colspanning-tables"> -<h3><a class="toc-backref" href="#toc-entry-37"><span class="sectnum">2.19</span> Colspanning tables</a></h3> +<h3><a class="toc-backref" href="#toc-entry-38"><span class="sectnum">2.19</span> Colspanning tables</a></h3> <p>This table has a cell spanning two columns:</p> <table> <colgroup> @@ -1083,7 +1091,7 @@ Fifth test in HTML.<br />Line two.</section> </table> </section> <section id="rowspanning-tables"> -<h3><a class="toc-backref" href="#toc-entry-38"><span class="sectnum">2.20</span> Rowspanning tables</a></h3> +<h3><a class="toc-backref" href="#toc-entry-39"><span class="sectnum">2.20</span> Rowspanning tables</a></h3> <p>Here's a table with cells spanning several rows:</p> <table> <colgroup> @@ -1116,7 +1124,7 @@ cell.</p></td> </table> </section> <section id="complex-tables"> -<h3><a class="toc-backref" href="#toc-entry-39"><span class="sectnum">2.21</span> Complex tables</a></h3> +<h3><a class="toc-backref" href="#toc-entry-40"><span class="sectnum">2.21</span> Complex tables</a></h3> <p>Here's a complex table, which should test all features.</p> <table> <colgroup> @@ -1165,14 +1173,14 @@ empty: <span class="docutils literal"><span class="pre">--></span></span></p> </table> </section> <section id="list-tables"> -<h3><a class="toc-backref" href="#toc-entry-40"><span class="sectnum">2.22</span> List Tables</a></h3> +<h3><a class="toc-backref" href="#toc-entry-41"><span class="sectnum">2.22</span> List Tables</a></h3> <p>Here's a list table exercising all features:</p> -<table class="colwidths-given test" style="width: 40em"> +<table class="colwidths-given test" style="width: 95%"> <caption>list table with integral header</caption> <colgroup> -<col style="width: 17%" /> -<col style="width: 33%" /> -<col style="width: 50%" /> +<col style="width: 26%" /> +<col style="width: 21%" /> +<col style="width: 53%" /> </colgroup> <thead> <tr><th class="head stub"><p>Treat</p></th> @@ -1212,7 +1220,7 @@ crunchy, now would it?</p></td> </table> </section> <section id="custom-roles"> -<h3><a class="toc-backref" href="#toc-entry-41"><span class="sectnum">2.23</span> Custom Roles</a></h3> +<h3><a class="toc-backref" href="#toc-entry-42"><span class="sectnum">2.23</span> Custom Roles</a></h3> <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> @@ -1238,112 +1246,262 @@ crunchy, now would it?</p></td> <p><span class="green sc" lang="en-gb">British colourful text in small-caps</span>.</p> </li> </ul> +<!-- HTML Specific --> </section> </section> -<section id="html-specific"> -<h2><a class="toc-backref" href="#toc-entry-42"><span class="sectnum">3</span> HTML Specific</a></h2> -<section id="svg-images"> -<h3><a class="toc-backref" href="#toc-entry-43"><span class="sectnum">3.1</span> SVG Images</a></h3> -<img alt="../../../docs/user/rst/images/biohazard.svg" class="align-left" src="../../../docs/user/rst/images/biohazard.svg" style="width: 48px; height: 48px;" /> -<p>Scalable vector graphics (SVG) images are the only standards-compliable way -to include vector graphics in HTML documents. However, they are not -supported by all backends/output formats. (E.g., LaTeX supports the -PDF or Postscript formats for vector graphics instead.)</p> -<p>Rendering behaviour varies, depending on</p> -<ol class="loweralpha"> -<li><p>The SVG image itself, e.g. fixed-size vs. scaling:</p> -<pre class="literal-block">width="280" viewBox="0 0 280 27" -height="27" width="100%" - height="100%"</pre> -</li> -<li><p>The method used to put the image in the document.</p> -<p>For HTML, there are several alternatives including:</p> -<ul class="simple"> -<li><p>using the HTML <span class="docutils literal"><img></span> tag (not for interactive/animated SVG),</p></li> -<li><p>using the HTML <span class="docutils literal"><object></span> tag,</p></li> -<li><p>including within SVG using the SVG <span class="docutils literal"><image></span> tag,</p></li> -<li><p>embedd the SVG code within HTML (inlining).</p></li> -</ul> -<p>The <cite>html4css1</cite> writer uses <span class="docutils literal"><object></span> tags, the <cite>html5</cite> -writer uses <span class="docutils literal"><img></span> tags.</p> -<!-- cf. http://edutechwiki.unige.ch/en/Using_SVG_with_HTML5_tutorial --> -</li> -<li><p>The viewing agent.</p> -<p>All up-to-date HTML browsers support SVG, however not all do this fully -and in the same manner. Many older versions, especially IE < 9, have -deficiencies or require plug-ins (i.e. don't support the <span class="docutils literal"><img></span> tag).</p> -</li> -</ol> -<p>If the image is wrapped in <span class="docutils literal"><object></span> or <span class="docutils literal"><svg></span> tags, it depends on the -<span class="docutils literal">viewBox</span> declaration inside the images root <span class="docutils literal"><svg></span> element whether an -SVG image is scaled or clipped/padded. Images wrapped in <span class="docutils literal"><img></span> are -always scaled.</p> +<section id="changes-to-the-html4css1-writer"> +<h2><a class="toc-backref" href="#toc-entry-43"><span class="sectnum">3</span> Changes to the <cite>html4css1</cite> Writer</a></h2> <ul> -<li><img alt="../../../docs/user/rst/images/title-scaling.svg" class="align-right" src="../../../docs/user/rst/images/title-scaling.svg" style="width: 50%;" /> -<p>A scaling image (scales with the browser window), occupying 50% of the line -width. The <span class="docutils literal">viewBox</span> setting in the image file enables auto-scaling also in -<span class="docutils literal"><object></span> tags and embedded SVG (if width and hight are set to 100% in the -SVG <image> tag).</p> -</li> -<li><img alt="../../../docs/user/rst/images/title.svg" class="align-right" src="../../../docs/user/rst/images/title.svg" style="width: 50%; height: 15px;" /> -<p>A fixed-size image in a box 50% wide and 15 pixles high. This image is -scaled, if wrapped in an <span class="docutils literal"><img></span> tag but clipped in an <span class="docutils literal"><object></span> tag -or within SVG.</p> -</li> -<li><img alt="../../../docs/user/rst/images/title-scaling.svg" class="align-right" src="../../../docs/user/rst/images/title-scaling.svg" style="width: 50%; height: 1.5em;" /> -<p>A right aligned, scaling image 50% wide and 1.5 em high. (This SVG image -keeps the aspect ratio.)</p> -</li> -<li><p>An inline image <img alt="inline-svg" src="../../../docs/user/rst/images/biohazard-scaling.svg" style="height: 0.8em;" /> scaled to a height of 0.8 em.</p> -</li> -<li><img alt="../../../docs/user/rst/images/biohazard-scaling.svg" class="align-right" src="../../../docs/user/rst/images/biohazard-scaling.svg" style="height: 1em;" /> -<p>A scaling image 1 em high, right aligned:</p> -</li> -<li><p>A scaling image 5 mm x 5 mm, centered, with hyperlink reference:</p> -<a class="reference internal image-reference" href="#svg-images"><img alt="../../../docs/user/rst/images/biohazard-scaling.svg" class="align-center" src="../../../docs/user/rst/images/biohazard-scaling.svg" style="width: 5mm; height: 5mm;" /></a> -</li> -<li><img alt="../../../docs/user/rst/images/biohazard.svg" class="align-right" src="../../../docs/user/rst/images/biohazard.svg" style="width: 4cm; height: 2em;" /> -<p>A fixed-size image in a 4 cm x 2 em box.</p> +<li><p>Use only meta keywords recognized by HTML 5. +Add HTML5-compatible meta tags for docinfo items +"authors", "date", and "copyright".</p></li> +<li><p>Set table column widths with <style="width: ...">, not "width" argument.</p></li> +<li><p>Horizontal alignment of table heads with CSS.</p></li> +<li><p>Field lists as styled definition lists.</p></li> +<li><p>Do not drop paragraph objects, use CSS rules to prevent unwanted vertical +space.</p></li> +<li><p>Put subtitles in <p> elements.</p></li> +<li><p>Use the new semantic tags <main>, <section>, <header>, +<footer>, <aside>, <figure>, and <figcaption>. +See <span class="docutils literal">minimal.css</span> and <span class="docutils literal">responsive.css</span> for styling rule examples.</p> +<p>Change the <cite>initial_header_level</cite> setting default to "2", as browsers +use the <a class="reference external" href="https://stackoverflow.com/questions/39547412/same-font-size-for-h1-and-h2-in-article">same style for <h1> and <h2> when nested in a <section></a> <a class="footnote-reference brackets" href="#footnote-15" id="footnote-reference-29">15</a>.</p> </li> +<li><p>Use HTML text-level tags <small>, <s>, <q>, <dfn>, <var>, <samp>, <kbd>, +<i>, <b>, <u>, <mark>, and <bdi> if a matching class value +is found in <cite>inline</cite> and <cite>literal</cite> elements. +Use <ins> and <del> if a matching class value +is found in <cite>inline</cite>, <cite>literal</cite>, or <cite>container</cite> elements.</p></li> </ul> -<p>Older versions of <cite>webkit</cite> based browsers (chromium, safari, midori, -konqueror) support the <span class="docutils literal"><img></span> tag but don't display contained bitmap -images in this case.</p> +<section id="field-list-rendering"> +<h3><a class="toc-backref" href="#toc-entry-44"><span class="sectnum">3.1</span> Field List Rendering</a></h3> +<p>A <cite>field list</cite> is converted to a HTML <cite>definition list</cite> and given the +<span class="docutils literal"><span class="pre">field-list</span></span> class argument value to allow CSS styling. +With <span class="docutils literal">html_plain.css</span>, the layout is similar to <cite>html4css1</cite>:</p> +<dl class="open field-list"> +<dt>A long field name</dt> +<dd><p>sticks into the field body.</p> +<p>The field body is pushed to the next line (you can suppress this +behaviour with the <a class="reference internal" href="#run-in">run-in</a> class argument).</p> +</dd> +<dt>Customization</dt> +<dd><p>of the field name width is possible with CSS instead +of the <cite>field-name-limit</cite> configuration setting, for +example:</p> +<pre class="literal-block">dl.field-list > dd { margin-left: 6em; }</pre> +</dd> +<dt>Empty</dt> +<dd><p></p></dd> +<dt>fields</dt> +<dd><p>must not lead to misalignment of the following content.</p> +</dd> +</dl> +</section> +<section id="styling-with-class-arguments"> +<h3><a class="toc-backref" href="#toc-entry-45"><span class="sectnum">3.2</span> Styling with Class Arguments</a></h3> +<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"> +<h4><a class="toc-backref" href="#toc-entry-46"><span class="sectnum">3.2.1</span> Description Lists</a></h4> +<p>Definition lists with the "description" class argument:</p> +<dl class="description"> +<dt>description lists</dt> +<dd><p>Definition lists that are styled like in most dictionaries, +encyclopedias etc. (as well as the LaTeX <cite>description</cite> environment).</p> +</dd> +<dt>label</dt> +<dd><p>The term to be described. Put in boldface or italic.</p> +</dd> +<dt>Content</dt> +<dd><p>starts on the same line and has a hanging indent.</p> +</dd> +<dt>A label without content</dt> +<dd><!-- --> +</dd> +<dt>and the next label</dt> +<dd><p>must align.</p> +</dd> +<dt>as well</dt> +<dd><p>as content containing more than one</p> +<p>paragraph</p> +</dd> +<dt>or</dt> +<dd><ul class="simple"> +<li><p>nested lists</p></li> +<li><p>item 2</p></li> +</ul> +</dd> +<dt>or</dt> +<dd><dl class="simple"> +<dt>nested</dt> +<dd><p>definition lists</p> +</dd> +</dl> +</dd> +</dl> +</section> +<section id="field-list-variants"> +<h4><a class="toc-backref" href="#toc-entry-47"><span class="sectnum">3.2.2</span> Field List Variants</a></h4> +<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"> +<dt><em>compact</em></dt> +<dd><dl class="compact field-list simple"> +<dt>Feature</dt> +<dd><p>No additional space between list items.</p> +</dd> +<dt>Option</dt> +<dd><p>The <span class="docutils literal"><span class="pre">--compact-field-lists</span></span> command line option (and the +corresponding configuration setting) set the <cite>compact</cite> +class argument on all "simple" field lists, if not +overridden with <cite>open</cite>.</p> +</dd> +<dt>Use</dt> +<dd><p>For lists with short field body.</p> +</dd> +</dl> +</dd> +<dt><em>open</em></dt> +<dd><dl class="open field-list"> +<dt>Feature</dt> +<dd><p>Additional space between list items also in "simple" lists. +(Overrides the <span class="docutils literal"><span class="pre">--compact-field-lists</span></span> command line +option and the corresponding configuration setting)</p> +</dd> +<dt>Use</dt> +<dd><p>For "simple" lists that should keep the space between list items.</p> +</dd> +</dl> +</dd> +<dt><em>narrow</em></dt> +<dd><dl class="narrow field-list simple"> +<dt>Feature</dt> +<dd><p>Less indented field body.</p> +</dd> +<dt>Use</dt> +<dd><p>For lists with short field names.</p> +</dd> +<dt>A long field name</dt> +<dd><p>sticks into the field body and the field body starts on a +new line (if not combined with <a class="reference internal" href="#run-in">run-in</a>).</p> +</dd> +</dl> +</dd> +</dl> +<dl class="simple" id="run-in"> +<dt><em>run-in</em></dt> +<dd><dl class="run-in field-list simple"> +<dt>Feature</dt> +<dd><p>Field body starts on the same line also after long field +names.</p> +</dd> +<dt>A long field name</dt> +<dd><p>sticks into the field body which continues on +the same line.</p> +</dd> +<dt>The next field name</dt> +<dd><p>and field body should align. Long text in the field +body is wrapped and aligns with other fields.</p> +</dd> +</dl> +</dd> +</dl> +</section> +<section id="table-variants"> +<h4><a class="toc-backref" href="#toc-entry-48"><span class="sectnum">3.2.3</span> Table Variants</a></h4> +<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-9" id="footnote-reference-22">9</a> configuration +setting (or command line argument).</p> <ul> -<li><img alt="../../../docs/user/rst/images/biohazard-bitmap.svg" class="align-right" src="../../../docs/user/rst/images/biohazard-bitmap.svg" style="width: 3em;" /> -<p>A small, fixed-size SVG image with embedded bitmap, The <span class="docutils literal">:width:</span> is -set to 3 em in the rST source. Does not scale if wrapped in <span class="docutils literal"><object></span> -tags.</p> +<li><p>Numbered tables can be achieved with the "numbered" class option:</p> +<table class="numbered"> +<caption>truth values</caption> +<colgroup> +<col style="width: 29%" /> +<col style="width: 29%" /> +<col style="width: 42%" /> +</colgroup> +<thead> +<tr><th class="head"><p>A</p></th> +<th class="head"><p>B</p></th> +<th class="head"><p>A or B</p></th> +</tr> +</thead> +<tbody> +<tr><td><p>False</p></td> +<td><p>False</p></td> +<td><p>False</p></td> +</tr> +<tr><td><p>True</p></td> +<td><p>False</p></td> +<td><p>True</p></td> +</tr> +<tr><td><p>False</p></td> +<td><p>True</p></td> +<td><p>True</p></td> +</tr> +<tr><td><p>True</p></td> +<td><p>True</p></td> +<td><p>True</p></td> +</tr> +</tbody> +</table> +<p>Currently, referencing to the table by number is not supported. This is a +common request and already on the <cite>TODO list</cite>.</p> </li> -<li><img alt="../../../docs/user/rst/images/biohazard-bitmap-scaling.svg" class="align-right" src="../../../docs/user/rst/images/biohazard-bitmap-scaling.svg" style="width: 3em;" /> -<p>A scaling SVG image with embedded bitmap, 3 em wide.</p> +<li><p>A table with "booktabs" class value, is rendered similar to the style +from the <a class="reference external" href="http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf">booktabs</a> <a class="footnote-reference brackets" href="#footnote-10" id="footnote-reference-23">10</a> LaTeX package.</p> </li> </ul> -<p>SVG images can also be put in figures:</p> +<p>"Booktabs" style table, numbered, centre-aligned, with auto-sized columns:</p> <blockquote> -<figure class="align-center"> -<img alt="reStructuredText, the markup syntax" src="../../../docs/user/rst/images/title.svg" style="width: 290px; height: 28px;" /> +<table class="booktabs numbered colwidths-auto align-center"> +<caption>I/O values</caption> +<thead> +<tr><th class="head" colspan="2"><p>Input</p></th> +<th class="head"><p>Output</p></th> +</tr> +<tr><th class="head"><p>A</p></th> +<th class="head"><p>B</p></th> +<th class="head"><p>A or B</p></th> +</tr> +</thead> +<tbody> +<tr><td><p>False</p></td> +<td><p>False</p></td> +<td><p>False</p></td> +</tr> +<tr><td><p>True</p></td> +<td><p>False</p></td> +<td><p>True</p></td> +</tr> +<tr><td><p>False</p></td> +<td><p>True</p></td> +<td><p>True</p></td> +</tr> +<tr><td><p>True</p></td> +<td><p>True</p></td> +<td><p>True</p></td> +</tr> +</tbody> +</table> +</blockquote> +</section> +<section id="numbered-figures"> +<h4><a class="toc-backref" href="#toc-entry-49"><span class="sectnum">3.2.4</span> Numbered Figures</a></h4> +<p>Numbered figures can be achieved with the "numbered" <span class="docutils literal">:figclass:</span> option:</p> +<figure class="numbered"> +<img alt="reStructuredText, the markup syntax" src="../../../docs/user/rst/images/title.svg" style="width: 100%;" /> <figcaption> -<p>SVG image in a figure.</p> +<p>SVG image in a numbered figure.</p> </figcaption> </figure> -</blockquote> </section> -<section id="swf-images"> -<h3><a class="toc-backref" href="#toc-entry-44"><span class="sectnum">3.2</span> SWF Images</a></h3> -<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> -<p>Images with extension <span class="docutils literal">.swf</span> are placed inside <object> elements. -For complete control over display options use raw HTML.</p> -<object class="align-left" data="../../../docs/user/rst/images/biohazard.swf" style="width: 4cm; height: 2em;" type="application/x-shockwave-flash">[biohazard.swf]</object> -<p>An SWF image in a 4 cm x 2 em box, left aligned.</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"> -<h3><a class="toc-backref" href="#toc-entry-45"><span class="sectnum">3.3</span> Text-Level Semantics</a></h3> +<h3><a class="toc-backref" href="#toc-entry-50"><span class="sectnum">3.3</span> Text-Level Semantics</a></h3> <p>This section describes the <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> +semantics</a> <a class="footnote-reference brackets" href="#footnote-16" id="footnote-reference-30">16</a> and their reStructuredText equivalents.</p> <dl class="description"> <dt>a</dt> <dd><p>Hyperlinks</p> @@ -1539,7 +1697,7 @@ a substitution.</p> <dl class="footnote brackets"> <dt class="label" id="attribute-optional"><span class="brackets">5</span><span class="fn-backref">(<a href="#footnote-reference-10">1</a>,<a href="#footnote-reference-14">2</a>,<a href="#footnote-reference-16">3</a>,<a href="#footnote-reference-17">4</a>)</span></dt> <dd><p>Would gain from support for attributes/arguments -to inline roles. See <a class="reference external" href="http://docutils.sourceforge.net/docs/dev/todo.html#interpreted-text">TODO</a> <a class="footnote-reference brackets" href="#footnote-9" id="footnote-reference-22">9</a></p> +to inline roles. See <a class="reference external" href="http://docutils.sourceforge.net/docs/dev/todo.html#interpreted-text">TODO</a> <a class="footnote-reference brackets" href="#footnote-11" id="footnote-reference-24">11</a></p> </dd> <dt class="label" id="attribute-required"><span class="brackets">6</span><span class="fn-backref">(<a href="#footnote-reference-12">1</a>,<a href="#footnote-reference-13">2</a>,<a href="#footnote-reference-15">3</a>)</span></dt> <dd><p>Requires support for attributes to inline @@ -1548,8 +1706,8 @@ roles to make sense.</p> </dl> </section> <section id="indicating-edits"> -<h3><a class="toc-backref" href="#toc-entry-46"><span class="sectnum">3.4</span> Indicating Edits</a></h3> -<p>The <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 +<h3><a class="toc-backref" href="#toc-entry-51"><span class="sectnum">3.4</span> Indicating Edits</a></h3> +<p>The <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-17" id="footnote-reference-31">17</a> and their reStructuredText equivalents are:</p> <dl class="description"> <dt>ins</dt> @@ -1573,245 +1731,8 @@ reStructuredText equivalents are:</p> </dl> </section> </section> -<section id="changes-to-the-html4css1-writer"> -<h2><a class="toc-backref" href="#toc-entry-47"><span class="sectnum">4</span> Changes to the <cite>html4css1</cite> Writer</a></h2> -<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> -<li><p>Horizontal alignment of table heads with CSS.</p></li> -<li><p>Field lists as styled definition lists.</p></li> -<li><p>Do not drop paragraph objects, use CSS rules to prevent unwanted vertical -space.</p></li> -<li><p>Put subtitles in <p> elements.</p></li> -</ul> -<section id="field-list-rendering"> -<h3><a class="toc-backref" href="#toc-entry-48"><span class="sectnum">4.1</span> Field List Rendering</a></h3> -<p>A <cite>field list</cite> is converted to a HTML <cite>definition list</cite> and given the -<span class="docutils literal"><span class="pre">field-list</span></span> class argument value to allow CSS styling. -With <span class="docutils literal">html_plain.css</span>, the layout is similar to <cite>html4css1</cite>:</p> -<dl class="open field-list"> -<dt>A long field name</dt> -<dd><p>sticks into the field body.</p> -<p>The field body is pushed to the next line (you can suppress this -behaviour with the <a class="reference internal" href="#run-in">run-in</a> class argument).</p> -</dd> -<dt>Customization</dt> -<dd><p>of the field name width is possible with CSS instead -of the <cite>field-name-limit</cite> configuration setting, for -example:</p> -<pre class="literal-block">dl.field-list > dd { margin-left: 6em; }</pre> -</dd> -<dt>Empty</dt> -<dd><p></p></dd> -<dt>fields</dt> -<dd><p>must not lead to misalignment of the following content.</p> -</dd> -</dl> -</section> -<section id="styling-with-class-arguments"> -<h3><a class="toc-backref" href="#toc-entry-49"><span class="sectnum">4.2</span> Styling with Class Arguments</a></h3> -<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"> -<h4><a class="toc-backref" href="#toc-entry-50"><span class="sectnum">4.2.1</span> Description Lists</a></h4> -<p>Definition lists with the "description" class argument:</p> -<dl class="description"> -<dt>description lists</dt> -<dd><p>Definition lists that are styled like in most dictionaries, -encyclopedias etc. (as well as the LaTeX <cite>description</cite> environment).</p> -</dd> -<dt>label</dt> -<dd><p>The term to be described. Put in boldface or italic.</p> -</dd> -<dt>Content</dt> -<dd><p>starts on the same line and has a hanging indent.</p> -</dd> -<dt>A label without content</dt> -<dd><!-- --> -</dd> -<dt>and the next label</dt> -<dd><p>must align.</p> -</dd> -<dt>as well</dt> -<dd><p>as content containing more than one</p> -<p>paragraph</p> -</dd> -<dt>or</dt> -<dd><ul class="simple"> -<li><p>nested lists</p></li> -<li><p>item 2</p></li> -</ul> -</dd> -<dt>or</dt> -<dd><dl class="simple"> -<dt>nested</dt> -<dd><p>definition lists</p> -</dd> -</dl> -</dd> -</dl> -</section> -<section id="field-list-variants"> -<h4><a class="toc-backref" href="#toc-entry-51"><span class="sectnum">4.2.2</span> Field List Variants</a></h4> -<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"> -<dt><em>compact</em></dt> -<dd><dl class="compact field-list simple"> -<dt>Feature</dt> -<dd><p>No additional space between list items.</p> -</dd> -<dt>Option</dt> -<dd><p>The <span class="docutils literal"><span class="pre">--compact-field-lists</span></span> command line option (and the -corresponding configuration setting) set the <cite>compact</cite> -class argument on all "simple" field lists, if not -overridden with <cite>open</cite>.</p> -</dd> -<dt>Use</dt> -<dd><p>For lists with short field body.</p> -</dd> -</dl> -</dd> -<dt><em>open</em></dt> -<dd><dl class="open field-list"> -<dt>Feature</dt> -<dd><p>Additional space between list items also in "simple" lists. -(Overrides the <span class="docutils literal"><span class="pre">--compact-field-lists</span></span> command line -option and the corresponding configuration setting)</p> -</dd> -<dt>Use</dt> -<dd><p>For "simple" lists that should keep the space between list items.</p> -</dd> -</dl> -</dd> -<dt><em>narrow</em></dt> -<dd><dl class="narrow field-list simple"> -<dt>Feature</dt> -<dd><p>Less indented field body.</p> -</dd> -<dt>Use</dt> -<dd><p>For lists with short field names.</p> -</dd> -<dt>A long field name</dt> -<dd><p>sticks into the field body and the field body starts on a -new line (if not combined with <a class="reference internal" href="#run-in">run-in</a>).</p> -</dd> -</dl> -</dd> -</dl> -<dl class="simple" id="run-in"> -<dt><em>run-in</em></dt> -<dd><dl class="run-in field-list simple"> -<dt>Feature</dt> -<dd><p>Field body starts on the same line also after long field -names.</p> -</dd> -<dt>A long field name</dt> -<dd><p>sticks into the field body which continues on -the same line.</p> -</dd> -<dt>The next field name</dt> -<dd><p>and field body should align. Long text in the field -body is wrapped and aligns with other fields.</p> -</dd> -</dl> -</dd> -</dl> -</section> -<section id="table-variants"> -<h4><a class="toc-backref" href="#toc-entry-52"><span class="sectnum">4.2.3</span> Table Variants</a></h4> -<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> -<ul> -<li><p>Numbered tables can be achieved with the "numbered" class option:</p> -<table class="numbered"> -<caption>truth values</caption> -<colgroup> -<col style="width: 29%" /> -<col style="width: 29%" /> -<col style="width: 42%" /> -</colgroup> -<thead> -<tr><th class="head"><p>A</p></th> -<th class="head"><p>B</p></th> -<th class="head"><p>A or B</p></th> -</tr> -</thead> -<tbody> -<tr><td><p>False</p></td> -<td><p>False</p></td> -<td><p>False</p></td> -</tr> -<tr><td><p>True</p></td> -<td><p>False</p></td> -<td><p>True</p></td> -</tr> -<tr><td><p>False</p></td> -<td><p>True</p></td> -<td><p>True</p></td> -</tr> -<tr><td><p>True</p></td> -<td><p>True</p></td> -<td><p>True</p></td> -</tr> -</tbody> -</table> -<p>Currently, referencing to the table by number is not supported. This is a -common request and already on the <cite>TODO list</cite>.</p> -</li> -<li><p>A table with "booktabs" class value, is rendered similar to the style -from the <a class="reference external" href="http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf">booktabs</a> <a class="footnote-reference brackets" href="#footnote-11" id="footnote-reference-24">11</a> LaTeX package.</p> -</li> -</ul> -<p>"Booktabs" style table, numbered, centre-aligned, with auto-sized columns:</p> -<blockquote> -<table class="booktabs numbered colwidths-auto align-center"> -<caption>I/O values</caption> -<thead> -<tr><th class="head" colspan="2"><p>Input</p></th> -<th class="head"><p>Output</p></th> -</tr> -<tr><th class="head"><p>A</p></th> -<th class="head"><p>B</p></th> -<th class="head"><p>A or B</p></th> -</tr> -</thead> -<tbody> -<tr><td><p>False</p></td> -<td><p>False</p></td> -<td><p>False</p></td> -</tr> -<tr><td><p>True</p></td> -<td><p>False</p></td> -<td><p>True</p></td> -</tr> -<tr><td><p>False</p></td> -<td><p>True</p></td> -<td><p>True</p></td> -</tr> -<tr><td><p>True</p></td> -<td><p>True</p></td> -<td><p>True</p></td> -</tr> -</tbody> -</table> -</blockquote> -</section> -<section id="numbered-figures"> -<h4><a class="toc-backref" href="#toc-entry-53"><span class="sectnum">4.2.4</span> Numbered Figures</a></h4> -<p>Numbered figures can be achieved with the "numbered" <span class="docutils literal">:figclass:</span> option:</p> -<figure class="numbered"> -<img alt="reStructuredText, the markup syntax" src="../../../docs/user/rst/images/title.svg" style="width: 100%;" /> -<figcaption> -<p>SVG image in a numbered figure.</p> -</figcaption> -</figure> -</section> -</section> -</section> <section id="error-handling"> -<h2><a class="toc-backref" href="#toc-entry-54"><span class="sectnum">5</span> Error Handling</a></h2> +<h2><a class="toc-backref" href="#toc-entry-52"><span class="sectnum">4</span> Error Handling</a></h2> <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> @@ -1820,23 +1741,23 @@ section, "Docutils System Messages":</p> <section class="system-messages"> <h2>Docutils System Messages</h2> <div class="system-message" id="system-message-1"> -<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 104); <em><a href="#problematic-1">backlink</a></em></p> +<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 99); <em><a href="#problematic-1">backlink</a></em></p> <p>Undefined substitution referenced: "problematic".</p> </div> <div class="system-message" id="system-message-2"> -<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 392); <em><a href="#footnote-reference-8">backlink</a></em></p> +<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 387); <em><a href="#footnote-reference-8">backlink</a></em></p> <p>Unknown target name: "5".</p> </div> <div class="system-message" id="system-message-3"> -<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 401); <em><a href="#citation-reference-3">backlink</a></em></p> +<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 396); <em><a href="#citation-reference-3">backlink</a></em></p> <p>Unknown target name: "nonexistent".</p> </div> <div class="system-message" id="system-message-4"> -<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 428); <em><a href="#problematic-2">backlink</a></em></p> +<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 423); <em><a href="#problematic-2">backlink</a></em></p> <p>Unknown target name: "hyperlink reference without a target".</p> </div> <div class="system-message" id="system-message-5"> -<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 441); <em><a href="#problematic-3">backlink</a></em></p> +<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 436); <em><a href="#problematic-3">backlink</a></em></p> <p>Duplicate target name, cannot be used as a unique reference: "duplicate target names".</p> </div> </section> diff --git a/docutils/test/functional/expected/standalone_rst_latex.tex b/docutils/test/functional/expected/standalone_rst_latex.tex index 24387c141..302a38077 100644 --- a/docutils/test/functional/expected/standalone_rst_latex.tex +++ b/docutils/test/functional/expected/standalone_rst_latex.tex @@ -341,8 +341,8 @@ Paragraphs contain text and may contain inline markup: \emph{emphasis}, (\url{http://www.python.org}), external hyperlinks (\href{http://www.python.org/}{Python}\DUfootnotemark{footnote-reference-10}{footnote-6}{5}), internal cross-references (\hyperref[example]{example}), external hyperlinks with embedded URIs (\href{http://www.python.org}{Python web site}), \href{http://www.python.org/}{anonymous hyperlink -references}\DUfootnotemark{footnote-reference-16}{footnote-6}{5} (\href{http://docutils.sourceforge.net/}{a second reference}\DUfootnotemark{footnote-reference-17}{footnote-9}{8}), footnote references (manually -numbered\DUfootnotemark{footnote-reference-1}{footnote-1}{1}, anonymous auto-numbered\DUfootnotemark{footnote-reference-2}{footnote-2}{3}, labeled auto-numbered\DUfootnotemark{footnote-reference-3}{label}{2}, or symbolic\DUfootnotemark{footnote-reference-4}{footnote-3}{*}), citation references (\hyperlink{cit2002}{[CIT2002]}), +references}\DUfootnotemark{footnote-reference-16}{footnote-6}{5} (\href{https://docutils.sourceforge.io/}{a second reference}\DUfootnotemark{footnote-reference-17}{footnote-9}{8}), footnote references (manually +numbered\DUfootnotemark{footnote-reference-1}{footnote-1}{1}, anonymous auto-numbered\DUfootnotemark{footnote-reference-2}{footnote-2}{3}, labeled auto-numbered\DUfootnotemark{footnote-reference-3}{label}{2}, or symbolic\DUfootnotemark{footnote-reference-4}{footnote-3}{*}), citation references (see \hyperlink{cit2002}{[CIT2002]}), substitution references (\includegraphics{../../../docs/user/rst/images/biohazard.png} \& a \emph{trimmed heart} \texttt{(U+2665):}\ding{170}), and % \phantomsection\label{inline-hyperlink-targets}inline hyperlink targets @@ -814,8 +814,7 @@ this: % \phantomsection\label{contents} These are just a sample of the many reStructuredText Directives. For -others, please see -\url{http://docutils.sourceforge.net/docs/ref/rst/directives.html}. +others, please see \href{https://docutils.sourceforge.io/docs/ref/rst/directives.html}{reStructuredText Directives}\DUfootnotemark{footnote-reference-18}{footnote-10}{9}. \subsubsection{2.14.1 Document Parts% @@ -833,11 +832,11 @@ document (a document-wide \hyperref[table-of-contents]{table of contents}). An image directive (also clickable – a hyperlink reference): -\hyperref[directives]{\includegraphics{../../../docs/user/rst/images/title.png}} +\hyperref[directives]{\includegraphics[width=0.700\linewidth]{../../../docs/user/rst/images/title.png}} Image with multiple IDs: -\includegraphics{../../../docs/user/rst/images/title.png} +\includegraphics{../../../docs/user/rst/images/biohazard.png} \phantomsection\label{image-target-3}\label{image-target-2}\label{image-target-1} A centered image: @@ -868,18 +867,15 @@ An image 2 em wide: \includegraphics[width=2em]{../../../docs/user/rst/images/biohazard.png} -An image 2 em wide and 15 pixel high: +An image 2 cm wide and 15 pixel high: -\includegraphics[height=15px,width=2em]{../../../docs/user/rst/images/biohazard.png} +\includegraphics[height=15px,width=2cm]{../../../docs/user/rst/images/biohazard.png} +Relative units allow adaption of the image to the screen or paper size. An image occupying 50\% of the line width: \includegraphics[width=0.500\linewidth]{../../../docs/user/rst/images/title.png} -An image 2 cm high: - -\includegraphics[height=2cm]{../../../docs/user/rst/images/biohazard.png} - A \emph{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. @@ -1250,10 +1246,18 @@ allowed (e.g. inside a directive). } % \DUfootnotetext{footnote-9}{footnote-reference-17}{8}{% -\url{http://docutils.sourceforge.net/} +\url{https://docutils.sourceforge.io/} } % \DUfootnotetext{footnote-10}{footnote-reference-18}{9}{% +\url{https://docutils.sourceforge.io/docs/ref/rst/directives.html} +} +% +\DUfootnotetext{footnote-11}{footnote-reference-19}{10}{% +\url{https://docutils.sourceforge.io/docs/ref/rst/directives.html\#metadata} +} +% +\DUfootnotetext{footnote-12}{footnote-reference-20}{11}{% \url{A:DOS\\path\\} } @@ -1476,6 +1480,14 @@ as a code block, here the rst file \texttt{header\_footer.txt} with line numbers \end{DUclass} +\subsubsection{2.14.11 Meta% + \label{meta}% +} + +The \href{https://docutils.sourceforge.io/docs/ref/rst/directives.html\#metadata}{“meta” directive}\DUfootnotemark{footnote-reference-19}{footnote-11}{10} is used to specify metadata to be stored in, +e.g., HTML META tags or ODT file properties. + + \subsection{2.15 Substitution Definitions% \label{substitution-definitions}% } @@ -1681,8 +1693,8 @@ body row 3 Here’s a list table exercising all features: \begin{DUclass}{test} -\setlength{\DUtablewidth}{40em}% -\begin{longtable}{|p{0.133\DUtablewidth}|p{0.249\DUtablewidth}|p{0.365\DUtablewidth}|} +\setlength{\DUtablewidth}{0.950\linewidth}% +\begin{longtable}{|p{0.133\DUtablewidth}|p{0.110\DUtablewidth}|p{0.249\DUtablewidth}|} \caption{list table with integral header}\\ \hline \textbf{% @@ -2754,7 +2766,7 @@ Handling by the LaTeX writer: \url{http://www.w3.org/XML/Schema\#dev} \item[] \href{http://www.w3.org/XML/Schema\%dev}{URL with \%} \url{http://example.org/Schema\%dev} -\item[] \href{A:DOS\\path\\}{file with DOS path}\DUfootnotemark{footnote-reference-18}{footnote-10}{9} \url{A:DOS\\path\\}\DUfootnotemark{footnote-reference-19}{footnote-10}{9} +\item[] \href{A:DOS\\path\\}{file with DOS path}\DUfootnotemark{footnote-reference-20}{footnote-12}{11} \url{A:DOS\\path\\}\DUfootnotemark{footnote-reference-21}{footnote-12}{11} \end{DUlineblock} \DUadmonition[note]{ @@ -2765,7 +2777,7 @@ These URLs are typeset inside a LaTeX command without error. \begin{DUlineblock}{0em} \item[] \url{http://www.w3.org/XML/Schema\#dev} \item[] \url{http://example.org/Schema\%dev} -\item[] \url{A:DOS\\path\\}\DUfootnotemark{footnote-reference-20}{footnote-10}{9} +\item[] \url{A:DOS\\path\\}\DUfootnotemark{footnote-reference-22}{footnote-12}{11} \end{DUlineblock} } \end{itemize} @@ -2870,7 +2882,7 @@ section, “Docutils System Messages”: \DUtitle[system-message]{system-message \raisebox{1em}{\hypertarget{system-message-1}{}}} -{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~104 +{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~99 \hyperlink{problematic-1}{ Undefined substitution referenced: \textquotedbl{}problematic\textquotedbl{}. @@ -2880,7 +2892,7 @@ Undefined substitution referenced: \textquotedbl{}problematic\textquotedbl{}. \DUtitle[system-message]{system-message \raisebox{1em}{\hypertarget{system-message-2}{}}} -{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~392 +{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~387 \hyperlink{footnote-reference-8}{ Unknown target name: \textquotedbl{}5\textquotedbl{}. @@ -2890,7 +2902,7 @@ Unknown target name: \textquotedbl{}5\textquotedbl{}. \DUtitle[system-message]{system-message \raisebox{1em}{\hypertarget{system-message-3}{}}} -{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~401 +{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~396 \hyperlink{citation-reference-3}{ Unknown target name: \textquotedbl{}nonexistent\textquotedbl{}. @@ -2900,7 +2912,7 @@ Unknown target name: \textquotedbl{}nonexistent\textquotedbl{}. \DUtitle[system-message]{system-message \raisebox{1em}{\hypertarget{system-message-4}{}}} -{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~428 +{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~423 \hyperlink{problematic-2}{ Unknown target name: \textquotedbl{}hyperlink reference without a target\textquotedbl{}. @@ -2910,7 +2922,7 @@ Unknown target name: \textquotedbl{}hyperlink reference without a target\textquo \DUtitle[system-message]{system-message \raisebox{1em}{\hypertarget{system-message-5}{}}} -{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~441 +{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~436 \hyperlink{problematic-3}{ Duplicate target name, cannot be used as a unique reference: \textquotedbl{}duplicate target names\textquotedbl{}. diff --git a/docutils/test/functional/expected/standalone_rst_pseudoxml.txt b/docutils/test/functional/expected/standalone_rst_pseudoxml.txt index 70eaf6dbf..d125af833 100644 --- a/docutils/test/functional/expected/standalone_rst_pseudoxml.txt +++ b/docutils/test/functional/expected/standalone_rst_pseudoxml.txt @@ -83,8 +83,6 @@ <target refid="subtitle"> <comment xml:space="preserve"> bibliographic fields (which also require a transform): - <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"> <raw format="latex" xml:space="preserve"> \pagebreak[4] % start ToC on new page <topic classes="contents" ids="table-of-contents" names="table\ of\ contents"> @@ -288,57 +286,63 @@ <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-33" refid="substitution-definitions"> + <reference ids="toc-entry-34" refid="substitution-definitions"> <generated classes="sectnum"> 2.15 Substitution Definitions <list_item> <paragraph> - <reference ids="toc-entry-34" refid="comments"> + <reference ids="toc-entry-35" refid="comments"> <generated classes="sectnum"> 2.16 Comments <list_item> <paragraph> - <reference ids="toc-entry-35" refid="raw-text"> + <reference ids="toc-entry-36" refid="raw-text"> <generated classes="sectnum"> 2.17 Raw text <list_item> <paragraph> - <reference ids="toc-entry-36" refid="container"> + <reference ids="toc-entry-37" refid="container"> <generated classes="sectnum"> 2.18 Container <list_item> <paragraph> - <reference ids="toc-entry-37" refid="colspanning-tables"> + <reference ids="toc-entry-38" refid="colspanning-tables"> <generated classes="sectnum"> 2.19 Colspanning tables <list_item> <paragraph> - <reference ids="toc-entry-38" refid="rowspanning-tables"> + <reference ids="toc-entry-39" refid="rowspanning-tables"> <generated classes="sectnum"> 2.20 Rowspanning tables <list_item> <paragraph> - <reference ids="toc-entry-39" refid="complex-tables"> + <reference ids="toc-entry-40" refid="complex-tables"> <generated classes="sectnum"> 2.21 Complex tables <list_item> <paragraph> - <reference ids="toc-entry-40" refid="list-tables"> + <reference ids="toc-entry-41" refid="list-tables"> <generated classes="sectnum"> 2.22 List Tables <list_item> <paragraph> - <reference ids="toc-entry-41" refid="error-handling"> + <reference ids="toc-entry-42" refid="error-handling"> <generated classes="sectnum"> 3 Error Handling @@ -432,7 +436,7 @@ <footnote_reference auto="1" ids="footnote-reference-14" refid="footnote-6"> 5 ( - <reference anonymous="1" name="a second reference" refuri="http://docutils.sourceforge.net/"> + <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"> @@ -450,7 +454,7 @@ , or symbolic <footnote_reference auto="*" ids="footnote-reference-4" refid="footnote-3"> * - ), citation references ( + ), citation references (see <citation_reference ids="citation-reference-1" refid="cit2002"> CIT2002 ), @@ -492,7 +496,7 @@ subtitle . <target anonymous="1" ids="target-1" refuri="http://www.python.org/"> - <target anonymous="1" ids="target-2" refuri="http://docutils.sourceforge.net/"> + <target anonymous="1" ids="target-2" refuri="https://docutils.sourceforge.io/"> <paragraph> The default role for interpreted text is <title_reference> @@ -1146,7 +1150,7 @@ <generated classes="sectnum"> 2.13.2 Duplicate Target Names - <system_message backrefs="duplicate-target-names-1" level="1" line="439" source="functional/input/data/standard.txt" type="INFO"> + <system_message backrefs="duplicate-target-names-1" level="1" line="434" source="functional/input/data/standard.txt" type="INFO"> <paragraph> Duplicate implicit target name: "duplicate target names". <paragraph> @@ -1165,72 +1169,82 @@ <bullet_list classes="auto-toc"> <list_item> <paragraph> - <reference ids="toc-entry-42" refid="document-parts"> + <reference ids="toc-entry-43" refid="document-parts"> <generated classes="sectnum"> 2.14.1 Document Parts <list_item> <paragraph> - <reference ids="toc-entry-43" refid="images-and-figures"> + <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-44" refid="tables"> + <reference ids="toc-entry-45" refid="tables"> <generated classes="sectnum"> 2.14.3 Tables <list_item> <paragraph> - <reference ids="toc-entry-45" refid="admonitions"> + <reference ids="toc-entry-46" refid="admonitions"> <generated classes="sectnum"> 2.14.4 Admonitions <list_item> <paragraph> - <reference ids="toc-entry-46" refid="topics-sidebars-and-rubrics"> + <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-47" refid="target-footnotes"> + <reference ids="toc-entry-48" refid="target-footnotes"> <generated classes="sectnum"> 2.14.6 Target Footnotes <list_item> <paragraph> - <reference ids="toc-entry-48" refid="replacement-text"> + <reference ids="toc-entry-49" refid="replacement-text"> <generated classes="sectnum"> 2.14.7 Replacement Text <list_item> <paragraph> - <reference ids="toc-entry-49" refid="compound-paragraph"> + <reference ids="toc-entry-50" refid="compound-paragraph"> <generated classes="sectnum"> 2.14.8 Compound Paragraph <list_item> <paragraph> - <reference ids="toc-entry-50" refid="parsed-literal-blocks"> + <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-51" refid="code"> + <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 refuri="http://docutils.sourceforge.net/docs/ref/rst/directives.html"> - http://docutils.sourceforge.net/docs/ref/rst/directives.html + 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-42"> + <title auto="1" refid="toc-entry-43"> <generated classes="sectnum"> 2.14.1 Document Parts @@ -1245,20 +1259,20 @@ table of contents ). <section ids="images-and-figures" names="images\ and\ figures"> - <title auto="1" refid="toc-entry-43"> + <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"> + <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/title.png"> + <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"> @@ -1287,15 +1301,13 @@ An image 2 em wide: <image uri="../../../docs/user/rst/images/biohazard.png" width="2em"> <paragraph> - An image 2 em wide and 15 pixel high: - <image height="15px" uri="../../../docs/user/rst/images/biohazard.png" width="2em"> + 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> - An image 2 cm high: - <image height="2cm" uri="../../../docs/user/rst/images/biohazard.png"> - <paragraph> A <emphasis> figure @@ -1382,7 +1394,7 @@ 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"> + <title auto="1" refid="toc-entry-45"> <generated classes="sectnum"> 2.14.3 Tables @@ -1543,7 +1555,7 @@ <paragraph> True <section ids="admonitions" names="admonitions"> - <title auto="1" refid="toc-entry-45"> + <title auto="1" refid="toc-entry-46"> <generated classes="sectnum"> 2.14.4 Admonitions @@ -1591,9 +1603,9 @@ And, by the way... <paragraph> You can make up your own admonition too. - <target ids="docutils" names="docutils" refuri="http://docutils.sourceforge.net/"> + <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-46"> + <title auto="1" refid="toc-entry-47"> <generated classes="sectnum"> 2.14.5 Topics, Sidebars, and Rubrics @@ -1640,7 +1652,7 @@ is not allowed (e.g. inside a directive). <section ids="target-footnotes" names="target\ footnotes"> - <title auto="1" refid="toc-entry-47"> + <title auto="1" refid="toc-entry-48"> <generated classes="sectnum"> 2.14.6 Target Footnotes @@ -1660,10 +1672,22 @@ <label> 7 <paragraph> - <reference refuri="http://docutils.sourceforge.net/"> - http://docutils.sourceforge.net/ + <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-48"> + <title auto="1" refid="toc-entry-49"> <generated classes="sectnum"> 2.14.7 Replacement Text @@ -1684,7 +1708,7 @@ the best language around <section ids="compound-paragraph" names="compound\ paragraph"> - <title auto="1" refid="toc-entry-49"> + <title auto="1" refid="toc-entry-50"> <generated classes="sectnum"> 2.14.8 Compound Paragraph @@ -1839,7 +1863,7 @@ <paragraph> and the final paragraph of the compound 7. <section ids="parsed-literal-blocks" names="parsed\ literal\ blocks"> - <title auto="1" refid="toc-entry-50"> + <title auto="1" refid="toc-entry-51"> <generated classes="sectnum"> 2.14.9 Parsed Literal Blocks @@ -1880,7 +1904,7 @@ <target ids="references" names="references" refuri="http://www.python.org/"> . <section ids="code" names="code"> - <title auto="1" refid="toc-entry-51"> + <title auto="1" refid="toc-entry-52"> <generated classes="sectnum"> 2.14.10 Code @@ -1957,8 +1981,25 @@ 2 .. footer:: Document footer <target ids="pygments" names="pygments" refuri="http://pygments.org/"> + <section ids="meta" names="meta"> + <title auto="1" refid="toc-entry-53"> + <generated classes="sectnum"> + 2.14.11 + Meta + <paragraph> + The + <reference anonymous="1" name="“meta” directive" refuri="https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata"> + “meta” directive + + <footnote_reference auto="1" ids="footnote-reference-17" refid="footnote-10"> + 9 + is used to specify metadata to be stored in, + e.g., HTML META tags or ODT file properties. + <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"> + <target anonymous="1" ids="target-6" refuri="https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata"> <section ids="substitution-definitions" names="substitution\ definitions"> - <title auto="1" refid="toc-entry-33"> + <title auto="1" refid="toc-entry-34"> <generated classes="sectnum"> 2.15 Substitution Definitions @@ -1975,7 +2016,7 @@ <paragraph> (Substitution definitions are not visible in the HTML source.) <section ids="comments" names="comments"> - <title auto="1" refid="toc-entry-34"> + <title auto="1" refid="toc-entry-35"> <generated classes="sectnum"> 2.16 Comments @@ -1992,7 +2033,7 @@ <paragraph> (View the HTML source to see the comment.) <section ids="raw-text" names="raw\ text"> - <title auto="1" refid="toc-entry-35"> + <title auto="1" refid="toc-entry-36"> <generated classes="sectnum"> 2.17 Raw text @@ -2016,7 +2057,7 @@ <raw format="latex" xml:space="preserve"> Fifth test in LaTeX.\\Line two. <section ids="container" names="container"> - <title auto="1" refid="toc-entry-36"> + <title auto="1" refid="toc-entry-37"> <generated classes="sectnum"> 2.18 Container @@ -2026,7 +2067,7 @@ <paragraph> paragraph 2 <section ids="colspanning-tables" names="colspanning\ tables"> - <title auto="1" refid="toc-entry-37"> + <title auto="1" refid="toc-entry-38"> <generated classes="sectnum"> 2.19 Colspanning tables @@ -2097,7 +2138,7 @@ <paragraph> True <section ids="rowspanning-tables" names="rowspanning\ tables"> - <title auto="1" refid="toc-entry-38"> + <title auto="1" refid="toc-entry-39"> <generated classes="sectnum"> 2.20 Rowspanning tables @@ -2149,7 +2190,7 @@ <paragraph> body row 3 <section ids="complex-tables" names="complex\ tables"> - <title auto="1" refid="toc-entry-39"> + <title auto="1" refid="toc-entry-40"> <generated classes="sectnum"> 2.21 Complex tables @@ -2234,19 +2275,19 @@ --> <entry> <section ids="list-tables" names="list\ tables"> - <title auto="1" refid="toc-entry-40"> + <title auto="1" refid="toc-entry-41"> <generated classes="sectnum"> 2.22 List Tables <paragraph> Here's a list table exercising all features: - <table classes="colwidths-given test" width="40em"> + <table classes="colwidths-given test" width="95%"> <title> list table with integral header <tgroup cols="3"> <colspec colwidth="10" stub="1"> + <colspec colwidth="8"> <colspec colwidth="20"> - <colspec colwidth="30"> <thead> <row> <entry> @@ -2319,7 +2360,7 @@ <paragraph> 1.99 <section ids="error-handling" names="error\ handling"> - <title auto="1" refid="toc-entry-41"> + <title auto="1" refid="toc-entry-42"> <generated classes="sectnum"> 3 Error Handling @@ -2333,45 +2374,45 @@ <section classes="system-messages"> <title> Docutils System Messages - <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="104" source="functional/input/data/standard.txt" type="ERROR"> + <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="99" source="functional/input/data/standard.txt" type="ERROR"> <paragraph> Undefined substitution referenced: "problematic". - <system_message backrefs="footnote-reference-8" ids="system-message-2" level="3" line="392" source="functional/input/data/standard.txt" type="ERROR"> + <system_message backrefs="footnote-reference-8" ids="system-message-2" level="3" line="387" source="functional/input/data/standard.txt" type="ERROR"> <paragraph> Unknown target name: "5". - <system_message backrefs="citation-reference-3" ids="system-message-3" level="3" line="401" source="functional/input/data/standard.txt" type="ERROR"> + <system_message backrefs="citation-reference-3" ids="system-message-3" level="3" line="396" source="functional/input/data/standard.txt" type="ERROR"> <paragraph> Unknown target name: "nonexistent". - <system_message backrefs="problematic-2" ids="system-message-4" level="3" line="428" source="functional/input/data/standard.txt" type="ERROR"> + <system_message backrefs="problematic-2" ids="system-message-4" level="3" line="423" source="functional/input/data/standard.txt" type="ERROR"> <paragraph> Unknown target name: "hyperlink reference without a target". - <system_message backrefs="problematic-3" ids="system-message-5" level="3" line="441" source="functional/input/data/standard.txt" type="ERROR"> + <system_message backrefs="problematic-3" ids="system-message-5" level="3" line="436" source="functional/input/data/standard.txt" type="ERROR"> <paragraph> Duplicate target name, cannot be used as a unique reference: "duplicate target names". - <system_message level="1" line="164" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="159" source="functional/input/data/standard.txt" type="INFO"> <paragraph> Hyperlink target "target" is not referenced. - <system_message level="1" line="406" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="401" source="functional/input/data/standard.txt" type="INFO"> <paragraph> Hyperlink target "another-target" is not referenced. - <system_message level="1" line="474" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="471" source="functional/input/data/standard.txt" type="INFO"> <paragraph> Hyperlink target "image-target-1" is not referenced. - <system_message level="1" line="475" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="472" source="functional/input/data/standard.txt" type="INFO"> <paragraph> Hyperlink target "image-target-2" is not referenced. - <system_message level="1" line="476" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="473" source="functional/input/data/standard.txt" type="INFO"> <paragraph> Hyperlink target "image-target-3" is not referenced. - <system_message level="1" line="643" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="636" source="functional/input/data/standard.txt" type="INFO"> <paragraph> Hyperlink target "target1" is not referenced. - <system_message level="1" line="644" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="637" source="functional/input/data/standard.txt" type="INFO"> <paragraph> Hyperlink target "target2" is not referenced. - <system_message level="1" line="689" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="682" source="functional/input/data/standard.txt" type="INFO"> <paragraph> Hyperlink target "docutils" is not referenced. - <system_message level="1" line="855" source="functional/input/data/standard.txt" type="INFO"> + <system_message level="1" line="848" 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 bed8f2718..de0f4d5cd 100644 --- a/docutils/test/functional/expected/standalone_rst_xetex.tex +++ b/docutils/test/functional/expected/standalone_rst_xetex.tex @@ -200,8 +200,8 @@ Paragraphs contain text and may contain inline markup: \emph{emphasis}, (\url{http://www.python.org}), external hyperlinks (\href{http://www.python.org/}{Python}\DUfootnotemark{footnote-reference-10}{footnote-6}{5}), internal cross-references (\hyperref[example]{example}), external hyperlinks with embedded URIs (\href{http://www.python.org}{Python web site}), \href{http://www.python.org/}{anonymous hyperlink -references}\DUfootnotemark{footnote-reference-17}{footnote-6}{5} (\href{http://docutils.sourceforge.net/}{a second reference}\DUfootnotemark{footnote-reference-18}{footnote-10}{9}), footnote references (manually -numbered\DUfootnotemark{footnote-reference-1}{footnote-1}{1}, anonymous auto-numbered\DUfootnotemark{footnote-reference-2}{footnote-2}{3}, labeled auto-numbered\DUfootnotemark{footnote-reference-3}{label}{2}, or symbolic\DUfootnotemark{footnote-reference-4}{footnote-3}{*}), citation references (\hyperlink{cit2002}{[CIT2002]}), +references}\DUfootnotemark{footnote-reference-17}{footnote-6}{5} (\href{https://docutils.sourceforge.io/}{a second reference}\DUfootnotemark{footnote-reference-18}{footnote-10}{9}), footnote references (manually +numbered\DUfootnotemark{footnote-reference-1}{footnote-1}{1}, anonymous auto-numbered\DUfootnotemark{footnote-reference-2}{footnote-2}{3}, labeled auto-numbered\DUfootnotemark{footnote-reference-3}{label}{2}, or symbolic\DUfootnotemark{footnote-reference-4}{footnote-3}{*}), citation references (see \hyperlink{cit2002}{[CIT2002]}), substitution references (\includegraphics{../../../docs/user/rst/images/biohazard.png} \& a \emph{trimmed heart} \texttt{(U+2665):}♥), and % \phantomsection\label{inline-hyperlink-targets}inline hyperlink targets @@ -673,8 +673,7 @@ this: % \phantomsection\label{contents} These are just a sample of the many reStructuredText Directives. For -others, please see -\url{http://docutils.sourceforge.net/docs/ref/rst/directives.html}. +others, please see \href{https://docutils.sourceforge.io/docs/ref/rst/directives.html}{reStructuredText Directives}\DUfootnotemark{footnote-reference-19}{footnote-11}{10}. \subsubsection{2.14.1 Document Parts% @@ -692,11 +691,11 @@ document (a document-wide \hyperref[table-of-contents]{table of contents}). An image directive (also clickable – a hyperlink reference): -\hyperref[directives]{\includegraphics{../../../docs/user/rst/images/title.png}} +\hyperref[directives]{\includegraphics[width=0.700\linewidth]{../../../docs/user/rst/images/title.png}} Image with multiple IDs: -\includegraphics{../../../docs/user/rst/images/title.png} +\includegraphics{../../../docs/user/rst/images/biohazard.png} \phantomsection\label{image-target-3}\label{image-target-2}\label{image-target-1} A centered image: @@ -727,18 +726,15 @@ An image 2 em wide: \includegraphics[width=2em]{../../../docs/user/rst/images/biohazard.png} -An image 2 em wide and 15 pixel high: +An image 2 cm wide and 15 pixel high: -\includegraphics[height=15\pdfpxdimen,width=2em]{../../../docs/user/rst/images/biohazard.png} +\includegraphics[height=15\pdfpxdimen,width=2cm]{../../../docs/user/rst/images/biohazard.png} +Relative units allow adaption of the image to the screen or paper size. An image occupying 50\% of the line width: \includegraphics[width=0.500\linewidth]{../../../docs/user/rst/images/title.png} -An image 2 cm high: - -\includegraphics[height=2cm]{../../../docs/user/rst/images/biohazard.png} - A \emph{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. @@ -1133,10 +1129,18 @@ allowed (e.g. inside a directive). } % \DUfootnotetext{footnote-10}{footnote-reference-18}{9}{% -\url{http://docutils.sourceforge.net/} +\url{https://docutils.sourceforge.io/} } % \DUfootnotetext{footnote-11}{footnote-reference-19}{10}{% +\url{https://docutils.sourceforge.io/docs/ref/rst/directives.html} +} +% +\DUfootnotetext{footnote-12}{footnote-reference-20}{11}{% +\url{https://docutils.sourceforge.io/docs/ref/rst/directives.html\#metadata} +} +% +\DUfootnotetext{footnote-13}{footnote-reference-21}{12}{% \url{A:DOS\\path\\} } @@ -1360,6 +1364,14 @@ as a code block, here the rst file \texttt{header\_footer.txt} with line numbers \end{DUclass} +\subsubsection{2.14.11 Meta% + \label{meta}% +} + +The \href{https://docutils.sourceforge.io/docs/ref/rst/directives.html\#metadata}{“meta” directive}\DUfootnotemark{footnote-reference-20}{footnote-12}{11} is used to specify metadata to be stored in, +e.g., HTML META tags or ODT file properties. + + \subsection{2.15 Substitution Definitions% \label{substitution-definitions}% } @@ -1565,8 +1577,8 @@ body row 3 Here’s a list table exercising all features: \begin{DUclass}{test} -\setlength{\DUtablewidth}{40em}% -\begin{longtable}{|p{0.133\DUtablewidth}|p{0.249\DUtablewidth}|p{0.365\DUtablewidth}|} +\setlength{\DUtablewidth}{0.950\linewidth}% +\begin{longtable}{|p{0.133\DUtablewidth}|p{0.110\DUtablewidth}|p{0.249\DUtablewidth}|} \caption{list table with integral header}\\ \hline \textbf{% @@ -2638,7 +2650,7 @@ Handling by the LaTeX writer: \url{http://www.w3.org/XML/Schema\#dev} \item[] \href{http://www.w3.org/XML/Schema\%dev}{URL with \%} \url{http://example.org/Schema\%dev} -\item[] \href{A:DOS\\path\\}{file with DOS path}\DUfootnotemark{footnote-reference-19}{footnote-11}{10} \url{A:DOS\\path\\}\DUfootnotemark{footnote-reference-20}{footnote-11}{10} +\item[] \href{A:DOS\\path\\}{file with DOS path}\DUfootnotemark{footnote-reference-21}{footnote-13}{12} \url{A:DOS\\path\\}\DUfootnotemark{footnote-reference-22}{footnote-13}{12} \end{DUlineblock} \begin{DUclass}{note} @@ -2650,7 +2662,7 @@ These URLs are typeset inside a LaTeX command without error. \begin{DUlineblock}{0em} \item[] \url{http://www.w3.org/XML/Schema\#dev} \item[] \url{http://example.org/Schema\%dev} -\item[] \url{A:DOS\\path\\}\DUfootnotemark{footnote-reference-21}{footnote-11}{10} +\item[] \url{A:DOS\\path\\}\DUfootnotemark{footnote-reference-23}{footnote-13}{12} \end{DUlineblock} \end{DUadmonition} \end{DUclass} @@ -2771,7 +2783,7 @@ section, “Docutils System Messages”: \DUtitle{system-message \raisebox{1em}{\hypertarget{system-message-1}{}}} -{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~104 +{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~99 \hyperlink{problematic-1}{ Undefined substitution referenced: \textquotedbl{}problematic\textquotedbl{}. @@ -2783,7 +2795,7 @@ Undefined substitution referenced: \textquotedbl{}problematic\textquotedbl{}. \DUtitle{system-message \raisebox{1em}{\hypertarget{system-message-2}{}}} -{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~392 +{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~387 \hyperlink{footnote-reference-8}{ Unknown target name: \textquotedbl{}5\textquotedbl{}. @@ -2795,7 +2807,7 @@ Unknown target name: \textquotedbl{}5\textquotedbl{}. \DUtitle{system-message \raisebox{1em}{\hypertarget{system-message-3}{}}} -{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~401 +{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~396 \hyperlink{citation-reference-3}{ Unknown target name: \textquotedbl{}nonexistent\textquotedbl{}. @@ -2807,7 +2819,7 @@ Unknown target name: \textquotedbl{}nonexistent\textquotedbl{}. \DUtitle{system-message \raisebox{1em}{\hypertarget{system-message-4}{}}} -{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~428 +{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~423 \hyperlink{problematic-2}{ Unknown target name: \textquotedbl{}hyperlink reference without a target\textquotedbl{}. @@ -2819,7 +2831,7 @@ Unknown target name: \textquotedbl{}hyperlink reference without a target\textquo \DUtitle{system-message \raisebox{1em}{\hypertarget{system-message-5}{}}} -{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~441 +{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~436 \hyperlink{problematic-3}{ Duplicate target name, cannot be used as a unique reference: \textquotedbl{}duplicate target names\textquotedbl{}. diff --git a/docutils/test/functional/input/data/html5-features.txt b/docutils/test/functional/input/data/html5-features.txt index 51f7c0efd..6c9e5087d 100644 --- a/docutils/test/functional/input/data/html5-features.txt +++ b/docutils/test/functional/input/data/html5-features.txt @@ -1,3 +1,36 @@ +Changes to the `html4css1` Writer +================================= + +* Use only meta keywords recognized by HTML 5. + Add HTML5-compatible meta tags for docinfo items + "authors", "date", and "copyright". + +* Set table column widths with <style="width: ...">, not "width" argument. + +* Horizontal alignment of table heads with CSS. + +* Field lists as styled definition lists. + +* Do not drop paragraph objects, use CSS rules to prevent unwanted vertical + space. + +* Put subtitles in <p> elements. + +* Use the new semantic tags <main>, <section>, <header>, + <footer>, <aside>, <figure>, and <figcaption>. + See ``minimal.css`` and ``responsive.css`` for styling rule examples. + + Change the `initial_header_level` setting default to "2", as browsers + use the `same style for <h1> and <h2> when nested in a <section\>`__. + + __ https://stackoverflow.com/questions/39547412/same-font-size-for-h1-and-h2-in-article + +* Use HTML text-level tags <small>, <s>, <q>, <dfn>, <var>, <samp>, <kbd>, + <i>, <b>, <u>, <mark>, and <bdi> if a matching class value + is found in `inline` and `literal` elements. + Use <ins> and <del> if a matching class value + is found in `inline`, `literal`, or `container` elements. + Field List Rendering -------------------- diff --git a/docutils/test/functional/input/data/list_table.txt b/docutils/test/functional/input/data/list_table.txt index 27315c9e2..7cac662ed 100644 --- a/docutils/test/functional/input/data/list_table.txt +++ b/docutils/test/functional/input/data/list_table.txt @@ -5,8 +5,8 @@ Here's a list table exercising all features: .. list-table:: list table with integral header :class: test - :width: 40em - :widths: 10 20 30 + :width: 95% + :widths: 10 8 20 :header-rows: 1 :stub-columns: 1 diff --git a/docutils/test/functional/input/data/standard.txt b/docutils/test/functional/input/data/standard.txt index 12e2fd1bf..854055739 100644 --- a/docutils/test/functional/input/data/standard.txt +++ b/docutils/test/functional/input/data/standard.txt @@ -51,11 +51,6 @@ This is a test document, containing at least one example of each reStructuredText construct. -.. meta:: - :keywords: reStructuredText, test, parser - :description lang=en: A test document, containing at least one - example of each reStructuredText construct. - .. raw:: latex \pagebreak[4] % start ToC on new page @@ -108,7 +103,7 @@ cross-references (example_), external hyperlinks with embedded URIs (`Python web site <http://www.python.org>`__), `anonymous hyperlink references`__ (`a second reference`__), footnote references (manually numbered [1]_, anonymous auto-numbered [#]_, labeled auto-numbered -[#label]_, or symbolic [*]_), citation references ([CIT2002]_), +[#label]_, or symbolic [*]_), citation references (see [CIT2002]_), substitution references (|example| & a *trimmed heart* ``(U+2665):`` |heart|), and _`inline hyperlink targets` (see Targets_ below for a reference back to here). Character-level @@ -118,7 +113,7 @@ inline markup is also possible (although exceedingly ugly!) in *re*\ reference to the doctitle_ and the subtitle_. __ http://www.python.org/ -__ http://docutils.sourceforge.net/ +__ https://docutils.sourceforge.io/ The default role for interpreted text is `Title Reference`. Here are some explicit interpreted text roles: a PEP reference (:PEP:`287`); an @@ -448,8 +443,9 @@ Directives .. contents:: :local: These are just a sample of the many reStructuredText Directives. For -others, please see -http://docutils.sourceforge.net/docs/ref/rst/directives.html. +others, please see `reStructuredText Directives`__. + +__ https://docutils.sourceforge.io/docs/ref/rst/directives.html Document Parts `````````````` @@ -466,13 +462,14 @@ An image directive (also clickable -- a hyperlink reference): .. image:: ../../../docs/user/rst/images/title.png :class: class1 class2 :target: directives_ + :width: 70% Image with multiple IDs: .. _image target 1: .. _image target 2: .. _image target 3: -.. image:: ../../../docs/user/rst/images/title.png +.. image:: ../../../docs/user/rst/images/biohazard.png A centered image: @@ -506,22 +503,18 @@ An image 2 em wide: .. image:: ../../../docs/user/rst/images/biohazard.png :width: 2 em -An image 2 em wide and 15 pixel high: +An image 2 cm wide and 15 pixel high: .. image:: ../../../docs/user/rst/images/biohazard.png - :width: 2em + :width: 2cm :height: 15 px +Relative units allow adaption of the image to the screen or paper size. An image occupying 50% of the line width: .. image:: ../../../docs/user/rst/images/title.png :width: 50% -An image 2 cm high: - -.. image:: ../../../docs/user/rst/images/biohazard.png - :height: 2 cm - A *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. @@ -686,7 +679,7 @@ Admonitions You can make up your own admonition too. - .. _Docutils: http://docutils.sourceforge.net/ + .. _Docutils: https://docutils.sourceforge.io/ Topics, Sidebars, and Rubrics ````````````````````````````` @@ -903,6 +896,21 @@ as a code block, here the rst file ``header_footer.txt`` with line numbers: .. _Pygments: http://pygments.org/ + +Meta +```` + +The `“meta” directive`__ is used to specify metadata to be stored in, +e.g., HTML META tags or ODT file properties. + +.. meta:: + :keywords: reStructuredText, test, parser + :description lang=en: A test document, containing at least one + example of each reStructuredText construct. + +__ https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata + + Substitution Definitions ------------------------ diff --git a/docutils/test/functional/input/standalone_rst_html5.txt b/docutils/test/functional/input/standalone_rst_html5.txt index 96755e0fc..c9404ef99 100644 --- a/docutils/test/functional/input/standalone_rst_html5.txt +++ b/docutils/test/functional/input/standalone_rst_html5.txt @@ -6,30 +6,10 @@ .. include:: data/list_table.txt .. include:: data/custom_roles.txt -HTML Specific -============= - -.. include:: data/svg_images.txt -.. include:: data/swf_images.txt -.. include:: data/html5-text-level-tags.txt - -Changes to the `html4css1` Writer -================================= - -* Use only meta keywords recognized by HTML 5. - -* Set table column widths with <style="width: ...">, not "width" argument. - -* Horizontal alignment of table heads with CSS. - -* Field lists as styled definition lists. - -* Do not drop paragraph objects, use CSS rules to prevent unwanted vertical - space. - -* Put subtitles in <p> elements. +.. HTML Specific .. include:: data/html5-features.txt +.. include:: data/html5-text-level-tags.txt .. include:: data/errors.txt |
