~ubuntu-branches/ubuntu/hardy/python-docutils/hardy

« back to all changes in this revision

Viewing changes to docs/rst/quickref.html

  • Committer: Bazaar Package Importer
  • Author(s): martin f. krafft
  • Date: 2006-07-10 11:45:05 UTC
  • mfrom: (2.1.4 edgy)
  • Revision ID: james.westby@ubuntu.com-20060710114505-otkhqcslevewxmz5
Tags: 0.4-3
Added build dependency on python-central (closes: #377580).

Show diffs side-by-side

added added

removed removed

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