| Server IP : 82.148.16.210 / Your IP : 216.73.216.32 Web Server : nginx/1.29.5 System : Linux mail.sarafai.ru 6.1.0-43-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.162-1 (2026-02-08) x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/thread-self/root/usr/share/doc/python3-docutils/docs/user/rst/ |
Upload File : |
<?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.19: https://docutils.sourceforge.io/" />
<title>reStructuredText Demonstration</title>
<meta content="reStructuredText, demonstration, demo, parser" name="keywords" />
<meta content="A demonstration of the reStructuredText markup language, containing examples of all basic constructs and many advanced constructs." lang="en" name="description" />
<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" />
<meta name="author" content="David Goodger" />
<meta name="authors" content="Me Myself I" />
<meta name="organization" content="humankind" />
<meta name="date" content="2022-01-29" />
<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." />
<link rel="stylesheet" href="../../../css/html4css1.css" type="text/css" />
</head>
<body>
<div class="document" id="restructuredtext-demonstration">
<h1 class="title">reStructuredText Demonstration</h1>
<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 external" href="mailto:docutils-develop@lists.sourceforge.net">docutils-develop@lists.sourceforge.net</a></td></tr>
<tr><th class="docinfo-name">Authors:</th>
<td>Me
<br />Myself
<br />I</td></tr>
<tr><th class="docinfo-name">Organization:</th>
<td>humankind</td></tr>
<tr><th class="docinfo-name">Date:</th>
<td>2022-01-29</td></tr>
<tr><th class="docinfo-name">Status:</th>
<td>This is a "work in progress"</td></tr>
<tr><th class="docinfo-name">Revision:</th>
<td>8995</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-name field"><th class="docinfo-name">field name:</th><td class="field-body">This is a generic bibliographic field.</td>
</tr>
<tr class="field-name-2 field"><th class="docinfo-name">field name 2:</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">Dedication</p>
<p>For Docutils users & co-developers.</p>
</div>
<div class="abstract topic">
<p class="topic-title">Abstract</p>
<p>This document is a demonstration of the reStructuredText markup
language, containing examples of all basic reStructuredText
constructs and many advanced constructs.</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">Table of Contents</p>
<ul class="auto-toc simple">
<li><a class="reference internal" href="#structural-elements" id="toc-entry-1">1 Structural Elements</a><ul class="auto-toc">
<li><a class="reference internal" href="#section-title" id="toc-entry-2">1.1 Section Title</a></li>
<li><a class="reference internal" href="#transitions" id="toc-entry-3">1.2 Transitions</a></li>
</ul>
</li>
<li><a class="reference internal" href="#body-elements" id="toc-entry-4">2 Body Elements</a><ul class="auto-toc">
<li><a class="reference internal" href="#paragraphs" id="toc-entry-5">2.1 Paragraphs</a><ul class="auto-toc">
<li><a class="reference internal" href="#inline-markup" id="toc-entry-6">2.1.1 Inline Markup</a></li>
</ul>
</li>
<li><a class="reference internal" href="#bullet-lists" id="toc-entry-7">2.2 Bullet Lists</a></li>
<li><a class="reference internal" href="#enumerated-lists" id="toc-entry-8">2.3 Enumerated Lists</a></li>
<li><a class="reference internal" href="#definition-lists" id="toc-entry-9">2.4 Definition Lists</a></li>
<li><a class="reference internal" href="#field-lists" id="toc-entry-10">2.5 Field Lists</a></li>
<li><a class="reference internal" href="#option-lists" id="toc-entry-11">2.6 Option Lists</a></li>
<li><a class="reference internal" href="#literal-blocks" id="toc-entry-12">2.7 Literal Blocks</a></li>
<li><a class="reference internal" href="#line-blocks" id="toc-entry-13">2.8 Line Blocks</a></li>
<li><a class="reference internal" href="#block-quotes" id="toc-entry-14">2.9 Block Quotes</a></li>
<li><a class="reference internal" href="#doctest-blocks" id="toc-entry-15">2.10 Doctest Blocks</a></li>
<li><a class="reference internal" href="#tables" id="toc-entry-16">2.11 Tables</a></li>
<li><a class="reference internal" href="#footnotes" id="toc-entry-17">2.12 Footnotes</a></li>
<li><a class="reference internal" href="#citations" id="toc-entry-18">2.13 Citations</a></li>
<li><a class="reference internal" href="#targets" id="toc-entry-19">2.14 Targets</a><ul class="auto-toc">
<li><a class="reference internal" href="#duplicate-target-names" id="toc-entry-20">2.14.1 Duplicate Target Names</a></li>
<li><a class="reference internal" href="#duplicate-target-names-1" id="toc-entry-21">2.14.2 Duplicate Target Names</a></li>
</ul>
</li>
<li><a class="reference internal" href="#directives" id="toc-entry-22">2.15 Directives</a><ul class="auto-toc">
<li><a class="reference internal" href="#document-parts" id="toc-entry-23">2.15.1 Document Parts</a></li>
<li><a class="reference internal" href="#images" id="toc-entry-24">2.15.2 Images</a></li>
<li><a class="reference internal" href="#admonitions" id="toc-entry-25">2.15.3 Admonitions</a></li>
<li><a class="reference internal" href="#topics-sidebars-and-rubrics" id="toc-entry-26">2.15.4 Topics, Sidebars, and Rubrics</a></li>
<li><a class="reference internal" href="#target-footnotes" id="toc-entry-27">2.15.5 Target Footnotes</a></li>
<li><a class="reference internal" href="#replacement-text" id="toc-entry-28">2.15.6 Replacement Text</a></li>
<li><a class="reference internal" href="#compound-paragraph" id="toc-entry-29">2.15.7 Compound Paragraph</a></li>
<li><a class="reference internal" href="#meta" id="toc-entry-30">2.15.8 Meta</a></li>
</ul>
</li>
<li><a class="reference internal" href="#substitution-definitions" id="toc-entry-31">2.16 Substitution Definitions</a></li>
<li><a class="reference internal" href="#comments" id="toc-entry-32">2.17 Comments</a></li>
</ul>
</li>
<li><a class="reference internal" href="#error-handling" id="toc-entry-33">3 Error Handling</a></li>
</ul>
</div>
<div class="section" id="structural-elements">
<h1><a class="toc-backref" href="#toc-entry-1">1 Structural Elements</a></h1>
<div class="section" id="section-title">
<h2><a class="toc-backref" href="#toc-entry-2">1.1 Section Title</a></h2>
<p>That's it, the text just above this line.</p>
</div>
<div class="section" id="transitions">
<h2><a class="toc-backref" href="#toc-entry-3">1.2 Transitions</a></h2>
<p>Here's a transition:</p>
<hr class="docutils" />
<p>It divides the section.</p>
</div>
</div>
<div class="section" id="body-elements">
<h1><a class="toc-backref" href="#toc-entry-4">2 Body Elements</a></h1>
<div class="section" id="paragraphs">
<h2><a class="toc-backref" href="#toc-entry-5">2.1 Paragraphs</a></h2>
<p>A paragraph.</p>
<div class="section" id="inline-markup">
<h3><a class="toc-backref" href="#toc-entry-6">2.1.1 Inline Markup</a></h3>
<p>Paragraphs contain text and may contain inline markup: <em>emphasis</em>,
<strong>strong emphasis</strong>, <tt class="docutils literal">inline literals</tt>, standalone hyperlinks
(<a class="reference external" href="https://www.python.org">https://www.python.org</a>), external hyperlinks (<a class="reference external" href="https://www.python.org">Python</a> <a class="footnote-reference" href="#footnote-6" id="footnote-reference-9">[5]</a>), internal
cross-references (<a class="reference internal" href="#example">example</a>), external hyperlinks with embedded URIs
(<a class="reference external" href="https://www.python.org">Python web site</a>), footnote references
(manually numbered <a class="footnote-reference" href="#footnote-1" id="footnote-reference-1">[1]</a>, anonymous auto-numbered <a class="footnote-reference" href="#footnote-2" id="footnote-reference-2">[3]</a>, labeled
auto-numbered <a class="footnote-reference" href="#label" id="footnote-reference-3">[2]</a>, or symbolic <a class="footnote-reference" href="#footnote-3" id="footnote-reference-4">[*]</a>), citation references
(<a class="citation-reference" href="#cit2002" id="citation-reference-1">[CIT2002]</a>), substitution references (<img alt="EXAMPLE" src="images/biohazard.png" />), and <span class="target" id="inline-hyperlink-targets">inline
hyperlink targets</span> (see <a class="reference internal" href="#targets">Targets</a> below for a reference back to here).
Character-level inline markup is also possible (although exceedingly
ugly!) in <em>re</em><tt class="docutils literal">Structured</tt><em>Text</em>. Problems are indicated by
<a href="#system-message-1"><span class="problematic" id="problematic-1">|problematic|</span></a> text (generated by processing errors; this one is
intentional).</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 external" href="https://peps.python.org/pep-0287">PEP 287</a>); an
RFC reference (<a class="reference external" href="https://tools.ietf.org/html/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">markup</tt>.</p>
<!-- DO NOT RE-WRAP THE FOLLOWING PARAGRAPH! -->
<p>Let's test wrapping and whitespace significance in inline literals:
<tt class="docutils literal">This is an example of <span class="pre">--inline-literal</span> <span class="pre">--text,</span> <span class="pre">--including</span> <span class="pre">some--</span>
<span class="pre">strangely--hyphenated-words.</span> <span class="pre">Adjust-the-width-of-your-browser-window</span>
to see how the text is wrapped. <span class="pre">--</span> <span class="pre">----</span> <span class="pre">--------</span> Now note the
spacing between the words of this sentence (words
should be grouped in pairs).</tt></p>
<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="#toc-entry-7">2.2 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>
</ul>
</li>
</ul>
</div>
<div class="section" id="enumerated-lists">
<h2><a class="toc-backref" href="#toc-entry-8">2.3 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>
<li><p class="first">List items may also be auto-enumerated.</p>
</li>
</ol>
</div>
<div class="section" id="definition-lists">
<h2><a class="toc-backref" href="#toc-entry-9">2.4 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>
</dl>
</div>
<div class="section" id="field-lists">
<h2><a class="toc-backref" href="#toc-entry-10">2.5 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"><p class="first">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.</p>
</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>
</tbody>
</table>
</div>
<div class="section" id="option-lists">
<h2><a class="toc-backref" href="#toc-entry-11">2.6 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 "a"</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> </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 "option group".</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-v</span>, <span class="option">--verbose</span></kbd></td>
<td>Commonly-seen: short & 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> </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="#toc-entry-12">2.7 Literal Blocks</a></h2>
<p>Literal blocks are indicated with a double-colon ("::") at the end of
the preceding paragraph (over there <tt class="docutils literal"><span class="pre">--></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">
>> Great idea!
>
> Why didn't I think of that?
</pre>
</div>
<div class="section" id="line-blocks">
<h2><a class="toc-backref" href="#toc-entry-13">2.8 Line Blocks</a></h2>
<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">Each new line begins with a vertical bar ("|").</div>
<div class="line">Line breaks and initial indents are preserved.</div>
</div>
<div class="line">Continuation lines are wrapped portions of long lines;
they begin with a space in place of the vertical bar.</div>
<div class="line-block">
<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 "|".</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="#toc-entry-14">2.9 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">—Anne Elk (Miss)</p>
</blockquote>
</div>
<div class="section" id="doctest-blocks">
<h2><a class="toc-backref" href="#toc-entry-15">2.10 Doctest Blocks</a></h2>
<pre class="doctest-block">
>>> 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)
</pre>
</div>
<div class="section" id="tables">
<h2><a class="toc-backref" href="#toc-entry-16">2.11 Tables</a></h2>
<p>Here's a grid table followed by a simple table:</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">Cells may
span rows.</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">--></span></tt></td>
<td> </td>
</tr>
</tbody>
</table>
<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="footnotes">
<h2><a class="toc-backref" href="#toc-entry-17">2.12 Footnotes</a></h2>
<table class="docutils footnote" frame="void" id="footnote-1" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label">[1]</td><td><em>(<a class="fn-backref" href="#footnote-reference-1">1</a>, <a class="fn-backref" href="#footnote-reference-5">2</a>)</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">[2]</td><td><em>(<a class="fn-backref" href="#footnote-reference-3">1</a>, <a class="fn-backref" href="#footnote-reference-6">2</a>)</em> Footnotes may be numbered, either manually (as in <a class="footnote-reference" href="#footnote-1" id="footnote-reference-5">[1]</a>) 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 (<a class="footnote-reference" href="#label" id="footnote-reference-6">[2]</a>) and as a hyperlink reference
(<a class="reference internal" href="#label">label</a>).</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="footnote-2" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#footnote-reference-2">[3]</a></td><td>This footnote is numbered automatically and anonymously using a
label of "#" only.</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="footnote-3" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#footnote-reference-4">[*]</a></td><td>Footnotes may also use symbols, specified with a "*" label.
Here's a reference to the next footnote: <a class="footnote-reference" href="#footnote-4" id="footnote-reference-7">[†]</a>.</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="footnote-4" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#footnote-reference-7">[†]</a></td><td>This footnote shows the next symbol in the sequence.</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="footnote-5" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label">[4]</td><td>Here's an unreferenced footnote, with a reference to a
nonexistent footnote: <a href="#system-message-3"><span class="problematic" id="footnote-reference-8">[5]_</span></a>.</td></tr>
</tbody>
</table>
</div>
<div class="section" id="citations">
<h2><a class="toc-backref" href="#toc-entry-18">2.13 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">[CIT2002]</td><td><em>(<a class="fn-backref" href="#citation-reference-1">1</a>, <a class="fn-backref" href="#citation-reference-2">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="citation-reference-2">[CIT2002]</a>, and a <a href="#system-message-4"><span class="problematic" id="citation-reference-3">[nonexistent]_</span></a>
citation.</p>
</div>
<div class="section" id="targets">
<h2><a class="toc-backref" href="#toc-entry-19">2.14 Targets</a></h2>
<p id="example">This paragraph is pointed to by the explicit "example" target. A
reference can be found under <a class="reference internal" href="#inline-markup">Inline Markup</a>, above. <a class="reference internal" href="#inline-hyperlink-targets">Inline
hyperlink targets</a> are also possible.</p>
<p>Section headers are implicit targets, referred to by name. See
<a class="reference internal" href="#targets">Targets</a>, which is a subsection of <a class="reference internal" href="#body-elements">Body Elements</a>.</p>
<p>Explicit external targets are interpolated into references such as
"<a class="reference external" href="https://www.python.org">Python</a> <a class="footnote-reference" href="#footnote-6" id="footnote-reference-10">[5]</a>".</p>
<p>Targets may be indirect and anonymous. Thus <a class="reference internal" href="#targets">this phrase</a> may also
refer to the <a class="reference internal" href="#targets">Targets</a> section.</p>
<p>Here's a <a href="#system-message-5"><span class="problematic" id="problematic-3">`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="#toc-entry-20">2.14.1 Duplicate Target Names</a></h3>
<p>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.</p>
</div>
<div class="section" id="duplicate-target-names-1">
<h3><a class="toc-backref" href="#toc-entry-21">2.14.2 Duplicate Target Names</a></h3>
<p>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: <a href="#system-message-6"><span class="problematic" id="problematic-4">`Duplicate Target Names`_</span></a>), an error is generated.</p>
</div>
</div>
<div class="section" id="directives">
<h2><a class="toc-backref" href="#toc-entry-22">2.15 Directives</a></h2>
<div class="contents local topic" id="contents">
<ul class="auto-toc simple">
<li><a class="reference internal" href="#document-parts" id="toc-entry-34">2.15.1 Document Parts</a></li>
<li><a class="reference internal" href="#images" id="toc-entry-35">2.15.2 Images</a></li>
<li><a class="reference internal" href="#admonitions" id="toc-entry-36">2.15.3 Admonitions</a></li>
<li><a class="reference internal" href="#topics-sidebars-and-rubrics" id="toc-entry-37">2.15.4 Topics, Sidebars, and Rubrics</a></li>
<li><a class="reference internal" href="#target-footnotes" id="toc-entry-38">2.15.5 Target Footnotes</a></li>
<li><a class="reference internal" href="#replacement-text" id="toc-entry-39">2.15.6 Replacement Text</a></li>
<li><a class="reference internal" href="#compound-paragraph" id="toc-entry-40">2.15.7 Compound Paragraph</a></li>
<li><a class="reference internal" href="#meta" id="toc-entry-41">2.15.8 Meta</a></li>
</ul>
</div>
<p>These are just a sample of the many reStructuredText Directives. For
others, please see
<a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html">https://docutils.sourceforge.io/docs/ref/rst/directives.html</a>.</p>
<div class="section" id="document-parts">
<h3><a class="toc-backref" href="#toc-entry-34">2.15.1 Document Parts</a></h3>
<p>An example of the "contents" directive can be seen above this section
(a local, untitled table of <a class="reference internal" href="#contents">contents</a>) and at the beginning of the
document (a document-wide <a class="reference internal" href="#table-of-contents">table of contents</a>).</p>
</div>
<div class="section" id="images">
<h3><a class="toc-backref" href="#toc-entry-35">2.15.2 Images</a></h3>
<p>An image directive (also clickable -- a hyperlink reference):</p>
<a class="reference internal image-reference" href="#directives"><img alt="images/title.png" src="images/title.png" /></a>
<p>A figure directive:</p>
<div class="figure">
<img alt="reStructuredText, the markup syntax" src="images/title.png" />
<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>
</div>
<div class="section" id="admonitions">
<h3><a class="toc-backref" href="#toc-entry-36">2.15.3 Admonitions</a></h3>
<div class="admonition attention">
<p class="first admonition-title">Attention!</p>
<p class="last">Directives at large.</p>
</div>
<div class="admonition caution">
<p class="first admonition-title">Caution!</p>
<p class="last">Don't take any wooden nickels.</p>
</div>
<div class="admonition danger">
<p class="first admonition-title">!DANGER!</p>
<p class="last">Mad scientist at work!</p>
</div>
<div class="admonition error">
<p class="first admonition-title">Error</p>
<p class="last">Does not compute.</p>
</div>
<div class="admonition hint">
<p class="first admonition-title">Hint</p>
<p class="last">It's bigger than a bread box.</p>
</div>
<div class="admonition 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="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This is a note.</p>
</div>
<div class="admonition tip">
<p class="first admonition-title">Tip</p>
<p class="last">15% if the service is good.</p>
</div>
<div class="admonition 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 admonition-and-by-the-way">
<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="#toc-entry-37">2.15.4 Topics, Sidebars, and Rubrics</a></h3>
<div class="sidebar">
<p class="first sidebar-title">Optional 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">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="#toc-entry-38">2.15.5 Target Footnotes</a></h3>
<table class="docutils footnote" frame="void" id="footnote-6" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label">[5]</td><td><em>(<a class="fn-backref" href="#footnote-reference-9">1</a>, <a class="fn-backref" href="#footnote-reference-10">2</a>, <a class="fn-backref" href="#footnote-reference-11">3</a>)</em> <a class="reference external" href="https://www.python.org">https://www.python.org</a></td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="footnote-7" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#footnote-reference-12">[6]</a></td><td><a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata">https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata</a></td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="footnote-8" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#footnote-reference-13">[7]</a></td><td><a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag">https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag</a></td></tr>
</tbody>
</table>
</div>
<div class="section" id="replacement-text">
<h3><a class="toc-backref" href="#toc-entry-39">2.15.6 Replacement Text</a></h3>
<p>I recommend you try <a class="reference external" href="https://www.python.org">Python, <em>the</em> best language around</a> <a class="footnote-reference" href="#footnote-6" id="footnote-reference-11">[5]</a>.</p>
</div>
<div class="section" id="compound-paragraph">
<h3><a class="toc-backref" href="#toc-entry-40">2.15.7 Compound Paragraph</a></h3>
<div class="compound">
<p class="compound-first">This paragraph contains a literal block:</p>
<pre class="compound-middle literal-block">
Connecting... OK
Transmitting data... OK
Disconnecting... OK
</pre>
<p class="compound-last">and thus consists of a simple paragraph, a literal block, and
another simple paragraph. Nonetheless it is semantically <em>one</em>
paragraph.</p>
</div>
<p>This construct is called a <em>compound paragraph</em> and can be produced
with the "compound" directive.</p>
</div>
<div class="section" id="meta">
<h3><a class="toc-backref" href="#toc-entry-41">2.15.8 Meta</a></h3>
<p>The <a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata">“meta” directive</a> <a class="footnote-reference" href="#footnote-7" id="footnote-reference-12">[6]</a> is used to specify metadata to be stored in,
e.g., HTML <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag">META</a> <a class="footnote-reference" href="#footnote-8" id="footnote-reference-13">[7]</a> tags or ODT file properties.</p>
</div>
</div>
<div class="section" id="substitution-definitions">
<h2><a class="toc-backref" href="#toc-entry-31">2.16 Substitution Definitions</a></h2>
<p>An inline image (<img alt="EXAMPLE" src="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="#toc-entry-32">2.17 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>
<div class="section" id="error-handling">
<h1><a class="toc-backref" href="#toc-entry-33">3 Error Handling</a></h1>
<p>Any errors caught during processing will generate system messages.</p>
<p><a href="#system-message-2"><span class="problematic" id="problematic-2">|*** Expect 6 errors (including this one). ***|</span></a></p>
<p>There should be six messages in the following, auto-generated
section, "Docutils System Messages":</p>
<!-- section should be added by Docutils automatically -->
</div>
<div class="system-messages section">
<h1>Docutils System Messages</h1>
<div class="system-message" id="system-message-1">
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">docs/user/rst/demo.txt</tt>, line 89); <em><a href="#problematic-1">backlink</a></em></p>
Undefined substitution referenced: "problematic".</div>
<div class="system-message" id="system-message-2">
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">docs/user/rst/demo.txt</tt>, line 562); <em><a href="#problematic-2">backlink</a></em></p>
Undefined substitution referenced: "*** Expect 6 errors (including this one). ***".</div>
<div class="system-message" id="system-message-3">
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">docs/user/rst/demo.txt</tt>, line 346); <em><a href="#footnote-reference-8">backlink</a></em></p>
Unknown target name: "5".</div>
<div class="system-message" id="system-message-4">
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">docs/user/rst/demo.txt</tt>, line 355); <em><a href="#citation-reference-3">backlink</a></em></p>
Unknown target name: "nonexistent".</div>
<div class="system-message" id="system-message-5">
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">docs/user/rst/demo.txt</tt>, line 380); <em><a href="#problematic-3">backlink</a></em></p>
Unknown target name: "hyperlink reference without a target".</div>
<div class="system-message" id="system-message-6">
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">docs/user/rst/demo.txt</tt>, line 393); <em><a href="#problematic-4">backlink</a></em></p>
Duplicate target name, cannot be used as a unique reference: "duplicate target names".</div>
</div>
</div>
</body>
</html>