1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2   "http://www.w3.org/TR/html4/loose.dtd">
3
4<html>
5  <head>
6    <title>Quick reStructuredText</title>
7    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8
9    <style type="text/css"><!--
10      a.backref { text-decoration: none ; color: black }
11      div.line-block { display: block }
12      div.line-block div.line-block { margin-left: 1.5em }
13    --></style>
14
15  </head>
16
17  <body>
18    <h1>Quick <i>re</i><font size="+4"><tt>Structured</tt></font><i>Text</i></h1>
19
20    <!-- Caveat: if you're reading the HTML for the examples, -->
21    <!-- beware that it was hand-generated, not by Docutils/ReST.  -->
22
23    <p align="right"><em><a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html"
24    >http://docutils.sourceforge.net/docs/user/rst/quickref.html</a></em>
25    <br><em>Being a cheat-sheet for reStructuredText</em>
26    <br><em>Updated $Date: 2019-09-30 13:36:39 +0200 (Mo, 30. Sep 2019) $</em>
27
28    <blockquote>
29      <p>Copyright: This document has been placed in the public domain.
30    </blockquote>
31
32
33    <p>The full details of the markup may be found on the
34      <a href="http://docutils.sourceforge.net/rst.html">reStructuredText</a>
35      page. This document is just intended as a reminder.
36
37    <p>Links that look like "(<a href="#details">details</a>)" point
38      into the HTML version of the full <a
39      href="../../ref/rst/restructuredtext.html">reStructuredText
40      specification</a> document.  These are relative links; if they
41      don't work, please use the <a
42      href="http://docutils.sourceforge.net/docs/user/rst/quickref.html"
43      >master "Quick reStructuredText"</a> document.
44
45    <h2><a name="contents">Contents</a></h2>
46
47    <ul>
48    <li><a href="#inline-markup">Inline Markup</a></li>
49    <li><a href="#escaping">Escaping with Backslashes</a></li>
50    <li><a href="#section-structure">Section Structure</a></li>
51    <li><a href="#paragraphs">Paragraphs</a></li>
52    <li><a href="#bullet-lists">Bullet Lists</a></li>
53    <li><a href="#enumerated-lists">Enumerated Lists</a></li>
54    <li><a href="#definition-lists">Definition Lists</a></li>
55    <li><a href="#field-lists">Field Lists</a></li>
56    <li><a href="#option-lists">Option Lists</a></li>
57    <li><a href="#literal-blocks">Literal Blocks</a></li>
58    <li><a href="#line-blocks">Line Blocks</a></li>
59    <li><a href="#block-quotes">Block Quotes</a></li>
60    <li><a href="#doctest-blocks">Doctest Blocks</a></li>
61    <li><a href="#tables">Tables</a></li>
62    <li><a href="#transitions">Transitions</a></li>
63    <li><a href="#explicit-markup">Explicit Markup</a>
64    <ul>
65    <li><a href="#footnotes">Footnotes</a></li>
66    <li><a href="#citations">Citations</a></li>
67    <li><a href="#hyperlink-targets">Hyperlink Targets</a>
68    <ul>
69    <li><a href="#external-hyperlink-targets">External Hyperlink Targets</a></li>
70    <li><a href="#internal-hyperlink-targets">Internal Hyperlink Targets</a></li>
71    <li><a href="#indirect-hyperlink-targets">Indirect Hyperlink Targets</a></li>
72    <li><a href="#implicit-hyperlink-targets">Implicit Hyperlink Targets</a></li>
73    </ul></li>
74    <li><a href="#directives">Directives</a></li>
75    <li><a href="#substitution-references-and-definitions">Substitution References and Definitions</a></li>
76    <li><a href="#comments">Comments</a></li>
77    </ul></li>
78    <li><a href="#getting-help">Getting Help</a></li>
79    </ul>
80
81    <h2><a href="#contents" name="inline-markup" class="backref"
82        >Inline Markup</a></h2>
83
84    <p>(<a href="../../ref/rst/restructuredtext.html#inline-markup">details</a>)
85
86    <p>Inline markup allows words and phrases within text to have
87    character styles (like italics and boldface) and functionality
88    (like hyperlinks).
89
90    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
91      <thead>
92    <tr align="left" bgcolor="#99CCFF">
93      <th>Plain text
94      <th>Typical result
95      <th>Notes
96      </thead>
97      <tbody>
98    <tr valign="top">
99      <td nowrap><samp>*emphasis*</samp>
100      <td><em>emphasis</em>
101      <td>Normally rendered as italics.
102
103    <tr valign="top">
104      <td nowrap><samp>**strong&nbsp;emphasis**</samp>
105      <td><strong>strong emphasis</strong>
106      <td>Normally rendered as boldface.
107
108    <tr valign="top">
109      <td nowrap><samp>`interpreted&nbsp;text`</samp>
110      <td>(see note at right)
111      <td>The rendering and <em>meaning</em> of interpreted text is
112      domain- or application-dependent.  It can be used for things
113      like index entries or explicit descriptive markup (like program
114      identifiers).
115
116    <tr valign="top">
117      <td nowrap><samp>``inline&nbsp;literal``</samp>
118      <td><code>inline&nbsp;literal</code>
119      <td>Normally rendered as monospaced text. Spaces should be
120      preserved, but line breaks will not be.
121
122    <tr valign="top">
123      <td nowrap><samp>reference_</samp>
124      <td><a href="#hyperlink-targets">reference</a>
125      <td>A simple, one-word hyperlink reference.  See <a
126      href="#hyperlink-targets">Hyperlink Targets</a>.
127
128    <tr valign="top">
129      <td nowrap><samp>`phrase reference`_</samp>
130      <td><a href="#hyperlink-targets">phrase reference</a>
131      <td>A hyperlink reference with spaces or punctuation needs to be
132      quoted with backquotes.  See <a
133      href="#hyperlink-targets">Hyperlink Targets</a>.
134
135    <tr valign="top">
136      <td nowrap><samp>anonymous__</samp>
137      <td><a href="#hyperlink-targets">anonymous</a>
138      <td>With two underscores instead of one, both simple and phrase
139      references may be anonymous (the reference text is not repeated
140      at the target).  See <a
141      href="#hyperlink-targets">Hyperlink Targets</a>.
142
143    <tr valign="top">
144      <td nowrap><samp>_`inline internal target`</samp>
145      <td><a name="inline-internal-target">inline internal target</a>
146      <td>A crossreference target within text.
147      See <a href="#hyperlink-targets">Hyperlink Targets</a>.
148
149    <tr valign="top">
150      <td nowrap><samp>|substitution reference|</samp>
151      <td>(see note at right)
152      <td>The result is substituted in from the <a
153      href="#substitution-references-and-definitions">substitution
154      definition</a>.  It could be text, an image, a hyperlink, or a
155      combination of these and others.
156
157    <tr valign="top">
158      <td nowrap><samp>footnote reference [1]_</samp>
159      <td>footnote reference <sup><a href="#footnotes">1</a></sup>
160      <td>See <a href="#footnotes">Footnotes</a>.
161
162    <tr valign="top">
163      <td nowrap><samp>citation reference [CIT2002]_</samp>
164      <td>citation reference <a href="#citations">[CIT2002]</a>
165      <td>See <a href="#citations">Citations</a>.
166
167    <tr valign="top">
168      <td nowrap><samp>http://docutils.sf.net/</samp>
169      <td><a href="http://docutils.sf.net/">http://docutils.sf.net/</a>
170      <td>A standalone hyperlink.
171
172    </table>
173
174    <p>Asterisk, backquote, vertical bar, and underscore are inline
175    delimiter characters. Asterisk, backquote, and vertical bar act
176    like quote marks; matching characters surround the marked-up word
177    or phrase, whitespace or other quoting is required outside them,
178    and there can't be whitespace just inside them. If you want to use
179    inline delimiter characters literally, <a href="#escaping">escape
180    (with backslash)</a> or quote them (with double backquotes; i.e.
181    use inline literals).
182
183    <p>In detail, the reStructuredText specification says that in
184      inline markup, the following rules apply to start-strings and
185      end-strings (inline markup delimiters):
186
187    <ol>
188      <li>The start-string must start a text block or be
189    immediately preceded by whitespace or any of&nbsp;
190    <samp>' " ( [ {</samp> or&nbsp;<samp>&lt;</samp>.
191      <li>The start-string must be immediately followed by non-whitespace.
192      <li>The end-string must be immediately preceded by non-whitespace.
193      <li>The end-string must end a text block (end of document or
194    followed by a blank line) or be immediately followed by whitespace
195    or any of&nbsp;<samp>' " . , : ; ! ? - ) ] } / \</samp>
196    or&nbsp;<samp>&gt;</samp>.
197      <li>If a start-string is immediately preceded by one of&nbsp;
198    <samp>' " ( [ {</samp> or&nbsp;<samp>&lt;</samp>, it must not be
199    immediately followed by the corresponding character from&nbsp;
200    <samp>' " ) ] }</samp> or&nbsp;<samp>&gt;</samp>.
201      <li>An end-string must be separated by at least one
202    character from the start-string.
203      <li>An <a href="#escaping">unescaped</a> backslash preceding a
204    start-string or end-string will disable markup recognition, except
205    for the end-string of inline literals.
206    </ol>
207
208    <p>Also remember that inline markup may not be nested (well,
209      except that inline literals can contain any of the other inline
210      markup delimiter characters, but that doesn't count because
211      nothing is processed).
212
213    <h2><a href="#contents" name="escaping" class="backref"
214        >Escaping with Backslashes</a></h2>
215
216    <p>(<a
217    href="../../ref/rst/restructuredtext.html#escaping-mechanism">details</a>)
218
219    <p>reStructuredText uses backslashes ("\") to override the special
220    meaning given to markup characters and get the literal characters
221    themselves. To get a literal backslash, use an escaped backslash
222    ("\\"). For example:
223
224    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
225      <thead>
226    <tr align="left" bgcolor="#99CCFF">
227      <th width="50%">Raw reStructuredText
228      <th width="50%">Typical result
229      </thead>
230      <tbody>
231    <tr valign="top"><td>
232        <samp>*escape*&nbsp;``with``&nbsp;"\"</samp>
233      <td><em>escape</em> <samp>with</samp> ""
234    <tr valign="top"><td>
235        <samp>\*escape*&nbsp;\``with``&nbsp;"\\"</samp>
236      <td>*escape* ``with`` "\"
237    </table>
238
239    <p>In Python strings it will, of course, be necessary
240      to escape any backslash characters so that they actually
241      <em>reach</em> reStructuredText.
242      The simplest way to do this is to use raw strings:
243
244    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
245      <thead>
246    <tr align="left" bgcolor="#99CCFF">
247      <th width="50%">Python string
248      <th width="50%">Typical result
249      </thead>
250      <tbody>
251    <tr valign="top"><td>
252        <samp>r"""\*escape*&nbsp;\`with`&nbsp;"\\""""</samp>
253      <td>*escape* `with` "\"
254    <tr valign="top"><td>
255        <samp>&nbsp;"""\\*escape*&nbsp;\\`with`&nbsp;"\\\\""""</samp>
256      <td>*escape* `with` "\"
257    <tr valign="top"><td>
258        <samp>&nbsp;"""\*escape*&nbsp;\`with`&nbsp;"\\""""</samp>
259      <td><em>escape</em> with ""
260    </table>
261
262    <h2><a href="#contents" name="section-structure" class="backref"
263        >Section Structure</a></h2>
264
265    <p>(<a href="../../ref/rst/restructuredtext.html#sections">details</a>)
266
267    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
268      <thead>
269    <tr align="left" bgcolor="#99CCFF">
270      <th width="50%">Plain text
271      <th width="50%">Typical result
272      </thead>
273      <tbody>
274    <tr valign="top">
275      <td>
276<samp>=====</samp>
277<br><samp>Title</samp>
278<br><samp>=====</samp>
279<br><samp>Subtitle</samp>
280<br><samp>--------</samp>
281<br><samp>Titles&nbsp;are&nbsp;underlined&nbsp;(or&nbsp;over-</samp>
282<br><samp>and&nbsp;underlined)&nbsp;with&nbsp;a&nbsp;printing</samp>
283<br><samp>nonalphanumeric&nbsp;7-bit&nbsp;ASCII</samp>
284<br><samp>character.&nbsp;Recommended&nbsp;choices</samp>
285<br><samp>are&nbsp;"``=&nbsp;-&nbsp;`&nbsp;:&nbsp;'&nbsp;"&nbsp;~&nbsp;^&nbsp;_&nbsp;*&nbsp;+&nbsp;#&nbsp;&lt;&nbsp;&gt;``".</samp>
286<br><samp>The&nbsp;underline/overline&nbsp;must&nbsp;be&nbsp;at</samp>
287<br><samp>least&nbsp;as&nbsp;long&nbsp;as&nbsp;the&nbsp;title&nbsp;text.</samp>
288<br><samp></samp>
289<br><samp>A&nbsp;lone&nbsp;top-level&nbsp;(sub)section</samp>
290<br><samp>is&nbsp;lifted&nbsp;up&nbsp;to&nbsp;be&nbsp;the&nbsp;document's</samp>
291<br><samp>(sub)title.</samp>
292
293      <td>
294        <font size="+2"><strong>Title</strong></font>
295        <p><font size="+1"><strong>Subtitle</strong></font>
296        <p>Titles are underlined (or over-
297          and underlined) with a printing
298          nonalphanumeric 7-bit ASCII
299          character. Recommended choices
300          are "<samp>= - ` : ' " ~ ^ _ * + # &lt; &gt;</samp>".
301          The underline/overline must be at
302          least as long as the title text.
303        <p>A lone top-level (sub)section is
304          lifted up to be the document's
305          (sub)title.
306    </table>
307
308    <h2><a href="#contents" name="paragraphs" class="backref"
309        >Paragraphs</a></h2>
310
311    <p>(<a href="../../ref/rst/restructuredtext.html#paragraphs">details</a>)
312
313    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
314      <thead>
315    <tr align="left" bgcolor="#99CCFF">
316      <th width="50%">Plain text
317      <th width="50%">Typical result
318      </thead>
319      <tbody>
320    <tr valign="top">
321      <td>
322<p><samp>This&nbsp;is&nbsp;a&nbsp;paragraph.</samp>
323
324<p><samp>Paragraphs&nbsp;line&nbsp;up&nbsp;at&nbsp;their&nbsp;left</samp>
325<br><samp>edges,&nbsp;and&nbsp;are&nbsp;normally&nbsp;separated</samp>
326<br><samp>by&nbsp;blank&nbsp;lines.</samp>
327
328      <td>
329        <p>This is a paragraph.
330
331        <p>Paragraphs line up at their left edges, and are normally
332        separated by blank lines.
333
334    </table>
335
336    <h2><a href="#contents" name="bullet-lists" class="backref"
337        >Bullet Lists</a></h2>
338
339    <p>(<a href="../../ref/rst/restructuredtext.html#bullet-lists">details</a>)
340
341    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
342      <thead>
343    <tr align="left" bgcolor="#99CCFF">
344      <th width="50%">Plain text
345      <th width="50%">Typical result
346      </thead>
347      <tbody>
348    <tr valign="top">
349      <td>
350<samp>Bullet&nbsp;lists:</samp>
351
352<p><samp>-&nbsp;This&nbsp;is&nbsp;item&nbsp;1</samp>
353<br><samp>-&nbsp;This&nbsp;is&nbsp;item&nbsp;2</samp>
354
355<p><samp>-&nbsp;Bullets&nbsp;are&nbsp;"-",&nbsp;"*"&nbsp;or&nbsp;"+".</samp>
356<br><samp>&nbsp;&nbsp;Continuing&nbsp;text&nbsp;must&nbsp;be&nbsp;aligned</samp>
357<br><samp>&nbsp;&nbsp;after&nbsp;the&nbsp;bullet&nbsp;and&nbsp;whitespace.</samp>
358
359<p><samp>Note&nbsp;that&nbsp;a&nbsp;blank&nbsp;line&nbsp;is&nbsp;required</samp>
360<br><samp>before&nbsp;the&nbsp;first&nbsp;item&nbsp;and&nbsp;after&nbsp;the</samp>
361<br><samp>last,&nbsp;but&nbsp;is&nbsp;optional&nbsp;between&nbsp;items.</samp>
362      <td>Bullet lists:
363        <ul>
364          <li>This is item 1
365          <li>This is item 2
366          <li>Bullets are "-", "*" or "+".
367        Continuing text must be aligned
368        after the bullet and whitespace.
369        </ul>
370        <p>Note that a blank line is required before the first
371          item and after the last, but is optional between items.
372    </table>
373
374    <h2><a href="#contents" name="enumerated-lists" class="backref"
375        >Enumerated Lists</a></h2>
376
377    <p>(<a href="../../ref/rst/restructuredtext.html#enumerated-lists">details</a>)
378
379    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
380      <thead>
381    <tr align="left" bgcolor="#99CCFF">
382      <th width="50%">Plain text
383      <th width="50%">Typical result
384      </thead>
385      <tbody>
386    <tr valign="top">
387      <td>
388<samp>Enumerated&nbsp;lists:</samp>
389
390<p><samp>3.&nbsp;This&nbsp;is&nbsp;the&nbsp;first&nbsp;item</samp>
391<br><samp>4.&nbsp;This&nbsp;is&nbsp;the&nbsp;second&nbsp;item</samp>
392<br><samp>5.&nbsp;Enumerators&nbsp;are&nbsp;arabic&nbsp;numbers,</samp>
393<br><samp>&nbsp;&nbsp;&nbsp;single&nbsp;letters,&nbsp;or&nbsp;roman&nbsp;numerals</samp>
394<br><samp>6.&nbsp;List&nbsp;items&nbsp;should&nbsp;be&nbsp;sequentially</samp>
395<br><samp>&nbsp;&nbsp;&nbsp;numbered,&nbsp;but&nbsp;need&nbsp;not&nbsp;start&nbsp;at&nbsp;1</samp>
396<br><samp>&nbsp;&nbsp;&nbsp;(although&nbsp;not&nbsp;all&nbsp;formatters&nbsp;will</samp>
397<br><samp>&nbsp;&nbsp;&nbsp;honour&nbsp;the&nbsp;first&nbsp;index).</samp>
398<br><samp>#.&nbsp;This&nbsp;item&nbsp;is&nbsp;auto-enumerated</samp>
399      <td>Enumerated lists:
400        <ol type="1">
401          <li value="3">This is the first item
402          <li>This is the second item
403          <li>Enumerators are arabic numbers, single letters,
404        or roman numerals
405          <li>List items should be sequentially numbered,
406        but need not start at 1 (although not all
407        formatters will honour the first index).
408          <li>This item is auto-enumerated
409        </ol>
410    </table>
411
412    <h2><a href="#contents" name="definition-lists" class="backref"
413        >Definition Lists</a></h2>
414
415    <p>(<a href="../../ref/rst/restructuredtext.html#definition-lists">details</a>)
416
417    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
418      <thead>
419    <tr align="left" bgcolor="#99CCFF">
420      <th width="50%">Plain text
421      <th width="50%">Typical result
422      </thead>
423      <tbody>
424    <tr valign="top">
425      <td>
426<samp>Definition&nbsp;lists:</samp>
427<br>
428<br><samp>what</samp>
429<br><samp>&nbsp;&nbsp;Definition&nbsp;lists&nbsp;associate&nbsp;a&nbsp;term&nbsp;with</samp>
430<br><samp>&nbsp;&nbsp;a&nbsp;definition.</samp>
431<br>
432<br><samp>how</samp>
433<br><samp>&nbsp;&nbsp;The&nbsp;term&nbsp;is&nbsp;a&nbsp;one-line&nbsp;phrase,&nbsp;and&nbsp;the</samp>
434<br><samp>&nbsp;&nbsp;definition&nbsp;is&nbsp;one&nbsp;or&nbsp;more&nbsp;paragraphs&nbsp;or</samp>
435<br><samp>&nbsp;&nbsp;body&nbsp;elements,&nbsp;indented&nbsp;relative&nbsp;to&nbsp;the</samp>
436<br><samp>&nbsp;&nbsp;term.&nbsp;Blank&nbsp;lines&nbsp;are&nbsp;not&nbsp;allowed</samp>
437<br><samp>&nbsp;&nbsp;between&nbsp;term&nbsp;and&nbsp;definition.</samp>
438      <td>Definition lists:
439        <dl>
440          <dt><strong>what</strong>
441          <dd>Definition lists associate a term with
442        a definition.
443
444          <dt><strong>how</strong>
445          <dd>The term is a one-line phrase, and the
446        definition is one or more paragraphs or
447        body elements, indented relative to the
448        term.  Blank lines are not allowed
449        between term and definition.
450        </dl>
451    </table>
452
453    <h2><a href="#contents" name="field-lists" class="backref"
454        >Field Lists</a></h2>
455
456    <p>(<a href="../../ref/rst/restructuredtext.html#field-lists">details</a>)
457
458    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
459      <thead>
460    <tr align="left" bgcolor="#99CCFF">
461      <th width="50%">Plain text
462      <th width="50%">Typical result
463      </thead>
464      <tbody>
465    <tr valign="top">
466      <td>
467<samp>:Authors:</samp>
468<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;Tony&nbsp;J.&nbsp;(Tibs)&nbsp;Ibbs,</samp>
469<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;David&nbsp;Goodger</samp>
470
471<p><samp>&nbsp;&nbsp;&nbsp;&nbsp;(and&nbsp;sundry&nbsp;other&nbsp;good-natured&nbsp;folks)</samp>
472
473<p><samp>:Version:&nbsp;1.0&nbsp;of&nbsp;2001/08/08</samp>
474<br><samp>:Dedication:&nbsp;To&nbsp;my&nbsp;father.</samp>
475      <td>
476        <table>
477          <tr valign="top">
478        <td><strong>Authors:</strong>
479        <td>Tony J. (Tibs) Ibbs,
480          David Goodger
481          <tr><td><td>(and sundry other good-natured folks)
482          <tr><td><strong>Version:</strong><td>1.0 of 2001/08/08
483          <tr><td><strong>Dedication:</strong><td>To my father.
484        </table>
485    </table>
486
487    <p>Field lists are used as part of an extension syntax, such as
488    options for <a href="#directives">directives</a>, or database-like
489    records meant for further processing.  Field lists may also be
490    used as generic two-column table constructs in documents.
491
492    <h2><a href="#contents" name="option-lists" class="backref"
493        >Option Lists</a></h2>
494
495    <p>(<a href="../../ref/rst/restructuredtext.html#option-lists">details</a>)
496
497    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
498      <thead>
499      <tr align="left" bgcolor="#99CCFF">
500      <th width="50%">Plain text
501      <th width="50%">Typical result
502      </thead>
503      <tbody>
504    <tr valign="top">
505      <td>
506        <p><samp>
507-a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;command-line&nbsp;option&nbsp;"a"
508<br>-b&nbsp;file&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;options&nbsp;can&nbsp;have&nbsp;arguments
509<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and&nbsp;long&nbsp;descriptions
510<br>--long&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;options&nbsp;can&nbsp;be&nbsp;long&nbsp;also
511<br>--input=file&nbsp;&nbsp;long&nbsp;options&nbsp;can&nbsp;also&nbsp;have
512<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arguments
513<br>/V&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DOS/VMS-style&nbsp;options&nbsp;too
514</samp>
515
516      <td>
517        <table border="0" width="100%">
518          <tbody valign="top">
519            <tr>
520              <td width="30%"><samp>-a</samp>
521              <td>command-line option "a"
522            <tr>
523              <td><samp>-b <i>file</i></samp>
524              <td>options can have arguments and long descriptions
525            <tr>
526              <td><samp>--long</samp>
527              <td>options can be long also
528            <tr>
529              <td><samp>--input=<i>file</i></samp>
530              <td>long options can also have arguments
531            <tr>
532              <td><samp>/V</samp>
533              <td>DOS/VMS-style options too
534        </table>
535    </table>
536
537    <p>There must be at least two spaces between the option and the
538    description.
539
540    <h2><a href="#contents" name="literal-blocks" class="backref"
541        >Literal Blocks</a></h2>
542
543    <p>(<a href="../../ref/rst/restructuredtext.html#literal-blocks">details</a>)
544
545    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
546      <thead>
547    <tr align="left" bgcolor="#99CCFF">
548      <th width="50%">Plain text
549      <th width="50%">Typical result
550      </thead>
551      <tbody>
552    <tr valign="top">
553      <td>
554<samp>A&nbsp;paragraph&nbsp;containing&nbsp;only&nbsp;two&nbsp;colons</samp>
555<br><samp>indicates&nbsp;that&nbsp;the&nbsp;following&nbsp;indented</samp>
556<br><samp>or&nbsp;quoted&nbsp;text&nbsp;is&nbsp;a&nbsp;literal&nbsp;block.</samp>
557<br>
558<br><samp>::</samp>
559<br>
560<br><samp>&nbsp;&nbsp;Whitespace,&nbsp;newlines,&nbsp;blank&nbsp;lines,&nbsp;and</samp>
561<br><samp>&nbsp;&nbsp;all&nbsp;kinds&nbsp;of&nbsp;markup&nbsp;(like&nbsp;*this*&nbsp;or</samp>
562<br><samp>&nbsp;&nbsp;\this)&nbsp;is&nbsp;preserved&nbsp;by&nbsp;literal&nbsp;blocks.</samp>
563<br>
564<br><samp>&nbsp;&nbsp;The&nbsp;paragraph&nbsp;containing&nbsp;only&nbsp;'::'</samp>
565<br><samp>&nbsp;&nbsp;will&nbsp;be&nbsp;omitted&nbsp;from&nbsp;the&nbsp;result.</samp>
566<br>
567<br><samp>The&nbsp;``::``&nbsp;may&nbsp;be&nbsp;tacked&nbsp;onto&nbsp;the&nbsp;very</samp>
568<br><samp>end&nbsp;of&nbsp;any&nbsp;paragraph.&nbsp;The&nbsp;``::``&nbsp;will&nbsp;be</samp>
569<br><samp>omitted&nbsp;if&nbsp;it&nbsp;is&nbsp;preceded&nbsp;by&nbsp;whitespace.</samp>
570<br><samp>The&nbsp;``::``&nbsp;will&nbsp;be&nbsp;converted&nbsp;to&nbsp;a&nbsp;single</samp>
571<br><samp>colon&nbsp;if&nbsp;preceded&nbsp;by&nbsp;text,&nbsp;like&nbsp;this::</samp>
572<br>
573<br><samp>&nbsp;&nbsp;It's&nbsp;very&nbsp;convenient&nbsp;to&nbsp;use&nbsp;this&nbsp;form.</samp>
574<br>
575<br><samp>Literal&nbsp;blocks&nbsp;end&nbsp;when&nbsp;text&nbsp;returns&nbsp;to</samp>
576<br><samp>the&nbsp;preceding&nbsp;paragraph's&nbsp;indentation.</samp>
577<br><samp>This&nbsp;means&nbsp;that&nbsp;something&nbsp;like&nbsp;this</samp>
578<br><samp>is&nbsp;possible::</samp>
579<br>
580<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;We&nbsp;start&nbsp;here</samp>
581<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;and&nbsp;continue&nbsp;here</samp>
582<br><samp>&nbsp;&nbsp;and&nbsp;end&nbsp;here.</samp>
583<br>
584<br><samp>Per-line&nbsp;quoting&nbsp;can&nbsp;also&nbsp;be&nbsp;used&nbsp;on</samp>
585<br><samp>unindented&nbsp;literal&nbsp;blocks::</samp>
586<br>
587<br><samp>&gt;&nbsp;Useful&nbsp;for&nbsp;quotes&nbsp;from&nbsp;email&nbsp;and</samp>
588<br><samp>&gt;&nbsp;for&nbsp;Haskell&nbsp;literate&nbsp;programming.</samp>
589
590      <td>
591        <p>A paragraph containing only two colons
592indicates that the following indented or quoted
593text is a literal block.
594
595        <pre>
596  Whitespace, newlines, blank lines, and
597  all kinds of markup (like *this* or
598  \this) is preserved by literal blocks.
599
600  The paragraph containing only '::'
601  will be omitted from the result.</pre>
602
603        <p>The <samp>::</samp> may be tacked onto the very
604end of any paragraph. The <samp>::</samp> will be
605omitted if it is preceded by whitespace.
606The <samp>::</samp> will be converted to a single
607colon if preceded by text, like this:
608
609        <pre>
610  It's very convenient to use this form.</pre>
611
612        <p>Literal blocks end when text returns to
613the preceding paragraph's indentation.
614This means that something like this is possible:
615
616        <pre>
617      We start here
618    and continue here
619  and end here.</pre>
620
621        <p>Per-line quoting can also be used on
622unindented literal blocks:
623
624        <pre>
625  &gt; Useful for quotes from email and
626  &gt; for Haskell literate programming.</pre>
627    </table>
628
629    <h2><a href="#contents" name="line-blocks" class="backref"
630        >Line Blocks</a></h2>
631
632    <p>(<a href="../../ref/rst/restructuredtext.html#line-blocks">details</a>)
633
634    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
635      <thead>
636    <tr align="left" bgcolor="#99CCFF">
637      <th width="50%">Plain text
638      <th width="50%">Typical result
639      </thead>
640      <tbody>
641    <tr valign="top">
642      <td>
643<samp>|&nbsp;Line&nbsp;blocks&nbsp;are&nbsp;useful&nbsp;for&nbsp;addresses,</samp>
644<br><samp>|&nbsp;verse,&nbsp;and&nbsp;adornment-free&nbsp;lists.</samp>
645<br><samp>|</samp>
646<br><samp>|&nbsp;Each&nbsp;new&nbsp;line&nbsp;begins&nbsp;with&nbsp;a</samp>
647<br><samp>|&nbsp;vertical&nbsp;bar&nbsp;("|").</samp>
648<br><samp>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Line&nbsp;breaks&nbsp;and&nbsp;initial&nbsp;indents</samp>
649<br><samp>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;are&nbsp;preserved.</samp>
650<br><samp>|&nbsp;Continuation&nbsp;lines&nbsp;are&nbsp;wrapped</samp>
651<br><samp>&nbsp;&nbsp;portions&nbsp;of&nbsp;long&nbsp;lines;&nbsp;they&nbsp;begin</samp>
652<br><samp>&nbsp;&nbsp;with&nbsp;spaces&nbsp;in&nbsp;place&nbsp;of&nbsp;vertical&nbsp;bars.</samp>
653
654      <td>
655        <div class="line-block">
656          <div class="line">Line blocks are useful for addresses,</div>
657          <div class="line">verse, and adornment-free lists.</div>
658          <div class="line"><br /></div>
659          <div class="line">Each new line begins with a</div>
660          <div class="line">vertical bar ("|").</div>
661          <div class="line-block">
662            <div class="line">Line breaks and initial indents</div>
663            <div class="line">are preserved.</div>
664          </div>
665          <div class="line">Continuation lines are wrapped portions
666            of long lines; they begin
667            with spaces in place of vertical bars.</div>
668        </div>
669    </table>
670
671    <h2><a href="#contents" name="block-quotes" class="backref"
672        >Block Quotes</a></h2>
673
674    <p>(<a href="../../ref/rst/restructuredtext.html#block-quotes">details</a>)
675
676    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
677      <thead>
678      <tr align="left" bgcolor="#99CCFF">
679      <th width="50%">Plain text
680      <th width="50%">Typical result
681      </thead>
682      <tbody>
683    <tr valign="top">
684      <td>
685<samp>Block&nbsp;quotes&nbsp;are&nbsp;just:</samp>
686
687<p><samp>&nbsp;&nbsp;&nbsp;&nbsp;Indented&nbsp;paragraphs,</samp>
688
689<p><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and&nbsp;they&nbsp;may&nbsp;nest.</samp>
690      <td>
691        Block quotes are just:
692        <blockquote>
693          <p>Indented paragraphs,
694          <blockquote>
695        <p>and they may nest.
696          </blockquote>
697        </blockquote>
698    </table>
699
700    <p>Use <a href="#comments">empty comments</a> to separate indentation
701    contexts, such as block quotes and directive contents.</p>
702
703    <h2><a href="#contents" name="doctest-blocks" class="backref"
704        >Doctest Blocks</a></h2>
705
706    <p>(<a href="../../ref/rst/restructuredtext.html#doctest-blocks">details</a>)
707
708    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
709      <thead>
710      <tr align="left" bgcolor="#99CCFF">
711      <th width="50%">Plain text
712      <th width="50%">Typical result
713      </thead>
714      <tbody>
715    <tr valign="top">
716      <td>
717        <p><samp>Doctest&nbsp;blocks&nbsp;are&nbsp;interactive
718<br>Python&nbsp;sessions.&nbsp;They&nbsp;begin&nbsp;with
719<br>"``&gt;&gt;&gt;``"&nbsp;and&nbsp;end&nbsp;with&nbsp;a&nbsp;blank&nbsp;line.</samp>
720
721        <p><samp>&gt;&gt;&gt;&nbsp;print&nbsp;"This&nbsp;is&nbsp;a&nbsp;doctest&nbsp;block."
722<br>This&nbsp;is&nbsp;a&nbsp;doctest&nbsp;block.</samp>
723
724      <td>
725        <p>Doctest blocks are interactive
726        Python sessions. They begin with
727        "<samp>&gt;&gt;&gt;</samp>" and end with a blank line.
728
729        <p><samp>&gt;&gt;&gt;&nbsp;print&nbsp;"This&nbsp;is&nbsp;a&nbsp;doctest&nbsp;block."
730<br>This&nbsp;is&nbsp;a&nbsp;doctest&nbsp;block.</samp>
731    </table>
732
733    <p>"The <a
734    href="http://www.python.org/doc/current/lib/module-doctest.html">doctest</a>
735    module searches a module's docstrings for text that looks like an
736    interactive Python session, then executes all such sessions to
737    verify they still work exactly as shown." (From the doctest docs.)
738
739    <h2><a href="#contents" name="tables" class="backref"
740        >Tables</a></h2>
741
742    <p>(<a href="../../ref/rst/restructuredtext.html#tables">details</a>)
743
744    <p>There are two syntaxes for tables in reStructuredText.  Grid
745    tables are complete but cumbersome to create.  Simple tables are
746    easy to create but limited (no row spans, etc.).</p>
747
748    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
749      <thead>
750    <tr align="left" bgcolor="#99CCFF">
751      <th width="50%">Plain text
752      <th width="50%">Typical result
753      </thead>
754      <tbody>
755    <tr valign="top">
756      <td>
757<p><samp>Grid table:</samp></p>
758
759<p><samp>+------------+------------+-----------+</samp>
760<br><samp>|&nbsp;Header&nbsp;1&nbsp;&nbsp;&nbsp;|&nbsp;Header&nbsp;2&nbsp;&nbsp;&nbsp;|&nbsp;Header&nbsp;3&nbsp;&nbsp;|</samp>
761<br><samp>+============+============+===========+</samp>
762<br><samp>|&nbsp;body&nbsp;row&nbsp;1&nbsp;|&nbsp;column&nbsp;2&nbsp;&nbsp;&nbsp;|&nbsp;column&nbsp;3&nbsp;&nbsp;|</samp>
763<br><samp>+------------+------------+-----------+</samp>
764<br><samp>|&nbsp;body&nbsp;row&nbsp;2&nbsp;|&nbsp;Cells&nbsp;may&nbsp;span&nbsp;columns.|</samp>
765<br><samp>+------------+------------+-----------+</samp>
766<br><samp>|&nbsp;body&nbsp;row&nbsp;3&nbsp;|&nbsp;Cells&nbsp;may&nbsp;&nbsp;|&nbsp;-&nbsp;Cells&nbsp;&nbsp;&nbsp;|</samp>
767<br><samp>+------------+&nbsp;span&nbsp;rows.&nbsp;|&nbsp;-&nbsp;contain&nbsp;|</samp>
768<br><samp>|&nbsp;body&nbsp;row&nbsp;4&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;-&nbsp;blocks.&nbsp;|</samp>
769<br><samp>+------------+------------+-----------+</samp></p>
770      <td>
771        <p>Grid table:</p>
772        <table border="1">
773          <thead valign="bottom">
774            <tr>
775              <th>Header 1
776              <th>Header 2
777              <th>Header 3
778            </tr>
779          </thead>
780          <tbody valign="top">
781            <tr>
782              <td>body row 1
783              <td>column 2
784              <td>column 3
785            </tr>
786            <tr>
787              <td>body row 2
788              <td colspan="2">Cells may span columns.
789            </tr>
790            <tr>
791              <td>body row 3
792              <td rowspan="2">Cells may<br>span rows.
793              <td rowspan="2">
794                <ul>
795                  <li>Cells
796                  <li>contain
797                  <li>blocks.
798                </ul>
799            </tr>
800            <tr>
801              <td>body row 4
802            </tr>
803        </table>
804    <tr valign="top">
805      <td>
806<p><samp>Simple table:</samp></p>
807
808<p><samp>=====&nbsp;&nbsp;=====&nbsp;&nbsp;======</samp>
809<br><samp>&nbsp;&nbsp;&nbsp;Inputs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Output</samp>
810<br><samp>------------&nbsp;&nbsp;------</samp>
811<br><samp>&nbsp;&nbsp;A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B&nbsp;&nbsp;&nbsp;&nbsp;A&nbsp;or&nbsp;B</samp>
812<br><samp>=====&nbsp;&nbsp;=====&nbsp;&nbsp;======</samp>
813<br><samp>False&nbsp;&nbsp;False&nbsp;&nbsp;False</samp>
814<br><samp>True&nbsp;&nbsp;&nbsp;False&nbsp;&nbsp;True</samp>
815<br><samp>False&nbsp;&nbsp;True&nbsp;&nbsp;&nbsp;True</samp>
816<br><samp>True&nbsp;&nbsp;&nbsp;True&nbsp;&nbsp;&nbsp;True</samp>
817<br><samp>=====&nbsp;&nbsp;=====&nbsp;&nbsp;======</samp></p>
818
819      <td>
820        <p>Simple table:</p>
821        <table border="1">
822          <colgroup>
823            <col width="31%">
824            <col width="31%">
825            <col width="38%">
826          </colgroup>
827          <thead valign="bottom">
828            <tr>
829              <th colspan="2">Inputs
830              <th>Output
831            <tr>
832              <th>A
833              <th>B
834              <th>A or B
835          <tbody valign="top">
836            <tr>
837              <td>False
838              <td>False
839              <td>False
840            <tr>
841              <td>True
842              <td>False
843              <td>True
844            <tr>
845              <td>False
846              <td>True
847              <td>True
848            <tr>
849              <td>True
850              <td>True
851              <td>True
852        </table>
853
854    </table>
855
856    <h2><a href="#contents" name="transitions" class="backref"
857        >Transitions</a></h2>
858
859    <p>(<a href="../../ref/rst/restructuredtext.html#transitions">details</a>)
860
861    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
862      <thead>
863      <tr align="left" bgcolor="#99CCFF">
864      <th width="50%">Plain text
865      <th width="50%">Typical result
866      </thead>
867      <tbody>
868    <tr valign="top">
869      <td>
870        <p><samp>
871A&nbsp;transition&nbsp;marker&nbsp;is&nbsp;a&nbsp;horizontal&nbsp;line
872<br>of&nbsp;4&nbsp;or&nbsp;more&nbsp;repeated&nbsp;punctuation
873<br>characters.</samp>
874
875        <p><samp>------------</samp>
876
877        <p><samp>A&nbsp;transition&nbsp;should&nbsp;not&nbsp;begin&nbsp;or&nbsp;end&nbsp;a
878<br>section&nbsp;or&nbsp;document,&nbsp;nor&nbsp;should&nbsp;two
879<br>transitions&nbsp;be&nbsp;immediately&nbsp;adjacent.</samp>
880
881      <td>
882        <p>A transition marker is a horizontal line
883        of 4 or more repeated punctuation
884        characters.</p>
885
886        <hr>
887
888        <p>A transition should not begin or end a
889        section or document, nor should two
890        transitions be immediately adjacent.
891    </table>
892
893    <p>Transitions are commonly seen in novels and short fiction, as a
894    gap spanning one or more lines, marking text divisions or
895    signaling changes in subject, time, point of view, or emphasis.
896
897    <h2><a href="#contents" name="explicit-markup" class="backref"
898        >Explicit Markup</a></h2>
899
900    <p>Explicit markup blocks are used for constructs which float
901    (footnotes), have no direct paper-document representation
902    (hyperlink targets, comments), or require specialized processing
903    (directives).  They all begin with two periods and whitespace, the
904    "explicit markup start".
905
906    <h3><a href="#contents" name="footnotes" class="backref"
907        >Footnotes</a></h3>
908
909    <p>(<a href="../../ref/rst/restructuredtext.html#footnotes">details</a>)
910
911    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
912      <thead>
913    <tr align="left" bgcolor="#99CCFF">
914      <th width="50%">Plain text
915      <th width="50%">Typical result
916      </thead>
917      <tbody>
918
919    <tr valign="top">
920      <td>
921        <samp>Footnote&nbsp;references,&nbsp;like&nbsp;[5]_.</samp>
922        <br><samp>Note&nbsp;that&nbsp;footnotes&nbsp;may&nbsp;get</samp>
923        <br><samp>rearranged,&nbsp;e.g.,&nbsp;to&nbsp;the&nbsp;bottom&nbsp;of</samp>
924        <br><samp>the&nbsp;"page".</samp>
925
926        <p><samp>..&nbsp;[5]&nbsp;A&nbsp;numerical&nbsp;footnote.&nbsp;Note</samp>
927          <br><samp>&nbsp;&nbsp;&nbsp;there's&nbsp;no&nbsp;colon&nbsp;after&nbsp;the&nbsp;``]``.</samp>
928
929      <td>
930        Footnote references, like <sup><a href="#5">5</a></sup>.
931        Note that footnotes may get rearranged, e.g., to the bottom of
932        the "page".
933
934        <p><table>
935          <tr><td colspan="2"><hr>
936          <!-- <tr><td colspan="2">Footnotes: -->
937          <tr><td><a name="5"><strong>[5]</strong></a><td> A numerical footnote.
938          Note there's no colon after the <samp>]</samp>.
939          </table>
940
941    <tr valign="top">
942      <td>
943        <samp>Autonumbered&nbsp;footnotes&nbsp;are</samp>
944        <br><samp>possible,&nbsp;like&nbsp;using&nbsp;[#]_&nbsp;and&nbsp;[#]_.</samp>
945        <p><samp>..&nbsp;[#]&nbsp;This&nbsp;is&nbsp;the&nbsp;first&nbsp;one.</samp>
946          <br><samp>..&nbsp;[#]&nbsp;This&nbsp;is&nbsp;the&nbsp;second&nbsp;one.</samp>
947
948        <p><samp>They&nbsp;may&nbsp;be&nbsp;assigned&nbsp;'autonumber</samp>
949          <br><samp>labels'&nbsp;-&nbsp;for&nbsp;instance,
950        <br>[#fourth]_&nbsp;and&nbsp;[#third]_.</samp>
951
952        <p><samp>..&nbsp;[#third]&nbsp;a.k.a.&nbsp;third_</samp>
953        <p><samp>..&nbsp;[#fourth]&nbsp;a.k.a.&nbsp;fourth_</samp>
954      <td>
955        Autonumbered footnotes are possible, like using <sup><a
956        href="#auto1">1</a></sup> and <sup><a href="#auto2">2</a></sup>.
957
958        <p>They may be assigned 'autonumber labels' - for instance,
959          <sup><a href="#fourth">4</a></sup> and <sup><a
960          href="#third">3</a></sup>.
961
962        <p><table>
963          <tr><td colspan="2"><hr>
964          <!-- <tr><td colspan="2">Footnotes: -->
965          <tr><td><a name="auto1"><strong>[1]</strong></a><td> This is the first one.
966          <tr><td><a name="auto2"><strong>[2]</strong></a><td> This is the second one.
967          <tr><td><a name="third"><strong>[3]</strong></a><td> a.k.a. <a href="#third">third</a>
968          <tr><td><a name="fourth"><strong>[4]</strong></a><td> a.k.a. <a href="#fourth">fourth</a>
969        </table>
970
971    <tr valign="top">
972      <td>
973        <samp>Auto-symbol&nbsp;footnotes&nbsp;are&nbsp;also</samp>
974        <br><samp>possible,&nbsp;like&nbsp;this:&nbsp;[*]_&nbsp;and&nbsp;[*]_.</samp>
975        <p><samp>..&nbsp;[*]&nbsp;This&nbsp;is&nbsp;the&nbsp;first&nbsp;one.</samp>
976          <br><samp>..&nbsp;[*]&nbsp;This&nbsp;is&nbsp;the&nbsp;second&nbsp;one.</samp>
977
978      <td>
979        Auto-symbol footnotes are also
980        possible, like this: <sup><a href="#symbol1">*</a></sup>
981        and <sup><a href="#symbol2">&dagger;</a></sup>.
982
983        <p><table>
984          <tr><td colspan="2"><hr>
985          <!-- <tr><td colspan="2">Footnotes: -->
986          <tr><td><a name="symbol1"><strong>[*]</strong></a><td> This is the first symbol footnote
987          <tr><td><a name="symbol2"><strong>[&dagger;]</strong></a><td> This is the second one.
988        </table>
989
990    </table>
991
992    <p>The numbering of auto-numbered footnotes is determined by the
993    order of the footnotes, not of the references. For auto-numbered
994    footnote references without autonumber labels
995    ("<samp>[#]_</samp>"), the references and footnotes must be in the
996    same relative order. Similarly for auto-symbol footnotes
997    ("<samp>[*]_</samp>").
998
999    <h3><a href="#contents" name="citations" class="backref"
1000        >Citations</a></h3>
1001
1002    <p>(<a href="../../ref/rst/restructuredtext.html#citations">details</a>)
1003
1004    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
1005      <thead>
1006    <tr align="left" bgcolor="#99CCFF">
1007      <th width="50%">Plain text
1008      <th width="50%">Typical result
1009      </thead>
1010      <tbody>
1011
1012    <tr valign="top">
1013      <td>
1014        <samp>Citation&nbsp;references,&nbsp;like&nbsp;[CIT2002]_.</samp>
1015        <br><samp>Note&nbsp;that&nbsp;citations&nbsp;may&nbsp;get</samp>
1016        <br><samp>rearranged,&nbsp;e.g.,&nbsp;to&nbsp;the&nbsp;bottom&nbsp;of</samp>
1017        <br><samp>the&nbsp;"page".</samp>
1018
1019        <p><samp>..&nbsp;[CIT2002]&nbsp;A&nbsp;citation</samp>
1020          <br><samp>&nbsp;&nbsp;&nbsp;(as&nbsp;often&nbsp;used&nbsp;in&nbsp;journals).</samp>
1021
1022        <p><samp>Citation&nbsp;labels&nbsp;contain&nbsp;alphanumerics,</samp>
1023          <br><samp>underlines,&nbsp;hyphens&nbsp;and&nbsp;fullstops.</samp>
1024          <br><samp>Case&nbsp;is&nbsp;not&nbsp;significant.</samp>
1025
1026        <p><samp>Given&nbsp;a&nbsp;citation&nbsp;like&nbsp;[this]_,&nbsp;one</samp>
1027          <br><samp>can&nbsp;also&nbsp;refer&nbsp;to&nbsp;it&nbsp;like&nbsp;this_.</samp>
1028
1029        <p><samp>..&nbsp;[this]&nbsp;here.</samp>
1030
1031      <td>
1032        Citation references, like <a href="#cit2002">[CIT2002]</a>.
1033        Note that citations may get rearranged, e.g., to the bottom of
1034        the "page".
1035
1036        <p>Citation labels contain alphanumerics, underlines, hyphens
1037          and fullstops.  Case is not significant.
1038
1039        <p>Given a citation like <a href="#this">[this]</a>, one
1040          can also refer to it like <a href="#this">this</a>.
1041
1042        <p><table>
1043          <tr><td colspan="2"><hr>
1044          <!-- <tr><td colspan="2">Citations: -->
1045          <tr><td><a name="cit2002"><strong>[CIT2002]</strong></a><td> A citation
1046          (as often used in journals).
1047          <tr><td><a name="this"><strong>[this]</strong></a><td> here.
1048          </table>
1049
1050    </table>
1051
1052    <h3><a href="#contents" name="hyperlink-targets" class="backref"
1053        >Hyperlink Targets</a></h3>
1054
1055    <p>(<a href="../../ref/rst/restructuredtext.html#hyperlink-targets">details</a>)
1056
1057    <h4><a href="#contents" name="external-hyperlink-targets" class="backref"
1058        >External Hyperlink Targets</a></h4>
1059
1060    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
1061      <thead>
1062    <tr align="left" bgcolor="#99CCFF">
1063      <th width="50%">Plain text
1064      <th width="50%">Typical result
1065      </thead>
1066      <tbody>
1067
1068    <tr valign="top">
1069      <td rowspan="2">
1070        <samp>External&nbsp;hyperlinks,&nbsp;like&nbsp;Python_.</samp>
1071
1072        <p><samp>..&nbsp;_Python:&nbsp;http://www.python.org/</samp>
1073      <td>
1074        <table width="100%">
1075          <tr bgcolor="#99CCFF"><td><em>Fold-in form</em>
1076          <tr><td>External hyperlinks, like
1077          <a href="http://www.python.org/">Python</a>.
1078        </table>
1079    <tr valign="top">
1080      <td>
1081        <table width="100%">
1082          <tr bgcolor="#99CCFF"><td><em>Call-out form</em>
1083          <tr><td>External hyperlinks, like
1084          <a href="#labPython"><i>Python</i></a>.
1085
1086          <p><table>
1087            <tr><td colspan="2"><hr>
1088            <tr><td><a name="labPython"><i>Python:</i></a>
1089              <td> <a href="http://www.python.org/">http://www.python.org/</a>
1090          </table>
1091        </table>
1092    </table>
1093
1094    <p>"<em>Fold-in</em>" is the representation typically used in HTML
1095      documents (think of the indirect hyperlink being "folded in" like
1096      ingredients into a cake), and "<em>call-out</em>" is more suitable for
1097      printed documents, where the link needs to be presented explicitly, for
1098      example as a footnote.  You can force usage of the call-out form by
1099      using the
1100      "<a href="../../ref/rst/directives.html#target-notes">target-notes</a>"
1101      directive.
1102
1103    <p>reStructuredText also provides for <b>embedded URIs</b> (<a
1104      href="../../ref/rst/restructuredtext.html#embedded-uris-and-aliases">details</a>),
1105      a convenience at the expense of readability.  A hyperlink
1106      reference may directly embed a target URI inline, within angle
1107      brackets.  The following is exactly equivalent to the example above:
1108
1109    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
1110      <thead>
1111    <tr align="left" bgcolor="#99CCFF">
1112      <th width="50%">Plain text
1113      <th width="50%">Typical result
1114      </thead>
1115      <tbody>
1116
1117    <tr valign="top">
1118      <td rowspan="2">
1119        <samp>External&nbsp;hyperlinks,&nbsp;like&nbsp;`Python
1120<br>&lt;http://www.python.org/&gt;`_.</samp>
1121      <td>External hyperlinks, like
1122          <a href="http://www.python.org/">Python</a>.
1123    </table>
1124
1125    <h4><a href="#contents" name="internal-hyperlink-targets" class="backref"
1126        >Internal Hyperlink Targets</a></h4>
1127
1128    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
1129      <thead>
1130    <tr align="left" bgcolor="#99CCFF">
1131      <th width="50%">Plain text
1132      <th width="50%">Typical result
1133      </thead>
1134      <tbody>
1135
1136    <tr valign="top">
1137      <td rowspan="2"><samp>Internal&nbsp;crossreferences,&nbsp;like&nbsp;example_.</samp>
1138
1139        <p><samp>..&nbsp;_example:</samp>
1140
1141        <p><samp>This&nbsp;is&nbsp;an&nbsp;example&nbsp;crossreference&nbsp;target.</samp>
1142      <td>
1143        <table width="100%">
1144          <tr bgcolor="#99CCFF"><td><em>Fold-in form</em>
1145          <!-- Note that some browsers may not like an "a" tag that -->
1146          <!-- does not have any content, so we could arbitrarily   -->
1147          <!-- use the first word as content - *or* just trust to   -->
1148          <!-- luck!                                                -->
1149          <tr><td>Internal crossreferences, like <a href="#example-foldin">example</a>
1150          <p><a name="example-foldin">This</a> is an example
1151            crossreference target.
1152        </table>
1153    <tr valign="top">
1154      <td>
1155        <table width="100%">
1156          <tr><td bgcolor="#99CCFF"><em>Call-out form</em>
1157          <tr><td>Internal crossreferences, like <a href="#example-callout">example</a>
1158
1159          <p><a name="example-callout"><i>example:</i></a>
1160            <br>This is an example crossreference target.
1161        </table>
1162
1163    </table>
1164
1165    <h4><a href="#contents" name="indirect-hyperlink-targets" class="backref"
1166        >Indirect Hyperlink Targets</a></h4>
1167
1168    <p>(<a href="../../ref/rst/restructuredtext.html#indirect-hyperlink-targets">details</a>)
1169
1170    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
1171      <thead>
1172    <tr align="left" bgcolor="#99CCFF">
1173      <th width="50%">Plain text
1174      <th width="50%">Typical result
1175      </thead>
1176      <tbody>
1177
1178    <tr valign="top">
1179      <td>
1180        <samp>Python_&nbsp;is&nbsp;`my&nbsp;favourite
1181<br>programming&nbsp;language`__.</samp>
1182
1183        <p><samp>..&nbsp;_Python:&nbsp;http://www.python.org/</samp>
1184
1185        <p><samp>__&nbsp;Python_</samp>
1186
1187      <td>
1188        <p><a href="http://www.python.org/">Python</a> is
1189        <a href="http://www.python.org/">my favourite
1190        programming language</a>.
1191
1192    </table>
1193
1194    <p>The second hyperlink target (the line beginning with
1195    "<samp>__</samp>") is both an indirect hyperlink target
1196    (<i>indirectly</i> pointing at the Python website via the
1197    "<samp>Python_</samp>" reference) and an <b>anonymous hyperlink
1198    target</b>. In the text, a double-underscore suffix is used to
1199    indicate an <b>anonymous hyperlink reference</b>.  In an anonymous
1200    hyperlink target, the reference text is not repeated.  This is
1201    useful for references with long text or throw-away references, but
1202    the target should be kept close to the reference to prevent them
1203    going out of sync.
1204
1205    <h4><a href="#contents" name="implicit-hyperlink-targets" class="backref"
1206        >Implicit Hyperlink Targets</a></h4>
1207
1208    <p>(<a href="../../ref/rst/restructuredtext.html#implicit-hyperlink-targets">details</a>)
1209
1210    <p>Section titles, footnotes, and citations automatically generate
1211    hyperlink targets (the title text or footnote/citation label is
1212    used as the hyperlink name).
1213
1214    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
1215       <thead><tr align="left" bgcolor="#99CCFF">
1216      <th width="50%">Plain text
1217      <th width="50%">Typical result
1218      </thead>
1219      <tbody>
1220
1221    <tr valign="top">
1222      <td>
1223        <samp>Titles&nbsp;are&nbsp;targets,&nbsp;too</samp>
1224        <br><samp>=======================</samp>
1225        <br><samp>Implict&nbsp;references,&nbsp;like&nbsp;`Titles&nbsp;are</samp>
1226        <br><samp>targets,&nbsp;too`_.</samp>
1227      <td>
1228        <font size="+2"><strong><a name="title">Titles are targets, too</a></strong></font>
1229        <p>Implict references, like <a href="#title">Titles are
1230        targets, too</a>.
1231    </table>
1232
1233    <h3><a href="#contents" name="directives" class="backref"
1234        >Directives</a></h3>
1235
1236    <p>(<a href="../../ref/rst/restructuredtext.html#directives">details</a>)
1237
1238    <p>Directives are a general-purpose extension mechanism, a way of
1239    adding support for new constructs without adding new syntax.  For
1240    a description of all standard directives, see <a
1241    href="../../ref/rst/directives.html" >reStructuredText
1242    Directives</a>.
1243
1244    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
1245      <thead>
1246    <tr align="left" bgcolor="#99CCFF">
1247      <th width="50%">Plain text
1248      <th width="50%">Typical result
1249      </thead>
1250      <tbody>
1251    <tr valign="top">
1252      <td><samp>For&nbsp;instance:</samp>
1253
1254        <p><samp>..&nbsp;image::&nbsp;images/ball1.gif</samp>
1255
1256      <td>
1257        For instance:
1258        <p><img src="images/ball1.gif" alt="ball1">
1259    </table>
1260
1261    <h3><a href="#contents" name="substitution-references-and-definitions"
1262        class="backref" >Substitution References and Definitions</a></h3>
1263
1264    <p>(<a href="../../ref/rst/restructuredtext.html#substitution-definitions">details</a>)
1265
1266    <p>Substitutions are like inline directives, allowing graphics and
1267    arbitrary constructs within text.
1268
1269    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
1270      <thead>
1271    <tr align="left" bgcolor="#99CCFF">
1272      <th width="50%">Plain text
1273      <th width="50%">Typical result
1274      </thead>
1275      <tbody>
1276    <tr valign="top">
1277      <td><samp>
1278The&nbsp;|biohazard|&nbsp;symbol&nbsp;must&nbsp;be
1279used&nbsp;on&nbsp;containers&nbsp;used&nbsp;to
1280dispose&nbsp;of&nbsp;medical&nbsp;waste.</samp>
1281
1282        <p><samp>
1283..&nbsp;|biohazard|&nbsp;image::&nbsp;biohazard.png</samp>
1284
1285      <td>
1286
1287        <p>The <img src="images/biohazard.png" align="bottom" alt="biohazard"> symbol
1288        must be used on containers used to dispose of medical waste.
1289
1290    </table>
1291
1292    <h3><a href="#contents" name="comments" class="backref"
1293        >Comments</a></h3>
1294
1295    <p>(<a href="../../ref/rst/restructuredtext.html#comments">details</a>)
1296
1297    <p>Any text which begins with an explicit markup start but doesn't
1298    use the syntax of any of the constructs above, is a comment.
1299
1300    <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3">
1301      <thead>
1302    <tr align="left" bgcolor="#99CCFF">
1303      <th width="50%">Plain text
1304      <th width="50%">Typical result
1305      </thead>
1306      <tbody>
1307    <tr valign="top">
1308      <td><samp>..&nbsp;This&nbsp;text&nbsp;will&nbsp;not&nbsp;be&nbsp;shown</samp>
1309        <br><samp>&nbsp;&nbsp;&nbsp;(but,&nbsp;for&nbsp;instance,&nbsp;in&nbsp;HTML&nbsp;might&nbsp;be</samp>
1310        <br><samp>&nbsp;&nbsp;&nbsp;rendered&nbsp;as&nbsp;an&nbsp;HTML&nbsp;comment)</samp>
1311
1312      <td>&nbsp;
1313          <!-- This text will not be shown         -->
1314          <!-- (but, for instance in HTML might be -->
1315          <!-- rendered as an HTML comment)        -->
1316
1317    <tr valign="top">
1318      <td>
1319        <samp>An&nbsp;"empty&nbsp;comment"&nbsp;does&nbsp;not</samp>
1320        <br><samp>consume&nbsp;following&nbsp;blocks.</samp>
1321        <br><samp>(An&nbsp;empty&nbsp;comment&nbsp;is&nbsp;".."&nbsp;with</samp>
1322        <br><samp>blank&nbsp;lines&nbsp;before&nbsp;and&nbsp;after.)</samp>
1323        <p><samp>..</samp>
1324        <p><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;So&nbsp;this&nbsp;block&nbsp;is&nbsp;not&nbsp;"lost",</samp>
1325          <br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;despite&nbsp;its&nbsp;indentation.</samp>
1326      <td>
1327        An "empty comment" does not
1328        consume following blocks.
1329        (An empty comment is ".." with
1330        blank lines before and after.)
1331        <blockquote>
1332          So this block is not "lost",
1333          despite its indentation.
1334        </blockquote>
1335    </table>
1336
1337    <h2><a href="#contents" name="getting-help" class="backref"
1338        >Getting Help</a></h2>
1339
1340    <p>Users who have questions or need assistance with Docutils or
1341    reStructuredText should <a
1342    href="mailto:docutils-users@lists.sourceforge.net" >post a
1343    message</a> to the <a
1344    href="http://lists.sourceforge.net/lists/listinfo/docutils-users"
1345    >Docutils-Users mailing list</a>.  The <a
1346    href="http://docutils.sourceforge.net/" >Docutils project web
1347    site</a> has more information.
1348
1349    <p><hr>
1350    <address>
1351      <p>Authors:
1352    <a href="http://www.tibsnjoan.co.uk/">Tibs</a>
1353    (<a href="mailto:tibs@tibsnjoan.co.uk"><tt>tibs@tibsnjoan.co.uk</tt></a>)
1354    and David Goodger
1355    (<a href="mailto:goodger@python.org">goodger@python.org</a>)
1356    </address>
1357    <!-- Created: Fri Aug 03 09:11:57 GMT Daylight Time 2001 -->
1358  </body>
1359</html>
1360