A new Riff-radio.org site with a static approach.

quickref.html 51KB

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