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

quickref.rst 56KB

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