summaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2005-08-17 13:59:12 +0000
committerwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2005-08-17 13:59:12 +0000
commita4bc0d09f3d1f633a5780976d1f913e083c9564a (patch)
tree1777475e88463b08438f0719be97cc087554eadd /test/functional
parent60c69f8cf97125135948a3d35b7698ee80921137 (diff)
parent2818db9a234cc37008c5f2bb0e821f9b1fa92de2 (diff)
downloaddocutils-0.3.9.tar.gz
re-added docutils-0.3.9 tag one level deeper (without web/ and sandboxes/)docutils-0.3.9
git-svn-id: http://svn.code.sf.net/p/docutils/code/tags/docutils-0.3.9@3815 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/README.txt5
-rw-r--r--test/functional/expected/dangerous.html66
-rw-r--r--test/functional/expected/field_name_limit.html28
-rw-r--r--test/functional/expected/latex_docinfo.tex85
-rw-r--r--test/functional/expected/misc_rst_html4css1.html15
-rw-r--r--test/functional/expected/pep_html.html92
-rw-r--r--test/functional/expected/standalone_rst_html4css1.html949
-rw-r--r--test/functional/expected/standalone_rst_latex.tex1482
-rw-r--r--test/functional/expected/standalone_rst_pseudoxml.txt1726
-rw-r--r--test/functional/input/dangerous.txt16
-rw-r--r--test/functional/input/data/errors.txt9
-rw-r--r--test/functional/input/data/header_footer.txt2
-rw-r--r--test/functional/input/data/latex.txt120
-rw-r--r--test/functional/input/data/list_table.txt24
-rw-r--r--test/functional/input/data/nonalphanumeric.txt13
-rw-r--r--test/functional/input/data/standard.txt670
-rw-r--r--test/functional/input/data/table_colspan.txt15
-rw-r--r--test/functional/input/data/table_complex.txt21
-rw-r--r--test/functional/input/data/table_rowspan.txt15
-rw-r--r--test/functional/input/data/unicode.txt27
-rw-r--r--test/functional/input/field_list.txt5
-rw-r--r--test/functional/input/latex_docinfo.txt10
-rw-r--r--test/functional/input/pep_html.txt32
-rw-r--r--test/functional/input/simple.txt1
-rw-r--r--test/functional/input/standalone_rst_html4css1.txt7
-rw-r--r--test/functional/input/standalone_rst_latex.txt12
-rw-r--r--test/functional/input/standalone_rst_newlatex.txt12
-rw-r--r--test/functional/output/README.txt3
-rw-r--r--test/functional/tests/_default.py6
-rw-r--r--test/functional/tests/_standalone_rst_defaults.py6
-rw-r--r--test/functional/tests/dangerous.py12
-rw-r--r--test/functional/tests/field_name_limit.py12
-rw-r--r--test/functional/tests/latex_docinfo.py12
-rw-r--r--test/functional/tests/misc_rst_html4css1.py12
-rw-r--r--test/functional/tests/pep_html.py17
-rw-r--r--test/functional/tests/standalone_rst_html4css1.py12
-rw-r--r--test/functional/tests/standalone_rst_latex.py8
-rw-r--r--test/functional/tests/standalone_rst_pseudoxml.py8
38 files changed, 5567 insertions, 0 deletions
diff --git a/test/functional/README.txt b/test/functional/README.txt
new file mode 100644
index 000000000..fc104d52e
--- /dev/null
+++ b/test/functional/README.txt
@@ -0,0 +1,5 @@
+This directory stores data files for functional tests.
+
+Please see the documentation on `functional testing`__ for details.
+
+__ ../../docs/dev/testing.html#functional
diff --git a/test/functional/expected/dangerous.html b/test/functional/expected/dangerous.html
new file mode 100644
index 000000000..df3de8cef
--- /dev/null
+++ b/test/functional/expected/dangerous.html
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.3.9: http://docutils.sourceforge.net/" />
+<title></title>
+<link rel="stylesheet" href="default.css" type="text/css" />
+</head>
+<body>
+<div class="document">
+<p>Potentially dangerous features (security holes):</p>
+<div class="system-message">
+<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">functional/input/dangerous.txt</tt>, line 3)</p>
+<p>&quot;include&quot; directive disabled.</p>
+<pre class="literal-block">
+.. include:: /etc/passwd
+</pre>
+</div>
+<div class="system-message">
+<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">functional/input/dangerous.txt</tt>, line 4)</p>
+<p>&quot;raw&quot; directive disabled.</p>
+<pre class="literal-block">
+.. raw:: html
+ :file: /etc/passwd
+</pre>
+</div>
+<div class="system-message">
+<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">functional/input/dangerous.txt</tt>, line 6)</p>
+<p>&quot;raw&quot; directive disabled.</p>
+<pre class="literal-block">
+.. raw:: html
+ :url: file:///etc/passwd
+</pre>
+</div>
+<div class="system-message">
+<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">functional/input/dangerous.txt</tt>, line 8)</p>
+<p>&quot;raw&quot; directive disabled.</p>
+<pre class="literal-block">
+.. raw:: html
+
+ &lt;script&gt;
+ that does something really nasty
+ &lt;/script&gt;
+</pre>
+</div>
+<div class="system-message">
+<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">functional/input/dangerous.txt</tt>, line 13)</p>
+<p>&quot;csv-table&quot; directive disabled.</p>
+<pre class="literal-block">
+.. csv-table:: :file: /etc/passwd
+</pre>
+</div>
+<div class="system-message">
+<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">functional/input/dangerous.txt</tt>, line 14)</p>
+<p>&quot;csv-table&quot; directive disabled.</p>
+<pre class="literal-block">
+.. csv-table:: :url: file:///etc/passwd
+</pre>
+</div>
+<div class="figure">
+<div class="image"><img alt="picture.png" src="picture.png" /></div>
+</div>
+</div>
+</body>
+</html>
diff --git a/test/functional/expected/field_name_limit.html b/test/functional/expected/field_name_limit.html
new file mode 100644
index 000000000..f961650ae
--- /dev/null
+++ b/test/functional/expected/field_name_limit.html
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.3.9: http://docutils.sourceforge.net/" />
+<title></title>
+<link rel="stylesheet" href="default.css" type="text/css" />
+</head>
+<body>
+<div class="document">
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">short:</th><td class="field-body">This field's name is short.</td>
+</tr>
+<tr class="field"><th class="field-name">medium-length:</th><td class="field-body">This field's name is medium-length.</td>
+</tr>
+<tr class="field"><th class="field-name">long field name:</th><td class="field-body">This field's name is long.</td>
+</tr>
+<tr class="field"><th class="field-name">very very long field name:</th><td class="field-body">This field's name is quite long.</td>
+</tr>
+</tbody>
+</table>
+</div>
+</body>
+</html>
diff --git a/test/functional/expected/latex_docinfo.tex b/test/functional/expected/latex_docinfo.tex
new file mode 100644
index 000000000..04d9438f7
--- /dev/null
+++ b/test/functional/expected/latex_docinfo.tex
@@ -0,0 +1,85 @@
+\documentclass[10pt,a4paper,english]{article}
+\usepackage{babel}
+\usepackage{ae}
+\usepackage{aeguill}
+\usepackage{shortvrb}
+\usepackage[latin1]{inputenc}
+\usepackage{tabularx}
+\usepackage{longtable}
+\setlength{\extrarowheight}{2pt}
+\usepackage{amsmath}
+\usepackage{graphicx}
+\usepackage{color}
+\usepackage{multirow}
+\usepackage{ifthen}
+\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
+\usepackage[DIV12]{typearea}
+%% generator Docutils: http://docutils.sourceforge.net/
+\newlength{\admonitionwidth}
+\setlength{\admonitionwidth}{0.9\textwidth}
+\newlength{\docinfowidth}
+\setlength{\docinfowidth}{0.9\textwidth}
+\newlength{\locallinewidth}
+\newcommand{\optionlistlabel}[1]{\bf #1 \hfill}
+\newenvironment{optionlist}[1]
+{\begin{list}{}
+ {\setlength{\labelwidth}{#1}
+ \setlength{\rightmargin}{1cm}
+ \setlength{\leftmargin}{\rightmargin}
+ \addtolength{\leftmargin}{\labelwidth}
+ \addtolength{\leftmargin}{\labelsep}
+ \renewcommand{\makelabel}{\optionlistlabel}}
+}{\end{list}}
+\newlength{\lineblockindentation}
+\setlength{\lineblockindentation}{2.5em}
+\newenvironment{lineblock}[1]
+{\begin{list}{}
+ {\setlength{\partopsep}{\parskip}
+ \addtolength{\partopsep}{\baselineskip}
+ \topsep0pt\itemsep0.15\baselineskip\parsep0pt
+ \leftmargin#1}
+ \raggedright}
+{\end{list}}
+% begin: floats for footnotes tweaking.
+\setlength{\floatsep}{0.5em}
+\setlength{\textfloatsep}{\fill}
+\addtolength{\textfloatsep}{3em}
+\renewcommand{\textfraction}{0.5}
+\renewcommand{\topfraction}{0.5}
+\renewcommand{\bottomfraction}{0.5}
+\setcounter{totalnumber}{50}
+\setcounter{topnumber}{50}
+\setcounter{bottomnumber}{50}
+% end floats for footnotes
+% some commands, that could be overwritten in the style file.
+\newcommand{\rubric}[1]{\subsection*{~\hfill {\it #1} \hfill ~}}
+\newcommand{\titlereference}[1]{\textsl{#1}}
+% end of "some commands"
+\title{}
+\author{Foo Fred~\\
+Food Foomatics {\&} Friends~\\
+foo@food.example.info~\\
+Fox St 13~\\
+Foowood \and
+Bar Barney~\\
+Bar-BQ Bar~\\
+1-800-BARBQBAR~\\
+Barbara St 16~\\
+South Barwell}
+\date{}
+\hypersetup{
+pdfauthor={Foo Fred;Bar Barney}
+}
+\raggedbottom
+\begin{document}
+\maketitle
+
+%___________________________________________________________________________
+\begin{center}
+\begin{tabularx}{\docinfowidth}{lX}
+\end{tabularx}
+\end{center}
+
+\setlength{\locallinewidth}{\linewidth}
+
+\end{document}
diff --git a/test/functional/expected/misc_rst_html4css1.html b/test/functional/expected/misc_rst_html4css1.html
new file mode 100644
index 000000000..324152872
--- /dev/null
+++ b/test/functional/expected/misc_rst_html4css1.html
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.3.9: http://docutils.sourceforge.net/" />
+<title></title>
+<link rel="stylesheet" href="foo&amp;bar.css" type="text/css" />
+</head>
+<body>
+<div class="document">
+<p>simple input</p>
+</div>
+</body>
+</html>
diff --git a/test/functional/expected/pep_html.html b/test/functional/expected/pep_html.html
new file mode 100644
index 000000000..a1b9f2791
--- /dev/null
+++ b/test/functional/expected/pep_html.html
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<!--
+This HTML is auto-generated. DO NOT EDIT THIS FILE! If you are writing a new
+PEP, see http://www.python.org/peps/pep-0001.html for instructions and links
+to templates. DO NOT USE THIS HTML FILE AS YOUR TEMPLATE!
+-->
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta name="generator" content="Docutils 0.3.9: http://docutils.sourceforge.net/" />
+ <title>PEP 100 -- Test PEP</title>
+ <link rel="stylesheet" href="../../../tools/stylesheets/pep.css" type="text/css" />
+</head>
+<body bgcolor="white">
+<table class="navigation" cellpadding="0" cellspacing="0"
+ width="100%" border="0">
+<tr><td class="navicon" width="150" height="35">
+<a href="http://www.python.org/" title="Python Home Page">
+<img src="http://www.python.org/pics/PyBanner000.gif" alt="[Python]"
+ border="0" width="150" height="35" /></a></td>
+<td class="textlinks" align="left">
+[<b><a href="http://www.python.org/">Python Home</a></b>]
+[<b><a href="http://www.python.org/peps/">PEP Index</a></b>]
+[<b><a href="http://www.python.org/peps/pep-0100.txt">PEP Source</a></b>]
+</td></tr></table>
+<table class="rfc2822 docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">PEP:</th><td class="field-body">100</td>
+</tr>
+<tr class="field"><th class="field-name">Title:</th><td class="field-body">Test PEP</td>
+</tr>
+<tr class="field"><th class="field-name">Version:</th><td class="field-body">42</td>
+</tr>
+<tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference" href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/python/python/nondist/peps/pep-0100.txt">A long time ago.</a></td>
+</tr>
+<tr class="field"><th class="field-name">Author:</th><td class="field-body">John Doe &lt;john&#32;&#97;t&#32;example.org&gt;</td>
+</tr>
+<tr class="field"><th class="field-name">Discussions-To:</th><td class="field-body">&lt;<a class="reference" href="mailto:%64%65%76%6E%75%6C%6C%40%65%78%61%6D%70%6C%65%2E%6F%72%67?subject=PEP%20100">devnull&#32;&#97;t&#32;example.org</a>&gt;</td>
+</tr>
+<tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td>
+</tr>
+<tr class="field"><th class="field-name">Type:</th><td class="field-body">Standards Track</td>
+</tr>
+<tr class="field"><th class="field-name">Content-Type:</th><td class="field-body"><a class="reference" href="http://www.python.org/peps/pep-0012.html">text/x-rst</a></td>
+</tr>
+<tr class="field"><th class="field-name">Created:</th><td class="field-body">01-Jun-2001</td>
+</tr>
+<tr class="field"><th class="field-name">Post-History:</th><td class="field-body">13-Jun-2001</td>
+</tr>
+</tbody>
+</table>
+<hr />
+<div class="contents topic" id="contents">
+<p class="topic-title first"><a name="contents">Contents</a></p>
+<ul class="simple">
+<li><a class="reference" href="#abstract" id="id5" name="id5">Abstract</a></li>
+<li><a class="reference" href="#copyright" id="id6" name="id6">Copyright</a></li>
+<li><a class="reference" href="#references-and-footnotes" id="id7" name="id7">References and Footnotes</a></li>
+</ul>
+</div>
+<div class="section" id="abstract">
+<h1><a class="toc-backref" href="#id5" name="abstract">Abstract</a></h1>
+<p>This is just a test <a class="footnote-reference" href="#id2" id="id1" name="id1">[1]</a>. See the <a class="reference" href="http://www.python.org/peps/">PEP repository</a> <a class="footnote-reference" href="#id3" id="id4" name="id4">[2]</a> for the real
+thing.</p>
+</div>
+<div class="section" id="copyright">
+<h1><a class="toc-backref" href="#id6" name="copyright">Copyright</a></h1>
+<p>This document has been placed in the public domain.</p>
+</div>
+<div class="section" id="references-and-footnotes">
+<h1><a class="toc-backref" href="#id7" name="references-and-footnotes">References and Footnotes</a></h1>
+<table class="docutils footnote" frame="void" id="id2" rules="none">
+<colgroup><col class="label" /><col /></colgroup>
+<tbody valign="top">
+<tr><td class="label"><a class="fn-backref" href="#id1" name="id2">[1]</a></td><td>PEP editors: <a class="reference" href="mailto:%70%65%70%73%40%70%79%74%68%6F%6E%2E%6F%72%67">peps at python dot org</a></td></tr>
+</tbody>
+</table>
+<table class="docutils footnote" frame="void" id="id3" rules="none">
+<colgroup><col class="label" /><col /></colgroup>
+<tbody valign="top">
+<tr><td class="label"><a class="fn-backref" href="#id4" name="id3">[2]</a></td><td><a class="reference" href="http://www.python.org/peps/">http://www.python.org/peps/</a></td></tr>
+</tbody>
+</table>
+</div>
+
+</div>
+</body>
+</html>
+
diff --git a/test/functional/expected/standalone_rst_html4css1.html b/test/functional/expected/standalone_rst_html4css1.html
new file mode 100644
index 000000000..bc06486a2
--- /dev/null
+++ b/test/functional/expected/standalone_rst_html4css1.html
@@ -0,0 +1,949 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.3.9: http://docutils.sourceforge.net/" />
+<title>reStructuredText Test Document</title>
+<meta name="author" content="David Goodger" />
+<meta name="author" content="Me" />
+<meta name="author" content="Myself" />
+<meta name="author" content="I" />
+<meta name="organization" content="humankind" />
+<meta name="date" content="Now, or yesterday. Or maybe even before yesterday." />
+<meta name="copyright" content="This document has been placed in the public domain. You may do with it as you wish. You may copy, modify, redistribute, reattribute, sell, buy, rent, lease, destroy, or improve it, quote it at length, excerpt, incorporate, collate, fold, staple, or mutilate it, or do anything else to it that your or anyone else's heart desires." />
+<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" />
+<link rel="stylesheet" href="../../../tools/stylesheets/default.css" type="text/css" />
+</head>
+<body>
+<div class="header">
+Document header
+<hr class="header"/>
+</div>
+<span id="doctitle"></span><div class="document" id="restructuredtext-test-document">
+<h1 class="title">reStructuredText Test Document</h1>
+<span id="subtitle"></span><h2 class="subtitle" id="examples-of-syntax-constructs">Examples of Syntax Constructs</h2>
+<table class="docinfo" frame="void" rules="none">
+<col class="docinfo-name" />
+<col class="docinfo-content" />
+<tbody valign="top">
+<tr><th class="docinfo-name">Author:</th>
+<td>David Goodger</td></tr>
+<tr><th class="docinfo-name">Address:</th>
+<td><pre class="address">
+123 Example Street
+Example, EX Canada
+A1B 2C3
+</pre>
+</td></tr>
+<tr><th class="docinfo-name">Contact:</th>
+<td><a class="first last reference" href="mailto:goodger&#64;users.sourceforge.net">goodger&#64;users.sourceforge.net</a></td></tr>
+<tr><th class="docinfo-name">Author:</th>
+<td>Me</td></tr>
+<tr><th class="docinfo-name">Author:</th>
+<td>Myself</td></tr>
+<tr><th class="docinfo-name">Author:</th>
+<td>I</td></tr>
+<tr><th class="docinfo-name">Organization:</th>
+<td>humankind</td></tr>
+<tr><th class="docinfo-name">Date:</th>
+<td>Now, or yesterday. Or maybe even <em>before</em> yesterday.</td></tr>
+<tr><th class="docinfo-name">Status:</th>
+<td>This is a &quot;work in progress&quot;</td></tr>
+<tr><th class="docinfo-name">Revision:</th>
+<td>is managed by a version control system.</td></tr>
+<tr><th class="docinfo-name">Version:</th>
+<td>1</td></tr>
+<tr><th class="docinfo-name">Copyright:</th>
+<td>This document has been placed in the public domain. You
+may do with it as you wish. You may copy, modify,
+redistribute, reattribute, sell, buy, rent, lease,
+destroy, or improve it, quote it at length, excerpt,
+incorporate, collate, fold, staple, or mutilate it, or do
+anything else to it that your or anyone else's heart
+desires.</td></tr>
+<tr class="field"><th class="docinfo-name">field name:</th><td class="field-body">This is a &quot;generic bibliographic field&quot;.</td>
+</tr>
+<tr class="field"><th class="docinfo-name">field name &quot;2&quot;:</th><td class="field-body"><p class="first">Generic bibliographic fields may contain multiple body elements.</p>
+<p class="last">Like this.</p>
+</td>
+</tr>
+</tbody>
+</table>
+<div class="dedication topic">
+<p class="topic-title first">Dedication</p>
+<p>For Docutils users &amp; co-developers.</p>
+</div>
+<div class="abstract topic">
+<p class="topic-title first">Abstract</p>
+<p>This is a test document, containing at least one example of each
+reStructuredText construct.</p>
+</div>
+<!-- This is a comment. Note how any initial comments are moved by
+transforms to after the document title, subtitle, and docinfo. -->
+<!-- Above is the document title, and below is the subtitle.
+They are transformed from section titles after parsing. -->
+<!-- bibliographic fields (which also require a transform): -->
+<div class="contents topic" id="table-of-contents">
+<p class="topic-title first"><a name="table-of-contents">Table of Contents</a></p>
+<ul class="auto-toc simple">
+<li><a class="reference" href="#structural-elements" id="id25" name="id25">1&nbsp;&nbsp;&nbsp;Structural Elements</a><ul class="auto-toc">
+<li><a class="reference" href="#section-title" id="id26" name="id26">1.1&nbsp;&nbsp;&nbsp;Section Title</a></li>
+<li><a class="reference" href="#empty-section" id="id27" name="id27">1.2&nbsp;&nbsp;&nbsp;Empty Section</a></li>
+<li><a class="reference" href="#transitions" id="id28" name="id28">1.3&nbsp;&nbsp;&nbsp;Transitions</a></li>
+</ul>
+</li>
+<li><a class="reference" href="#body-elements" id="id29" name="id29">2&nbsp;&nbsp;&nbsp;Body Elements</a><ul class="auto-toc">
+<li><a class="reference" href="#paragraphs" id="id30" name="id30">2.1&nbsp;&nbsp;&nbsp;Paragraphs</a><ul class="auto-toc">
+<li><a class="reference" href="#inline-markup" id="id31" name="id31">2.1.1&nbsp;&nbsp;&nbsp;Inline Markup</a></li>
+</ul>
+</li>
+<li><a class="reference" href="#bullet-lists" id="id32" name="id32">2.2&nbsp;&nbsp;&nbsp;Bullet Lists</a></li>
+<li><a class="reference" href="#enumerated-lists" id="id33" name="id33">2.3&nbsp;&nbsp;&nbsp;Enumerated Lists</a></li>
+<li><a class="reference" href="#definition-lists" id="id34" name="id34">2.4&nbsp;&nbsp;&nbsp;Definition Lists</a></li>
+<li><a class="reference" href="#field-lists" id="id35" name="id35">2.5&nbsp;&nbsp;&nbsp;Field Lists</a></li>
+<li><a class="reference" href="#option-lists" id="id36" name="id36">2.6&nbsp;&nbsp;&nbsp;Option Lists</a></li>
+<li><a class="reference" href="#literal-blocks" id="id37" name="id37">2.7&nbsp;&nbsp;&nbsp;Literal Blocks</a></li>
+<li><a class="reference" href="#line-blocks" id="id38" name="id38">2.8&nbsp;&nbsp;&nbsp;Line Blocks</a></li>
+<li><a class="reference" href="#block-quotes" id="id39" name="id39">2.9&nbsp;&nbsp;&nbsp;Block Quotes</a></li>
+<li><a class="reference" href="#doctest-blocks" id="id40" name="id40">2.10&nbsp;&nbsp;&nbsp;Doctest Blocks</a></li>
+<li><a class="reference" href="#footnotes" id="id41" name="id41">2.11&nbsp;&nbsp;&nbsp;Footnotes</a></li>
+<li><a class="reference" href="#citations" id="id42" name="id42">2.12&nbsp;&nbsp;&nbsp;Citations</a></li>
+<li><a class="reference" href="#targets" id="id43" name="id43">2.13&nbsp;&nbsp;&nbsp;Targets</a><ul class="auto-toc">
+<li><a class="reference" href="#duplicate-target-names" id="id44" name="id44">2.13.1&nbsp;&nbsp;&nbsp;Duplicate Target Names</a></li>
+<li><a class="reference" href="#id18" id="id45" name="id45">2.13.2&nbsp;&nbsp;&nbsp;Duplicate Target Names</a></li>
+</ul>
+</li>
+<li><a class="reference" href="#directives" id="id46" name="id46">2.14&nbsp;&nbsp;&nbsp;Directives</a><ul class="auto-toc">
+<li><a class="reference" href="#document-parts" id="id47" name="id47">2.14.1&nbsp;&nbsp;&nbsp;Document Parts</a></li>
+<li><a class="reference" href="#images" id="id48" name="id48">2.14.2&nbsp;&nbsp;&nbsp;Images</a></li>
+<li><a class="reference" href="#admonitions" id="id49" name="id49">2.14.3&nbsp;&nbsp;&nbsp;Admonitions</a></li>
+<li><a class="reference" href="#topics-sidebars-and-rubrics" id="id50" name="id50">2.14.4&nbsp;&nbsp;&nbsp;Topics, Sidebars, and Rubrics</a></li>
+<li><a class="reference" href="#target-footnotes" id="id51" name="id51">2.14.5&nbsp;&nbsp;&nbsp;Target Footnotes</a></li>
+<li><a class="reference" href="#replacement-text" id="id52" name="id52">2.14.6&nbsp;&nbsp;&nbsp;Replacement Text</a></li>
+<li><a class="reference" href="#compound-paragraph" id="id53" name="id53">2.14.7&nbsp;&nbsp;&nbsp;Compound Paragraph</a></li>
+</ul>
+</li>
+<li><a class="reference" href="#substitution-definitions" id="id54" name="id54">2.15&nbsp;&nbsp;&nbsp;Substitution Definitions</a></li>
+<li><a class="reference" href="#comments" id="id55" name="id55">2.16&nbsp;&nbsp;&nbsp;Comments</a></li>
+<li><a class="reference" href="#raw-text" id="id56" name="id56">2.17&nbsp;&nbsp;&nbsp;Raw text</a></li>
+<li><a class="reference" href="#colspanning-tables" id="id57" name="id57">2.18&nbsp;&nbsp;&nbsp;Colspanning tables</a></li>
+<li><a class="reference" href="#rowspanning-tables" id="id58" name="id58">2.19&nbsp;&nbsp;&nbsp;Rowspanning tables</a></li>
+<li><a class="reference" href="#complex-tables" id="id59" name="id59">2.20&nbsp;&nbsp;&nbsp;Complex tables</a></li>
+<li><a class="reference" href="#list-tables" id="id60" name="id60">2.21&nbsp;&nbsp;&nbsp;List Tables</a></li>
+</ul>
+</li>
+<li><a class="reference" href="#error-handling" id="id61" name="id61">3&nbsp;&nbsp;&nbsp;Error Handling</a></li>
+</ul>
+</div>
+<div class="section" id="structural-elements">
+<h1><a class="toc-backref" href="#id25" name="structural-elements">1&nbsp;&nbsp;&nbsp;Structural Elements</a></h1>
+<div class="section" id="section-title">
+<h2 class="with-subtitle"><a class="toc-backref" href="#id26" name="section-title">1.1&nbsp;&nbsp;&nbsp;Section Title</a></h2>
+<h2 class="section-subtitle" id="section-subtitle"><span class="section-subtitle">Section Subtitle</span></h2>
+<p>That's it, the text just above this line.</p>
+</div>
+<div class="section" id="empty-section">
+<h2><a class="toc-backref" href="#id27" name="empty-section">1.2&nbsp;&nbsp;&nbsp;Empty Section</a></h2>
+</div>
+<div class="section" id="transitions">
+<h2><a class="toc-backref" href="#id28" name="transitions">1.3&nbsp;&nbsp;&nbsp;Transitions</a></h2>
+<p>Here's a transition:</p>
+<hr class="docutils" />
+<p>It divides the section. Transitions may also occur between sections:</p>
+</div>
+</div>
+<hr class="docutils" />
+<div class="section" id="body-elements">
+<h1><a class="toc-backref" href="#id29" name="body-elements">2&nbsp;&nbsp;&nbsp;Body Elements</a></h1>
+<div class="section" id="paragraphs">
+<h2><a class="toc-backref" href="#id30" name="paragraphs">2.1&nbsp;&nbsp;&nbsp;Paragraphs</a></h2>
+<p>A paragraph.</p>
+<div class="section" id="inline-markup">
+<h3><a class="toc-backref" href="#id31" name="inline-markup">2.1.1&nbsp;&nbsp;&nbsp;Inline Markup</a></h3>
+<p>Paragraphs contain text and may contain inline markup: <em>emphasis</em>,
+<strong>strong emphasis</strong>, <tt class="docutils literal"><span class="pre">inline</span> <span class="pre">literals</span></tt>, standalone hyperlinks
+(<a class="reference" href="http://www.python.org">http://www.python.org</a>), external hyperlinks (<a class="reference" href="http://www.python.org/">Python</a> <a class="footnote-reference" href="#id21" id="id22" name="id22">[5]</a>), internal
+cross-references (<a class="reference" href="#example">example</a>), external hyperlinks with embedded URIs
+(<a class="reference" href="http://www.python.org">Python web site</a>), footnote references
+(manually numbered <a class="footnote-reference" href="#id6" id="id1" name="id1">[1]</a>, anonymous auto-numbered <a class="footnote-reference" href="#id9" id="id2" name="id2">[3]</a>, labeled
+auto-numbered <a class="footnote-reference" href="#label" id="id3" name="id3">[2]</a>, or symbolic <a class="footnote-reference" href="#id10" id="id4" name="id4">[*]</a>), citation references
+(<a class="citation-reference" href="#cit2002" id="id5" name="id5">[CIT2002]</a>), substitution references (<img alt="EXAMPLE" src="../../../docs/user/rst/images/biohazard.png" />), and <span class="target" id="inline-hyperlink-targets">inline
+hyperlink targets</span> (see <a class="reference" href="#targets">Targets</a> below for a reference back to here).
+Character-level inline markup is also possible (although exceedingly
+ugly!) in <em>re</em><tt class="docutils literal"><span class="pre">Structured</span></tt><em>Text</em>. Problems are indicated by
+<a href="#id19" name="id20"><span class="problematic" id="id20">|problematic|</span></a> text (generated by processing errors; this one is
+intentional). Here is a reference to the <a class="reference" href="#doctitle">doctitle</a> and the <a class="reference" href="#subtitle">subtitle</a>.</p>
+<p>The default role for interpreted text is <cite>Title Reference</cite>. Here are
+some explicit interpreted text roles: a PEP reference (<a class="reference" href="http://www.python.org/peps/pep-0287.html">PEP 287</a>); an
+RFC reference (<a class="reference" href="http://www.faqs.org/rfcs/rfc2822.html">RFC 2822</a>); a <sub>subscript</sub>; a <sup>superscript</sup>;
+and explicit roles for <em>standard</em> <strong>inline</strong>
+<tt class="docutils literal"><span class="pre">markup</span></tt>.</p>
+<!-- DO NOT RE-WRAP THE FOLLOWING PARAGRAPH! -->
+<p>Let's test wrapping and whitespace significance in inline literals:
+<tt class="docutils literal"><span class="pre">This</span> <span class="pre">is</span> <span class="pre">an</span> <span class="pre">example</span> <span class="pre">of</span> <span class="pre">--inline-literal</span> <span class="pre">--text,</span> <span class="pre">--including</span> <span class="pre">some--</span>
+<span class="pre">strangely--hyphenated-words.</span>&nbsp; <span class="pre">Adjust-the-width-of-your-browser-window</span>
+<span class="pre">to</span> <span class="pre">see</span> <span class="pre">how</span> <span class="pre">the</span> <span class="pre">text</span> <span class="pre">is</span> <span class="pre">wrapped.</span>&nbsp; <span class="pre">--</span> <span class="pre">----</span> <span class="pre">--------</span>&nbsp; <span class="pre">Now</span> <span class="pre">note</span>&nbsp;&nbsp;&nbsp; <span class="pre">the</span>
+<span class="pre">spacing</span>&nbsp;&nbsp;&nbsp; <span class="pre">between</span> <span class="pre">the</span>&nbsp;&nbsp;&nbsp; <span class="pre">words</span> <span class="pre">of</span>&nbsp;&nbsp;&nbsp; <span class="pre">this</span> <span class="pre">sentence</span>&nbsp;&nbsp;&nbsp; <span class="pre">(words</span>
+<span class="pre">should</span>&nbsp;&nbsp;&nbsp; <span class="pre">be</span> <span class="pre">grouped</span>&nbsp;&nbsp;&nbsp; <span class="pre">in</span> <span class="pre">pairs).</span></tt></p>
+<p>If the <tt class="docutils literal"><span class="pre">--pep-references</span></tt> option was supplied, there should be a
+live link to PEP 258 here.</p>
+</div>
+</div>
+<div class="section" id="bullet-lists">
+<h2><a class="toc-backref" href="#id32" name="bullet-lists">2.2&nbsp;&nbsp;&nbsp;Bullet Lists</a></h2>
+<ul>
+<li><p class="first">A bullet list</p>
+<ul class="simple">
+<li>Nested bullet list.</li>
+<li>Nested item 2.</li>
+</ul>
+</li>
+<li><p class="first">Item 2.</p>
+<p>Paragraph 2 of item 2.</p>
+<ul class="simple">
+<li>Nested bullet list.</li>
+<li>Nested item 2.<ul>
+<li>Third level.</li>
+<li>Item 2.</li>
+</ul>
+</li>
+<li>Nested item 3.</li>
+<li>This nested list should be compacted by the HTML writer.<span class="target" id="target"></span><!-- Even if this item contains a target and a comment. -->
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<div class="section" id="enumerated-lists">
+<h2><a class="toc-backref" href="#id33" name="enumerated-lists">2.3&nbsp;&nbsp;&nbsp;Enumerated Lists</a></h2>
+<ol class="arabic">
+<li><p class="first">Arabic numerals.</p>
+<ol class="loweralpha simple">
+<li>lower alpha)<ol class="lowerroman">
+<li>(lower roman)<ol class="upperalpha">
+<li>upper alpha.<ol class="upperroman">
+<li>upper roman)</li>
+</ol>
+</li>
+</ol>
+</li>
+</ol>
+</li>
+</ol>
+</li>
+<li><p class="first">Lists that don't start at 1:</p>
+<ol class="arabic simple" start="3">
+<li>Three</li>
+<li>Four</li>
+</ol>
+<ol class="upperalpha simple" start="3">
+<li>C</li>
+<li>D</li>
+</ol>
+<ol class="lowerroman simple" start="3">
+<li>iii</li>
+<li>iv</li>
+</ol>
+</li>
+</ol>
+</div>
+<div class="section" id="definition-lists">
+<h2><a class="toc-backref" href="#id34" name="definition-lists">2.4&nbsp;&nbsp;&nbsp;Definition Lists</a></h2>
+<dl class="docutils">
+<dt>Term</dt>
+<dd>Definition</dd>
+<dt>Term <span class="classifier-delimiter">:</span> <span class="classifier">classifier</span></dt>
+<dd><p class="first">Definition paragraph 1.</p>
+<p class="last">Definition paragraph 2.</p>
+</dd>
+<dt>Term</dt>
+<dd>Definition</dd>
+<dt>Term <span class="classifier-delimiter">:</span> <span class="classifier">classifier one</span> <span class="classifier-delimiter">:</span> <span class="classifier">classifier two</span></dt>
+<dd>Definition</dd>
+</dl>
+</div>
+<div class="section" id="field-lists">
+<h2><a class="toc-backref" href="#id35" name="field-lists">2.5&nbsp;&nbsp;&nbsp;Field Lists</a></h2>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">what:</th><td class="field-body">Field lists map field names to field bodies, like database
+records. They are often part of an extension syntax. They are
+an unambiguous variant of RFC 2822 fields.</td>
+</tr>
+<tr class="field"><th class="field-name">how arg1 arg2:</th><td class="field-body"><p class="first">The field marker is a colon, the field name, and a colon.</p>
+<p class="last">The field body may contain one or more body elements, indented
+relative to the field marker.</p>
+</td>
+</tr>
+<tr class="field"><th class="field-name">credits:</th><td class="field-body"><p class="credits first last">This paragraph has the <cite>credits</cite> class set. (This is actually not
+about credits but just for ensuring that the class attribute
+doesn't get stripped away.)</p>
+</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="option-lists">
+<h2><a class="toc-backref" href="#id36" name="option-lists">2.6&nbsp;&nbsp;&nbsp;Option Lists</a></h2>
+<p>For listing command-line options:</p>
+<table class="docutils option-list" frame="void" rules="none">
+<col class="option" />
+<col class="description" />
+<tbody valign="top">
+<tr><td class="option-group">
+<kbd><span class="option">-a</span></kbd></td>
+<td>command-line option &quot;a&quot;</td></tr>
+<tr><td class="option-group">
+<kbd><span class="option">-b <var>file</var></span></kbd></td>
+<td>options can have arguments
+and long descriptions</td></tr>
+<tr><td class="option-group">
+<kbd><span class="option">--long</span></kbd></td>
+<td>options can be long also</td></tr>
+<tr><td class="option-group">
+<kbd><span class="option">--input=<var>file</var></span></kbd></td>
+<td>long options can also have
+arguments</td></tr>
+<tr><td class="option-group" colspan="2">
+<kbd><span class="option">--very-long-option</span></kbd></td>
+</tr>
+<tr><td>&nbsp;</td><td><p class="first">The description can also start on the next line.</p>
+<p class="last">The description may contain multiple body elements,
+regardless of where it starts.</p>
+</td></tr>
+<tr><td class="option-group">
+<kbd><span class="option">-x</span>, <span class="option">-y</span>, <span class="option">-z</span></kbd></td>
+<td>Multiple options are an &quot;option group&quot;.</td></tr>
+<tr><td class="option-group">
+<kbd><span class="option">-v</span>, <span class="option">--verbose</span></kbd></td>
+<td>Commonly-seen: short &amp; long options.</td></tr>
+<tr><td class="option-group" colspan="2">
+<kbd><span class="option">-1 <var>file</var></span>, <span class="option">--one=<var>file</var></span>, <span class="option">--two <var>file</var></span></kbd></td>
+</tr>
+<tr><td>&nbsp;</td><td>Multiple options with arguments.</td></tr>
+<tr><td class="option-group">
+<kbd><span class="option">/V</span></kbd></td>
+<td>DOS/VMS-style options too</td></tr>
+</tbody>
+</table>
+<p>There must be at least two spaces between the option and the
+description.</p>
+</div>
+<div class="section" id="literal-blocks">
+<h2><a class="toc-backref" href="#id37" name="literal-blocks">2.7&nbsp;&nbsp;&nbsp;Literal Blocks</a></h2>
+<p>Literal blocks are indicated with a double-colon (&quot;::&quot;) at the end of
+the preceding paragraph (over there <tt class="docutils literal"><span class="pre">--&gt;</span></tt>). They can be indented:</p>
+<pre class="literal-block">
+if literal_block:
+ text = 'is left as-is'
+ spaces_and_linebreaks = 'are preserved'
+ markup_processing = None
+</pre>
+<p>Or they can be quoted without indentation:</p>
+<pre class="literal-block">
+&gt;&gt; Great idea!
+&gt;
+&gt; Why didn't I think of that?
+</pre>
+</div>
+<div class="section" id="line-blocks">
+<h2><a class="toc-backref" href="#id38" name="line-blocks">2.8&nbsp;&nbsp;&nbsp;Line Blocks</a></h2>
+<p>This section tests line blocks. Line blocks are body elements which
+consist of lines and other line blocks. Nested line blocks cause
+indentation.</p>
+<div class="line-block">
+<div class="line">This is a line block. It ends with a blank line.</div>
+<div class="line-block">
+<div class="line">New lines begin with a vertical bar (&quot;|&quot;).</div>
+<div class="line">Line breaks and initial indent are significant, and preserved.</div>
+<div class="line-block">
+<div class="line">Continuation lines are also possible. A long line that is intended
+to wrap should begin with a space in place of the vertical bar.</div>
+</div>
+<div class="line">The left edge of a continuation line need not be aligned with
+the left edge of the text above it.</div>
+</div>
+</div>
+<div class="line-block">
+<div class="line">This is a second line block.</div>
+<div class="line"><br /></div>
+<div class="line">Blank lines are permitted internally, but they must begin with a &quot;|&quot;.</div>
+</div>
+<p>Another line block, surrounded by paragraphs:</p>
+<div class="line-block">
+<div class="line">And it's no good waiting by the window</div>
+<div class="line">It's no good waiting for the sun</div>
+<div class="line">Please believe me, the things you dream of</div>
+<div class="line">They don't fall in the lap of no-one</div>
+</div>
+<p>Take it away, Eric the Orchestra Leader!</p>
+<blockquote>
+<div class="line-block">
+<div class="line">A one, two, a one two three four</div>
+<div class="line"><br /></div>
+<div class="line">Half a bee, philosophically,</div>
+<div class="line-block">
+<div class="line">must, <em>ipso facto</em>, half not be.</div>
+</div>
+<div class="line">But half the bee has got to be,</div>
+<div class="line-block">
+<div class="line"><em>vis a vis</em> its entity. D'you see?</div>
+<div class="line"><br /></div>
+</div>
+<div class="line">But can a bee be said to be</div>
+<div class="line-block">
+<div class="line">or not to be an entire bee,</div>
+<div class="line-block">
+<div class="line">when half the bee is not a bee,</div>
+<div class="line-block">
+<div class="line">due to some ancient injury?</div>
+<div class="line"><br /></div>
+</div>
+</div>
+</div>
+<div class="line">Singing...</div>
+</div>
+</blockquote>
+</div>
+<div class="section" id="block-quotes">
+<h2><a class="toc-backref" href="#id39" name="block-quotes">2.9&nbsp;&nbsp;&nbsp;Block Quotes</a></h2>
+<p>Block quotes consist of indented body elements:</p>
+<blockquote>
+<p>My theory by A. Elk. Brackets Miss, brackets. This theory goes
+as follows and begins now. All brontosauruses are thin at one
+end, much much thicker in the middle and then thin again at the
+far end. That is my theory, it is mine, and belongs to me and I
+own it, and what it is too.</p>
+<p class="attribution">&mdash;Anne Elk (Miss)</p>
+</blockquote>
+</div>
+<div class="section" id="doctest-blocks">
+<h2><a class="toc-backref" href="#id40" name="doctest-blocks">2.10&nbsp;&nbsp;&nbsp;Doctest Blocks</a></h2>
+<pre class="doctest-block">
+&gt;&gt;&gt; print 'Python-specific usage examples; begun with &quot;&gt;&gt;&gt;&quot;'
+Python-specific usage examples; begun with &quot;&gt;&gt;&gt;&quot;
+&gt;&gt;&gt; print '(cut and pasted from interactive Python sessions)'
+(cut and pasted from interactive Python sessions)
+</pre>
+</div>
+<div class="section" id="footnotes">
+<h2><a class="toc-backref" href="#id41" name="footnotes">2.11&nbsp;&nbsp;&nbsp;Footnotes</a></h2>
+<table class="docutils footnote" frame="void" id="id6" rules="none">
+<colgroup><col class="label" /><col /></colgroup>
+<tbody valign="top">
+<tr><td class="label"><a name="id6">[1]</a></td><td><em>(<a class="fn-backref" href="#id1">1</a>, <a class="fn-backref" href="#id7">2</a>)</em> <p>A footnote contains body elements, consistently indented by at
+least 3 spaces.</p>
+<p class="last">This is the footnote's second paragraph.</p>
+</td></tr>
+</tbody>
+</table>
+<table class="docutils footnote" frame="void" id="label" rules="none">
+<colgroup><col class="label" /><col /></colgroup>
+<tbody valign="top">
+<tr><td class="label"><a name="label">[2]</a></td><td><em>(<a class="fn-backref" href="#id3">1</a>, <a class="fn-backref" href="#id8">2</a>)</em> Footnotes may be numbered, either manually (as in <a class="footnote-reference" href="#id6" id="id7" name="id7">[1]</a>) or
+automatically using a &quot;#&quot;-prefixed label. This footnote has a
+label so it can be referred to from multiple places, both as a
+footnote reference (<a class="footnote-reference" href="#label" id="id8" name="id8">[2]</a>) and as a hyperlink reference
+(<a class="reference" href="#label">label</a>).</td></tr>
+</tbody>
+</table>
+<table class="docutils footnote" frame="void" id="id9" rules="none">
+<colgroup><col class="label" /><col /></colgroup>
+<tbody valign="top">
+<tr><td class="label"><a class="fn-backref" href="#id2" name="id9">[3]</a></td><td><p class="first">This footnote is numbered automatically and anonymously using a
+label of &quot;#&quot; only.</p>
+<p>This is the second paragraph.</p>
+<p class="last">And this is the third paragraph.</p>
+</td></tr>
+</tbody>
+</table>
+<table class="docutils footnote" frame="void" id="id10" rules="none">
+<colgroup><col class="label" /><col /></colgroup>
+<tbody valign="top">
+<tr><td class="label"><a class="fn-backref" href="#id4" name="id10">[*]</a></td><td>Footnotes may also use symbols, specified with a &quot;*&quot; label.
+Here's a reference to the next footnote: <a class="footnote-reference" href="#id12" id="id11" name="id11">[†]</a>.</td></tr>
+</tbody>
+</table>
+<table class="docutils footnote" frame="void" id="id12" rules="none">
+<colgroup><col class="label" /><col /></colgroup>
+<tbody valign="top">
+<tr><td class="label"><a class="fn-backref" href="#id11" name="id12">[†]</a></td><td>This footnote shows the next symbol in the sequence.</td></tr>
+</tbody>
+</table>
+<table class="docutils footnote" frame="void" id="id13" rules="none">
+<colgroup><col class="label" /><col /></colgroup>
+<tbody valign="top">
+<tr><td class="label"><a name="id13">[4]</a></td><td>Here's an unreferenced footnote, with a reference to a
+nonexistent footnote: <a href="#id69" name="id70"><span class="problematic" id="id70">[5]_</span></a>.</td></tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="citations">
+<h2><a class="toc-backref" href="#id42" name="citations">2.12&nbsp;&nbsp;&nbsp;Citations</a></h2>
+<table class="docutils citation" frame="void" id="cit2002" rules="none">
+<colgroup><col class="label" /><col /></colgroup>
+<tbody valign="top">
+<tr><td class="label"><a name="cit2002">[CIT2002]</a></td><td><em>(<a class="fn-backref" href="#id5">1</a>, <a class="fn-backref" href="#id15">2</a>)</em> Citations are text-labeled footnotes. They may be
+rendered separately and differently from footnotes.</td></tr>
+</tbody>
+</table>
+<p>Here's a reference to the above, <a class="citation-reference" href="#cit2002" id="id15" name="id15">[CIT2002]</a>, and a <a href="#id71" name="id72"><span class="problematic" id="id72">[nonexistent]_</span></a>
+citation.</p>
+</div>
+<span id="another-target"></span><div class="section" id="targets">
+<h2><a class="toc-backref" href="#id43" name="targets">2.13&nbsp;&nbsp;&nbsp;Targets</a></h2>
+<p id="example">This paragraph is pointed to by the explicit &quot;example&quot; target. A
+reference can be found under <a class="reference" href="#inline-markup">Inline Markup</a>, above. <a class="reference" href="#inline-hyperlink-targets">Inline
+hyperlink targets</a> are also possible.</p>
+<p>Section headers are implicit targets, referred to by name. See
+<a class="reference" href="#targets">Targets</a>, which is a subsection of <a class="reference" href="#body-elements">Body Elements</a>.</p>
+<p>Explicit external targets are interpolated into references such as
+&quot;<a class="reference" href="http://www.python.org/">Python</a> <a class="footnote-reference" href="#id21" id="id23" name="id23">[5]</a>&quot;.</p>
+<p>Targets may be indirect and anonymous. Thus <a class="reference" href="#targets">this phrase</a> may also
+refer to the <a class="reference" href="#targets">Targets</a> section.</p>
+<p>Here's a <a href="#id73" name="id74"><span class="problematic" id="id74">`hyperlink reference without a target`_</span></a>, which generates an
+error.</p>
+<div class="section" id="duplicate-target-names">
+<h3><a class="toc-backref" href="#id44" name="duplicate-target-names">2.13.1&nbsp;&nbsp;&nbsp;Duplicate Target Names</a></h3>
+<p>Duplicate names in section headers or other implicit targets will
+generate &quot;info&quot; (level-1) system messages. Duplicate names in
+explicit targets will generate &quot;warning&quot; (level-2) system messages.</p>
+</div>
+<div class="section" id="id18">
+<h3><a class="toc-backref" href="#id45" name="id18">2.13.2&nbsp;&nbsp;&nbsp;Duplicate Target Names</a></h3>
+<p>Since there are two &quot;Duplicate Target Names&quot; section headers, we
+cannot uniquely refer to either of them by name. If we try to (like
+this: <a href="#id75" name="id76"><span class="problematic" id="id76">`Duplicate Target Names`_</span></a>), an error is generated.</p>
+</div>
+</div>
+<div class="section" id="directives">
+<h2><a class="toc-backref" href="#id46" name="directives">2.14&nbsp;&nbsp;&nbsp;Directives</a></h2>
+<div class="contents topic" id="contents">
+<ul class="auto-toc simple">
+<li><a class="reference" href="#document-parts" id="id62" name="id62">2.14.1&nbsp;&nbsp;&nbsp;Document Parts</a></li>
+<li><a class="reference" href="#images" id="id63" name="id63">2.14.2&nbsp;&nbsp;&nbsp;Images</a></li>
+<li><a class="reference" href="#admonitions" id="id64" name="id64">2.14.3&nbsp;&nbsp;&nbsp;Admonitions</a></li>
+<li><a class="reference" href="#topics-sidebars-and-rubrics" id="id65" name="id65">2.14.4&nbsp;&nbsp;&nbsp;Topics, Sidebars, and Rubrics</a></li>
+<li><a class="reference" href="#target-footnotes" id="id66" name="id66">2.14.5&nbsp;&nbsp;&nbsp;Target Footnotes</a></li>
+<li><a class="reference" href="#replacement-text" id="id67" name="id67">2.14.6&nbsp;&nbsp;&nbsp;Replacement Text</a></li>
+<li><a class="reference" href="#compound-paragraph" id="id68" name="id68">2.14.7&nbsp;&nbsp;&nbsp;Compound Paragraph</a></li>
+</ul>
+</div>
+<p>These are just a sample of the many reStructuredText Directives. For
+others, please see
+<a class="reference" href="http://docutils.sourceforge.net/docs/ref/rst/directives.html">http://docutils.sourceforge.net/docs/ref/rst/directives.html</a>.</p>
+<div class="section" id="document-parts">
+<h3><a class="toc-backref" href="#id62" name="document-parts">2.14.1&nbsp;&nbsp;&nbsp;Document Parts</a></h3>
+<p>An example of the &quot;contents&quot; directive can be seen above this section
+(a local, untitled table of <a class="reference" href="#contents">contents</a>) and at the beginning of the
+document (a document-wide <a class="reference" href="#table-of-contents">table of contents</a>).</p>
+</div>
+<div class="section" id="images">
+<h3><a class="toc-backref" href="#id63" name="images">2.14.2&nbsp;&nbsp;&nbsp;Images</a></h3>
+<p>An image directive (also clickable -- a hyperlink reference):</p>
+<div class="image class1 class2 image-reference"><a class="reference" href="#directives"><img alt="../../../docs/user/rst/images/title.png" class="class1 class2" src="../../../docs/user/rst/images/title.png" /></a></div>
+<p>A figure directive:</p>
+<div align="right" class="figclass1 figclass2 figure">
+<div class="image class1 class2"><img alt="reStructuredText, the markup syntax" class="class1 class2" src="../../../docs/user/rst/images/biohazard.png" width="50" /></div>
+<p class="caption">A figure is an image with a caption and/or a legend:</p>
+<div class="legend">
+<table border="1" class="docutils">
+<colgroup>
+<col width="20%" />
+<col width="80%" />
+</colgroup>
+<tbody valign="top">
+<tr><td>re</td>
+<td>Revised, revisited, based on 're' module.</td>
+</tr>
+<tr><td>Structured</td>
+<td>Structure-enhanced text, structuredtext.</td>
+</tr>
+<tr><td>Text</td>
+<td>Well it is, isn't it?</td>
+</tr>
+</tbody>
+</table>
+<p>This paragraph is also part of the legend.</p>
+</div>
+</div>
+<p>This paragraph might flow around the figure...</p>
+<p>A centered figure:</p>
+<div align="center" class="figure">
+<div class="image"><img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" width="50" /></div>
+<p class="caption">This is the caption.</p>
+<div class="legend">
+<p>This is the legend.</p>
+<p>The legend may consist of several paragraphs.</p>
+</div>
+</div>
+<p>This paragraph might flow around the figure...</p>
+<p>A left-aligned figure:</p>
+<div align="left" class="figure">
+<div class="image"><img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" width="50" /></div>
+<p class="caption">This is the caption.</p>
+<div class="legend">
+<p>This is the legend.</p>
+<p>The legend may consist of several paragraphs.</p>
+</div>
+</div>
+<p>This paragraph might flow around the figure...</p>
+</div>
+<div class="section" id="admonitions">
+<h3><a class="toc-backref" href="#id64" name="admonitions">2.14.3&nbsp;&nbsp;&nbsp;Admonitions</a></h3>
+<div class="attention">
+<p class="first admonition-title">Attention!</p>
+<p class="last">Directives at large.</p>
+</div>
+<div class="caution">
+<p class="first admonition-title">Caution!</p>
+<p class="last">Don't take any wooden nickels.</p>
+</div>
+<div class="danger">
+<p class="first admonition-title">!DANGER!</p>
+<p class="last">Mad scientist at work!</p>
+</div>
+<div class="error">
+<p class="first admonition-title">Error</p>
+<p class="last">Does not compute.</p>
+</div>
+<div class="hint">
+<p class="first admonition-title">Hint</p>
+<p class="last">It's bigger than a bread box.</p>
+</div>
+<div class="important">
+<p class="first admonition-title">Important</p>
+<ul class="last simple">
+<li>Wash behind your ears.</li>
+<li>Clean up your room.</li>
+<li>Call your mother.</li>
+<li>Back up your data.</li>
+</ul>
+</div>
+<div class="note">
+<p class="first admonition-title">Note</p>
+<p class="last">This is a note.</p>
+</div>
+<div class="tip">
+<p class="first admonition-title">Tip</p>
+<p class="last">15% if the service is good.</p>
+</div>
+<div class="warning">
+<p class="first admonition-title">Warning</p>
+<p class="last">Strong prose may provoke extreme mental exertion.
+Reader discretion is strongly advised.</p>
+</div>
+<div class="admonition-and-by-the-way admonition">
+<p class="first admonition-title">And, by the way...</p>
+<p class="last">You can make up your own admonition too.</p>
+</div>
+</div>
+<div class="section" id="topics-sidebars-and-rubrics">
+<h3><a class="toc-backref" href="#id65" name="topics-sidebars-and-rubrics">2.14.4&nbsp;&nbsp;&nbsp;Topics, Sidebars, and Rubrics</a></h3>
+<div class="sidebar">
+<p class="first sidebar-title">Sidebar Title</p>
+<p class="sidebar-subtitle">Optional Subtitle</p>
+<p>This is a sidebar. It is for text outside the flow of the main
+text.</p>
+<p class="rubric">This is a rubric inside a sidebar</p>
+<p class="last">Sidebars often appears beside the main text with a border and
+background color.</p>
+</div>
+<div class="topic">
+<p class="topic-title first">Topic Title</p>
+<p>This is a topic.</p>
+</div>
+<p class="rubric">This is a rubric</p>
+</div>
+<div class="section" id="target-footnotes">
+<h3><a class="toc-backref" href="#id66" name="target-footnotes">2.14.5&nbsp;&nbsp;&nbsp;Target Footnotes</a></h3>
+<table class="docutils footnote" frame="void" id="id21" rules="none">
+<colgroup><col class="label" /><col /></colgroup>
+<tbody valign="top">
+<tr><td class="label"><a name="id21">[5]</a></td><td><em>(<a class="fn-backref" href="#id22">1</a>, <a class="fn-backref" href="#id23">2</a>, <a class="fn-backref" href="#id24">3</a>)</em> <a class="reference" href="http://www.python.org/">http://www.python.org/</a></td></tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="replacement-text">
+<h3><a class="toc-backref" href="#id67" name="replacement-text">2.14.6&nbsp;&nbsp;&nbsp;Replacement Text</a></h3>
+<p>I recommend you try <a class="reference" href="http://www.python.org/">Python, <em>the</em> best language around</a> <a class="footnote-reference" href="#id21" id="id24" name="id24">[5]</a>.</p>
+</div>
+<div class="section" id="compound-paragraph">
+<h3><a class="toc-backref" href="#id68" name="compound-paragraph">2.14.7&nbsp;&nbsp;&nbsp;Compound Paragraph</a></h3>
+<div class="some-class compound">
+<p class="compound-first">Compound 1, paragraph 1.</p>
+<p class="compound-middle">Compound 1, paragraph 2.</p>
+<ul class="compound-last simple">
+<li>Compound 1, list item one.</li>
+<li>Compound 1, list item two.</li>
+</ul>
+</div>
+<p>Another compound statement:</p>
+<div class="compound">
+<p class="compound-first">Compound 2, a literal block:</p>
+<pre class="compound-middle literal-block">
+Compound 2, literal.
+</pre>
+<p class="compound-last">Compound 2, this is a test.</p>
+</div>
+<div class="compound">
+<p>Compound 3, only consisting of one paragraph.</p>
+</div>
+<div class="compound">
+<pre class="compound-first literal-block">
+Compound 4.
+This one starts with a literal block.
+</pre>
+<p class="compound-last">Compound 4, a paragraph.</p>
+</div>
+<p>Now something <em>really</em> perverted -- a nested compound block. In
+LaTeX, the following paragraphs should all be first-line indented:</p>
+<div class="compound">
+<p class="compound-first">Compound 5, block 1 (a paragraph).</p>
+<div class="compound-middle compound">
+<p class="compound-first">Compound 6, block 2 in compound 5.</p>
+<p class="compound-last">Compound 6, another paragraph.</p>
+</div>
+<p class="compound-last">Compound 5, block 3 (a paragraph).</p>
+</div>
+<div class="compound">
+<p class="compound-first">Compound 7, with a table inside:</p>
+<table border="1" class="compound-middle docutils">
+<colgroup>
+<col width="33%" />
+<col width="33%" />
+<col width="33%" />
+</colgroup>
+<tbody valign="top">
+<tr><td><p class="first">Left cell, first
+paragraph.</p>
+<p class="last">Left cell, second
+paragraph.</p>
+</td>
+<td>Middle cell,
+consisting of
+exactly one
+paragraph.</td>
+<td><p class="first">Right cell.</p>
+<p>Paragraph 2.</p>
+<p class="last">Paragraph 3.</p>
+</td>
+</tr>
+</tbody>
+</table>
+<p class="compound-middle">Compound 7, a paragraph after the table.</p>
+<p class="compound-last">Compound 7, another paragraph.</p>
+</div>
+</div>
+</div>
+<div class="section" id="substitution-definitions">
+<h2><a class="toc-backref" href="#id54" name="substitution-definitions">2.15&nbsp;&nbsp;&nbsp;Substitution Definitions</a></h2>
+<p>An inline image (<img alt="EXAMPLE" src="../../../docs/user/rst/images/biohazard.png" />) 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="#id55" name="comments">2.16&nbsp;&nbsp;&nbsp;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
+targets, directives, or substitution definitions.
+
+Double-dashes - - "- -" - - must be escaped somehow in HTML output. -->
+<p>(View the HTML source to see the comment.)</p>
+</div>
+<div class="section" id="raw-text">
+<h2><a class="toc-backref" href="#id56" name="raw-text">2.17&nbsp;&nbsp;&nbsp;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="colspanning-tables">
+<h2><a class="toc-backref" href="#id57" name="colspanning-tables">2.18&nbsp;&nbsp;&nbsp;Colspanning tables</a></h2>
+<p>This table has a cell spanning two columns:</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="31%" />
+<col width="31%" />
+<col width="38%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head" colspan="2">Inputs</th>
+<th class="head">Output</th>
+</tr>
+<tr><th class="head">A</th>
+<th class="head">B</th>
+<th class="head">A or B</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td>False</td>
+<td>False</td>
+<td>False</td>
+</tr>
+<tr><td>True</td>
+<td>False</td>
+<td>True</td>
+</tr>
+<tr><td>False</td>
+<td>True</td>
+<td>True</td>
+</tr>
+<tr><td>True</td>
+<td>True</td>
+<td>True</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="rowspanning-tables">
+<h2><a class="toc-backref" href="#id58" name="rowspanning-tables">2.19&nbsp;&nbsp;&nbsp;Rowspanning tables</a></h2>
+<p>Here's a table with cells spanning several rows:</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="44%" />
+<col width="22%" />
+<col width="33%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head">Header row, column 1
+(header rows optional)</th>
+<th class="head">Header 2</th>
+<th class="head">Header 3</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td>body row 1, column 1</td>
+<td>column 2</td>
+<td>column 3</td>
+</tr>
+<tr><td>body row 2</td>
+<td rowspan="2">Cells may
+span rows.</td>
+<td rowspan="2">Another
+rowspanning
+cell.</td>
+</tr>
+<tr><td>body row 3</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="complex-tables">
+<h2><a class="toc-backref" href="#id59" name="complex-tables">2.20&nbsp;&nbsp;&nbsp;Complex tables</a></h2>
+<p>Here's a complex table, which should test all features.</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="43%" />
+<col width="21%" />
+<col width="18%" />
+<col width="18%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head">Header row, column 1
+(header rows optional)</th>
+<th class="head">Header 2</th>
+<th class="head">Header 3</th>
+<th class="head">Header 4</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td>body row 1, column 1</td>
+<td>column 2</td>
+<td>column 3</td>
+<td>column 4</td>
+</tr>
+<tr><td>body row 2</td>
+<td colspan="3">Cells may span columns.</td>
+</tr>
+<tr><td>body row 3</td>
+<td rowspan="2"><p class="first">Cells may
+span rows.</p>
+<p class="last">Paragraph.</p>
+</td>
+<td colspan="2" rowspan="2"><ul class="first last simple">
+<li>Table cells</li>
+<li>contain</li>
+<li>body elements.</li>
+</ul>
+</td>
+</tr>
+<tr><td>body row 4</td>
+</tr>
+<tr><td>body row 5</td>
+<td colspan="2">Cells may also be
+empty: <tt class="docutils literal"><span class="pre">--&gt;</span></tt></td>
+<td>&nbsp;</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="list-tables">
+<h2><a class="toc-backref" href="#id60" name="list-tables">2.21&nbsp;&nbsp;&nbsp;List Tables</a></h2>
+<p>Here's a list table exercising all features:</p>
+<table border="1" class="test docutils">
+<caption>list table with integral header</caption>
+<colgroup>
+<col width="17%" />
+<col width="33%" />
+<col width="50%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head stub">Treat</th>
+<th class="head">Quantity</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><th class="stub">Albatross</th>
+<td>2.99</td>
+<td>On a stick!</td>
+</tr>
+<tr><th class="stub">Crunchy Frog</th>
+<td>1.49</td>
+<td>If we took the bones out, it wouldn't be
+crunchy, now would it?</td>
+</tr>
+<tr><th class="stub">Gannet Ripple</th>
+<td>1.99</td>
+<td>On a stick!</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+<div class="section" id="error-handling">
+<h1><a class="toc-backref" href="#id61" name="error-handling">3&nbsp;&nbsp;&nbsp;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, &quot;Docutils System Messages&quot;:</p>
+<!-- section should be added by Docutils automatically -->
+</div>
+<div class="system-messages section">
+<h1><a>Docutils System Messages</a></h1>
+<div class="system-message" id="id19">
+<p class="system-message-title">System Message: <a name="id19">ERROR/3</a> (<tt class="docutils">functional/input/data/standard.txt</tt>, line 100); <em><a href="#id20">backlink</a></em></p>
+Undefined substitution referenced: &quot;problematic&quot;.</div>
+<div class="system-message" id="id69">
+<p class="system-message-title">System Message: <a name="id69">ERROR/3</a> (<tt class="docutils">functional/input/standalone_rst_html4css1.txt</tt>, line 354); <em><a href="#id70">backlink</a></em></p>
+Unknown target name: &quot;5&quot;.</div>
+<div class="system-message" id="id71">
+<p class="system-message-title">System Message: <a name="id71">ERROR/3</a> (<tt class="docutils">functional/input/data/standard.txt</tt>, line 363); <em><a href="#id72">backlink</a></em></p>
+Unknown target name: &quot;nonexistent&quot;.</div>
+<div class="system-message" id="id73">
+<p class="system-message-title">System Message: <a name="id73">ERROR/3</a> (<tt class="docutils">functional/input/data/standard.txt</tt>, line 390); <em><a href="#id74">backlink</a></em></p>
+Unknown target name: &quot;hyperlink reference without a target&quot;.</div>
+<div class="system-message" id="id75">
+<p class="system-message-title">System Message: <a name="id75">ERROR/3</a> (<tt class="docutils">functional/input/data/standard.txt</tt>, line 403); <em><a href="#id76">backlink</a></em></p>
+Duplicate target name, cannot be used as a unique reference: &quot;duplicate target names&quot;.</div>
+</div>
+</div>
+<div class="footer">
+<hr class="footer" />
+Document footer
+</div>
+</body>
+</html>
diff --git a/test/functional/expected/standalone_rst_latex.tex b/test/functional/expected/standalone_rst_latex.tex
new file mode 100644
index 000000000..ec682aa52
--- /dev/null
+++ b/test/functional/expected/standalone_rst_latex.tex
@@ -0,0 +1,1482 @@
+\documentclass[10pt,a4paper,english]{article}
+\usepackage{babel}
+\usepackage{ae}
+\usepackage{aeguill}
+\usepackage{shortvrb}
+\usepackage[latin1]{inputenc}
+\usepackage{tabularx}
+\usepackage{longtable}
+\setlength{\extrarowheight}{2pt}
+\usepackage{amsmath}
+\usepackage{graphicx}
+\usepackage{color}
+\usepackage{multirow}
+\usepackage{ifthen}
+\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
+\usepackage[DIV12]{typearea}
+%% generator Docutils: http://docutils.sourceforge.net/
+\newlength{\admonitionwidth}
+\setlength{\admonitionwidth}{0.9\textwidth}
+\newlength{\docinfowidth}
+\setlength{\docinfowidth}{0.9\textwidth}
+\newlength{\locallinewidth}
+\newcommand{\optionlistlabel}[1]{\bf #1 \hfill}
+\newenvironment{optionlist}[1]
+{\begin{list}{}
+ {\setlength{\labelwidth}{#1}
+ \setlength{\rightmargin}{1cm}
+ \setlength{\leftmargin}{\rightmargin}
+ \addtolength{\leftmargin}{\labelwidth}
+ \addtolength{\leftmargin}{\labelsep}
+ \renewcommand{\makelabel}{\optionlistlabel}}
+}{\end{list}}
+\newlength{\lineblockindentation}
+\setlength{\lineblockindentation}{2.5em}
+\newenvironment{lineblock}[1]
+{\begin{list}{}
+ {\setlength{\partopsep}{\parskip}
+ \addtolength{\partopsep}{\baselineskip}
+ \topsep0pt\itemsep0.15\baselineskip\parsep0pt
+ \leftmargin#1}
+ \raggedright}
+{\end{list}}
+% begin: floats for footnotes tweaking.
+\setlength{\floatsep}{0.5em}
+\setlength{\textfloatsep}{\fill}
+\addtolength{\textfloatsep}{3em}
+\renewcommand{\textfraction}{0.5}
+\renewcommand{\topfraction}{0.5}
+\renewcommand{\bottomfraction}{0.5}
+\setcounter{totalnumber}{50}
+\setcounter{topnumber}{50}
+\setcounter{bottomnumber}{50}
+% end floats for footnotes
+% some commands, that could be overwritten in the style file.
+\newcommand{\rubric}[1]{\subsection*{~\hfill {\it #1} \hfill ~}}
+\newcommand{\titlereference}[1]{\textsl{#1}}
+% end of "some commands"
+\title{reStructuredText Test Document\\
+\large{Examples of Syntax Constructs}
+}
+\author{}
+\date{}
+\hypersetup{
+pdftitle={reStructuredText Test Document},
+pdfauthor={David Goodger;Me;Myself;I}
+}
+\raggedbottom
+\begin{document}
+\maketitle
+
+%___________________________________________________________________________
+\begin{center}
+\begin{tabularx}{\docinfowidth}{lX}
+\textbf{Author}: &
+ David Goodger \\
+\textbf{Address}: &
+ {\raggedright
+123 Example Street~\\
+Example, EX Canada~\\
+A1B 2C3 } \\
+\textbf{Contact}: &
+ \href{mailto:goodger@users.sourceforge.net}{goodger@users.sourceforge.net} \\
+\textbf{Author}: &
+ Me \\
+\textbf{Author}: &
+ Myself \\
+\textbf{Author}: &
+ I \\
+\textbf{Organization}: &
+ humankind \\
+\textbf{Date}: &
+ Now, or yesterday. Or maybe even \emph{before} yesterday. \\
+\textbf{Status}: &
+ This is a ``work in progress'' \\
+\textbf{Revision}: &
+ is managed by a version control system. \\
+\textbf{Version}: &
+ 1 \\
+\textbf{Copyright}: &
+ This document has been placed in the public domain. You
+may do with it as you wish. You may copy, modify,
+redistribute, reattribute, sell, buy, rent, lease,
+destroy, or improve it, quote it at length, excerpt,
+incorporate, collate, fold, staple, or mutilate it, or do
+anything else to it that your or anyone else's heart
+desires. \\
+\textbf{field name}: &
+ This is a ``generic bibliographic field''. \\
+\textbf{field name ``2''}: &
+ Generic bibliographic fields may contain multiple body elements.
+
+Like this. \\
+\end{tabularx}
+\end{center}
+
+\setlength{\locallinewidth}{\linewidth}
+
+
+\subsubsection*{~\hfill Dedication\hfill ~}
+
+For Docutils users {\&} co-developers.
+
+\subsubsection*{~\hfill Abstract\hfill ~}
+
+This is a test document, containing at least one example of each
+reStructuredText construct.
+
+% This is a comment. Note how any initial comments are moved by
+% transforms to after the document title, subtitle, and docinfo.
+% Above is the document title, and below is the subtitle.
+% They are transformed from section titles after parsing.
+% bibliographic fields (which also require a transform):
+\hypertarget{table-of-contents}{}
+\pdfbookmark[0]{Table of Contents}{table-of-contents}
+\subsubsection*{~\hfill Table of Contents\hfill ~}
+\begin{list}{}{}
+\item {} \href{\#structural-elements}{1~~~Structural Elements}
+\begin{list}{}{}
+\item {} \href{\#section-title}{1.1~~~Section Title}
+
+\item {} \href{\#empty-section}{1.2~~~Empty Section}
+
+\item {} \href{\#transitions}{1.3~~~Transitions}
+
+\end{list}
+
+\item {} \href{\#body-elements}{2~~~Body Elements}
+\begin{list}{}{}
+\item {} \href{\#paragraphs}{2.1~~~Paragraphs}
+\begin{list}{}{}
+\item {} \href{\#inline-markup}{2.1.1~~~Inline Markup}
+
+\end{list}
+
+\item {} \href{\#bullet-lists}{2.2~~~Bullet Lists}
+
+\item {} \href{\#enumerated-lists}{2.3~~~Enumerated Lists}
+
+\item {} \href{\#definition-lists}{2.4~~~Definition Lists}
+
+\item {} \href{\#field-lists}{2.5~~~Field Lists}
+
+\item {} \href{\#option-lists}{2.6~~~Option Lists}
+
+\item {} \href{\#literal-blocks}{2.7~~~Literal Blocks}
+
+\item {} \href{\#line-blocks}{2.8~~~Line Blocks}
+
+\item {} \href{\#block-quotes}{2.9~~~Block Quotes}
+
+\item {} \href{\#doctest-blocks}{2.10~~~Doctest Blocks}
+
+\item {} \href{\#footnotes}{2.11~~~Footnotes}
+
+\item {} \href{\#citations}{2.12~~~Citations}
+
+\item {} \href{\#targets}{2.13~~~Targets}
+\begin{list}{}{}
+\item {} \href{\#duplicate-target-names}{2.13.1~~~Duplicate Target Names}
+
+\item {} \href{\#id18}{2.13.2~~~Duplicate Target Names}
+
+\end{list}
+
+\item {} \href{\#directives}{2.14~~~Directives}
+\begin{list}{}{}
+\item {} \href{\#document-parts}{2.14.1~~~Document Parts}
+
+\item {} \href{\#images}{2.14.2~~~Images}
+
+\item {} \href{\#admonitions}{2.14.3~~~Admonitions}
+
+\item {} \href{\#topics-sidebars-and-rubrics}{2.14.4~~~Topics, Sidebars, and Rubrics}
+
+\item {} \href{\#target-footnotes}{2.14.5~~~Target Footnotes}
+
+\item {} \href{\#replacement-text}{2.14.6~~~Replacement Text}
+
+\item {} \href{\#compound-paragraph}{2.14.7~~~Compound Paragraph}
+
+\end{list}
+
+\item {} \href{\#substitution-definitions}{2.15~~~Substitution Definitions}
+
+\item {} \href{\#comments}{2.16~~~Comments}
+
+\item {} \href{\#raw-text}{2.17~~~Raw text}
+
+\item {} \href{\#colspanning-tables}{2.18~~~Colspanning tables}
+
+\item {} \href{\#rowspanning-tables}{2.19~~~Rowspanning tables}
+
+\end{list}
+
+\item {} \href{\#tests-for-the-latex-writer}{3~~~Tests for the LaTeX writer}
+\begin{list}{}{}
+\item {} \href{\#monospaced-non-alphanumeric-characters}{3.1~~~Monospaced non-alphanumeric characters}
+
+\item {} \href{\#various-non-ascii-characters}{3.2~~~Various non-ASCII characters}
+
+\end{list}
+
+\item {} \href{\#error-handling}{4~~~Error Handling}
+
+\end{list}
+
+
+
+%___________________________________________________________________________
+
+\hypertarget{structural-elements}{}
+\pdfbookmark[0]{1~~~Structural Elements}{structural-elements}
+\section*{1~~~Structural Elements}
+
+
+%___________________________________________________________________________
+
+\hypertarget{section-title}{}
+\pdfbookmark[1]{1.1~~~Section Title}{section-title}
+\subsection*{1.1~~~Section Title}
+\textbf{Section Subtitle}\vspace{0.2cm}
+
+\noindent
+That's it, the text just above this line.
+
+
+%___________________________________________________________________________
+
+\hypertarget{empty-section}{}
+\pdfbookmark[1]{1.2~~~Empty Section}{empty-section}
+\subsection*{1.2~~~Empty Section}
+
+
+%___________________________________________________________________________
+
+\hypertarget{transitions}{}
+\pdfbookmark[1]{1.3~~~Transitions}{transitions}
+\subsection*{1.3~~~Transitions}
+
+Here's a transition:
+
+
+%___________________________________________________________________________
+\hspace*{\fill}\hrulefill\hspace*{\fill}
+
+
+It divides the section. Transitions may also occur between sections:
+
+
+%___________________________________________________________________________
+\hspace*{\fill}\hrulefill\hspace*{\fill}
+
+
+
+%___________________________________________________________________________
+
+\hypertarget{body-elements}{}
+\pdfbookmark[0]{2~~~Body Elements}{body-elements}
+\section*{2~~~Body Elements}
+
+
+%___________________________________________________________________________
+
+\hypertarget{paragraphs}{}
+\pdfbookmark[1]{2.1~~~Paragraphs}{paragraphs}
+\subsection*{2.1~~~Paragraphs}
+
+A paragraph.
+
+
+%___________________________________________________________________________
+
+\hypertarget{inline-markup}{}
+\pdfbookmark[2]{2.1.1~~~Inline Markup}{inline-markup}
+\subsubsection*{2.1.1~~~Inline Markup}
+
+Paragraphs contain text and may contain inline markup: \emph{emphasis},
+\textbf{strong emphasis}, \texttt{inline literals}, standalone hyperlinks
+(\href{http://www.python.org}{http://www.python.org}), external hyperlinks (\href{http://www.python.org/}{Python}\raisebox{.5em}[0em]{\scriptsize\hyperlink{id21}{5}}), internal
+cross-references (\href{\#example}{example}), external hyperlinks with embedded URIs
+(\href{http://www.python.org}{Python web site}), footnote references
+(manually numbered\raisebox{.5em}[0em]{\scriptsize\hyperlink{id6}{1}}, anonymous auto-numbered\raisebox{.5em}[0em]{\scriptsize\hyperlink{id9}{3}}, labeled
+auto-numbered\raisebox{.5em}[0em]{\scriptsize\hyperlink{label}{2}}, or symbolic\raisebox{.5em}[0em]{\scriptsize\hyperlink{id10}{*}}), citation references
+([\hyperlink{cit2002}{CIT2002}]), substitution references (\includegraphics{../../../docs/user/rst/images/biohazard.png}), and \hypertarget{inline-hyperlink-targets}{inline
+hyperlink targets} (see \href{\#targets}{Targets} below for a reference back to here).
+Character-level inline markup is also possible (although exceedingly
+ugly!) in \emph{re}\texttt{Structured}\emph{Text}. Problems are indicated by
+{\color{red}\bfseries{}{\textbar}problematic{\textbar}} text (generated by processing errors; this one is
+intentional). Here is a reference to the \href{\#doctitle}{doctitle} and the \href{\#subtitle}{subtitle}.
+
+The default role for interpreted text is \titlereference{Title Reference}. Here are
+some explicit interpreted text roles: a PEP reference (\href{http://www.python.org/peps/pep-0287.html}{PEP 287}); an
+RFC reference (\href{http://www.faqs.org/rfcs/rfc2822.html}{RFC 2822}); a $_{subscript}$; a $^{superscript}$;
+and explicit roles for \emph{standard} \textbf{inline}
+\texttt{markup}.
+% DO NOT RE-WRAP THE FOLLOWING PARAGRAPH!
+
+Let's test wrapping and whitespace significance in inline literals:
+\texttt{This is an example of -{}-inline-literal -{}-text, -{}-including some-{}-
+strangely-{}-hyphenated-words. Adjust-the-width-of-your-browser-window
+to see how the text is wrapped. -{}- -{}-{}-{}- -{}-{}-{}-{}-{}-{}-{}- Now note the
+spacing between the words of this sentence (words
+should be grouped in pairs).}
+
+If the \texttt{-{}-pep-references} option was supplied, there should be a
+live link to PEP 258 here.
+
+
+%___________________________________________________________________________
+
+\hypertarget{bullet-lists}{}
+\pdfbookmark[1]{2.2~~~Bullet Lists}{bullet-lists}
+\subsection*{2.2~~~Bullet Lists}
+\begin{itemize}
+\item {}
+A bullet list
+\begin{itemize}
+\item {}
+Nested bullet list.
+
+\item {}
+Nested item 2.
+
+\end{itemize}
+
+\item {}
+Item 2.
+
+Paragraph 2 of item 2.
+\begin{itemize}
+\item {}
+Nested bullet list.
+
+\item {}
+Nested item 2.
+\begin{itemize}
+\item {}
+Third level.
+
+\item {}
+Item 2.
+
+\end{itemize}
+
+\item {}
+Nested item 3.
+
+\item {}
+This nested list should be compacted by the HTML writer.
+\hypertarget{target}{}% Even if this item contains a target and a comment.
+
+\end{itemize}
+
+\end{itemize}
+
+
+%___________________________________________________________________________
+
+\hypertarget{enumerated-lists}{}
+\pdfbookmark[1]{2.3~~~Enumerated Lists}{enumerated-lists}
+\subsection*{2.3~~~Enumerated Lists}
+\newcounter{listcnt1}
+\begin{list}{\arabic{listcnt1}.}
+{
+\usecounter{listcnt1}
+\setlength{\rightmargin}{\leftmargin}
+}
+\item {}
+Arabic numerals.
+\newcounter{listcnt2}
+\begin{list}{\alph{listcnt2})}
+{
+\usecounter{listcnt2}
+\setlength{\rightmargin}{\leftmargin}
+}
+\item {}
+lower alpha)
+\newcounter{listcnt3}
+\begin{list}{(\roman{listcnt3})}
+{
+\usecounter{listcnt3}
+\setlength{\rightmargin}{\leftmargin}
+}
+\item {}
+(lower roman)
+\newcounter{listcnt4}
+\begin{list}{\Alph{listcnt4}.}
+{
+\usecounter{listcnt4}
+\setlength{\rightmargin}{\leftmargin}
+}
+\item {}
+upper alpha.
+\newcounter{listcnt5}
+\begin{list}{\Roman{listcnt5})}
+{
+\usecounter{listcnt5}
+\setlength{\rightmargin}{\leftmargin}
+}
+\item {}
+upper roman)
+
+\end{list}
+
+\end{list}
+
+\end{list}
+
+\end{list}
+
+\item {}
+Lists that don't start at 1:
+\newcounter{listcnt6}
+\begin{list}{\arabic{listcnt6}.}
+{
+\usecounter{listcnt6}
+\addtocounter{listcnt6}{2}
+\setlength{\rightmargin}{\leftmargin}
+}
+\item {}
+Three
+
+\item {}
+Four
+
+\end{list}
+\newcounter{listcnt7}
+\begin{list}{\Alph{listcnt7}.}
+{
+\usecounter{listcnt7}
+\addtocounter{listcnt7}{2}
+\setlength{\rightmargin}{\leftmargin}
+}
+\item {}
+C
+
+\item {}
+D
+
+\end{list}
+\newcounter{listcnt8}
+\begin{list}{\roman{listcnt8}.}
+{
+\usecounter{listcnt8}
+\addtocounter{listcnt8}{2}
+\setlength{\rightmargin}{\leftmargin}
+}
+\item {}
+iii
+
+\item {}
+iv
+
+\end{list}
+
+\end{list}
+
+
+%___________________________________________________________________________
+
+\hypertarget{definition-lists}{}
+\pdfbookmark[1]{2.4~~~Definition Lists}{definition-lists}
+\subsection*{2.4~~~Definition Lists}
+\begin{description}
+%[visit_definition_list_item]
+\item[{Term}] %[visit_definition]
+
+Definition
+
+%[depart_definition]
+%[depart_definition_list_item]
+%[visit_definition_list_item]
+\item[{Term}] (\textbf{classifier})
+%[visit_definition]
+
+Definition paragraph 1.
+
+Definition paragraph 2.
+
+%[depart_definition]
+%[depart_definition_list_item]
+%[visit_definition_list_item]
+\item[{Term}] %[visit_definition]
+
+Definition
+
+%[depart_definition]
+%[depart_definition_list_item]
+%[visit_definition_list_item]
+\item[{Term}] (\textbf{classifier one})
+(\textbf{classifier two})
+%[visit_definition]
+
+Definition
+
+%[depart_definition]
+%[depart_definition_list_item]
+\end{description}
+
+
+%___________________________________________________________________________
+
+\hypertarget{field-lists}{}
+\pdfbookmark[1]{2.5~~~Field Lists}{field-lists}
+\subsection*{2.5~~~Field Lists}
+\begin{quote}
+\begin{description}
+\item [what:]
+Field lists map field names to field bodies, like database
+records. They are often part of an extension syntax. They are
+an unambiguous variant of RFC 2822 fields.
+
+
+\item [how arg1 arg2:]
+The field marker is a colon, the field name, and a colon.
+
+The field body may contain one or more body elements, indented
+relative to the field marker.
+
+
+\item [credits:]
+This paragraph has the \titlereference{credits} class set. (This is actually not
+about credits but just for ensuring that the class attribute
+doesn't get stripped away.)
+
+
+\end{description}
+\end{quote}
+
+
+%___________________________________________________________________________
+
+\hypertarget{option-lists}{}
+\pdfbookmark[1]{2.6~~~Option Lists}{option-lists}
+\subsection*{2.6~~~Option Lists}
+
+For listing command-line options:
+% [option list]
+\begin{optionlist}{3cm}
+\item [-a]
+command-line option ``a''
+\item [-b file]
+options can have arguments
+and long descriptions
+\item [-{}-long]
+options can be long also
+\item [-{}-input=file]
+long options can also have
+arguments
+\item [-{}-very-long-option]
+The description can also start on the next line.
+
+The description may contain multiple body elements,
+regardless of where it starts.
+\item [-x, -y, -z]
+Multiple options are an ``option group''.
+\item [-v, -{}-verbose]
+Commonly-seen: short {\&} long options.
+\item [-1 file, -{}-one=file, -{}-two file]
+Multiple options with arguments.
+\item [/V]
+DOS/VMS-style options too
+\end{optionlist}
+
+There must be at least two spaces between the option and the
+description.
+
+
+%___________________________________________________________________________
+
+\hypertarget{literal-blocks}{}
+\pdfbookmark[1]{2.7~~~Literal Blocks}{literal-blocks}
+\subsection*{2.7~~~Literal Blocks}
+
+Literal blocks are indicated with a double-colon (``::'') at the end of
+the preceding paragraph (over there \texttt{-{}->}). They can be indented:
+\begin{quote}{\ttfamily \raggedright \noindent
+if~literal{\_}block:~\\
+~~~~text~=~'is~left~as-is'~\\
+~~~~spaces{\_}and{\_}linebreaks~=~'are~preserved'~\\
+~~~~markup{\_}processing~=~None
+}\end{quote}
+
+Or they can be quoted without indentation:
+\begin{quote}{\ttfamily \raggedright \noindent
+>{}>~Great~idea!~\\
+>~\\
+>~Why~didn't~I~think~of~that?
+}\end{quote}
+
+
+%___________________________________________________________________________
+
+\hypertarget{line-blocks}{}
+\pdfbookmark[1]{2.8~~~Line Blocks}{line-blocks}
+\subsection*{2.8~~~Line Blocks}
+
+This section tests line blocks. Line blocks are body elements which
+consist of lines and other line blocks. Nested line blocks cause
+indentation.
+
+\begin{lineblock}{0em}
+\item[] This is a line block. It ends with a blank line.
+\item[]
+\begin{lineblock}{\lineblockindentation}
+\item[] New lines begin with a vertical bar (``{\textbar}'').
+\item[] Line breaks and initial indent are significant, and preserved.
+\item[]
+\begin{lineblock}{\lineblockindentation}
+\item[] Continuation lines are also possible. A long line that is intended
+to wrap should begin with a space in place of the vertical bar.
+\end{lineblock}
+\item[] The left edge of a continuation line need not be aligned with
+the left edge of the text above it.
+\end{lineblock}
+\end{lineblock}
+
+\begin{lineblock}{0em}
+\item[] This is a second line block.
+\item[]
+\item[] Blank lines are permitted internally, but they must begin with a ``{\textbar}''.
+\end{lineblock}
+
+Another line block, surrounded by paragraphs:
+
+\begin{lineblock}{0em}
+\item[] And it's no good waiting by the window
+\item[] It's no good waiting for the sun
+\item[] Please believe me, the things you dream of
+\item[] They don't fall in the lap of no-one
+\end{lineblock}
+
+Take it away, Eric the Orchestra Leader!
+\begin{quote}
+
+\begin{lineblock}{0em}
+\item[] A one, two, a one two three four
+\item[]
+\item[] Half a bee, philosophically,
+\item[]
+\begin{lineblock}{\lineblockindentation}
+\item[] must, \emph{ipso facto}, half not be.
+\end{lineblock}
+\item[] But half the bee has got to be,
+\item[]
+\begin{lineblock}{\lineblockindentation}
+\item[] \emph{vis a vis} its entity. D'you see?
+\item[]
+\end{lineblock}
+\item[] But can a bee be said to be
+\item[]
+\begin{lineblock}{\lineblockindentation}
+\item[] or not to be an entire bee,
+\item[]
+\begin{lineblock}{\lineblockindentation}
+\item[] when half the bee is not a bee,
+\item[]
+\begin{lineblock}{\lineblockindentation}
+\item[] due to some ancient injury?
+\item[]
+\end{lineblock}
+\end{lineblock}
+\end{lineblock}
+\item[] Singing...
+\end{lineblock}
+\end{quote}
+
+
+%___________________________________________________________________________
+
+\hypertarget{block-quotes}{}
+\pdfbookmark[1]{2.9~~~Block Quotes}{block-quotes}
+\subsection*{2.9~~~Block Quotes}
+
+Block quotes consist of indented body elements:
+\begin{quote}
+
+My theory by A. Elk. Brackets Miss, brackets. This theory goes
+as follows and begins now. All brontosauruses are thin at one
+end, much much thicker in the middle and then thin again at the
+far end. That is my theory, it is mine, and belongs to me and I
+own it, and what it is too.
+
+\begin{flushright}
+---Anne Elk (Miss)
+\end{flushright}
+\end{quote}
+
+
+%___________________________________________________________________________
+
+\hypertarget{doctest-blocks}{}
+\pdfbookmark[1]{2.10~~~Doctest Blocks}{doctest-blocks}
+\subsection*{2.10~~~Doctest Blocks}
+\begin{verbatim}>>> print 'Python-specific usage examples; begun with ">>>"'
+Python-specific usage examples; begun with ">>>"
+>>> print '(cut and pasted from interactive Python sessions)'
+(cut and pasted from interactive Python sessions)\end{verbatim}
+
+
+%___________________________________________________________________________
+
+\hypertarget{footnotes}{}
+\pdfbookmark[1]{2.11~~~Footnotes}{footnotes}
+\subsection*{2.11~~~Footnotes}
+\begin{figure}[b]\hypertarget{id6}$^{1}$
+A footnote contains body elements, consistently indented by at
+least 3 spaces.
+
+This is the footnote's second paragraph.
+\end{figure}
+\begin{figure}[b]\hypertarget{label}$^{2}$
+Footnotes may be numbered, either manually (as in\raisebox{.5em}[0em]{\scriptsize\hyperlink{id6}{1}}) or
+automatically using a ``{\#}''-prefixed label. This footnote has a
+label so it can be referred to from multiple places, both as a
+footnote reference (\raisebox{.5em}[0em]{\scriptsize\hyperlink{label}{2}}) and as a hyperlink reference
+(\href{\#label}{label}).
+\end{figure}
+\begin{figure}[b]\hypertarget{id9}$^{3}$
+This footnote is numbered automatically and anonymously using a
+label of ``{\#}'' only.
+
+This is the second paragraph.
+
+And this is the third paragraph.
+\end{figure}
+\begin{figure}[b]\hypertarget{id10}$^{*}$
+Footnotes may also use symbols, specified with a ``*'' label.
+Here's a reference to the next footnote:\raisebox{.5em}[0em]{\scriptsize\hyperlink{id12}{{\dag}}}.
+\end{figure}
+\begin{figure}[b]\hypertarget{id12}$^{{\dag}}$
+This footnote shows the next symbol in the sequence.
+\end{figure}
+\begin{figure}[b]\hypertarget{id13}$^{4}$
+Here's an unreferenced footnote, with a reference to a
+nonexistent footnote:{\color{red}\bfseries{}{[}5]{\_}}.
+\end{figure}
+
+
+%___________________________________________________________________________
+
+\hypertarget{citations}{}
+\pdfbookmark[1]{2.12~~~Citations}{citations}
+\subsection*{2.12~~~Citations}
+\begin{figure}[b]\hypertarget{cit2002}[CIT2002]
+Citations are text-labeled footnotes. They may be
+rendered separately and differently from footnotes.
+\end{figure}
+
+Here's a reference to the above, [\hyperlink{cit2002}{CIT2002}], and a {\color{red}\bfseries{}{[}nonexistent]{\_}}
+citation.
+
+
+%___________________________________________________________________________
+
+\hypertarget{targets}{}
+\hypertarget{another-target}{}
+\pdfbookmark[1]{2.13~~~Targets}{targets}
+\pdfbookmark[1]{2.13~~~Targets}{another-target}
+\subsection*{2.13~~~Targets}
+
+This paragraph is pointed to by the explicit ``example'' target. A
+reference can be found under \href{\#inline-markup}{Inline Markup}, above. \href{\#inline-hyperlink-targets}{Inline
+hyperlink targets} are also possible.
+
+Section headers are implicit targets, referred to by name. See
+\href{\#targets}{Targets}, which is a subsection of \href{\#body-elements}{Body Elements}.
+
+Explicit external targets are interpolated into references such as
+``\href{http://www.python.org/}{Python}\raisebox{.5em}[0em]{\scriptsize\hyperlink{id21}{5}}''.
+
+Targets may be indirect and anonymous. Thus \href{\#targets}{this phrase} may also
+refer to the \href{\#targets}{Targets} section.
+
+Here's a {\color{red}\bfseries{}`hyperlink reference without a target`{\_}}, which generates an
+error.
+
+
+%___________________________________________________________________________
+
+\hypertarget{duplicate-target-names}{}
+\pdfbookmark[2]{2.13.1~~~Duplicate Target Names}{duplicate-target-names}
+\subsubsection*{2.13.1~~~Duplicate Target Names}
+
+Duplicate names in section headers or other implicit targets will
+generate ``info'' (level-1) system messages. Duplicate names in
+explicit targets will generate ``warning'' (level-2) system messages.
+
+
+%___________________________________________________________________________
+
+\hypertarget{id18}{}
+\pdfbookmark[2]{2.13.2~~~Duplicate Target Names}{id18}
+\subsubsection*{2.13.2~~~Duplicate Target Names}
+
+Since there are two ``Duplicate Target Names'' section headers, we
+cannot uniquely refer to either of them by name. If we try to (like
+this: {\color{red}\bfseries{}`Duplicate Target Names`{\_}}), an error is generated.
+
+
+%___________________________________________________________________________
+
+\hypertarget{directives}{}
+\pdfbookmark[1]{2.14~~~Directives}{directives}
+\subsection*{2.14~~~Directives}
+\begin{list}{}{}
+\item {} \href{\#document-parts}{2.14.1~~~Document Parts}
+
+\item {} \href{\#images}{2.14.2~~~Images}
+
+\item {} \href{\#admonitions}{2.14.3~~~Admonitions}
+
+\item {} \href{\#topics-sidebars-and-rubrics}{2.14.4~~~Topics, Sidebars, and Rubrics}
+
+\item {} \href{\#target-footnotes}{2.14.5~~~Target Footnotes}
+
+\item {} \href{\#replacement-text}{2.14.6~~~Replacement Text}
+
+\item {} \href{\#compound-paragraph}{2.14.7~~~Compound Paragraph}
+
+\end{list}
+
+
+These are just a sample of the many reStructuredText Directives. For
+others, please see
+\href{http://docutils.sourceforge.net/docs/ref/rst/directives.html}{http://docutils.sourceforge.net/docs/ref/rst/directives.html}.
+
+
+%___________________________________________________________________________
+
+\hypertarget{document-parts}{}
+\pdfbookmark[2]{2.14.1~~~Document Parts}{document-parts}
+\subsubsection*{2.14.1~~~Document Parts}
+
+An example of the ``contents'' directive can be seen above this section
+(a local, untitled table of \href{\#contents}{contents}) and at the beginning of the
+document (a document-wide \href{\#table-of-contents}{table of contents}).
+
+
+%___________________________________________________________________________
+
+\hypertarget{images}{}
+\pdfbookmark[2]{2.14.2~~~Images}{images}
+\subsubsection*{2.14.2~~~Images}
+
+An image directive (also clickable -{}- a hyperlink reference):
+\href{\#directives}{\includegraphics{../../../docs/user/rst/images/title.png}}
+A figure directive:
+\begin{figure}[htbp]\begin{center}
+
+\includegraphics{../../../docs/user/rst/images/biohazard.png}
+\caption{A figure is an image with a caption and/or a legend:}{\small
+\begin{longtable}[c]{|p{0.16\locallinewidth}|p{0.56\locallinewidth}|}
+\hline
+
+re
+ &
+Revised, revisited, based on 're' module.
+ \\
+\hline
+
+Structured
+ &
+Structure-enhanced text, structuredtext.
+ \\
+\hline
+
+Text
+ &
+Well it is, isn't it?
+ \\
+\hline
+\end{longtable}
+
+This paragraph is also part of the legend.
+}\end{center}\end{figure}
+
+This paragraph might flow around the figure...
+
+A centered figure:
+\begin{figure}[htbp]\begin{center}
+
+\includegraphics{../../../docs/user/rst/images/biohazard.png}
+\caption{This is the caption.}{\small
+This is the legend.
+
+The legend may consist of several paragraphs.
+}\end{center}\end{figure}
+
+This paragraph might flow around the figure...
+
+A left-aligned figure:
+\begin{figure}[htbp]\begin{center}
+
+\includegraphics{../../../docs/user/rst/images/biohazard.png}
+\caption{This is the caption.}{\small
+This is the legend.
+
+The legend may consist of several paragraphs.
+}\end{center}\end{figure}
+
+This paragraph might flow around the figure...
+
+
+%___________________________________________________________________________
+
+\hypertarget{admonitions}{}
+\pdfbookmark[2]{2.14.3~~~Admonitions}{admonitions}
+\subsubsection*{2.14.3~~~Admonitions}
+\begin{center}\begin{sffamily}
+\fbox{\parbox{\admonitionwidth}{
+\textbf{\large Attention!}
+\vspace{2mm}
+
+Directives at large.
+}}
+\end{sffamily}
+\end{center}
+\begin{center}\begin{sffamily}
+\fbox{\parbox{\admonitionwidth}{
+\textbf{\large Caution!}
+\vspace{2mm}
+
+Don't take any wooden nickels.
+}}
+\end{sffamily}
+\end{center}
+\begin{center}\begin{sffamily}
+\fbox{\parbox{\admonitionwidth}{
+\textbf{\large !DANGER!}
+\vspace{2mm}
+
+Mad scientist at work!
+}}
+\end{sffamily}
+\end{center}
+\begin{center}\begin{sffamily}
+\fbox{\parbox{\admonitionwidth}{
+\textbf{\large Error}
+\vspace{2mm}
+
+Does not compute.
+}}
+\end{sffamily}
+\end{center}
+\begin{center}\begin{sffamily}
+\fbox{\parbox{\admonitionwidth}{
+\textbf{\large Hint}
+\vspace{2mm}
+
+It's bigger than a bread box.
+}}
+\end{sffamily}
+\end{center}
+\begin{center}\begin{sffamily}
+\fbox{\parbox{\admonitionwidth}{
+\textbf{\large Important}
+\vspace{2mm}
+\begin{itemize}
+\item {}
+Wash behind your ears.
+
+\item {}
+Clean up your room.
+
+\item {}
+Call your mother.
+
+\item {}
+Back up your data.
+
+\end{itemize}
+}}
+\end{sffamily}
+\end{center}
+\begin{center}\begin{sffamily}
+\fbox{\parbox{\admonitionwidth}{
+\textbf{\large Note}
+\vspace{2mm}
+
+This is a note.
+}}
+\end{sffamily}
+\end{center}
+\begin{center}\begin{sffamily}
+\fbox{\parbox{\admonitionwidth}{
+\textbf{\large Tip}
+\vspace{2mm}
+
+15{\%} if the service is good.
+}}
+\end{sffamily}
+\end{center}
+\begin{center}\begin{sffamily}
+\fbox{\parbox{\admonitionwidth}{
+\textbf{\large Warning}
+\vspace{2mm}
+
+Strong prose may provoke extreme mental exertion.
+Reader discretion is strongly advised.
+}}
+\end{sffamily}
+\end{center}
+\begin{center}\begin{sffamily}
+\fbox{\parbox{\admonitionwidth}{
+\vspace{2mm}
+\textbf{\large And, by the way...}
+\smallskip
+
+You can make up your own admonition too.
+}}
+\end{sffamily}
+\end{center}
+
+
+%___________________________________________________________________________
+
+\hypertarget{topics-sidebars-and-rubrics}{}
+\pdfbookmark[2]{2.14.4~~~Topics, Sidebars, and Rubrics}{topics-sidebars-and-rubrics}
+\subsubsection*{2.14.4~~~Topics, Sidebars, and Rubrics}
+
+\setlength{\locallinewidth}{0.9\admonitionwidth}
+\begin{center}\begin{sffamily}
+\fbox{\colorbox[gray]{0.80}{\parbox{\admonitionwidth}{
+\textbf{\large Sidebar Title}
+\smallskip
+~\\
+\textbf{Optional Subtitle}
+\smallskip
+
+This is a sidebar. It is for text outside the flow of the main
+text.
+\rubric{This is a rubric inside a sidebar}
+
+Sidebars often appears beside the main text with a border and
+background color.
+}}}
+\end{sffamily}
+\end{center}
+
+\setlength{\locallinewidth}{\linewidth}
+\subsubsection*{~\hfill Topic Title\hfill ~}
+
+This is a topic.
+
+\rubric{This is a rubric}
+
+
+%___________________________________________________________________________
+
+\hypertarget{target-footnotes}{}
+\pdfbookmark[2]{2.14.5~~~Target Footnotes}{target-footnotes}
+\subsubsection*{2.14.5~~~Target Footnotes}
+\begin{figure}[b]\hypertarget{id21}$^{5}$
+\href{http://www.python.org/}{http://www.python.org/}
+\end{figure}
+
+
+%___________________________________________________________________________
+
+\hypertarget{replacement-text}{}
+\pdfbookmark[2]{2.14.6~~~Replacement Text}{replacement-text}
+\subsubsection*{2.14.6~~~Replacement Text}
+
+I recommend you try \href{http://www.python.org/}{Python, \emph{the} best language around}\raisebox{.5em}[0em]{\scriptsize\hyperlink{id21}{5}}.
+
+
+%___________________________________________________________________________
+
+\hypertarget{compound-paragraph}{}
+\pdfbookmark[2]{2.14.7~~~Compound Paragraph}{compound-paragraph}
+\subsubsection*{2.14.7~~~Compound Paragraph}
+
+Compound 1, paragraph 1.
+
+Compound 1, paragraph 2.
+\begin{itemize}
+\item {}
+Compound 1, list item one.
+
+\item {}
+Compound 1, list item two.
+
+\end{itemize}
+
+Another compound statement:
+
+Compound 2, a literal block:
+\begin{quote}{\ttfamily \raggedright \noindent
+Compound~2,~literal.
+}\end{quote}
+Compound 2, this is a test.
+
+Compound 3, only consisting of one paragraph.
+\begin{quote}{\ttfamily \raggedright \noindent
+Compound~4.~\\
+This~one~starts~with~a~literal~block.
+}\end{quote}
+Compound 4, a paragraph.
+
+Now something \emph{really} perverted -{}- a nested compound block. In
+LaTeX, the following paragraphs should all be first-line indented:
+
+Compound 5, block 1 (a paragraph).
+
+Compound 6, block 2 in compound 5.
+
+Compound 6, another paragraph.
+
+Compound 5, block 3 (a paragraph).
+
+Compound 7, with a table inside:
+
+\begin{longtable}[c]{|p{0.25\locallinewidth}|p{0.25\locallinewidth}|p{0.25\locallinewidth}|}
+\hline
+
+Left cell, first
+paragraph.
+
+Left cell, second
+paragraph.
+ &
+Middle cell,
+consisting of
+exactly one
+paragraph.
+ &
+Right cell.
+
+Paragraph 2.
+
+Paragraph 3.
+ \\
+\hline
+\end{longtable}
+Compound 7, a paragraph after the table.
+
+Compound 7, another paragraph.
+
+
+%___________________________________________________________________________
+
+\hypertarget{substitution-definitions}{}
+\pdfbookmark[1]{2.15~~~Substitution Definitions}{substitution-definitions}
+\subsection*{2.15~~~Substitution Definitions}
+
+An inline image (\includegraphics{../../../docs/user/rst/images/biohazard.png}) example:
+
+(Substitution definitions are not visible in the HTML source.)
+
+
+%___________________________________________________________________________
+
+\hypertarget{comments}{}
+\pdfbookmark[1]{2.16~~~Comments}{comments}
+\subsection*{2.16~~~Comments}
+
+Here's one:
+% Comments begin with two dots and a space. Anything may
+% follow, except for the syntax of footnotes, hyperlink
+% targets, directives, or substitution definitions.
+%
+% Double-dashes -- "--" -- must be escaped somehow in HTML output.
+
+(View the HTML source to see the comment.)
+
+
+%___________________________________________________________________________
+
+\hypertarget{raw-text}{}
+\pdfbookmark[1]{2.17~~~Raw text}{raw-text}
+\subsection*{2.17~~~Raw text}
+
+This does not necessarily look nice, because there may be missing white space.
+
+It's just there to freeze the behavior.
+A test.Second test.Another test with myclass set.
+This is the fourth test with myrawroleclass set.
+Fifth test in LaTeX.\\Line two.
+
+%___________________________________________________________________________
+
+\hypertarget{colspanning-tables}{}
+\pdfbookmark[1]{2.18~~~Colspanning tables}{colspanning-tables}
+\subsection*{2.18~~~Colspanning tables}
+
+This table has a cell spanning two columns:
+
+\begin{longtable}[c]{|p{0.07\locallinewidth}|p{0.07\locallinewidth}|p{0.09\locallinewidth}|}
+\hline
+\multicolumn{2}{|l|}{\textbf{
+Inputs
+}} & \textbf{
+Output
+} \\
+\hline
+\textbf{
+A
+} & \textbf{
+B
+} & \textbf{
+A or B
+} \\
+\hline
+\endhead
+
+False
+ &
+False
+ &
+False
+ \\
+\hline
+
+True
+ &
+False
+ &
+True
+ \\
+\hline
+
+False
+ &
+True
+ &
+True
+ \\
+\hline
+
+True
+ &
+True
+ &
+True
+ \\
+\hline
+\end{longtable}
+
+
+%___________________________________________________________________________
+
+\hypertarget{rowspanning-tables}{}
+\pdfbookmark[1]{2.19~~~Rowspanning tables}{rowspanning-tables}
+\subsection*{2.19~~~Rowspanning tables}
+
+Here's a table with cells spanning several rows:
+
+\begin{longtable}[c]{|p{0.30\locallinewidth}|p{0.16\locallinewidth}|p{0.23\locallinewidth}|}
+\hline
+\textbf{
+Header row, column 1
+(header rows optional)
+} & \textbf{
+Header 2
+} & \textbf{
+Header 3
+} \\
+\hline
+\endhead
+
+body row 1, column 1
+ &
+column 2
+ &
+column 3
+ \\
+\hline
+
+body row 2
+ & \multirow{2}{0.16\locallinewidth}{
+Cells may
+span rows.
+} & \multirow{2}{0.23\locallinewidth}{
+Another
+rowspanning
+cell.
+} \\
+\cline{1-1}
+
+body row 3
+ & \\
+\hline
+\end{longtable}
+
+
+%___________________________________________________________________________
+
+\hypertarget{tests-for-the-latex-writer}{}
+\pdfbookmark[0]{3~~~Tests for the LaTeX writer}{tests-for-the-latex-writer}
+\section*{3~~~Tests for the LaTeX writer}
+
+
+%___________________________________________________________________________
+
+\hypertarget{monospaced-non-alphanumeric-characters}{}
+\pdfbookmark[1]{3.1~~~Monospaced non-alphanumeric characters}{monospaced-non-alphanumeric-characters}
+\subsection*{3.1~~~Monospaced non-alphanumeric characters}
+
+These are all ASCII characters except a-zA-Z0-9 and space:
+
+\texttt{!!!"{}"{}"{\#}{\#}{\#}{\$}{\$}{\$}{\%}{\%}{\%}{\&}{\&}{\&}'{}'{}'((()))***+++,{},{},-{}-{}-...///:::}
+
+\texttt{;;;<{}<{}<===>{}>{}>???@@@{[}{[}{[}{\textbackslash}{\textbackslash}{\textbackslash}]]]{\textasciicircum}{\textasciicircum}{\textasciicircum}{\_}{\_}{\_}`{}`{}`{\{}{\{}{\{}|||{\}}{\}}{\}}{\textasciitilde}{\textasciitilde}{\textasciitilde}}
+
+\texttt{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
+
+The two lines of non-alphanumeric characters should both have the same
+width as the third line.
+
+
+%___________________________________________________________________________
+
+\hypertarget{various-non-ascii-characters}{}
+\pdfbookmark[1]{3.2~~~Various non-ASCII characters}{various-non-ascii-characters}
+\subsection*{3.2~~~Various non-ASCII characters}
+
+\begin{longtable}[c]{|p{0.03\locallinewidth}|p{0.42\locallinewidth}|}
+\hline
+
+
+ &
+copyright sign
+ \\
+\hline
+
+
+ &
+registered sign
+ \\
+\hline
+
+
+ &
+left pointing guillemet
+ \\
+\hline
+
+
+ &
+right pointing guillemet
+ \\
+\hline
+
+{--}
+ &
+en-dash
+ \\
+\hline
+
+{---}
+ &
+em-dash
+ \\
+\hline
+
+`
+ &
+single turned comma quotation mark
+ \\
+\hline
+
+'
+ &
+single comma quotation mark
+ \\
+\hline
+
+,
+ &
+low single comma quotation mark
+ \\
+\hline
+
+``
+ &
+double turned comma quotation mark
+ \\
+\hline
+
+''
+ &
+double comma quotation mark
+ \\
+\hline
+
+,,
+ &
+low double comma quotation mark
+ \\
+\hline
+
+{\dag}
+ &
+dagger
+ \\
+\hline
+
+{\ddag}
+ &
+double dagger
+ \\
+\hline
+
+{\dots}
+ &
+ellipsis
+ \\
+\hline
+
+{\texttrademark}
+ &
+trade mark sign
+ \\
+\hline
+
+{$\Leftrightarrow$}
+ &
+left-right double arrow
+ \\
+\hline
+\end{longtable}
+
+The following line should not be wrapped, because it uses
+non-breakable spaces:
+
+X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X~X
+
+
+%___________________________________________________________________________
+
+\hypertarget{error-handling}{}
+\pdfbookmark[0]{4~~~Error Handling}{error-handling}
+\section*{4~~~Error Handling}
+
+Any errors caught during processing will generate system messages.
+
+There should be five messages in the following, auto-generated
+section, ``Docutils System Messages'':
+% section should be added by Docutils automatically
+
+
+%___________________________________________________________________________
+
+\section*{Docutils System Messages}
+
+Undefined substitution referenced: ``problematic''.
+
+
+Unknown target name: ``5''.
+
+
+Unknown target name: ``nonexistent''.
+
+
+Unknown target name: ``hyperlink reference without a target''.
+
+
+Duplicate target name, cannot be used as a unique reference: ``duplicate target names''.
+
+
+\end{document}
diff --git a/test/functional/expected/standalone_rst_pseudoxml.txt b/test/functional/expected/standalone_rst_pseudoxml.txt
new file mode 100644
index 000000000..1c21abc9a
--- /dev/null
+++ b/test/functional/expected/standalone_rst_pseudoxml.txt
@@ -0,0 +1,1726 @@
+<document ids="restructuredtext-test-document doctitle" names="restructuredtext test document doctitle" source="functional/input/standalone_rst_html4css1.txt">
+ <title>
+ reStructuredText Test Document
+ <subtitle ids="examples-of-syntax-constructs subtitle" names="examples of syntax constructs subtitle">
+ Examples of Syntax Constructs
+ <decoration>
+ <header>
+ <paragraph>
+ Document header
+ <footer>
+ <paragraph>
+ Document footer
+ <docinfo>
+ <author>
+ David Goodger
+ <address xml:space="preserve">
+ 123 Example Street
+ Example, EX Canada
+ A1B 2C3
+ <contact>
+ <reference refuri="mailto:goodger@users.sourceforge.net">
+ goodger@users.sourceforge.net
+ <authors>
+ <author>
+ Me
+ <author>
+ Myself
+ <author>
+ I
+ <organization>
+ humankind
+ <date>
+ Now, or yesterday. Or maybe even
+ <emphasis>
+ before
+ yesterday.
+ <status>
+ This is a "work in progress"
+ <revision>
+ is managed by a version control system.
+ <version>
+ 1
+ <copyright>
+ This document has been placed in the public domain. You
+ may do with it as you wish. You may copy, modify,
+ redistribute, reattribute, sell, buy, rent, lease,
+ destroy, or improve it, quote it at length, excerpt,
+ incorporate, collate, fold, staple, or mutilate it, or do
+ anything else to it that your or anyone else's heart
+ desires.
+ <field>
+ <field_name>
+ field name
+ <field_body>
+ <paragraph>
+ This is a "generic bibliographic field".
+ <field>
+ <field_name>
+ field name "2"
+ <field_body>
+ <paragraph>
+ Generic bibliographic fields may contain multiple body elements.
+ <paragraph>
+ Like this.
+ <topic classes="dedication">
+ <title>
+ Dedication
+ <paragraph>
+ For Docutils users & co-developers.
+ <topic classes="abstract">
+ <title>
+ Abstract
+ <paragraph>
+ This is a test document, containing at least one example of each
+ reStructuredText construct.
+ <comment xml:space="preserve">
+ This is a comment. Note how any initial comments are moved by
+ transforms to after the document title, subtitle, and docinfo.
+ <target refid="doctitle">
+ <comment xml:space="preserve">
+ Above is the document title, and below is the subtitle.
+ They are transformed from section titles after parsing.
+ <target refid="subtitle">
+ <comment xml:space="preserve">
+ bibliographic fields (which also require a transform):
+ <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">
+ <topic classes="contents" ids="table-of-contents" names="table of contents">
+ <title>
+ Table of Contents
+ <bullet_list classes="auto-toc">
+ <list_item>
+ <paragraph>
+ <reference ids="id25" refid="structural-elements">
+ <generated classes="sectnum">
+ 1   
+ Structural Elements
+ <bullet_list classes="auto-toc">
+ <list_item>
+ <paragraph>
+ <reference ids="id26" refid="section-title">
+ <generated classes="sectnum">
+ 1.1   
+ Section Title
+ <list_item>
+ <paragraph>
+ <reference ids="id27" refid="empty-section">
+ <generated classes="sectnum">
+ 1.2   
+ Empty Section
+ <list_item>
+ <paragraph>
+ <reference ids="id28" refid="transitions">
+ <generated classes="sectnum">
+ 1.3   
+ Transitions
+ <list_item>
+ <paragraph>
+ <reference ids="id29" refid="body-elements">
+ <generated classes="sectnum">
+ 2   
+ Body Elements
+ <bullet_list classes="auto-toc">
+ <list_item>
+ <paragraph>
+ <reference ids="id30" refid="paragraphs">
+ <generated classes="sectnum">
+ 2.1   
+ Paragraphs
+ <bullet_list classes="auto-toc">
+ <list_item>
+ <paragraph>
+ <reference ids="id31" refid="inline-markup">
+ <generated classes="sectnum">
+ 2.1.1   
+ Inline Markup
+ <list_item>
+ <paragraph>
+ <reference ids="id32" refid="bullet-lists">
+ <generated classes="sectnum">
+ 2.2   
+ Bullet Lists
+ <list_item>
+ <paragraph>
+ <reference ids="id33" refid="enumerated-lists">
+ <generated classes="sectnum">
+ 2.3   
+ Enumerated Lists
+ <list_item>
+ <paragraph>
+ <reference ids="id34" refid="definition-lists">
+ <generated classes="sectnum">
+ 2.4   
+ Definition Lists
+ <list_item>
+ <paragraph>
+ <reference ids="id35" refid="field-lists">
+ <generated classes="sectnum">
+ 2.5   
+ Field Lists
+ <list_item>
+ <paragraph>
+ <reference ids="id36" refid="option-lists">
+ <generated classes="sectnum">
+ 2.6   
+ Option Lists
+ <list_item>
+ <paragraph>
+ <reference ids="id37" refid="literal-blocks">
+ <generated classes="sectnum">
+ 2.7   
+ Literal Blocks
+ <list_item>
+ <paragraph>
+ <reference ids="id38" refid="line-blocks">
+ <generated classes="sectnum">
+ 2.8   
+ Line Blocks
+ <list_item>
+ <paragraph>
+ <reference ids="id39" refid="block-quotes">
+ <generated classes="sectnum">
+ 2.9   
+ Block Quotes
+ <list_item>
+ <paragraph>
+ <reference ids="id40" refid="doctest-blocks">
+ <generated classes="sectnum">
+ 2.10   
+ Doctest Blocks
+ <list_item>
+ <paragraph>
+ <reference ids="id41" refid="footnotes">
+ <generated classes="sectnum">
+ 2.11   
+ Footnotes
+ <list_item>
+ <paragraph>
+ <reference ids="id42" refid="citations">
+ <generated classes="sectnum">
+ 2.12   
+ Citations
+ <list_item>
+ <paragraph>
+ <reference ids="id43" refid="targets">
+ <generated classes="sectnum">
+ 2.13   
+ Targets
+ <bullet_list classes="auto-toc">
+ <list_item>
+ <paragraph>
+ <reference ids="id44" refid="duplicate-target-names">
+ <generated classes="sectnum">
+ 2.13.1   
+ Duplicate Target Names
+ <list_item>
+ <paragraph>
+ <reference ids="id45" refid="id18">
+ <generated classes="sectnum">
+ 2.13.2   
+ Duplicate Target Names
+ <list_item>
+ <paragraph>
+ <reference ids="id46" refid="directives">
+ <generated classes="sectnum">
+ 2.14   
+ Directives
+ <bullet_list classes="auto-toc">
+ <list_item>
+ <paragraph>
+ <reference ids="id47" refid="document-parts">
+ <generated classes="sectnum">
+ 2.14.1   
+ Document Parts
+ <list_item>
+ <paragraph>
+ <reference ids="id48" refid="images">
+ <generated classes="sectnum">
+ 2.14.2   
+ Images
+ <list_item>
+ <paragraph>
+ <reference ids="id49" refid="admonitions">
+ <generated classes="sectnum">
+ 2.14.3   
+ Admonitions
+ <list_item>
+ <paragraph>
+ <reference ids="id50" refid="topics-sidebars-and-rubrics">
+ <generated classes="sectnum">
+ 2.14.4   
+ Topics, Sidebars, and Rubrics
+ <list_item>
+ <paragraph>
+ <reference ids="id51" refid="target-footnotes">
+ <generated classes="sectnum">
+ 2.14.5   
+ Target Footnotes
+ <list_item>
+ <paragraph>
+ <reference ids="id52" refid="replacement-text">
+ <generated classes="sectnum">
+ 2.14.6   
+ Replacement Text
+ <list_item>
+ <paragraph>
+ <reference ids="id53" refid="compound-paragraph">
+ <generated classes="sectnum">
+ 2.14.7   
+ Compound Paragraph
+ <list_item>
+ <paragraph>
+ <reference ids="id54" refid="substitution-definitions">
+ <generated classes="sectnum">
+ 2.15   
+ Substitution Definitions
+ <list_item>
+ <paragraph>
+ <reference ids="id55" refid="comments">
+ <generated classes="sectnum">
+ 2.16   
+ Comments
+ <list_item>
+ <paragraph>
+ <reference ids="id56" refid="raw-text">
+ <generated classes="sectnum">
+ 2.17   
+ Raw text
+ <list_item>
+ <paragraph>
+ <reference ids="id57" refid="colspanning-tables">
+ <generated classes="sectnum">
+ 2.18   
+ Colspanning tables
+ <list_item>
+ <paragraph>
+ <reference ids="id58" refid="rowspanning-tables">
+ <generated classes="sectnum">
+ 2.19   
+ Rowspanning tables
+ <list_item>
+ <paragraph>
+ <reference ids="id59" refid="complex-tables">
+ <generated classes="sectnum">
+ 2.20   
+ Complex tables
+ <list_item>
+ <paragraph>
+ <reference ids="id60" refid="list-tables">
+ <generated classes="sectnum">
+ 2.21   
+ List Tables
+ <list_item>
+ <paragraph>
+ <reference ids="id61" refid="error-handling">
+ <generated classes="sectnum">
+ 3   
+ Error Handling
+ <section ids="structural-elements" names="structural elements">
+ <title auto="1" refid="id25">
+ <generated classes="sectnum">
+ 1   
+ Structural Elements
+ <section ids="section-title" names="section title">
+ <title auto="1" refid="id26">
+ <generated classes="sectnum">
+ 1.1   
+ Section Title
+ <subtitle ids="section-subtitle" names="section subtitle">
+ Section Subtitle
+ <paragraph>
+ That's it, the text just above this line.
+ <section ids="empty-section" names="empty section">
+ <title auto="1" refid="id27">
+ <generated classes="sectnum">
+ 1.2   
+ Empty Section
+ <section ids="transitions" names="transitions">
+ <title auto="1" refid="id28">
+ <generated classes="sectnum">
+ 1.3   
+ Transitions
+ <paragraph>
+ Here's a transition:
+ <transition>
+ <paragraph>
+ It divides the section. Transitions may also occur between sections:
+ <transition>
+ <section ids="body-elements" names="body elements">
+ <title auto="1" refid="id29">
+ <generated classes="sectnum">
+ 2   
+ Body Elements
+ <section ids="paragraphs" names="paragraphs">
+ <title auto="1" refid="id30">
+ <generated classes="sectnum">
+ 2.1   
+ Paragraphs
+ <paragraph>
+ A paragraph.
+ <section ids="inline-markup" names="inline markup">
+ <title auto="1" refid="id31">
+ <generated classes="sectnum">
+ 2.1.1   
+ Inline Markup
+ <paragraph>
+ Paragraphs contain text and may contain inline markup:
+ <emphasis>
+ emphasis
+ ,
+ <strong>
+ strong emphasis
+ ,
+ <literal>
+ inline literals
+ , standalone hyperlinks
+ (
+ <reference refuri="http://www.python.org">
+ http://www.python.org
+ ), external hyperlinks (
+ <reference name="Python" refuri="http://www.python.org/">
+ Python
+
+ <footnote_reference auto="1" ids="id22" refid="id21">
+ 5
+ ), internal
+ cross-references (
+ <reference name="example" refid="example">
+ example
+ ), external hyperlinks with embedded URIs
+ (
+ <reference name="Python web site" refuri="http://www.python.org">
+ Python web site
+ ), footnote references
+ (manually numbered
+ <footnote_reference ids="id1" refid="id6">
+ 1
+ , anonymous auto-numbered
+ <footnote_reference auto="1" ids="id2" refid="id9">
+ 3
+ , labeled
+ auto-numbered
+ <footnote_reference auto="1" ids="id3" refid="label">
+ 2
+ , or symbolic
+ <footnote_reference auto="*" ids="id4" refid="id10">
+ *
+ ), citation references
+ (
+ <citation_reference ids="id5" refid="cit2002">
+ CIT2002
+ ), substitution references (
+ <image alt="EXAMPLE" uri="../../../docs/user/rst/images/biohazard.png">
+ ), and
+ <target ids="inline-hyperlink-targets" names="inline hyperlink targets">
+ inline
+ hyperlink targets
+ (see
+ <reference name="Targets" refid="targets">
+ Targets
+ below for a reference back to here).
+ Character-level inline markup is also possible (although exceedingly
+ ugly!) in
+ <emphasis>
+ re
+ <literal>
+ Structured
+ <emphasis>
+ Text
+ . Problems are indicated by
+ <problematic ids="id20" refid="id19">
+ |problematic|
+ text (generated by processing errors; this one is
+ intentional). Here is a reference to the
+ <reference name="doctitle" refid="doctitle">
+ doctitle
+ and the
+ <reference name="subtitle" refid="subtitle">
+ subtitle
+ .
+ <paragraph>
+ The default role for interpreted text is
+ <title_reference>
+ Title Reference
+ . Here are
+ some explicit interpreted text roles: a PEP reference (
+ <reference refuri="http://www.python.org/peps/pep-0287.html">
+ PEP 287
+ ); an
+ RFC reference (
+ <reference refuri="http://www.faqs.org/rfcs/rfc2822.html">
+ RFC 2822
+ ); a
+ <subscript>
+ subscript
+ ; a
+ <superscript>
+ superscript
+ ;
+ and explicit roles for
+ <emphasis>
+ standard
+
+ <strong>
+ inline
+
+ <literal>
+ markup
+ .
+ <comment xml:space="preserve">
+ DO NOT RE-WRAP THE FOLLOWING PARAGRAPH!
+ <paragraph>
+ Let's test wrapping and whitespace significance in inline literals:
+ <literal>
+ This is an example of --inline-literal --text, --including some--
+ strangely--hyphenated-words. Adjust-the-width-of-your-browser-window
+ to see how the text is wrapped. -- ---- -------- Now note the
+ spacing between the words of this sentence (words
+ should be grouped in pairs).
+ <paragraph>
+ If the
+ <literal>
+ --pep-references
+ option was supplied, there should be a
+ live link to PEP 258 here.
+ <section ids="bullet-lists" names="bullet lists">
+ <title auto="1" refid="id32">
+ <generated classes="sectnum">
+ 2.2   
+ Bullet Lists
+ <bullet_list bullet="-">
+ <list_item>
+ <paragraph>
+ A bullet list
+ <bullet_list bullet="+">
+ <list_item>
+ <paragraph>
+ Nested bullet list.
+ <list_item>
+ <paragraph>
+ Nested item 2.
+ <list_item>
+ <paragraph>
+ Item 2.
+ <paragraph>
+ Paragraph 2 of item 2.
+ <bullet_list bullet="*">
+ <list_item>
+ <paragraph>
+ Nested bullet list.
+ <list_item>
+ <paragraph>
+ Nested item 2.
+ <bullet_list bullet="-">
+ <list_item>
+ <paragraph>
+ Third level.
+ <list_item>
+ <paragraph>
+ Item 2.
+ <list_item>
+ <paragraph>
+ Nested item 3.
+ <list_item>
+ <paragraph>
+ This nested list should be compacted by the HTML writer.
+ <target ids="target" names="target">
+ <comment xml:space="preserve">
+ Even if this item contains a target and a comment.
+ <section ids="enumerated-lists" names="enumerated lists">
+ <title auto="1" refid="id33">
+ <generated classes="sectnum">
+ 2.3   
+ Enumerated Lists
+ <enumerated_list enumtype="arabic" prefix="" suffix=".">
+ <list_item>
+ <paragraph>
+ Arabic numerals.
+ <enumerated_list enumtype="loweralpha" prefix="" suffix=")">
+ <list_item>
+ <paragraph>
+ lower alpha)
+ <enumerated_list enumtype="lowerroman" prefix="(" suffix=")">
+ <list_item>
+ <paragraph>
+ (lower roman)
+ <enumerated_list enumtype="upperalpha" prefix="" suffix=".">
+ <list_item>
+ <paragraph>
+ upper alpha.
+ <enumerated_list enumtype="upperroman" prefix="" suffix=")">
+ <list_item>
+ <paragraph>
+ upper roman)
+ <list_item>
+ <paragraph>
+ Lists that don't start at 1:
+ <enumerated_list enumtype="arabic" prefix="" start="3" suffix=".">
+ <list_item>
+ <paragraph>
+ Three
+ <list_item>
+ <paragraph>
+ Four
+ <enumerated_list enumtype="upperalpha" prefix="" start="3" suffix=".">
+ <list_item>
+ <paragraph>
+ C
+ <list_item>
+ <paragraph>
+ D
+ <enumerated_list enumtype="lowerroman" prefix="" start="3" suffix=".">
+ <list_item>
+ <paragraph>
+ iii
+ <list_item>
+ <paragraph>
+ iv
+ <section ids="definition-lists" names="definition lists">
+ <title auto="1" refid="id34">
+ <generated classes="sectnum">
+ 2.4   
+ Definition Lists
+ <definition_list>
+ <definition_list_item>
+ <term>
+ Term
+ <definition>
+ <paragraph>
+ Definition
+ <definition_list_item>
+ <term>
+ Term
+ <classifier>
+ classifier
+ <definition>
+ <paragraph>
+ Definition paragraph 1.
+ <paragraph>
+ Definition paragraph 2.
+ <definition_list_item>
+ <term>
+ Term
+ <definition>
+ <paragraph>
+ Definition
+ <definition_list_item>
+ <term>
+ Term
+ <classifier>
+ classifier one
+ <classifier>
+ classifier two
+ <definition>
+ <paragraph>
+ Definition
+ <section ids="field-lists" names="field lists">
+ <title auto="1" refid="id35">
+ <generated classes="sectnum">
+ 2.5   
+ Field Lists
+ <field_list>
+ <field>
+ <field_name>
+ what
+ <field_body>
+ <paragraph>
+ Field lists map field names to field bodies, like database
+ records. They are often part of an extension syntax. They are
+ an unambiguous variant of RFC 2822 fields.
+ <field>
+ <field_name>
+ how arg1 arg2
+ <field_body>
+ <paragraph>
+ The field marker is a colon, the field name, and a colon.
+ <paragraph>
+ The field body may contain one or more body elements, indented
+ relative to the field marker.
+ <field>
+ <field_name>
+ credits
+ <field_body>
+ <paragraph classes="credits">
+ This paragraph has the
+ <title_reference>
+ credits
+ class set. (This is actually not
+ about credits but just for ensuring that the class attribute
+ doesn't get stripped away.)
+ <section ids="option-lists" names="option lists">
+ <title auto="1" refid="id36">
+ <generated classes="sectnum">
+ 2.6   
+ Option Lists
+ <paragraph>
+ For listing command-line options:
+ <option_list>
+ <option_list_item>
+ <option_group>
+ <option>
+ <option_string>
+ -a
+ <description>
+ <paragraph>
+ command-line option "a"
+ <option_list_item>
+ <option_group>
+ <option>
+ <option_string>
+ -b
+ <option_argument delimiter=" ">
+ file
+ <description>
+ <paragraph>
+ options can have arguments
+ and long descriptions
+ <option_list_item>
+ <option_group>
+ <option>
+ <option_string>
+ --long
+ <description>
+ <paragraph>
+ options can be long also
+ <option_list_item>
+ <option_group>
+ <option>
+ <option_string>
+ --input
+ <option_argument delimiter="=">
+ file
+ <description>
+ <paragraph>
+ long options can also have
+ arguments
+ <option_list_item>
+ <option_group>
+ <option>
+ <option_string>
+ --very-long-option
+ <description>
+ <paragraph>
+ The description can also start on the next line.
+ <paragraph>
+ The description may contain multiple body elements,
+ regardless of where it starts.
+ <option_list_item>
+ <option_group>
+ <option>
+ <option_string>
+ -x
+ <option>
+ <option_string>
+ -y
+ <option>
+ <option_string>
+ -z
+ <description>
+ <paragraph>
+ Multiple options are an "option group".
+ <option_list_item>
+ <option_group>
+ <option>
+ <option_string>
+ -v
+ <option>
+ <option_string>
+ --verbose
+ <description>
+ <paragraph>
+ Commonly-seen: short & long options.
+ <option_list_item>
+ <option_group>
+ <option>
+ <option_string>
+ -1
+ <option_argument delimiter=" ">
+ file
+ <option>
+ <option_string>
+ --one
+ <option_argument delimiter="=">
+ file
+ <option>
+ <option_string>
+ --two
+ <option_argument delimiter=" ">
+ file
+ <description>
+ <paragraph>
+ Multiple options with arguments.
+ <option_list_item>
+ <option_group>
+ <option>
+ <option_string>
+ /V
+ <description>
+ <paragraph>
+ DOS/VMS-style options too
+ <paragraph>
+ There must be at least two spaces between the option and the
+ description.
+ <section ids="literal-blocks" names="literal blocks">
+ <title auto="1" refid="id37">
+ <generated classes="sectnum">
+ 2.7   
+ Literal Blocks
+ <paragraph>
+ Literal blocks are indicated with a double-colon ("::") at the end of
+ the preceding paragraph (over there
+ <literal>
+ -->
+ ). They can be indented:
+ <literal_block xml:space="preserve">
+ if literal_block:
+ text = 'is left as-is'
+ spaces_and_linebreaks = 'are preserved'
+ markup_processing = None
+ <paragraph>
+ Or they can be quoted without indentation:
+ <literal_block xml:space="preserve">
+ >> Great idea!
+ >
+ > Why didn't I think of that?
+ <section ids="line-blocks" names="line blocks">
+ <title auto="1" refid="id38">
+ <generated classes="sectnum">
+ 2.8   
+ Line Blocks
+ <paragraph>
+ This section tests line blocks. Line blocks are body elements which
+ consist of lines and other line blocks. Nested line blocks cause
+ indentation.
+ <line_block>
+ <line>
+ This is a line block. It ends with a blank line.
+ <line_block>
+ <line>
+ New lines begin with a vertical bar ("|").
+ <line>
+ Line breaks and initial indent are significant, and preserved.
+ <line_block>
+ <line>
+ Continuation lines are also possible. A long line that is intended
+ to wrap should begin with a space in place of the vertical bar.
+ <line>
+ The left edge of a continuation line need not be aligned with
+ the left edge of the text above it.
+ <line_block>
+ <line>
+ This is a second line block.
+ <line>
+ <line>
+ Blank lines are permitted internally, but they must begin with a "|".
+ <paragraph>
+ Another line block, surrounded by paragraphs:
+ <line_block>
+ <line>
+ And it's no good waiting by the window
+ <line>
+ It's no good waiting for the sun
+ <line>
+ Please believe me, the things you dream of
+ <line>
+ They don't fall in the lap of no-one
+ <paragraph>
+ Take it away, Eric the Orchestra Leader!
+ <block_quote>
+ <line_block>
+ <line>
+ A one, two, a one two three four
+ <line>
+ <line>
+ Half a bee, philosophically,
+ <line_block>
+ <line>
+ must,
+ <emphasis>
+ ipso facto
+ , half not be.
+ <line>
+ But half the bee has got to be,
+ <line_block>
+ <line>
+ <emphasis>
+ vis a vis
+ its entity. D'you see?
+ <line>
+ <line>
+ But can a bee be said to be
+ <line_block>
+ <line>
+ or not to be an entire bee,
+ <line_block>
+ <line>
+ when half the bee is not a bee,
+ <line_block>
+ <line>
+ due to some ancient injury?
+ <line>
+ <line>
+ Singing...
+ <section ids="block-quotes" names="block quotes">
+ <title auto="1" refid="id39">
+ <generated classes="sectnum">
+ 2.9   
+ Block Quotes
+ <paragraph>
+ Block quotes consist of indented body elements:
+ <block_quote>
+ <paragraph>
+ My theory by A. Elk. Brackets Miss, brackets. This theory goes
+ as follows and begins now. All brontosauruses are thin at one
+ end, much much thicker in the middle and then thin again at the
+ far end. That is my theory, it is mine, and belongs to me and I
+ own it, and what it is too.
+ <attribution>
+ Anne Elk (Miss)
+ <section ids="doctest-blocks" names="doctest blocks">
+ <title auto="1" refid="id40">
+ <generated classes="sectnum">
+ 2.10   
+ Doctest Blocks
+ <doctest_block xml:space="preserve">
+ >>> print 'Python-specific usage examples; begun with ">>>"'
+ Python-specific usage examples; begun with ">>>"
+ >>> print '(cut and pasted from interactive Python sessions)'
+ (cut and pasted from interactive Python sessions)
+ <section ids="footnotes" names="footnotes">
+ <title auto="1" refid="id41">
+ <generated classes="sectnum">
+ 2.11   
+ Footnotes
+ <footnote backrefs="id1 id7" ids="id6" names="1">
+ <label>
+ 1
+ <paragraph>
+ A footnote contains body elements, consistently indented by at
+ least 3 spaces.
+ <paragraph>
+ This is the footnote's second paragraph.
+ <footnote auto="1" backrefs="id3 id8" ids="label" names="label">
+ <label>
+ 2
+ <paragraph>
+ Footnotes may be numbered, either manually (as in
+ <footnote_reference ids="id7" refid="id6">
+ 1
+ ) or
+ automatically using a "#"-prefixed label. This footnote has a
+ label so it can be referred to from multiple places, both as a
+ footnote reference (
+ <footnote_reference auto="1" ids="id8" refid="label">
+ 2
+ ) and as a hyperlink reference
+ (
+ <reference name="label" refid="label">
+ label
+ ).
+ <footnote auto="1" backrefs="id2" ids="id9" names="3">
+ <label>
+ 3
+ <paragraph>
+ This footnote is numbered automatically and anonymously using a
+ label of "#" only.
+ <paragraph>
+ This is the second paragraph.
+ <paragraph>
+ And this is the third paragraph.
+ <footnote auto="*" backrefs="id4" ids="id10">
+ <label>
+ *
+ <paragraph>
+ Footnotes may also use symbols, specified with a "*" label.
+ Here's a reference to the next footnote:
+ <footnote_reference auto="*" ids="id11" refid="id12">
+ †
+ .
+ <footnote auto="*" backrefs="id11" ids="id12">
+ <label>
+ †
+ <paragraph>
+ This footnote shows the next symbol in the sequence.
+ <footnote ids="id13" names="4">
+ <label>
+ 4
+ <paragraph>
+ Here's an unreferenced footnote, with a reference to a
+ nonexistent footnote:
+ <problematic ids="id70" refid="id69">
+ [5]_
+ .
+ <section ids="citations" names="citations">
+ <title auto="1" refid="id42">
+ <generated classes="sectnum">
+ 2.12   
+ Citations
+ <citation backrefs="id5 id15" ids="cit2002" names="cit2002">
+ <label>
+ CIT2002
+ <paragraph>
+ Citations are text-labeled footnotes. They may be
+ rendered separately and differently from footnotes.
+ <paragraph>
+ Here's a reference to the above,
+ <citation_reference ids="id15" refid="cit2002">
+ CIT2002
+ , and a
+ <problematic ids="id72" refid="id71">
+ [nonexistent]_
+
+ citation.
+ <target refid="another-target">
+ <section ids="targets another-target" names="targets another target">
+ <title auto="1" refid="id43">
+ <generated classes="sectnum">
+ 2.13   
+ Targets
+ <target refid="example">
+ <paragraph ids="example" names="example">
+ This paragraph is pointed to by the explicit "example" target. A
+ reference can be found under
+ <reference name="Inline Markup" refid="inline-markup">
+ Inline Markup
+ , above.
+ <reference name="Inline hyperlink targets" refid="inline-hyperlink-targets">
+ Inline
+ hyperlink targets
+ are also possible.
+ <paragraph>
+ Section headers are implicit targets, referred to by name. See
+ <reference name="Targets" refid="targets">
+ Targets
+ , which is a subsection of
+ <reference name="Body Elements" refid="body-elements">
+ Body Elements
+ .
+ <paragraph>
+ Explicit external targets are interpolated into references such as
+ "
+ <reference name="Python" refuri="http://www.python.org/">
+ Python
+
+ <footnote_reference auto="1" ids="id23" refid="id21">
+ 5
+ ".
+ <target ids="python" names="python" refuri="http://www.python.org/">
+ <paragraph>
+ Targets may be indirect and anonymous. Thus
+ <reference anonymous="1" name="this phrase" refid="targets">
+ this phrase
+ may also
+ refer to the
+ <reference name="Targets" refid="targets">
+ Targets
+ section.
+ <target anonymous="1" ids="id17" refid="targets">
+ <paragraph>
+ Here's a
+ <problematic ids="id74" refid="id73">
+ `hyperlink reference without a target`_
+ , which generates an
+ error.
+ <section dupnames="duplicate target names" ids="duplicate-target-names">
+ <title auto="1" refid="id44">
+ <generated classes="sectnum">
+ 2.13.1   
+ Duplicate Target Names
+ <paragraph>
+ Duplicate names in section headers or other implicit targets will
+ generate "info" (level-1) system messages. Duplicate names in
+ explicit targets will generate "warning" (level-2) system messages.
+ <section dupnames="duplicate target names" ids="id18">
+ <title auto="1" refid="id45">
+ <generated classes="sectnum">
+ 2.13.2   
+ Duplicate Target Names
+ <paragraph>
+ Since there are two "Duplicate Target Names" section headers, we
+ cannot uniquely refer to either of them by name. If we try to (like
+ this:
+ <problematic ids="id76" refid="id75">
+ `Duplicate Target Names`_
+ ), an error is generated.
+ <section ids="directives" names="directives">
+ <title auto="1" refid="id46">
+ <generated classes="sectnum">
+ 2.14   
+ Directives
+ <topic classes="contents" ids="contents" names="contents">
+ <bullet_list classes="auto-toc">
+ <list_item>
+ <paragraph>
+ <reference ids="id62" refid="document-parts">
+ <generated classes="sectnum">
+ 2.14.1   
+ Document Parts
+ <list_item>
+ <paragraph>
+ <reference ids="id63" refid="images">
+ <generated classes="sectnum">
+ 2.14.2   
+ Images
+ <list_item>
+ <paragraph>
+ <reference ids="id64" refid="admonitions">
+ <generated classes="sectnum">
+ 2.14.3   
+ Admonitions
+ <list_item>
+ <paragraph>
+ <reference ids="id65" refid="topics-sidebars-and-rubrics">
+ <generated classes="sectnum">
+ 2.14.4   
+ Topics, Sidebars, and Rubrics
+ <list_item>
+ <paragraph>
+ <reference ids="id66" refid="target-footnotes">
+ <generated classes="sectnum">
+ 2.14.5   
+ Target Footnotes
+ <list_item>
+ <paragraph>
+ <reference ids="id67" refid="replacement-text">
+ <generated classes="sectnum">
+ 2.14.6   
+ Replacement Text
+ <list_item>
+ <paragraph>
+ <reference ids="id68" refid="compound-paragraph">
+ <generated classes="sectnum">
+ 2.14.7   
+ Compound Paragraph
+ <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
+ .
+ <section ids="document-parts" names="document parts">
+ <title auto="1" refid="id62">
+ <generated classes="sectnum">
+ 2.14.1   
+ Document Parts
+ <paragraph>
+ An example of the "contents" directive can be seen above this section
+ (a local, untitled table of
+ <reference name="contents" refid="contents">
+ contents
+ ) and at the beginning of the
+ document (a document-wide
+ <reference name="table of contents" refid="table-of-contents">
+ table of contents
+ ).
+ <section ids="images" names="images">
+ <title auto="1" refid="id63">
+ <generated classes="sectnum">
+ 2.14.2   
+ Images
+ <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">
+ <paragraph>
+ A figure directive:
+ <figure align="right" classes="figclass1 figclass2">
+ <image alt="reStructuredText, the markup syntax" classes="class1 class2" uri="../../../docs/user/rst/images/biohazard.png" width="50">
+ <caption>
+ A figure is an image with a caption and/or a legend:
+ <legend>
+ <table>
+ <tgroup cols="2">
+ <colspec colwidth="12">
+ <colspec colwidth="47">
+ <tbody>
+ <row>
+ <entry>
+ <paragraph>
+ re
+ <entry>
+ <paragraph>
+ Revised, revisited, based on 're' module.
+ <row>
+ <entry>
+ <paragraph>
+ Structured
+ <entry>
+ <paragraph>
+ Structure-enhanced text, structuredtext.
+ <row>
+ <entry>
+ <paragraph>
+ Text
+ <entry>
+ <paragraph>
+ Well it is, isn't it?
+ <paragraph>
+ This paragraph is also part of the legend.
+ <paragraph>
+ This paragraph might flow around the figure...
+ <paragraph>
+ A centered figure:
+ <figure align="center">
+ <image uri="../../../docs/user/rst/images/biohazard.png" width="50">
+ <caption>
+ This is the caption.
+ <legend>
+ <paragraph>
+ This is the legend.
+ <paragraph>
+ The legend may consist of several paragraphs.
+ <paragraph>
+ This paragraph might flow around the figure...
+ <paragraph>
+ A left-aligned figure:
+ <figure align="left">
+ <image uri="../../../docs/user/rst/images/biohazard.png" width="50">
+ <caption>
+ This is the caption.
+ <legend>
+ <paragraph>
+ This is the legend.
+ <paragraph>
+ The legend may consist of several paragraphs.
+ <paragraph>
+ This paragraph might flow around the figure...
+ <section ids="admonitions" names="admonitions">
+ <title auto="1" refid="id64">
+ <generated classes="sectnum">
+ 2.14.3   
+ Admonitions
+ <attention>
+ <paragraph>
+ Directives at large.
+ <caution>
+ <paragraph>
+ Don't take any wooden nickels.
+ <danger>
+ <paragraph>
+ Mad scientist at work!
+ <error>
+ <paragraph>
+ Does not compute.
+ <hint>
+ <paragraph>
+ It's bigger than a bread box.
+ <important>
+ <bullet_list bullet="-">
+ <list_item>
+ <paragraph>
+ Wash behind your ears.
+ <list_item>
+ <paragraph>
+ Clean up your room.
+ <list_item>
+ <paragraph>
+ Call your mother.
+ <list_item>
+ <paragraph>
+ Back up your data.
+ <note>
+ <paragraph>
+ This is a note.
+ <tip>
+ <paragraph>
+ 15% if the service is good.
+ <warning>
+ <paragraph>
+ Strong prose may provoke extreme mental exertion.
+ Reader discretion is strongly advised.
+ <admonition classes="admonition-and-by-the-way">
+ <title>
+ And, by the way...
+ <paragraph>
+ You can make up your own admonition too.
+ <target ids="docutils" names="docutils" refuri="http://docutils.sourceforge.net/">
+ <section ids="topics-sidebars-and-rubrics" names="topics, sidebars, and rubrics">
+ <title auto="1" refid="id65">
+ <generated classes="sectnum">
+ 2.14.4   
+ Topics, Sidebars, and Rubrics
+ <sidebar>
+ <title>
+ Sidebar Title
+ <subtitle>
+ Optional Subtitle
+ <paragraph>
+ This is a sidebar. It is for text outside the flow of the main
+ text.
+ <rubric>
+ This is a rubric inside a sidebar
+ <paragraph>
+ Sidebars often appears beside the main text with a border and
+ background color.
+ <topic>
+ <title>
+ Topic Title
+ <paragraph>
+ This is a topic.
+ <rubric>
+ This is a rubric
+ <section ids="target-footnotes" names="target footnotes">
+ <title auto="1" refid="id66">
+ <generated classes="sectnum">
+ 2.14.5   
+ Target Footnotes
+ <footnote auto="1" backrefs="id22 id23 id24" ids="id21" names="TARGET_NOTE: id21">
+ <label>
+ 5
+ <paragraph>
+ <reference refuri="http://www.python.org/">
+ http://www.python.org/
+ <section ids="replacement-text" names="replacement text">
+ <title auto="1" refid="id67">
+ <generated classes="sectnum">
+ 2.14.6   
+ Replacement Text
+ <paragraph>
+ I recommend you try
+ <reference refuri="http://www.python.org/">
+ Python,
+ <emphasis>
+ the
+ best language around
+
+ <footnote_reference auto="1" ids="id24" refid="id21">
+ 5
+ .
+ <substitution_definition names="Python">
+ Python,
+ <emphasis>
+ the
+ best language around
+ <section ids="compound-paragraph" names="compound paragraph">
+ <title auto="1" refid="id68">
+ <generated classes="sectnum">
+ 2.14.7   
+ Compound Paragraph
+ <compound classes="some-class">
+ <paragraph>
+ Compound 1, paragraph 1.
+ <paragraph>
+ Compound 1, paragraph 2.
+ <bullet_list bullet="*">
+ <list_item>
+ <paragraph>
+ Compound 1, list item one.
+ <list_item>
+ <paragraph>
+ Compound 1, list item two.
+ <paragraph>
+ Another compound statement:
+ <compound>
+ <paragraph>
+ Compound 2, a literal block:
+ <literal_block xml:space="preserve">
+ Compound 2, literal.
+ <paragraph>
+ Compound 2, this is a test.
+ <compound>
+ <paragraph>
+ Compound 3, only consisting of one paragraph.
+ <compound>
+ <literal_block xml:space="preserve">
+ Compound 4.
+ This one starts with a literal block.
+ <paragraph>
+ Compound 4, a paragraph.
+ <paragraph>
+ Now something
+ <emphasis>
+ really
+ perverted -- a nested compound block. In
+ LaTeX, the following paragraphs should all be first-line indented:
+ <compound>
+ <paragraph>
+ Compound 5, block 1 (a paragraph).
+ <compound>
+ <paragraph>
+ Compound 6, block 2 in compound 5.
+ <paragraph>
+ Compound 6, another paragraph.
+ <paragraph>
+ Compound 5, block 3 (a paragraph).
+ <compound>
+ <paragraph>
+ Compound 7, with a table inside:
+ <table>
+ <tgroup cols="3">
+ <colspec colwidth="20">
+ <colspec colwidth="20">
+ <colspec colwidth="20">
+ <tbody>
+ <row>
+ <entry>
+ <paragraph>
+ Left cell, first
+ paragraph.
+ <paragraph>
+ Left cell, second
+ paragraph.
+ <entry>
+ <paragraph>
+ Middle cell,
+ consisting of
+ exactly one
+ paragraph.
+ <entry>
+ <paragraph>
+ Right cell.
+ <paragraph>
+ Paragraph 2.
+ <paragraph>
+ Paragraph 3.
+ <paragraph>
+ Compound 7, a paragraph after the table.
+ <paragraph>
+ Compound 7, another paragraph.
+ <section ids="substitution-definitions" names="substitution definitions">
+ <title auto="1" refid="id54">
+ <generated classes="sectnum">
+ 2.15   
+ Substitution Definitions
+ <paragraph>
+ An inline image (
+ <image alt="EXAMPLE" uri="../../../docs/user/rst/images/biohazard.png">
+ ) example:
+ <substitution_definition names="EXAMPLE">
+ <image alt="EXAMPLE" uri="../../../docs/user/rst/images/biohazard.png">
+ <paragraph>
+ (Substitution definitions are not visible in the HTML source.)
+ <section ids="comments" names="comments">
+ <title auto="1" refid="id55">
+ <generated classes="sectnum">
+ 2.16   
+ Comments
+ <paragraph>
+ Here's one:
+ <comment xml:space="preserve">
+ Comments begin with two dots and a space. Anything may
+ follow, except for the syntax of footnotes, hyperlink
+ targets, directives, or substitution definitions.
+
+ Double-dashes -- "--" -- must be escaped somehow in HTML output.
+ <paragraph>
+ (View the HTML source to see the comment.)
+ <section ids="raw-text" names="raw text">
+ <title auto="1" refid="id56">
+ <generated classes="sectnum">
+ 2.17   
+ Raw text
+ <paragraph>
+ This does not necessarily look nice, because there may be missing white space.
+ <paragraph>
+ It's just there to freeze the behavior.
+ <raw format="html latex" xml:space="preserve">
+ A test.
+ <raw format="html latex" xml:space="preserve">
+ Second test.
+ <raw classes="myclass" format="html latex" xml:space="preserve">
+ Another test with myclass set.
+ <paragraph>
+ This is the
+ <raw classes="myrawroleclass" format="html latex" xml:space="preserve">
+ fourth test
+ with myrawroleclass set.
+ <raw format="html" xml:space="preserve">
+ Fifth test in HTML.<br />Line two.
+ <raw format="latex" xml:space="preserve">
+ Fifth test in LaTeX.\\Line two.
+ <section ids="colspanning-tables" names="colspanning tables">
+ <title auto="1" refid="id57">
+ <generated classes="sectnum">
+ 2.18   
+ Colspanning tables
+ <paragraph>
+ This table has a cell spanning two columns:
+ <table>
+ <tgroup cols="3">
+ <colspec colwidth="5">
+ <colspec colwidth="5">
+ <colspec colwidth="6">
+ <thead>
+ <row>
+ <entry morecols="1">
+ <paragraph>
+ Inputs
+ <entry>
+ <paragraph>
+ Output
+ <row>
+ <entry>
+ <paragraph>
+ A
+ <entry>
+ <paragraph>
+ B
+ <entry>
+ <paragraph>
+ A or B
+ <tbody>
+ <row>
+ <entry>
+ <paragraph>
+ False
+ <entry>
+ <paragraph>
+ False
+ <entry>
+ <paragraph>
+ False
+ <row>
+ <entry>
+ <paragraph>
+ True
+ <entry>
+ <paragraph>
+ False
+ <entry>
+ <paragraph>
+ True
+ <row>
+ <entry>
+ <paragraph>
+ False
+ <entry>
+ <paragraph>
+ True
+ <entry>
+ <paragraph>
+ True
+ <row>
+ <entry>
+ <paragraph>
+ True
+ <entry>
+ <paragraph>
+ True
+ <entry>
+ <paragraph>
+ True
+ <section ids="rowspanning-tables" names="rowspanning tables">
+ <title auto="1" refid="id58">
+ <generated classes="sectnum">
+ 2.19   
+ Rowspanning tables
+ <paragraph>
+ Here's a table with cells spanning several rows:
+ <table>
+ <tgroup cols="3">
+ <colspec colwidth="24">
+ <colspec colwidth="12">
+ <colspec colwidth="18">
+ <thead>
+ <row>
+ <entry>
+ <paragraph>
+ Header row, column 1
+ (header rows optional)
+ <entry>
+ <paragraph>
+ Header 2
+ <entry>
+ <paragraph>
+ Header 3
+ <tbody>
+ <row>
+ <entry>
+ <paragraph>
+ body row 1, column 1
+ <entry>
+ <paragraph>
+ column 2
+ <entry>
+ <paragraph>
+ column 3
+ <row>
+ <entry>
+ <paragraph>
+ body row 2
+ <entry morerows="1">
+ <paragraph>
+ Cells may
+ span rows.
+ <entry morerows="1">
+ <paragraph>
+ Another
+ rowspanning
+ cell.
+ <row>
+ <entry>
+ <paragraph>
+ body row 3
+ <section ids="complex-tables" names="complex tables">
+ <title auto="1" refid="id59">
+ <generated classes="sectnum">
+ 2.20   
+ Complex tables
+ <paragraph>
+ Here's a complex table, which should test all features.
+ <table>
+ <tgroup cols="4">
+ <colspec colwidth="24">
+ <colspec colwidth="12">
+ <colspec colwidth="10">
+ <colspec colwidth="10">
+ <thead>
+ <row>
+ <entry>
+ <paragraph>
+ Header row, column 1
+ (header rows optional)
+ <entry>
+ <paragraph>
+ Header 2
+ <entry>
+ <paragraph>
+ Header 3
+ <entry>
+ <paragraph>
+ Header 4
+ <tbody>
+ <row>
+ <entry>
+ <paragraph>
+ body row 1, column 1
+ <entry>
+ <paragraph>
+ column 2
+ <entry>
+ <paragraph>
+ column 3
+ <entry>
+ <paragraph>
+ column 4
+ <row>
+ <entry>
+ <paragraph>
+ body row 2
+ <entry morecols="2">
+ <paragraph>
+ Cells may span columns.
+ <row>
+ <entry>
+ <paragraph>
+ body row 3
+ <entry morerows="1">
+ <paragraph>
+ Cells may
+ span rows.
+ <paragraph>
+ Paragraph.
+ <entry morecols="1" morerows="1">
+ <bullet_list bullet="-">
+ <list_item>
+ <paragraph>
+ Table cells
+ <list_item>
+ <paragraph>
+ contain
+ <list_item>
+ <paragraph>
+ body elements.
+ <row>
+ <entry>
+ <paragraph>
+ body row 4
+ <row>
+ <entry>
+ <paragraph>
+ body row 5
+ <entry morecols="1">
+ <paragraph>
+ Cells may also be
+ empty:
+ <literal>
+ -->
+ <entry>
+ <section ids="list-tables" names="list tables">
+ <title auto="1" refid="id60">
+ <generated classes="sectnum">
+ 2.21   
+ List Tables
+ <paragraph>
+ Here's a list table exercising all features:
+ <table classes="test">
+ <title>
+ list table with integral header
+ <tgroup cols="3">
+ <colspec colwidth="10" stub="1">
+ <colspec colwidth="20">
+ <colspec colwidth="30">
+ <thead>
+ <row>
+ <entry>
+ <paragraph>
+ Treat
+ <entry>
+ <paragraph>
+ Quantity
+ <entry>
+ <paragraph>
+ Description
+ <tbody>
+ <row>
+ <entry>
+ <paragraph>
+ Albatross
+ <entry>
+ <paragraph>
+ 2.99
+ <entry>
+ <paragraph>
+ On a stick!
+ <row>
+ <entry>
+ <paragraph>
+ Crunchy Frog
+ <entry>
+ <paragraph>
+ 1.49
+ <entry>
+ <paragraph>
+ If we took the bones out, it wouldn't be
+ crunchy, now would it?
+ <row>
+ <entry>
+ <paragraph>
+ Gannet Ripple
+ <entry>
+ <paragraph>
+ 1.99
+ <entry>
+ <paragraph>
+ On a stick!
+ <section ids="error-handling" names="error handling">
+ <title auto="1" refid="id61">
+ <generated classes="sectnum">
+ 3   
+ Error Handling
+ <paragraph>
+ Any errors caught during processing will generate system messages.
+ <paragraph>
+ There should be five messages in the following, auto-generated
+ section, "Docutils System Messages":
+ <comment xml:space="preserve">
+ section should be added by Docutils automatically
+ <section classes="system-messages">
+ <title>
+ Docutils System Messages
+ <system_message backrefs="id20" ids="id19" level="3" line="100" source="functional/input/data/standard.txt" type="ERROR">
+ <paragraph>
+ Undefined substitution referenced: "problematic".
+ <system_message backrefs="id70" ids="id69" level="3" line="354" source="functional/input/standalone_rst_html4css1.txt" type="ERROR">
+ <paragraph>
+ Unknown target name: "5".
+ <system_message backrefs="id72" ids="id71" level="3" line="363" source="functional/input/data/standard.txt" type="ERROR">
+ <paragraph>
+ Unknown target name: "nonexistent".
+ <system_message backrefs="id74" ids="id73" level="3" line="390" source="functional/input/data/standard.txt" type="ERROR">
+ <paragraph>
+ Unknown target name: "hyperlink reference without a target".
+ <system_message backrefs="id76" ids="id75" level="3" line="403" source="functional/input/data/standard.txt" type="ERROR">
+ <paragraph>
+ Duplicate target name, cannot be used as a unique reference: "duplicate target names".
diff --git a/test/functional/input/dangerous.txt b/test/functional/input/dangerous.txt
new file mode 100644
index 000000000..8f75386c8
--- /dev/null
+++ b/test/functional/input/dangerous.txt
@@ -0,0 +1,16 @@
+Potentially dangerous features (security holes):
+
+.. include:: /etc/passwd
+.. raw:: html
+ :file: /etc/passwd
+.. raw:: html
+ :url: file:///etc/passwd
+.. raw:: html
+
+ <script>
+ that does something really nasty
+ </script>
+.. csv-table:: :file: /etc/passwd
+.. csv-table:: :url: file:///etc/passwd
+.. figure:: picture.png
+ :figwidth: image
diff --git a/test/functional/input/data/errors.txt b/test/functional/input/data/errors.txt
new file mode 100644
index 000000000..557f479d3
--- /dev/null
+++ b/test/functional/input/data/errors.txt
@@ -0,0 +1,9 @@
+Error Handling
+==============
+
+Any errors caught during processing will generate system messages.
+
+There should be five messages in the following, auto-generated
+section, "Docutils System Messages":
+
+.. section should be added by Docutils automatically
diff --git a/test/functional/input/data/header_footer.txt b/test/functional/input/data/header_footer.txt
new file mode 100644
index 000000000..875c9fac0
--- /dev/null
+++ b/test/functional/input/data/header_footer.txt
@@ -0,0 +1,2 @@
+.. header:: Document header
+.. footer:: Document footer
diff --git a/test/functional/input/data/latex.txt b/test/functional/input/data/latex.txt
new file mode 100644
index 000000000..df1f66d45
--- /dev/null
+++ b/test/functional/input/data/latex.txt
@@ -0,0 +1,120 @@
+Some Tests for the LaTeX Writer
+===============================
+
+These tests have been written to exercise some unusual combinations of
+syntax elements which may cause trouble for the LaTeX writer but do
+not need to be tested with other writers (e.g. the HTML writer).
+
+This file is not yet used by any automated test. It is currently only
+used to control the visual appearance of the output.
+
+
+Block Quotes
+------------
+
+ This block quote comes directly after the section heading and is
+ followed by a paragraph.
+
+ This is the second paragraph of the block quote and it contains
+ some more text filling up some space which would otherwise be
+ empty.
+
+ -- Attribution
+
+This is a paragraph.
+
+ This block quote does not have an attribution.
+
+This is another paragraph.
+
+ Another block quote at the end of the section.
+
+
+More Block Quotes
+-----------------
+
+ Block quote followed by a transition.
+
+----------
+
+ Another block quote.
+
+
+Sidebars
+--------
+
+This paragraph precedes the sidebar. This is some text. This is some
+text. This is some text. This is some text. This is some text.
+This is some text. This is some text. This is some text.
+
+.. sidebar:: Sidebar Title
+
+ These are the sidebar contents. These are the sidebar contents.
+
+ These are the sidebar contents. These are the sidebar contents.
+
+ These are the sidebar contents. These are the sidebar contents.
+ These are the sidebar contents. These are the sidebar contents.
+
+This paragraph follows the sidebar. This is some text. This is some
+text. This is some text.
+
+This is some text. This is some text. This is some text. This is
+some text. This is some text. This is some text. This is some text.
+
+
+Next Section
+------------
+
+This section comes after the sidebar, and this text should float
+around the sidebar as well. This is some text. This is some text.
+This is some text. This is some text. This is some text. This is
+some text. This is some text. This is some text. This is some text.
+This is some text. This is some text. This is some text. This is
+some text. This is some text.
+
+This is some text. This is some text. This is some text. This is
+some text. This is some text. This is some text. This is some text.
+This is some text. This is some text. This is some text.
+
+
+Nested Elements
+---------------
+
+:Field list: | Line
+ | Block
+:Another field: * Bullet
+ * list
+
+* * * * * * * * Deeply nested list.
+
+1. 2. 3. 4. 5. 6. 7. 8. Deeply nested list.
+
++---------------+
+| | Line block |
+| |
+| * Bullet list |
+| |
+| :: |
+| |
+| Literal |
+| block |
++---------------+
+| :Field 1: |
+| Text. |
+| :Field 2: |
+| More text. |
++---------------+
+
+
+Images
+======
+
+Image with 20% width:
+
+.. image:: ../../../docs/user/rst/images/title.png
+ :width: 20
+
+Image with 100% width:
+
+.. image:: ../../../docs/user/rst/images/title.png
diff --git a/test/functional/input/data/list_table.txt b/test/functional/input/data/list_table.txt
new file mode 100644
index 000000000..632285e36
--- /dev/null
+++ b/test/functional/input/data/list_table.txt
@@ -0,0 +1,24 @@
+List Tables
+-----------
+
+Here's a list table exercising all features:
+
+.. list-table:: list table with integral header
+ :class: test
+ :widths: 10 20 30
+ :header-rows: 1
+ :stub-columns: 1
+
+ * - Treat
+ - Quantity
+ - Description
+ * - Albatross
+ - 2.99
+ - On a stick!
+ * - Crunchy Frog
+ - 1.49
+ - If we took the bones out, it wouldn't be
+ crunchy, now would it?
+ * - Gannet Ripple
+ - 1.99
+ - On a stick!
diff --git a/test/functional/input/data/nonalphanumeric.txt b/test/functional/input/data/nonalphanumeric.txt
new file mode 100644
index 000000000..4c4ee7343
--- /dev/null
+++ b/test/functional/input/data/nonalphanumeric.txt
@@ -0,0 +1,13 @@
+Monospaced non-alphanumeric characters
+--------------------------------------
+
+These are all ASCII characters except a-zA-Z0-9 and space:
+
+``!!!"""###$$$%%%&&&'''((()))***+++,,,---...///:::``
+
+``;;;<<<===>>>???@@@[[[\\\]]]^^^___```{{{|||}}}~~~``
+
+``xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx``
+
+The two lines of non-alphanumeric characters should both have the same
+width as the third line.
diff --git a/test/functional/input/data/standard.txt b/test/functional/input/data/standard.txt
new file mode 100644
index 000000000..a4a75b078
--- /dev/null
+++ b/test/functional/input/data/standard.txt
@@ -0,0 +1,670 @@
+.. This is a comment. Note how any initial comments are moved by
+ transforms to after the document title, subtitle, and docinfo.
+
+.. _doctitle:
+
+================================
+ reStructuredText Test Document
+================================
+
+.. Above is the document title, and below is the subtitle.
+ They are transformed from section titles after parsing.
+
+.. _subtitle:
+
+--------------------------------
+ Examples of Syntax Constructs
+--------------------------------
+
+.. bibliographic fields (which also require a transform):
+
+:Author: David Goodger
+:Address: 123 Example Street
+ Example, EX Canada
+ A1B 2C3
+:Contact: goodger@users.sourceforge.net
+:Authors: Me; Myself; I
+:organization: humankind
+:date: Now, or yesterday. Or maybe even *before* yesterday.
+:status: This is a "work in progress"
+:revision: is managed by a version control system.
+:version: 1
+:copyright: This document has been placed in the public domain. You
+ may do with it as you wish. You may copy, modify,
+ redistribute, reattribute, sell, buy, rent, lease,
+ destroy, or improve it, quote it at length, excerpt,
+ incorporate, collate, fold, staple, or mutilate it, or do
+ anything else to it that your or anyone else's heart
+ desires.
+:field name: This is a "generic bibliographic field".
+:field name "2":
+ Generic bibliographic fields may contain multiple body elements.
+
+ Like this.
+
+:Dedication:
+
+ For Docutils users & co-developers.
+
+:abstract:
+
+ 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.
+
+.. contents:: Table of Contents
+.. section-numbering::
+
+
+Structural Elements
+===================
+
+Section Title
+-------------
+Section Subtitle
+````````````````
+
+That's it, the text just above this line.
+
+Empty Section
+-------------
+
+Transitions
+-----------
+
+Here's a transition:
+
+---------
+
+It divides the section. Transitions may also occur between sections:
+
+---------
+
+Body Elements
+=============
+
+Paragraphs
+----------
+
+A paragraph.
+
+Inline Markup
+`````````````
+
+Paragraphs contain text and may contain inline markup: *emphasis*,
+**strong emphasis**, ``inline literals``, standalone hyperlinks
+(http://www.python.org), external hyperlinks (Python_), internal
+cross-references (example_), external hyperlinks with embedded URIs
+(`Python web site <http://www.python.org>`__), footnote references
+(manually numbered [1]_, anonymous auto-numbered [#]_, labeled
+auto-numbered [#label]_, or symbolic [*]_), citation references
+([CIT2002]_), substitution references (|example|), and _`inline
+hyperlink targets` (see Targets_ below for a reference back to here).
+Character-level inline markup is also possible (although exceedingly
+ugly!) in *re*\ ``Structured``\ *Text*. Problems are indicated by
+|problematic| text (generated by processing errors; this one is
+intentional). Here is a reference to the doctitle_ and the subtitle_.
+
+The default role for interpreted text is `Title Reference`. Here are
+some explicit interpreted text roles: a PEP reference (:PEP:`287`); an
+RFC reference (:RFC:`2822`); a :sub:`subscript`; a :sup:`superscript`;
+and explicit roles for :emphasis:`standard` :strong:`inline`
+:literal:`markup`.
+
+.. DO NOT RE-WRAP THE FOLLOWING PARAGRAPH!
+
+Let's test wrapping and whitespace significance in inline literals:
+``This is an example of --inline-literal --text, --including some--
+strangely--hyphenated-words. Adjust-the-width-of-your-browser-window
+to see how the text is wrapped. -- ---- -------- Now note the
+spacing between the words of this sentence (words
+should be grouped in pairs).``
+
+If the ``--pep-references`` option was supplied, there should be a
+live link to PEP 258 here.
+
+Bullet Lists
+------------
+
+- A bullet list
+
+ + Nested bullet list.
+ + Nested item 2.
+
+- Item 2.
+
+ Paragraph 2 of item 2.
+
+ * Nested bullet list.
+ * Nested item 2.
+
+ - Third level.
+ - Item 2.
+
+ * Nested item 3.
+
+ * This nested list should be compacted by the HTML writer.
+
+ .. _target:
+
+ .. Even if this item contains a target and a comment.
+
+Enumerated Lists
+----------------
+
+1. Arabic numerals.
+
+ a) lower alpha)
+
+ (i) (lower roman)
+
+ A. upper alpha.
+
+ I) upper roman)
+
+2. Lists that don't start at 1:
+
+ 3. Three
+
+ 4. Four
+
+ C. C
+
+ D. D
+
+ iii. iii
+
+ iv. iv
+
+Definition Lists
+----------------
+
+Term
+ Definition
+Term : classifier
+ Definition paragraph 1.
+
+ Definition paragraph 2.
+Term
+ Definition
+Term : classifier one : classifier two
+ Definition
+
+Field Lists
+-----------
+
+:what: Field lists map field names to field bodies, like database
+ records. They are often part of an extension syntax. They are
+ an unambiguous variant of RFC 2822 fields.
+
+:how arg1 arg2:
+
+ The field marker is a colon, the field name, and a colon.
+
+ The field body may contain one or more body elements, indented
+ relative to the field marker.
+
+:credits:
+
+ .. class:: credits
+
+ This paragraph has the `credits` class set. (This is actually not
+ about credits but just for ensuring that the class attribute
+ doesn't get stripped away.)
+
+Option Lists
+------------
+
+For listing command-line options:
+
+-a command-line option "a"
+-b file options can have arguments
+ and long descriptions
+--long options can be long also
+--input=file long options can also have
+ arguments
+
+--very-long-option
+ The description can also start on the next line.
+
+ The description may contain multiple body elements,
+ regardless of where it starts.
+
+-x, -y, -z Multiple options are an "option group".
+-v, --verbose Commonly-seen: short & long options.
+-1 file, --one=file, --two file
+ Multiple options with arguments.
+/V DOS/VMS-style options too
+
+There must be at least two spaces between the option and the
+description.
+
+Literal Blocks
+--------------
+
+Literal blocks are indicated with a double-colon ("::") at the end of
+the preceding paragraph (over there ``-->``). They can be indented::
+
+ if literal_block:
+ text = 'is left as-is'
+ spaces_and_linebreaks = 'are preserved'
+ markup_processing = None
+
+Or they can be quoted without indentation::
+
+>> Great idea!
+>
+> Why didn't I think of that?
+
+Line Blocks
+-----------
+
+This section tests line blocks. Line blocks are body elements which
+consist of lines and other line blocks. Nested line blocks cause
+indentation.
+
+| This is a line block. It ends with a blank line.
+| New lines begin with a vertical bar ("|").
+| Line breaks and initial indent are significant, and preserved.
+| Continuation lines are also possible. A long line that is intended
+ to wrap should begin with a space in place of the vertical bar.
+| The left edge of a continuation line need not be aligned with
+ the left edge of the text above it.
+
+| This is a second line block.
+|
+| Blank lines are permitted internally, but they must begin with a "|".
+
+Another line block, surrounded by paragraphs:
+
+| And it's no good waiting by the window
+| It's no good waiting for the sun
+| Please believe me, the things you dream of
+| They don't fall in the lap of no-one
+
+Take it away, Eric the Orchestra Leader!
+
+ | A one, two, a one two three four
+ |
+ | Half a bee, philosophically,
+ | must, *ipso facto*, half not be.
+ | But half the bee has got to be,
+ | *vis a vis* its entity. D'you see?
+ |
+ | But can a bee be said to be
+ | or not to be an entire bee,
+ | when half the bee is not a bee,
+ | due to some ancient injury?
+ |
+ | Singing...
+
+Block Quotes
+------------
+
+Block quotes consist of indented body elements:
+
+ My theory by A. Elk. Brackets Miss, brackets. This theory goes
+ as follows and begins now. All brontosauruses are thin at one
+ end, much much thicker in the middle and then thin again at the
+ far end. That is my theory, it is mine, and belongs to me and I
+ own it, and what it is too.
+
+ -- Anne Elk (Miss)
+
+Doctest Blocks
+--------------
+
+>>> print 'Python-specific usage examples; begun with ">>>"'
+Python-specific usage examples; begun with ">>>"
+>>> print '(cut and pasted from interactive Python sessions)'
+(cut and pasted from interactive Python sessions)
+
+Footnotes
+---------
+
+.. [1] A footnote contains body elements, consistently indented by at
+ least 3 spaces.
+
+ This is the footnote's second paragraph.
+
+.. [#label] Footnotes may be numbered, either manually (as in [1]_) or
+ automatically using a "#"-prefixed label. This footnote has a
+ label so it can be referred to from multiple places, both as a
+ footnote reference ([#label]_) and as a hyperlink reference
+ (label_).
+
+.. [#] This footnote is numbered automatically and anonymously using a
+ label of "#" only.
+
+ This is the second paragraph.
+
+ And this is the third paragraph.
+
+.. [*] Footnotes may also use symbols, specified with a "*" label.
+ Here's a reference to the next footnote: [*]_.
+
+.. [*] This footnote shows the next symbol in the sequence.
+
+.. [4] Here's an unreferenced footnote, with a reference to a
+ nonexistent footnote: [5]_.
+
+Citations
+---------
+
+.. [CIT2002] Citations are text-labeled footnotes. They may be
+ rendered separately and differently from footnotes.
+
+Here's a reference to the above, [CIT2002]_, and a [nonexistent]_
+citation.
+
+.. _Another Target:
+
+Targets
+-------
+
+.. _example:
+
+This paragraph is pointed to by the explicit "example" target. A
+reference can be found under `Inline Markup`_, above. `Inline
+hyperlink targets`_ are also possible.
+
+Section headers are implicit targets, referred to by name. See
+Targets_, which is a subsection of `Body Elements`_.
+
+Explicit external targets are interpolated into references such as
+"Python_".
+
+.. _Python: http://www.python.org/
+
+Targets may be indirect and anonymous. Thus `this phrase`__ may also
+refer to the Targets_ section.
+
+__ Targets_
+
+Here's a `hyperlink reference without a target`_, which generates an
+error.
+
+Duplicate Target Names
+``````````````````````
+
+Duplicate names in section headers or other implicit targets will
+generate "info" (level-1) system messages. Duplicate names in
+explicit targets will generate "warning" (level-2) system messages.
+
+Duplicate Target Names
+``````````````````````
+
+Since there are two "Duplicate Target Names" section headers, we
+cannot uniquely refer to either of them by name. If we try to (like
+this: `Duplicate Target Names`_), an error is generated.
+
+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.
+
+Document Parts
+``````````````
+
+An example of the "contents" directive can be seen above this section
+(a local, untitled table of contents_) and at the beginning of the
+document (a document-wide `table of contents`_).
+
+Images
+``````
+
+An image directive (also clickable -- a hyperlink reference):
+
+.. image:: ../../../docs/user/rst/images/title.png
+ :class: class1 class2
+ :target: directives_
+
+A figure directive:
+
+.. figure:: ../../../docs/user/rst/images/biohazard.png
+ :figclass: figclass1 figclass2
+ :class: class1 class2
+ :alt: reStructuredText, the markup syntax
+ :align: right
+ :width: 50
+
+ A figure is an image with a caption and/or a legend:
+
+ +------------+-----------------------------------------------+
+ | re | Revised, revisited, based on 're' module. |
+ +------------+-----------------------------------------------+
+ | Structured | Structure-enhanced text, structuredtext. |
+ +------------+-----------------------------------------------+
+ | Text | Well it is, isn't it? |
+ +------------+-----------------------------------------------+
+
+ This paragraph is also part of the legend.
+
+This paragraph might flow around the figure...
+
+A centered figure:
+
+.. figure:: ../../../docs/user/rst/images/biohazard.png
+ :align: center
+ :width: 50
+
+ This is the caption.
+
+ This is the legend.
+
+ The legend may consist of several paragraphs.
+
+This paragraph might flow around the figure...
+
+A left-aligned figure:
+
+.. figure:: ../../../docs/user/rst/images/biohazard.png
+ :align: left
+ :width: 50
+
+ This is the caption.
+
+ This is the legend.
+
+ The legend may consist of several paragraphs.
+
+This paragraph might flow around the figure...
+
+Admonitions
+```````````
+
+.. Attention:: Directives at large.
+
+.. Caution::
+
+ Don't take any wooden nickels.
+
+.. DANGER:: Mad scientist at work!
+
+.. Error:: Does not compute.
+
+.. Hint:: It's bigger than a bread box.
+
+.. Important::
+ - Wash behind your ears.
+ - Clean up your room.
+ - Call your mother.
+ - Back up your data.
+
+.. Note:: This is a note.
+
+.. Tip:: 15% if the service is good.
+
+.. WARNING:: Strong prose may provoke extreme mental exertion.
+ Reader discretion is strongly advised.
+
+.. admonition:: And, by the way...
+
+ You can make up your own admonition too.
+
+ .. _Docutils: http://docutils.sourceforge.net/
+
+Topics, Sidebars, and Rubrics
+`````````````````````````````
+
+.. sidebar:: Sidebar Title
+ :subtitle: Optional Subtitle
+
+ This is a sidebar. It is for text outside the flow of the main
+ text.
+
+ .. rubric:: This is a rubric inside a sidebar
+
+ Sidebars often appears beside the main text with a border and
+ background color.
+
+.. topic:: Topic Title
+
+ This is a topic.
+
+.. rubric:: This is a rubric
+
+Target Footnotes
+````````````````
+
+.. target-notes::
+
+
+Replacement Text
+````````````````
+
+I recommend you try |Python|_.
+
+.. |Python| replace:: Python, *the* best language around
+
+Compound Paragraph
+``````````````````
+
+.. compound::
+ :class: some-class
+
+ Compound 1, paragraph 1.
+
+ Compound 1, paragraph 2.
+
+ * Compound 1, list item one.
+ * Compound 1, list item two.
+
+Another compound statement:
+
+.. compound::
+
+ Compound 2, a literal block::
+
+ Compound 2, literal.
+
+ Compound 2, this is a test.
+
+.. compound::
+
+ Compound 3, only consisting of one paragraph.
+
+.. compound::
+
+ ::
+
+ Compound 4.
+ This one starts with a literal block.
+
+ Compound 4, a paragraph.
+
+Now something *really* perverted -- a nested compound block. In
+LaTeX, the following paragraphs should all be first-line indented:
+
+.. compound::
+
+ Compound 5, block 1 (a paragraph).
+
+ .. compound::
+
+ Compound 6, block 2 in compound 5.
+
+ Compound 6, another paragraph.
+
+ Compound 5, block 3 (a paragraph).
+
+.. compound::
+
+ Compound 7, with a table inside:
+
+ +--------------------+--------------------+--------------------+
+ | Left cell, first | Middle cell, | Right cell. |
+ | paragraph. | consisting of | |
+ | | exactly one | Paragraph 2. |
+ | Left cell, second | paragraph. | |
+ | paragraph. | | Paragraph 3. |
+ +--------------------+--------------------+--------------------+
+
+ Compound 7, a paragraph after the table.
+
+ Compound 7, another paragraph.
+
+Substitution Definitions
+------------------------
+
+An inline image (|example|) example:
+
+.. |EXAMPLE| image:: ../../../docs/user/rst/images/biohazard.png
+
+(Substitution definitions are not visible in the HTML source.)
+
+Comments
+--------
+
+Here's one:
+
+.. Comments begin with two dots and a space. Anything may
+ follow, except for the syntax of footnotes, hyperlink
+ targets, directives, or substitution definitions.
+
+ Double-dashes -- "--" -- must be escaped somehow in HTML output.
+
+(View the HTML source to see the comment.)
+
+Raw text
+--------
+
+This does not necessarily look nice, because there may be missing white space.
+
+It's just there to freeze the behavior.
+
+.. raw:: html latex
+
+ A test.
+
+.. raw:: html latex
+
+ Second test.
+
+.. class:: myclass
+
+.. raw:: html latex
+
+ Another test with myclass set.
+
+.. role:: raw-role(raw)
+ :format: html latex
+ :class: myrawroleclass
+
+This is the :raw-role:`fourth test` with myrawroleclass set.
+
+.. raw:: html
+
+ Fifth test in HTML.<br />Line two.
+
+.. raw:: latex
+
+ Fifth test in LaTeX.\\Line two.
diff --git a/test/functional/input/data/table_colspan.txt b/test/functional/input/data/table_colspan.txt
new file mode 100644
index 000000000..54294fdd2
--- /dev/null
+++ b/test/functional/input/data/table_colspan.txt
@@ -0,0 +1,15 @@
+Colspanning tables
+------------------
+
+This table has a cell spanning two columns:
+
+===== ===== ======
+ Inputs Output
+------------ ------
+ A B A or B
+===== ===== ======
+False False False
+True False True
+False True True
+True True True
+===== ===== ======
diff --git a/test/functional/input/data/table_complex.txt b/test/functional/input/data/table_complex.txt
new file mode 100644
index 000000000..8ff37180e
--- /dev/null
+++ b/test/functional/input/data/table_complex.txt
@@ -0,0 +1,21 @@
+Complex tables
+--------------
+
+Here's a complex table, which should test all features.
+
++------------------------+------------+----------+----------+
+| Header row, column 1 | Header 2 | Header 3 | Header 4 |
+| (header rows optional) | | | |
++========================+============+==========+==========+
+| body row 1, column 1 | column 2 | column 3 | column 4 |
++------------------------+------------+----------+----------+
+| body row 2 | Cells may span columns. |
++------------------------+------------+---------------------+
+| body row 3 | Cells may | - Table cells |
++------------------------+ span rows. | - contain |
+| body row 4 | | - body elements. |
+| | Paragraph. | |
++------------------------+------------+----------+----------+
+| body row 5 | Cells may also be | |
+| | empty: ``-->`` | |
++------------------------+-----------------------+----------+
diff --git a/test/functional/input/data/table_rowspan.txt b/test/functional/input/data/table_rowspan.txt
new file mode 100644
index 000000000..5df3109c4
--- /dev/null
+++ b/test/functional/input/data/table_rowspan.txt
@@ -0,0 +1,15 @@
+Rowspanning tables
+------------------
+
+Here's a table with cells spanning several rows:
+
++------------------------+------------+------------------+
+| Header row, column 1 | Header 2 | Header 3 |
+| (header rows optional) | | |
++========================+============+==================+
+| body row 1, column 1 | column 2 | column 3 |
++------------------------+------------+------------------+
+| body row 2 | Cells may | Another |
++------------------------+ span rows. | rowspanning |
+| body row 3 | | cell. |
++------------------------+------------+------------------+
diff --git a/test/functional/input/data/unicode.txt b/test/functional/input/data/unicode.txt
new file mode 100644
index 000000000..4bdd57653
--- /dev/null
+++ b/test/functional/input/data/unicode.txt
@@ -0,0 +1,27 @@
+Various non-ASCII characters
+----------------------------
+
+= ===================================
+© copyright sign
+® registered sign
+« left pointing guillemet
+» right pointing guillemet
+– en-dash
+— em-dash
+‘ single turned comma quotation mark
+’ single comma quotation mark
+‚ low single comma quotation mark
+“ double turned comma quotation mark
+” double comma quotation mark
+„ low double comma quotation mark
+† dagger
+‡ double dagger
+… ellipsis
+™ trade mark sign
+⇔ left-right double arrow
+= ===================================
+
+The following line should not be wrapped, because it uses
+non-breakable spaces:
+
+X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X
diff --git a/test/functional/input/field_list.txt b/test/functional/input/field_list.txt
new file mode 100644
index 000000000..fa04ba6ca
--- /dev/null
+++ b/test/functional/input/field_list.txt
@@ -0,0 +1,5 @@
+:short: This field's name is short.
+:medium-length: This field's name is medium-length.
+:long field name: This field's name is long.
+:very very long field name:
+ This field's name is quite long.
diff --git a/test/functional/input/latex_docinfo.txt b/test/functional/input/latex_docinfo.txt
new file mode 100644
index 000000000..f6c9ba2e4
--- /dev/null
+++ b/test/functional/input/latex_docinfo.txt
@@ -0,0 +1,10 @@
+:Author: Foo Fred
+:Organization: Food Foomatics & Friends
+:Contact: foo@food.example.info
+:Address: Fox St 13
+ Foowood
+:Author: Bar Barney
+:Organization: Bar-BQ Bar
+:Contact: 1-800-BARBQBAR
+:Address: Barbara St 16
+ South Barwell
diff --git a/test/functional/input/pep_html.txt b/test/functional/input/pep_html.txt
new file mode 100644
index 000000000..483077131
--- /dev/null
+++ b/test/functional/input/pep_html.txt
@@ -0,0 +1,32 @@
+PEP: 100
+Title: Test PEP
+Version: 42
+Last-Modified: A long time ago.
+Author: John Doe <john@example.org>
+Discussions-To: <devnull@example.org>
+Status: Draft
+Type: Standards Track
+Content-Type: text/x-rst
+Created: 01-Jun-2001
+Post-History: 13-Jun-2001
+
+
+Abstract
+========
+
+This is just a test [#]_. See the `PEP repository`_ for the real
+thing.
+
+.. _PEP repository: http://www.python.org/peps/
+
+
+Copyright
+=========
+
+This document has been placed in the public domain.
+
+
+References and Footnotes
+========================
+
+.. [#] PEP editors: peps@python.org
diff --git a/test/functional/input/simple.txt b/test/functional/input/simple.txt
new file mode 100644
index 000000000..492e4233b
--- /dev/null
+++ b/test/functional/input/simple.txt
@@ -0,0 +1 @@
+simple input
diff --git a/test/functional/input/standalone_rst_html4css1.txt b/test/functional/input/standalone_rst_html4css1.txt
new file mode 100644
index 000000000..05f0287d0
--- /dev/null
+++ b/test/functional/input/standalone_rst_html4css1.txt
@@ -0,0 +1,7 @@
+.. include:: data/standard.txt
+.. include:: data/header_footer.txt
+.. include:: data/table_colspan.txt
+.. include:: data/table_rowspan.txt
+.. include:: data/table_complex.txt
+.. include:: data/list_table.txt
+.. include:: data/errors.txt
diff --git a/test/functional/input/standalone_rst_latex.txt b/test/functional/input/standalone_rst_latex.txt
new file mode 100644
index 000000000..09a4f8890
--- /dev/null
+++ b/test/functional/input/standalone_rst_latex.txt
@@ -0,0 +1,12 @@
+.. include:: data/standard.txt
+.. include:: data/table_colspan.txt
+.. include:: data/table_rowspan.txt
+
+
+Tests for the LaTeX writer
+==========================
+
+.. include:: data/nonalphanumeric.txt
+.. include:: data/unicode.txt
+
+.. include:: data/errors.txt
diff --git a/test/functional/input/standalone_rst_newlatex.txt b/test/functional/input/standalone_rst_newlatex.txt
new file mode 100644
index 000000000..81b4e5ea6
--- /dev/null
+++ b/test/functional/input/standalone_rst_newlatex.txt
@@ -0,0 +1,12 @@
+.. include:: data/standard.txt
+.. include:: data/table_colspan.txt
+.. include:: data/latex.txt
+
+
+Tests for the LaTeX writer
+==========================
+
+.. include:: data/nonalphanumeric.txt
+.. include:: data/unicode.txt
+
+.. include:: data/errors.txt
diff --git a/test/functional/output/README.txt b/test/functional/output/README.txt
new file mode 100644
index 000000000..ce6dc9861
--- /dev/null
+++ b/test/functional/output/README.txt
@@ -0,0 +1,3 @@
+This is the directory where the actual output is stored.
+
+This README.txt is just a placeholder to make CVS create the directory.
diff --git a/test/functional/tests/_default.py b/test/functional/tests/_default.py
new file mode 100644
index 000000000..63e82451a
--- /dev/null
+++ b/test/functional/tests/_default.py
@@ -0,0 +1,6 @@
+# Default settings for all tests.
+
+settings_overrides['report_level'] = 2
+settings_overrides['halt_level'] = 5
+settings_overrides['warning_stream'] = ''
+settings_overrides['input_encoding'] = 'utf-8'
diff --git a/test/functional/tests/_standalone_rst_defaults.py b/test/functional/tests/_standalone_rst_defaults.py
new file mode 100644
index 000000000..b51704929
--- /dev/null
+++ b/test/functional/tests/_standalone_rst_defaults.py
@@ -0,0 +1,6 @@
+# Keyword parameters passed to publish_file.
+reader_name = "standalone"
+parser_name = "rst"
+
+# Settings.
+settings_overrides['sectsubtitle_xform'] = 1
diff --git a/test/functional/tests/dangerous.py b/test/functional/tests/dangerous.py
new file mode 100644
index 000000000..620a927ba
--- /dev/null
+++ b/test/functional/tests/dangerous.py
@@ -0,0 +1,12 @@
+# Source and destination file names.
+test_source = "dangerous.txt"
+test_destination = "dangerous.html"
+
+# Keyword parameters passed to publish_file.
+reader_name = "standalone"
+parser_name = "rst"
+writer_name = "html"
+
+# Settings
+settings_overrides['file_insertion_enabled'] = 0
+settings_overrides['raw_enabled'] = 0
diff --git a/test/functional/tests/field_name_limit.py b/test/functional/tests/field_name_limit.py
new file mode 100644
index 000000000..db79d4c67
--- /dev/null
+++ b/test/functional/tests/field_name_limit.py
@@ -0,0 +1,12 @@
+# Source and destination file names.
+test_source = "field_list.txt"
+test_destination = "field_name_limit.html"
+
+# Keyword parameters passed to publish_file.
+reader_name = "standalone"
+parser_name = "rst"
+writer_name = "html"
+
+# Settings
+settings_overrides['field_name_limit'] = 0 # no limit
+settings_overrides['docinfo_xform'] = 0
diff --git a/test/functional/tests/latex_docinfo.py b/test/functional/tests/latex_docinfo.py
new file mode 100644
index 000000000..3f9c34455
--- /dev/null
+++ b/test/functional/tests/latex_docinfo.py
@@ -0,0 +1,12 @@
+# Source and destination file names.
+test_source = "latex_docinfo.txt"
+test_destination = "latex_docinfo.tex"
+
+# Keyword parameters passed to publish_file.
+reader_name = "standalone"
+parser_name = "rst"
+writer_name = "latex"
+
+# Extra setting we need
+
+settings_overrides['use_latex_docinfo'] = 1
diff --git a/test/functional/tests/misc_rst_html4css1.py b/test/functional/tests/misc_rst_html4css1.py
new file mode 100644
index 000000000..d90f3453c
--- /dev/null
+++ b/test/functional/tests/misc_rst_html4css1.py
@@ -0,0 +1,12 @@
+# Source and destination file names.
+test_source = "simple.txt"
+test_destination = "misc_rst_html4css1.html"
+
+# Keyword parameters passed to publish_file.
+reader_name = "standalone"
+parser_name = "rst"
+writer_name = "html4css1"
+
+# Settings
+# test for encoded attribute value:
+settings_overrides['stylesheet'] = 'foo&bar.css'
diff --git a/test/functional/tests/pep_html.py b/test/functional/tests/pep_html.py
new file mode 100644
index 000000000..efb067ac4
--- /dev/null
+++ b/test/functional/tests/pep_html.py
@@ -0,0 +1,17 @@
+# Source and destination file names.
+test_source = "pep_html.txt"
+test_destination = "pep_html.html"
+
+# Keyword parameters passed to publish_file.
+reader_name = "pep"
+parser_name = "rst"
+writer_name = "pep_html"
+
+# Settings
+settings_overrides['stylesheet'] = None
+settings_overrides['stylesheet_path'] = "../tools/stylesheets/pep.css"
+settings_overrides['template'] = "../tools/pep-html-template"
+settings_overrides['python_home'] = "http://www.python.org"
+settings_overrides['pep_home'] = "http://www.python.org/peps"
+settings_overrides['no_random'] = 1
+settings_overrides['cloak_email_addresses'] = 1
diff --git a/test/functional/tests/standalone_rst_html4css1.py b/test/functional/tests/standalone_rst_html4css1.py
new file mode 100644
index 000000000..54252e83f
--- /dev/null
+++ b/test/functional/tests/standalone_rst_html4css1.py
@@ -0,0 +1,12 @@
+execfile('functional/tests/_standalone_rst_defaults.py')
+
+# Source and destination file names.
+test_source = "standalone_rst_html4css1.txt"
+test_destination = "standalone_rst_html4css1.html"
+
+# Keyword parameters passed to publish_file.
+writer_name = "html4css1"
+
+# Settings.
+settings_overrides['stylesheet'] = None
+settings_overrides['stylesheet_path'] = "../tools/stylesheets/default.css"
diff --git a/test/functional/tests/standalone_rst_latex.py b/test/functional/tests/standalone_rst_latex.py
new file mode 100644
index 000000000..f0c40b75a
--- /dev/null
+++ b/test/functional/tests/standalone_rst_latex.py
@@ -0,0 +1,8 @@
+execfile('functional/tests/_standalone_rst_defaults.py')
+
+# Source and destination file names.
+test_source = "standalone_rst_latex.txt"
+test_destination = "standalone_rst_latex.tex"
+
+# Keyword parameters passed to publish_file.
+writer_name = "latex"
diff --git a/test/functional/tests/standalone_rst_pseudoxml.py b/test/functional/tests/standalone_rst_pseudoxml.py
new file mode 100644
index 000000000..05be80899
--- /dev/null
+++ b/test/functional/tests/standalone_rst_pseudoxml.py
@@ -0,0 +1,8 @@
+execfile('functional/tests/_standalone_rst_defaults.py')
+
+# Source and destination file names.
+test_source = "standalone_rst_html4css1.txt"
+test_destination = "standalone_rst_pseudoxml.txt"
+
+# Keyword parameters passed to publish_file.
+writer_name = "pseudoxml"