reST.html 111 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753
  1. <!DOCTYPE html>
  2. <html lang="en" data-content_root="../">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>reST primer &#8212; SearXNG Documentation (2025.4.30+fd33559cf)</title>
  8. <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=6625fa76" />
  9. <link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
  10. <script src="../_static/documentation_options.js?v=b12b0e12"></script>
  11. <script src="../_static/doctools.js?v=9a2dae69"></script>
  12. <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
  13. <script data-project="searxng" data-version="2025.4.30+fd33559cf" src="../_static/describe_version.js?v=fa7f30d0"></script>
  14. <link rel="index" title="Index" href="../genindex.html" />
  15. <link rel="search" title="Search" href="../search.html" />
  16. <link rel="next" title="Tooling box searxng_extra" href="searxng_extra/index.html" />
  17. <link rel="prev" title="Makefile &amp; ./manage" href="makefile.html" />
  18. </head><body>
  19. <div class="related" role="navigation" aria-label="Related">
  20. <h3>Navigation</h3>
  21. <ul>
  22. <li class="right" style="margin-right: 10px">
  23. <a href="../genindex.html" title="General Index"
  24. accesskey="I">index</a></li>
  25. <li class="right" >
  26. <a href="../py-modindex.html" title="Python Module Index"
  27. >modules</a> |</li>
  28. <li class="right" >
  29. <a href="searxng_extra/index.html" title="Tooling box searxng_extra"
  30. accesskey="N">next</a> |</li>
  31. <li class="right" >
  32. <a href="makefile.html" title="Makefile &amp; ./manage"
  33. accesskey="P">previous</a> |</li>
  34. <li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2025.4.30+fd33559cf)</a> &#187;</li>
  35. <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
  36. <li class="nav-item nav-item-this"><a href="">reST primer</a></li>
  37. </ul>
  38. </div>
  39. <div class="document">
  40. <div class="documentwrapper">
  41. <div class="bodywrapper">
  42. <div class="body" role="main">
  43. <section id="rest-primer">
  44. <span id="id1"></span><h1>reST primer<a class="headerlink" href="#rest-primer" title="Link to this heading">¶</a></h1>
  45. <aside class="sidebar">
  46. <p class="sidebar-title"><a class="reference external" href="https://en.wikipedia.org/wiki/KISS_principle">KISS</a> and <a class="reference external" href="https://docs.python-guide.org/writing/style/">readability</a></p>
  47. <p>Instead of defining more and more roles, we at SearXNG encourage our
  48. contributors to follow principles like <a class="reference external" href="https://en.wikipedia.org/wiki/KISS_principle">KISS</a> and <a class="reference external" href="https://docs.python-guide.org/writing/style/">readability</a>.</p>
  49. </aside>
  50. <p>We at SearXNG are using reStructuredText (aka <a class="reference external" href="https://docutils.sourceforge.io/rst.html">reST</a>) markup for all kind of
  51. documentation. With the builders from the <a class="reference external" href="https://www.sphinx-doc.org">Sphinx</a> project a HTML output is
  52. generated and deployed at <a class="reference external" href="https://docs.searxng.org/">docs.searxng.org</a>. For build prerequisites read
  53. <a class="reference internal" href="../admin/buildhosts.html#docs-build"><span class="std std-ref">Build docs</span></a>.</p>
  54. <p>The source files of SearXNG’s documentation are located at <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/docs">git://docs</a>.
  55. Sphinx assumes source files to be encoded in UTF-8 by default. Run <a class="reference internal" href="contribution_guide.html#make-docs-live"><span class="std std-ref">make
  56. docs.live</span></a> to build HTML while editing.</p>
  57. <aside class="sidebar">
  58. <p class="sidebar-title">Further reading</p>
  59. <ul class="simple">
  60. <li><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html">Sphinx-Primer</a></p></li>
  61. <li><p><a class="reference external" href="https://www.sphinx-doc.org/en/stable/markup/index.html">Sphinx markup constructs</a></p></li>
  62. <li><p><a class="reference external" href="https://docutils.sourceforge.io/rst.html">reST</a>, <a class="reference external" href="http://docutils.sourceforge.net/docs/index.html">docutils</a>, <a class="reference external" href="http://docutils.sourceforge.net/FAQ.html">docutils FAQ</a></p></li>
  63. <li><p><a class="reference external" href="https://www.sphinx-doc.org">Sphinx</a>, <a class="reference external" href="https://www.sphinx-doc.org/en/stable/faq.html">sphinx-doc FAQ</a></p></li>
  64. <li><p><a class="reference external" href="https://www.sphinx-doc.org/en/stable/config.html">sphinx config</a>, <a class="reference external" href="https://www.sphinx-doc.org/en/master/extdev/tutorial.html?highlight=doctree#build-phases">doctree</a></p></li>
  65. <li><p><a class="reference external" href="https://www.sphinx-doc.org/en/stable/markup/inline.html#cross-referencing-arbitrary-locations">sphinx cross references</a></p></li>
  66. <li><p><a class="reference external" href="https://return42.github.io/linuxdoc">linuxdoc</a></p></li>
  67. <li><p><a class="reference external" href="https://www.sphinx-doc.org/en/stable/ext/intersphinx.html">intersphinx</a></p></li>
  68. <li><p><a class="reference external" href="https://github.com/tardyp/sphinx-jinja">sphinx-jinja</a></p></li>
  69. <li><p><a class="reference external" href="https://www.sphinx-doc.org/en/stable/ext/autodoc.html">Sphinx’s autodoc</a></p></li>
  70. <li><p><a class="reference external" href="https://www.sphinx-doc.org/en/stable/domains.html#the-python-domain">Sphinx’s Python domain</a>, <a class="reference external" href="https://www.sphinx-doc.org/en/stable/domains.html#cross-referencing-c-constructs">Sphinx’s C domain</a></p></li>
  71. <li><p><a class="reference external" href="https://www.w3.org/TR/SVG11/expanded-toc.html">SVG</a>, <a class="reference external" href="https://www.imagemagick.org">ImageMagick</a></p></li>
  72. <li><p><a class="reference external" href="https://graphviz.gitlab.io/_pages/doc/info/lang.html">DOT</a>, <a class="reference external" href="https://graphviz.gitlab.io/_pages/pdf/dotguide.pdf">Graphviz’s dot</a>, <a class="reference external" href="https://graphviz.gitlab.io">Graphviz</a></p></li>
  73. </ul>
  74. </aside>
  75. <nav class="contents local" id="contents">
  76. <ul class="simple">
  77. <li><p><a class="reference internal" href="#soft-skills" id="id15">Soft skills</a></p></li>
  78. <li><p><a class="reference internal" href="#basic-inline-markup" id="id16">Basic inline markup</a></p></li>
  79. <li><p><a class="reference internal" href="#basic-article-structure" id="id17">Basic article structure</a></p>
  80. <ul>
  81. <li><p><a class="reference internal" href="#rest-template" id="id18">reST template</a></p></li>
  82. <li><p><a class="reference internal" href="#headings" id="id19">Headings</a></p></li>
  83. </ul>
  84. </li>
  85. <li><p><a class="reference internal" href="#anchors-links" id="id20">Anchors &amp; Links</a></p>
  86. <ul>
  87. <li><p><a class="reference internal" href="#anchors" id="id21">Anchors</a></p></li>
  88. <li><p><a class="reference internal" href="#link-ordinary-url" id="id22">Link ordinary URL</a></p></li>
  89. <li><p><a class="reference internal" href="#smart-refs" id="id23">Smart refs</a></p></li>
  90. </ul>
  91. </li>
  92. <li><p><a class="reference internal" href="#literal-blocks" id="id24">Literal blocks</a></p>
  93. <ul>
  94. <li><p><a class="reference internal" href="#rest-literal" id="id25"><code class="docutils literal notranslate"><span class="pre">::</span></code></a></p></li>
  95. <li><p><a class="reference internal" href="#code-block" id="id26"><code class="docutils literal notranslate"><span class="pre">code-block</span></code></a></p></li>
  96. </ul>
  97. </li>
  98. <li><p><a class="reference internal" href="#unicode-substitution" id="id27">Unicode substitution</a></p></li>
  99. <li><p><a class="reference internal" href="#roles" id="id28">Roles</a></p></li>
  100. <li><p><a class="reference internal" href="#figures-images" id="id29">Figures &amp; Images</a></p>
  101. <ul>
  102. <li><p><a class="reference internal" href="#dot-files-aka-graphviz" id="id30">DOT files (aka Graphviz)</a></p></li>
  103. <li><p><a class="reference internal" href="#kernel-render-dot" id="id31"><code class="docutils literal notranslate"><span class="pre">kernel-render</span></code> DOT</a></p></li>
  104. <li><p><a class="reference internal" href="#kernel-render-svg" id="id32"><code class="docutils literal notranslate"><span class="pre">kernel-render</span></code> SVG</a></p></li>
  105. </ul>
  106. </li>
  107. <li><p><a class="reference internal" href="#list-markups" id="id33">List markups</a></p>
  108. <ul>
  109. <li><p><a class="reference internal" href="#bullet-list" id="id34">Bullet list</a></p></li>
  110. <li><p><a class="reference internal" href="#horizontal-list" id="id35">Horizontal list</a></p></li>
  111. <li><p><a class="reference internal" href="#definition-list" id="id36">Definition list</a></p></li>
  112. <li><p><a class="reference internal" href="#quoted-paragraphs" id="id37">Quoted paragraphs</a></p></li>
  113. <li><p><a class="reference internal" href="#field-lists" id="id38">Field Lists</a></p></li>
  114. <li><p><a class="reference internal" href="#further-list-blocks" id="id39">Further list blocks</a></p></li>
  115. </ul>
  116. </li>
  117. <li><p><a class="reference internal" href="#admonitions" id="id40">Admonitions</a></p>
  118. <ul>
  119. <li><p><a class="reference internal" href="#sidebar" id="id41">Sidebar</a></p></li>
  120. <li><p><a class="reference internal" href="#generic-admonition" id="id42">Generic admonition</a></p></li>
  121. <li><p><a class="reference internal" href="#specific-admonitions" id="id43">Specific admonitions</a></p></li>
  122. </ul>
  123. </li>
  124. <li><p><a class="reference internal" href="#tables" id="id44">Tables</a></p>
  125. <ul>
  126. <li><p><a class="reference internal" href="#simple-tables" id="id45">Simple tables</a></p></li>
  127. <li><p><a class="reference internal" href="#grid-tables" id="id46">Grid tables</a></p></li>
  128. <li><p><a class="reference internal" href="#flat-table" id="id47">flat-table</a></p></li>
  129. <li><p><a class="reference internal" href="#csv-table" id="id48">CSV table</a></p></li>
  130. </ul>
  131. </li>
  132. <li><p><a class="reference internal" href="#templating" id="id49">Templating</a></p></li>
  133. <li><p><a class="reference internal" href="#tabbed-views" id="id50">Tabbed views</a></p></li>
  134. <li><p><a class="reference internal" href="#math-equations" id="id51">Math equations</a></p></li>
  135. </ul>
  136. </nav>
  137. <p><a class="reference external" href="https://www.sphinx-doc.org">Sphinx</a> and <a class="reference external" href="https://docutils.sourceforge.io/rst.html">reST</a> have their place in the python ecosystem. Over that reST is
  138. used in popular projects, e.g the Linux kernel documentation <a class="reference external" href="https://www.kernel.org/doc/html/latest/doc-guide/sphinx.html">[kernel doc]</a>.</p>
  139. <aside class="sidebar">
  140. <p class="sidebar-title">Content matters</p>
  141. <p>The <a class="reference external" href="https://docs.python-guide.org/writing/style/">readability</a> of the reST sources has its value, therefore we recommend to
  142. make sparse usage of reST markup / .. content matters!</p>
  143. </aside>
  144. <p><strong>reST</strong> is a plaintext markup language, its markup is <em>mostly</em> intuitive and
  145. you will not need to learn much to produce well formed articles with. I use the
  146. word <em>mostly</em>: like everything in live, reST has its advantages and
  147. disadvantages, some markups feel a bit grumpy (especially if you are used to
  148. other plaintext markups).</p>
  149. <section id="soft-skills">
  150. <h2><a class="toc-backref" href="#id15" role="doc-backlink">Soft skills</a><a class="headerlink" href="#soft-skills" title="Link to this heading">¶</a></h2>
  151. <p>Before going any deeper into the markup let’s face on some <strong>soft skills</strong> a
  152. trained author brings with, to reach a well feedback from readers:</p>
  153. <ul class="simple">
  154. <li><p>Documentation is dedicated to an audience and answers questions from the
  155. audience point of view.</p></li>
  156. <li><p>Don’t detail things which are general knowledge from the audience point of
  157. view.</p></li>
  158. <li><p>Limit the subject, use cross links for any further reading.</p></li>
  159. </ul>
  160. <p>To be more concrete what a <em>point of view</em> means. In the (<a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/docs">git://docs</a>)
  161. folder we have three sections (and the <em>blog</em> folder), each dedicate to a
  162. different group of audience.</p>
  163. <dl class="simple">
  164. <dt>User’s POV: <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/docs/user">git://docs/user</a></dt><dd><p>A typical user knows about search engines and might have heard about
  165. meta crawlers and privacy.</p>
  166. </dd>
  167. <dt>Admin’s POV: <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/docs/admin">git://docs/admin</a></dt><dd><p>A typical Admin knows about setting up services on a linux system, but he does
  168. not know all the pros and cons of a SearXNG setup.</p>
  169. </dd>
  170. <dt>Developer’s POV: <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/docs/dev">git://docs/dev</a></dt><dd><p>Depending on the <a class="reference external" href="https://docs.python-guide.org/writing/style/">readability</a> of code, a typical developer is able to read and
  171. understand source code. Describe what a item aims to do (e.g. a function).
  172. If the chronological order matters, describe it. Name the <em>out-of-limits
  173. conditions</em> and all the side effects a external developer will not know.</p>
  174. </dd>
  175. </dl>
  176. </section>
  177. <section id="basic-inline-markup">
  178. <span id="rest-inline-markup"></span><h2><a class="toc-backref" href="#id16" role="doc-backlink">Basic inline markup</a><a class="headerlink" href="#basic-inline-markup" title="Link to this heading">¶</a></h2>
  179. <aside class="sidebar">
  180. <p class="sidebar-title">Inline markup</p>
  181. <ul class="simple">
  182. <li><p><a class="reference internal" href="#rest-roles"><span class="std std-ref">Roles</span></a></p></li>
  183. <li><p><a class="reference internal" href="#rest-smart-ref"><span class="std std-ref">Smart refs</span></a></p></li>
  184. </ul>
  185. </aside>
  186. <p>Basic inline markup is done with asterisks and backquotes. If asterisks or
  187. backquotes appear in running text and could be confused with inline markup
  188. delimiters, they have to be escaped with a backslash (<code class="docutils literal notranslate"><span class="pre">\*pointer</span></code>).</p>
  189. <table class="docutils align-default" id="id4">
  190. <caption><span class="caption-number">Table 9 </span><span class="caption-text">basic inline markup</span><a class="headerlink" href="#id4" title="Link to this table">¶</a></caption>
  191. <colgroup>
  192. <col style="width: 28.6%" />
  193. <col style="width: 21.4%" />
  194. <col style="width: 50.0%" />
  195. </colgroup>
  196. <thead>
  197. <tr class="row-odd"><th class="head"><p>description</p></th>
  198. <th class="head"><p>rendered</p></th>
  199. <th class="head"><p>markup</p></th>
  200. </tr>
  201. </thead>
  202. <tbody>
  203. <tr class="row-even"><td><p>one asterisk for emphasis</p></td>
  204. <td><p><em>italics</em></p></td>
  205. <td><p><code class="docutils literal notranslate"><span class="pre">*italics*</span></code></p></td>
  206. </tr>
  207. <tr class="row-odd"><td><p>two asterisks for strong emphasis</p></td>
  208. <td><p><strong>boldface</strong></p></td>
  209. <td><p><code class="docutils literal notranslate"><span class="pre">**boldface**</span></code></p></td>
  210. </tr>
  211. <tr class="row-even"><td><p>backquotes for code samples and literals</p></td>
  212. <td><p><code class="docutils literal notranslate"><span class="pre">foo()</span></code></p></td>
  213. <td><p><code class="docutils literal notranslate"><span class="pre">``foo()``</span></code></p></td>
  214. </tr>
  215. <tr class="row-odd"><td><p>quote asterisks or backquotes</p></td>
  216. <td><p>*foo is a pointer</p></td>
  217. <td><p><code class="docutils literal notranslate"><span class="pre">\*foo</span> <span class="pre">is</span> <span class="pre">a</span> <span class="pre">pointer</span></code></p></td>
  218. </tr>
  219. </tbody>
  220. </table>
  221. </section>
  222. <section id="basic-article-structure">
  223. <span id="rest-basic-structure"></span><h2><a class="toc-backref" href="#id17" role="doc-backlink">Basic article structure</a><a class="headerlink" href="#basic-article-structure" title="Link to this heading">¶</a></h2>
  224. <p>The basic structure of an article makes use of heading adornments to markup
  225. chapter, sections and subsections.</p>
  226. <section id="rest-template">
  227. <span id="id2"></span><h3><a class="toc-backref" href="#id18" role="doc-backlink">reST template</a><a class="headerlink" href="#rest-template" title="Link to this heading">¶</a></h3>
  228. <p>reST template for an simple article:</p>
  229. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">_doc refname:</span>
  230. <span class="gh">==============</span>
  231. <span class="gh">Document title</span>
  232. <span class="gh">==============</span>
  233. Lorem ipsum dolor sit amet, consectetur adipisici elit .. Further read
  234. <span class="na">:ref:</span><span class="nv">`chapter refname`</span>.
  235. <span class="p">..</span> <span class="nt">_chapter refname:</span>
  236. <span class="gh">Chapter</span>
  237. <span class="gh">=======</span>
  238. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
  239. aliquid ex ea commodi consequat ...
  240. <span class="p">..</span> <span class="nt">_section refname:</span>
  241. <span class="gh">Section</span>
  242. <span class="gh">-------</span>
  243. lorem ..
  244. <span class="p">..</span> <span class="nt">_subsection refname:</span>
  245. <span class="gh">Subsection</span>
  246. <span class="gh">~~~~~~~~~~</span>
  247. lorem ..
  248. </pre></div>
  249. </div>
  250. </section>
  251. <section id="headings">
  252. <h3><a class="toc-backref" href="#id19" role="doc-backlink">Headings</a><a class="headerlink" href="#headings" title="Link to this heading">¶</a></h3>
  253. <ol class="arabic simple">
  254. <li><p>title - with overline for document title:</p></li>
  255. </ol>
  256. <blockquote>
  257. <div><div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="gh">==============</span>
  258. <span class="gh">Document title</span>
  259. <span class="gh">==============</span>
  260. </pre></div>
  261. </div>
  262. </div></blockquote>
  263. <ol class="arabic">
  264. <li><p>chapter - with anchor named <code class="docutils literal notranslate"><span class="pre">anchor</span> <span class="pre">name</span></code>:</p>
  265. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">_anchor name:</span>
  266. <span class="gh">Chapter</span>
  267. <span class="gh">=======</span>
  268. </pre></div>
  269. </div>
  270. </li>
  271. <li><p>section</p>
  272. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="gh">Section</span>
  273. <span class="gh">-------</span>
  274. </pre></div>
  275. </div>
  276. </li>
  277. <li><p>subsection</p>
  278. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="gh">Subsection</span>
  279. <span class="gh">~~~~~~~~~~</span>
  280. </pre></div>
  281. </div>
  282. </li>
  283. </ol>
  284. </section>
  285. </section>
  286. <section id="anchors-links">
  287. <h2><a class="toc-backref" href="#id20" role="doc-backlink">Anchors &amp; Links</a><a class="headerlink" href="#anchors-links" title="Link to this heading">¶</a></h2>
  288. <section id="anchors">
  289. <span id="rest-anchor"></span><h3><a class="toc-backref" href="#id21" role="doc-backlink">Anchors</a><a class="headerlink" href="#anchors" title="Link to this heading">¶</a></h3>
  290. <p>To refer a point in the documentation a anchor is needed. The <a class="reference internal" href="#rest-template"><span class="std std-ref">reST
  291. template</span></a> shows an example where a chapter titled <em>“Chapters”</em>
  292. gets an anchor named <code class="docutils literal notranslate"><span class="pre">chapter</span> <span class="pre">title</span></code>. Another example from <em>this</em> document,
  293. where the anchor named <code class="docutils literal notranslate"><span class="pre">reST</span> <span class="pre">anchor</span></code>:</p>
  294. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">_reST anchor:</span>
  295. <span class="gh">Anchors</span>
  296. <span class="gh">-------</span>
  297. To refer a point in the documentation a anchor is needed ...
  298. </pre></div>
  299. </div>
  300. <p>To refer anchors use the <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-ref">ref role</a> markup:</p>
  301. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span>Visit chapter <span class="na">:ref:</span><span class="nv">`reST anchor`</span>. Or set hyperlink text manually :ref:`foo
  302. bar &lt;reST anchor&gt;`.
  303. </pre></div>
  304. </div>
  305. <div class="rst-example admonition">
  306. <p class="admonition-title"><code class="docutils literal notranslate"><span class="pre">:ref:</span></code> role</p>
  307. <p>Visit chapter <a class="reference internal" href="#rest-anchor"><span class="std std-ref">Anchors</span></a>. Or set hyperlink text manually <a class="reference internal" href="#rest-anchor"><span class="std std-ref">foo
  308. bar</span></a>.</p>
  309. </div>
  310. </section>
  311. <section id="link-ordinary-url">
  312. <span id="rest-ordinary-ref"></span><h3><a class="toc-backref" href="#id22" role="doc-backlink">Link ordinary URL</a><a class="headerlink" href="#link-ordinary-url" title="Link to this heading">¶</a></h3>
  313. <p>If you need to reference external URLs use <em>named</em> hyperlinks to maintain
  314. readability of reST sources. Here is a example taken from <em>this</em> article:</p>
  315. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">_Sphinx Field Lists:</span>
  316. https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html
  317. With the <span class="ge">*named*</span> hyperlink <span class="s">`Sphinx Field Lists`_</span>, the raw text is much more
  318. readable.
  319. And this shows the alternative (less readable) hyperlink markup `Sphinx Field
  320. Lists
  321. <span class="nt">&lt;https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html&gt;</span>`__.
  322. </pre></div>
  323. </div>
  324. <div class="rst-example admonition">
  325. <p class="admonition-title">Named hyperlink</p>
  326. <p>With the <em>named</em> hyperlink <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html">Sphinx Field Lists</a>, the raw text is much more
  327. readable.</p>
  328. <p>And this shows the alternative (less readable) hyperlink markup <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html">Sphinx Field
  329. Lists</a>.</p>
  330. </div>
  331. </section>
  332. <section id="smart-refs">
  333. <span id="rest-smart-ref"></span><h3><a class="toc-backref" href="#id23" role="doc-backlink">Smart refs</a><a class="headerlink" href="#smart-refs" title="Link to this heading">¶</a></h3>
  334. <p>With the power of <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html">sphinx.ext.extlinks</a> and <a class="reference external" href="https://www.sphinx-doc.org/en/stable/ext/intersphinx.html">intersphinx</a> referencing external
  335. content becomes smart.</p>
  336. <table class="docutils align-default" id="id5">
  337. <caption><span class="caption-number">Table 10 </span><span class="caption-text">smart refs with <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html">sphinx.ext.extlinks</a> and <a class="reference external" href="https://www.sphinx-doc.org/en/stable/ext/intersphinx.html">intersphinx</a></span><a class="headerlink" href="#id5" title="Link to this table">¶</a></caption>
  338. <colgroup>
  339. <col style="width: 28.6%" />
  340. <col style="width: 21.4%" />
  341. <col style="width: 50.0%" />
  342. </colgroup>
  343. <thead>
  344. <tr class="row-odd"><th class="head"><p>refer …</p></th>
  345. <th class="head"><p>rendered example</p></th>
  346. <th class="head"><p>markup</p></th>
  347. </tr>
  348. </thead>
  349. <tbody>
  350. <tr class="row-even"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-rfc" title="(in Sphinx v8.3.0)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">rfc</span></code></a></p></td>
  351. <td><p><span class="target" id="index-0"></span><a class="rfc reference external" href="https://datatracker.ietf.org/doc/html/rfc822.html"><strong>RFC 822</strong></a></p></td>
  352. <td><p><code class="docutils literal notranslate"><span class="pre">:rfc:`822`</span></code></p></td>
  353. </tr>
  354. <tr class="row-odd"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-pep" title="(in Sphinx v8.3.0)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">pep</span></code></a></p></td>
  355. <td><p><span class="target" id="index-1"></span><a class="pep reference external" href="https://peps.python.org/pep-0008/"><strong>PEP 8</strong></a></p></td>
  356. <td><p><code class="docutils literal notranslate"><span class="pre">:pep:`8`</span></code></p></td>
  357. </tr>
  358. <tr class="row-even"><td colspan="3"><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html">sphinx.ext.extlinks</a></p></td>
  359. </tr>
  360. <tr class="row-odd"><td><p>project’s wiki article</p></td>
  361. <td><p><a class="extlink-wiki reference external" href="https://github.com/searxng/searxng/wiki/Offline-engines"> Offline-engines</a></p></td>
  362. <td><p><code class="docutils literal notranslate"><span class="pre">:wiki:`Offline-engines`</span></code></p></td>
  363. </tr>
  364. <tr class="row-even"><td><p>to docs public URL</p></td>
  365. <td><p><a class="extlink-docs reference external" href="https://docs.searxng.org//dev/reST.html">docs: dev/reST.html</a></p></td>
  366. <td><p><code class="docutils literal notranslate"><span class="pre">:docs:`dev/reST.html`</span></code></p></td>
  367. </tr>
  368. <tr class="row-odd"><td><p>files &amp; folders origin</p></td>
  369. <td><p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/docs/dev/reST.rst">git://docs/dev/reST.rst</a></p></td>
  370. <td><p><code class="docutils literal notranslate"><span class="pre">:origin:`docs/dev/reST.rst`</span></code></p></td>
  371. </tr>
  372. <tr class="row-even"><td><p>pull request</p></td>
  373. <td><p><a class="extlink-pull reference external" href="https://github.com/searxng/searxng/pull/4">PR 4</a></p></td>
  374. <td><p><code class="docutils literal notranslate"><span class="pre">:pull:`4`</span></code></p></td>
  375. </tr>
  376. <tr class="row-odd"><td><p>patch</p></td>
  377. <td><p><a class="extlink-patch reference external" href="https://github.com/searxng/searxng/commit/af2cae6">#af2cae6</a></p></td>
  378. <td><p><code class="docutils literal notranslate"><span class="pre">:patch:`af2cae6`</span></code></p></td>
  379. </tr>
  380. <tr class="row-even"><td><p>PyPi package</p></td>
  381. <td><p><a class="extlink-pypi reference external" href="https://pypi.org/project/httpx">PyPi: httpx</a></p></td>
  382. <td><p><code class="docutils literal notranslate"><span class="pre">:pypi:`httpx`</span></code></p></td>
  383. </tr>
  384. <tr class="row-odd"><td><p>manual page man</p></td>
  385. <td><p><a class="extlink-man reference external" href="https://manpages.debian.org/jump?q=bash">bash</a></p></td>
  386. <td><p><code class="docutils literal notranslate"><span class="pre">:man:`bash`</span></code></p></td>
  387. </tr>
  388. <tr class="row-even"><td colspan="3"><p><a class="reference external" href="https://www.sphinx-doc.org/en/stable/ext/intersphinx.html">intersphinx</a></p></td>
  389. </tr>
  390. <tr class="row-odd"><td><p>external anchor</p></td>
  391. <td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#and" title="(in Python v3.13)"><span>Boolean operations</span></a></p></td>
  392. <td><p><code class="docutils literal notranslate"><span class="pre">:ref:`python:and`</span></code></p></td>
  393. </tr>
  394. <tr class="row-even"><td><p>external doc anchor</p></td>
  395. <td><p><a class="reference external" href="https://jinja.palletsprojects.com/en/stable/templates/" title="(in Jinja v3.1.x)"><span>Template Designer Documentation</span></a></p></td>
  396. <td><p><code class="docutils literal notranslate"><span class="pre">:doc:`jinja:templates`</span></code></p></td>
  397. </tr>
  398. <tr class="row-odd"><td><p>python code object</p></td>
  399. <td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.13)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">datetime.datetime</span></code></a></p></td>
  400. <td><p><code class="docutils literal notranslate"><span class="pre">:py:obj:`datetime.datetime`</span></code></p></td>
  401. </tr>
  402. <tr class="row-even"><td><p>flask code object</p></td>
  403. <td><p><a class="reference external" href="https://flask.palletsprojects.com/en/stable/api/#flask.Flask" title="(in Flask v3.1.x)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">flask.Flask</span></code></a></p></td>
  404. <td><p><code class="docutils literal notranslate"><span class="pre">:py:obj:`flask.Flask`</span></code></p></td>
  405. </tr>
  406. </tbody>
  407. </table>
  408. <p>Intersphinx is configured in <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/docs/conf.py">git://docs/conf.py</a>:</p>
  409. <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">intersphinx_mapping</span> <span class="o">=</span> <span class="p">{</span>
  410. <span class="s2">&quot;python&quot;</span><span class="p">:</span> <span class="p">(</span><span class="s2">&quot;https://docs.python.org/3/&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span>
  411. <span class="s2">&quot;flask&quot;</span><span class="p">:</span> <span class="p">(</span><span class="s2">&quot;https://flask.palletsprojects.com/&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span>
  412. <span class="s2">&quot;jinja&quot;</span><span class="p">:</span> <span class="p">(</span><span class="s2">&quot;https://jinja.palletsprojects.com/&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span>
  413. <span class="s2">&quot;linuxdoc&quot;</span> <span class="p">:</span> <span class="p">(</span><span class="s2">&quot;https://return42.github.io/linuxdoc/&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span>
  414. <span class="s2">&quot;sphinx&quot;</span> <span class="p">:</span> <span class="p">(</span><span class="s2">&quot;https://www.sphinx-doc.org/en/master/&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span>
  415. <span class="p">}</span>
  416. </pre></div>
  417. </div>
  418. <p>To list all anchors of the inventory (e.g. <code class="docutils literal notranslate"><span class="pre">python</span></code>) use:</p>
  419. <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>python<span class="w"> </span>-m<span class="w"> </span>sphinx.ext.intersphinx<span class="w"> </span>https://docs.python.org/3/objects.inv
  420. ...
  421. $<span class="w"> </span>python<span class="w"> </span>-m<span class="w"> </span>sphinx.ext.intersphinx<span class="w"> </span>https://docs.searxng.org/objects.inv
  422. ...
  423. </pre></div>
  424. </div>
  425. </section>
  426. </section>
  427. <section id="literal-blocks">
  428. <h2><a class="toc-backref" href="#id24" role="doc-backlink">Literal blocks</a><a class="headerlink" href="#literal-blocks" title="Link to this heading">¶</a></h2>
  429. <p>The simplest form of <a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#literal-blocks">literal-blocks</a> is a indented block introduced by
  430. two colons (<code class="docutils literal notranslate"><span class="pre">::</span></code>). For highlighting use <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#highlight">highlight</a> or <a class="reference internal" href="#rest-code"><span class="std std-ref">code-block</span></a> directive. To include literals from external files use
  431. <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-literalinclude" title="(in Sphinx v8.3.0)"><code class="xref rst rst-dir docutils literal notranslate"><span class="pre">literalinclude</span></code></a> or <a class="reference external" href="https://return42.github.io/linuxdoc/linuxdoc-howto/kernel-include-directive.html#kernel-include-directive" title="(in LinuxDoc v20240924.dev1)"><span class="xref std std-ref">kernel-include</span></a>
  432. directive (latter one expands environment variables in the path name).</p>
  433. <section id="rest-literal">
  434. <span id="id3"></span><h3><a class="toc-backref" href="#id25" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">::</span></code></a><a class="headerlink" href="#rest-literal" title="Link to this heading">¶</a></h3>
  435. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="se">::</span>
  436. <span class="s"> Literal block</span>
  437. Lorem ipsum dolor<span class="se">::</span>
  438. <span class="s"> Literal block</span>
  439. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
  440. eirmod tempor invidunt ut labore ::
  441. Literal block
  442. </pre></div>
  443. </div>
  444. <div class="rst-example admonition">
  445. <p class="admonition-title">Literal block</p>
  446. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Literal</span> <span class="n">block</span>
  447. </pre></div>
  448. </div>
  449. <p>Lorem ipsum dolor:</p>
  450. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Literal</span> <span class="n">block</span>
  451. </pre></div>
  452. </div>
  453. <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
  454. eirmod tempor invidunt ut labore</p>
  455. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Literal</span> <span class="n">block</span>
  456. </pre></div>
  457. </div>
  458. </div>
  459. </section>
  460. <section id="code-block">
  461. <span id="rest-code"></span><h3><a class="toc-backref" href="#id26" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">code-block</span></code></a><a class="headerlink" href="#code-block" title="Link to this heading">¶</a></h3>
  462. <aside class="sidebar">
  463. <p class="sidebar-title">Syntax highlighting</p>
  464. <p>is handled by <a class="reference external" href="https://pygments.org/languages/">pygments</a>.</p>
  465. </aside>
  466. <p>The <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-code-block" title="(in Sphinx v8.3.0)"><code class="xref rst rst-dir docutils literal notranslate"><span class="pre">code-block</span></code></a> directive is a variant of the <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#code">code</a> directive
  467. with additional options. To learn more about code literals visit
  468. <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#code-examples" title="(in Sphinx v8.3.0)"><span>Showing code examples</span></a>.</p>
  469. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span>The URL <span class="s">``/stats``</span> handle is shown in <span class="na">:ref:</span><span class="nv">`stats-handle`</span>
  470. <span class="p">..</span> <span class="ow">code-block</span><span class="p">::</span> Python
  471. <span class="nc">:caption:</span> python code block
  472. <span class="nc">:name:</span> stats-handle
  473. @app.route(&#39;/stats&#39;, methods=[&#39;GET&#39;])
  474. def stats():
  475. &quot;&quot;&quot;Render engine statistics page.&quot;&quot;&quot;
  476. stats = get_engines_stats()
  477. return render(
  478. &#39;stats.html&#39;
  479. , stats = stats )
  480. </pre></div>
  481. </div>
  482. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span>
  483. </pre></div>
  484. </div>
  485. <div class="rst-example admonition">
  486. <p class="admonition-title">Code block</p>
  487. <p>The URL <code class="docutils literal notranslate"><span class="pre">/stats</span></code> handle is shown in <a class="reference internal" href="#stats-handle"><span class="std std-ref">python code block</span></a></p>
  488. <div class="literal-block-wrapper docutils container" id="stats-handle">
  489. <div class="code-block-caption"><span class="caption-number">Listing 1 </span><span class="caption-text">python code block</span><a class="headerlink" href="#stats-handle" title="Link to this code">¶</a></div>
  490. <div class="highlight-Python notranslate"><div class="highlight"><pre><span></span><span class="nd">@app</span><span class="o">.</span><span class="n">route</span><span class="p">(</span><span class="s1">&#39;/stats&#39;</span><span class="p">,</span> <span class="n">methods</span><span class="o">=</span><span class="p">[</span><span class="s1">&#39;GET&#39;</span><span class="p">])</span>
  491. <span class="k">def</span><span class="w"> </span><span class="nf">stats</span><span class="p">():</span>
  492. <span class="w"> </span><span class="sd">&quot;&quot;&quot;Render engine statistics page.&quot;&quot;&quot;</span>
  493. <span class="n">stats</span> <span class="o">=</span> <span class="n">get_engines_stats</span><span class="p">()</span>
  494. <span class="k">return</span> <span class="n">render</span><span class="p">(</span>
  495. <span class="s1">&#39;stats.html&#39;</span>
  496. <span class="p">,</span> <span class="n">stats</span> <span class="o">=</span> <span class="n">stats</span> <span class="p">)</span>
  497. </pre></div>
  498. </div>
  499. </div>
  500. </div>
  501. </section>
  502. </section>
  503. <section id="unicode-substitution">
  504. <h2><a class="toc-backref" href="#id27" role="doc-backlink">Unicode substitution</a><a class="headerlink" href="#unicode-substitution" title="Link to this heading">¶</a></h2>
  505. <p>The <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#unicode-character-codes">unicode directive</a> converts Unicode
  506. character codes (numerical values) to characters. This directive can only be
  507. used within a substitution definition.</p>
  508. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">|copy|</span> <span class="ow">unicode</span><span class="p">::</span> 0xA9 .. copyright sign
  509. <span class="p">..</span> <span class="nt">|(TM)|</span> <span class="ow">unicode</span><span class="p">::</span> U+2122
  510. Trademark |(TM)| and copyright |copy| glyphs.
  511. </pre></div>
  512. </div>
  513. <div class="rst-example admonition">
  514. <p class="admonition-title">Unicode</p>
  515. <p>Trademark ™ and copyright © glyphs.</p>
  516. </div>
  517. </section>
  518. <section id="roles">
  519. <span id="rest-roles"></span><h2><a class="toc-backref" href="#id28" role="doc-backlink">Roles</a><a class="headerlink" href="#roles" title="Link to this heading">¶</a></h2>
  520. <aside class="sidebar">
  521. <p class="sidebar-title">Further reading</p>
  522. <ul class="simple">
  523. <li><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html">Sphinx Roles</a></p></li>
  524. <li><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html" title="(in Sphinx v8.3.0)"><span>MOVED: Domains</span></a></p></li>
  525. </ul>
  526. </aside>
  527. <p>A <em>custom interpreted text role</em> (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#roles">ref</a>) is an inline piece of
  528. explicit markup. It signifies that that the enclosed text should be interpreted
  529. in a specific way.</p>
  530. <p>The general markup is one of:</p>
  531. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="na">:rolename:</span><span class="nv">`ref-name`</span>
  532. <span class="na">:rolename:</span><span class="nv">`ref text &lt;ref-name&gt;`</span>
  533. </pre></div>
  534. </div>
  535. <table class="docutils align-default" id="id6">
  536. <caption><span class="caption-number">Table 11 </span><span class="caption-text">smart refs with <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html">sphinx.ext.extlinks</a> and <a class="reference external" href="https://www.sphinx-doc.org/en/stable/ext/intersphinx.html">intersphinx</a></span><a class="headerlink" href="#id6" title="Link to this table">¶</a></caption>
  537. <colgroup>
  538. <col style="width: 28.6%" />
  539. <col style="width: 21.4%" />
  540. <col style="width: 50.0%" />
  541. </colgroup>
  542. <thead>
  543. <tr class="row-odd"><th class="head"><p>role</p></th>
  544. <th class="head"><p>rendered example</p></th>
  545. <th class="head"><p>markup</p></th>
  546. </tr>
  547. </thead>
  548. <tbody>
  549. <tr class="row-even"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-guilabel" title="(in Sphinx v8.3.0)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">guilabel</span></code></a></p></td>
  550. <td><p><span class="guilabel"><span class="accelerator">C</span>ancel</span></p></td>
  551. <td><p><code class="docutils literal notranslate"><span class="pre">:guilabel:`&amp;Cancel`</span></code></p></td>
  552. </tr>
  553. <tr class="row-odd"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-kbd" title="(in Sphinx v8.3.0)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">kbd</span></code></a></p></td>
  554. <td><p><kbd class="kbd compound docutils literal notranslate"><kbd class="kbd docutils literal notranslate">C</kbd>-<kbd class="kbd docutils literal notranslate">x</kbd> <kbd class="kbd docutils literal notranslate">C</kbd>-<kbd class="kbd docutils literal notranslate">f</kbd></kbd></p></td>
  555. <td><p><code class="docutils literal notranslate"><span class="pre">:kbd:`C-x</span> <span class="pre">C-f`</span></code></p></td>
  556. </tr>
  557. <tr class="row-even"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-menuselection" title="(in Sphinx v8.3.0)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">menuselection</span></code></a></p></td>
  558. <td><p><span class="menuselection">Open ‣ File</span></p></td>
  559. <td><p><code class="docutils literal notranslate"><span class="pre">:menuselection:`Open</span> <span class="pre">--&gt;</span> <span class="pre">File`</span></code></p></td>
  560. </tr>
  561. <tr class="row-odd"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/referencing.html#role-download" title="(in Sphinx v8.3.0)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">download</span></code></a></p></td>
  562. <td><p><a class="reference download internal" download="" href="../_downloads/ad0ebe55d6b53b1559e0ca8dee6f30b9/reST.rst"><code class="xref download docutils literal notranslate"><span class="pre">this</span> <span class="pre">file</span></code></a></p></td>
  563. <td><p><code class="docutils literal notranslate"><span class="pre">:download:`this</span> <span class="pre">file</span> <span class="pre">&lt;reST.rst&gt;`</span></code></p></td>
  564. </tr>
  565. <tr class="row-even"><td><p><a class="reference internal" href="#math">math</a></p></td>
  566. <td><p><img class="math" src="../_images/math/6673b43f9fe29455c1fcd1164e5844698cc64d38.svg" alt="a^2 + b^2 = c^2"/></p></td>
  567. <td><p><code class="docutils literal notranslate"><span class="pre">:math:`a^2</span> <span class="pre">+</span> <span class="pre">b^2</span> <span class="pre">=</span> <span class="pre">c^2`</span></code></p></td>
  568. </tr>
  569. <tr class="row-odd"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/referencing.html#role-ref" title="(in Sphinx v8.3.0)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">ref</span></code></a></p></td>
  570. <td><p><a class="reference internal" href="#svg-image-example"><span class="std std-ref">Simple SVG image.</span></a></p></td>
  571. <td><p><code class="docutils literal notranslate"><span class="pre">:ref:`svg</span> <span class="pre">image</span> <span class="pre">example`</span></code></p></td>
  572. </tr>
  573. <tr class="row-even"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-command" title="(in Sphinx v8.3.0)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">command</span></code></a></p></td>
  574. <td><p><strong class="command">ls -la</strong></p></td>
  575. <td><p><code class="docutils literal notranslate"><span class="pre">:command:`ls</span> <span class="pre">-la`</span></code></p></td>
  576. </tr>
  577. <tr class="row-odd"><td><p><a class="extlink-durole reference external" href="https://docutils.sourceforge.io/docs/ref/rst/roles.html#emphasis">emphasis</a></p></td>
  578. <td><p><em>italic</em></p></td>
  579. <td><p><code class="docutils literal notranslate"><span class="pre">:emphasis:`italic`</span></code></p></td>
  580. </tr>
  581. <tr class="row-even"><td><p><a class="extlink-durole reference external" href="https://docutils.sourceforge.io/docs/ref/rst/roles.html#strong">strong</a></p></td>
  582. <td><p><strong>bold</strong></p></td>
  583. <td><p><code class="docutils literal notranslate"><span class="pre">:strong:`bold`</span></code></p></td>
  584. </tr>
  585. <tr class="row-odd"><td><p><a class="extlink-durole reference external" href="https://docutils.sourceforge.io/docs/ref/rst/roles.html#literal">literal</a></p></td>
  586. <td><p><code class="docutils literal notranslate"><span class="pre">foo()</span></code></p></td>
  587. <td><p><code class="docutils literal notranslate"><span class="pre">:literal:`foo()`</span></code></p></td>
  588. </tr>
  589. <tr class="row-even"><td><p><a class="extlink-durole reference external" href="https://docutils.sourceforge.io/docs/ref/rst/roles.html#subscript">subscript</a></p></td>
  590. <td><p>H<sub>2</sub>O</p></td>
  591. <td><p><code class="docutils literal notranslate"><span class="pre">H\</span> <span class="pre">:sub:`2`\</span> <span class="pre">O</span></code></p></td>
  592. </tr>
  593. <tr class="row-odd"><td><p><a class="extlink-durole reference external" href="https://docutils.sourceforge.io/docs/ref/rst/roles.html#superscript">superscript</a></p></td>
  594. <td><p>E = mc<sup>2</sup></p></td>
  595. <td><p><code class="docutils literal notranslate"><span class="pre">E</span> <span class="pre">=</span> <span class="pre">mc\</span> <span class="pre">:sup:`2`</span></code></p></td>
  596. </tr>
  597. <tr class="row-even"><td><p><a class="extlink-durole reference external" href="https://docutils.sourceforge.io/docs/ref/rst/roles.html#title-reference">title-reference</a></p></td>
  598. <td><p><cite>Time</cite></p></td>
  599. <td><p><code class="docutils literal notranslate"><span class="pre">:title:`Time`</span></code></p></td>
  600. </tr>
  601. </tbody>
  602. </table>
  603. </section>
  604. <section id="figures-images">
  605. <h2><a class="toc-backref" href="#id29" role="doc-backlink">Figures &amp; Images</a><a class="headerlink" href="#figures-images" title="Link to this heading">¶</a></h2>
  606. <aside class="sidebar">
  607. <p class="sidebar-title">Image processing</p>
  608. <p>With the directives from <a class="reference external" href="https://return42.github.io/linuxdoc/linuxdoc-howto/kfigure.html#kfigure" title="(in LinuxDoc v20240924.dev1)"><span class="xref std std-ref">linuxdoc</span></a> the build process
  609. is flexible. To get best results in the generated output format, install
  610. <a class="reference external" href="https://www.imagemagick.org">ImageMagick</a> and <a class="reference external" href="https://graphviz.gitlab.io">Graphviz</a>.</p>
  611. </aside>
  612. <p>SearXNG’s sphinx setup includes: <a class="reference external" href="https://return42.github.io/linuxdoc/linuxdoc-howto/kfigure.html#kfigure" title="(in LinuxDoc v20240924.dev1)"><span>Scalable figure and image handling</span></a>. Scalable here means;
  613. scalable in sense of the build process. Normally in absence of a converter
  614. tool, the build process will break. From the authors POV it’s annoying to care
  615. about the build process when handling with images, especially since he has no
  616. access to the build process. With <a class="reference external" href="https://return42.github.io/linuxdoc/linuxdoc-howto/kfigure.html#kfigure" title="(in LinuxDoc v20240924.dev1)"><span>Scalable figure and image handling</span></a> the build process
  617. continues and scales output quality in dependence of installed image processors.</p>
  618. <p>If you want to add an image, you should use the <code class="docutils literal notranslate"><span class="pre">kernel-figure</span></code> (inheritance
  619. of <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#figure">figure</a>) and <code class="docutils literal notranslate"><span class="pre">kernel-image</span></code> (inheritance of <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#image">image</a>)
  620. directives. E.g. to insert a figure with a scalable image format use SVG
  621. (<a class="reference internal" href="#svg-image-example"><span class="std std-ref">Simple SVG image.</span></a>):</p>
  622. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">_svg image example:</span>
  623. <span class="p">..</span> <span class="ow">kernel-figure</span><span class="p">::</span> svg_image.svg
  624. <span class="nc">:alt:</span> SVG image example
  625. Simple SVG image
  626. To refer the figure, a caption block is needed: <span class="na">:ref:</span><span class="nv">`svg image example`</span>.
  627. </pre></div>
  628. </div>
  629. <figure class="align-default" id="id7">
  630. <img alt="SVG image example" src="../_images/svg_image.svg" />
  631. <figcaption>
  632. <p><span class="caption-number">Fig. 4 </span><span class="caption-text">Simple SVG image.</span><a class="headerlink" href="#id7" title="Link to this image">¶</a></p>
  633. </figcaption>
  634. </figure>
  635. <p>To refer the figure, a caption block is needed: <a class="reference internal" href="#svg-image-example"><span class="std std-ref">Simple SVG image.</span></a>.</p>
  636. <section id="dot-files-aka-graphviz">
  637. <h3><a class="toc-backref" href="#id30" role="doc-backlink">DOT files (aka Graphviz)</a><a class="headerlink" href="#dot-files-aka-graphviz" title="Link to this heading">¶</a></h3>
  638. <p>With <a class="reference external" href="https://return42.github.io/linuxdoc/linuxdoc-howto/kfigure.html#kernel-figure" title="(in LinuxDoc v20240924.dev1)"><span>kernel-figure &amp; kernel-image</span></a> reST support for <strong>DOT</strong> formatted files is
  639. given.</p>
  640. <ul class="simple">
  641. <li><p><a class="reference external" href="https://graphviz.gitlab.io/_pages/pdf/dotguide.pdf">Graphviz’s dot</a></p></li>
  642. <li><p><a class="reference external" href="https://graphviz.gitlab.io/_pages/doc/info/lang.html">DOT</a></p></li>
  643. <li><p><a class="reference external" href="https://graphviz.gitlab.io">Graphviz</a></p></li>
  644. </ul>
  645. <p>A simple example is shown in <a class="reference internal" href="#dot-file-example"><span class="std std-ref">DOT’s hello world example</span></a>:</p>
  646. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">_dot file example:</span>
  647. <span class="p">..</span> <span class="ow">kernel-figure</span><span class="p">::</span> hello.dot
  648. <span class="nc">:alt:</span> hello world
  649. DOT&#39;s hello world example
  650. </pre></div>
  651. </div>
  652. <div class="rst-example admonition">
  653. <p class="admonition-title">hello.dot</p>
  654. <figure class="align-default" id="id8">
  655. <img alt="hello world" src="../_images/hello.svg" />
  656. <figcaption>
  657. <p><span class="caption-number">Fig. 5 </span><span class="caption-text">DOT’s hello world example</span><a class="headerlink" href="#id8" title="Link to this image">¶</a></p>
  658. </figcaption>
  659. </figure>
  660. </div>
  661. </section>
  662. <section id="kernel-render-dot">
  663. <h3><a class="toc-backref" href="#id31" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">kernel-render</span></code> DOT</a><a class="headerlink" href="#kernel-render-dot" title="Link to this heading">¶</a></h3>
  664. <p>Embed <em>render</em> markups (or languages) like Graphviz’s <strong>DOT</strong> is provided by the
  665. <a class="reference external" href="https://return42.github.io/linuxdoc/linuxdoc-howto/kfigure.html#kernel-render" title="(in LinuxDoc v20240924.dev1)"><span>kernel-render</span></a> directive. A simple example of embedded <a class="reference external" href="https://graphviz.gitlab.io/_pages/doc/info/lang.html">DOT</a> is
  666. shown in figure <a class="reference internal" href="#dot-render-example"><span class="std std-ref">Embedded DOT (Graphviz) code</span></a>:</p>
  667. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">_dot render example:</span>
  668. <span class="p">..</span> <span class="ow">kernel-render</span><span class="p">::</span> DOT
  669. <span class="nc">:alt:</span> digraph
  670. <span class="nc">:caption:</span> Embedded DOT (Graphviz) code
  671. digraph foo {
  672. &quot;bar&quot; -&gt; &quot;baz&quot;;
  673. }
  674. Attribute <span class="s">``caption``</span> is needed, if you want to refer the figure: :ref:`dot
  675. render example`.
  676. </pre></div>
  677. </div>
  678. <p>Please note <a class="reference external" href="https://return42.github.io/linuxdoc/linuxdoc-howto/kfigure.html#kfigure-build-tools" title="(in LinuxDoc v20240924.dev1)"><span class="xref std std-ref">build tools</span></a>. If <a class="reference external" href="https://graphviz.gitlab.io">Graphviz</a> is
  679. installed, you will see an vector image. If not, the raw markup is inserted as
  680. <em>literal-block</em>.</p>
  681. <div class="rst-example admonition">
  682. <p class="admonition-title">kernel-render DOT</p>
  683. <figure class="align-default" id="id9">
  684. <span id="dot-render-example"></span><img alt="digraph" src="../_images/DOT-57a4a7f78690d0b6b884bc59f36e84cfb0b61f76.svg" />
  685. <figcaption>
  686. <p><span class="caption-number">Fig. 6 </span><span class="caption-text">Embedded DOT (Graphviz) code</span><a class="headerlink" href="#id9" title="Link to this image">¶</a></p>
  687. </figcaption>
  688. </figure>
  689. <p>Attribute <code class="docutils literal notranslate"><span class="pre">caption</span></code> is needed, if you want to refer the figure: <a class="reference internal" href="#dot-render-example"><span class="std std-ref">Embedded DOT (Graphviz) code</span></a>.</p>
  690. </div>
  691. </section>
  692. <section id="kernel-render-svg">
  693. <h3><a class="toc-backref" href="#id32" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">kernel-render</span></code> SVG</a><a class="headerlink" href="#kernel-render-svg" title="Link to this heading">¶</a></h3>
  694. <p>A simple example of embedded <a class="reference external" href="https://www.w3.org/TR/SVG11/expanded-toc.html">SVG</a> is shown in figure <a class="reference internal" href="#svg-render-example"><span class="std std-ref">Embedded SVG markup</span></a>:</p>
  695. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">_svg render example:</span>
  696. <span class="p">..</span> <span class="ow">kernel-render</span><span class="p">::</span> SVG
  697. <span class="nc">:caption:</span> Embedded <span class="gs">**SVG**</span> markup
  698. <span class="nc">:alt:</span> so-nw-arrow
  699. </pre></div>
  700. </div>
  701. <blockquote>
  702. <div><div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
  703. <span class="nt">&lt;svg</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">&quot;http://www.w3.org/2000/svg&quot;</span><span class="w"> </span><span class="na">version=</span><span class="s">&quot;1.1&quot;</span>
  704. <span class="w"> </span><span class="na">baseProfile=</span><span class="s">&quot;full&quot;</span><span class="w"> </span><span class="na">width=</span><span class="s">&quot;70px&quot;</span><span class="w"> </span><span class="na">height=</span><span class="s">&quot;40px&quot;</span>
  705. <span class="w"> </span><span class="na">viewBox=</span><span class="s">&quot;0 0 700 400&quot;</span>
  706. <span class="w"> </span><span class="nt">&gt;</span>
  707. <span class="w"> </span><span class="nt">&lt;line</span><span class="w"> </span><span class="na">x1=</span><span class="s">&quot;180&quot;</span><span class="w"> </span><span class="na">y1=</span><span class="s">&quot;370&quot;</span>
  708. <span class="w"> </span><span class="na">x2=</span><span class="s">&quot;500&quot;</span><span class="w"> </span><span class="na">y2=</span><span class="s">&quot;50&quot;</span>
  709. <span class="w"> </span><span class="na">stroke=</span><span class="s">&quot;black&quot;</span><span class="w"> </span><span class="na">stroke-width=</span><span class="s">&quot;15px&quot;</span>
  710. <span class="w"> </span><span class="nt">/&gt;</span>
  711. <span class="w"> </span><span class="nt">&lt;polygon</span><span class="w"> </span><span class="na">points=</span><span class="s">&quot;585 0 525 25 585 50&quot;</span>
  712. <span class="w"> </span><span class="na">transform=</span><span class="s">&quot;rotate(135 525 25)&quot;</span>
  713. <span class="w"> </span><span class="nt">/&gt;</span>
  714. <span class="nt">&lt;/svg&gt;</span>
  715. </pre></div>
  716. </div>
  717. </div></blockquote>
  718. <div class="rst-example admonition">
  719. <p class="admonition-title">kernel-render SVG</p>
  720. <figure class="align-default" id="id10">
  721. <span id="svg-render-example"></span><img alt="so-nw-arrow" src="../_images/SVG-1fb7029fa2cc454a267bae271cccb2c591387416.svg" />
  722. <figcaption>
  723. <p><span class="caption-number">Fig. 7 </span><span class="caption-text">Embedded <strong>SVG</strong> markup</span><a class="headerlink" href="#id10" title="Link to this image">¶</a></p>
  724. </figcaption>
  725. </figure>
  726. </div>
  727. </section>
  728. </section>
  729. <section id="list-markups">
  730. <span id="rest-lists"></span><h2><a class="toc-backref" href="#id33" role="doc-backlink">List markups</a><a class="headerlink" href="#list-markups" title="Link to this heading">¶</a></h2>
  731. <section id="bullet-list">
  732. <h3><a class="toc-backref" href="#id34" role="doc-backlink">Bullet list</a><a class="headerlink" href="#bullet-list" title="Link to this heading">¶</a></h3>
  733. <p>List markup (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#bullet-lists">ref</a>) is simple:</p>
  734. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="m">-</span> This is a bulleted list.
  735. <span class="m">1.</span> Nested lists are possible, but be aware that they must be separated from
  736. the parent list items by blank line
  737. <span class="m">2.</span> Second item of nested list
  738. <span class="m">-</span> It has two items, the second
  739. item uses two lines.
  740. <span class="m">#.</span> This is a numbered list.
  741. <span class="m">#.</span> It has two items too.
  742. </pre></div>
  743. </div>
  744. <div class="rst-example admonition">
  745. <p class="admonition-title">bullet list</p>
  746. <ul class="simple">
  747. <li><p>This is a bulleted list.</p>
  748. <ol class="arabic simple">
  749. <li><p>Nested lists are possible, but be aware that they must be separated from
  750. the parent list items by blank line</p></li>
  751. <li><p>Second item of nested list</p></li>
  752. </ol>
  753. </li>
  754. <li><p>It has two items, the second
  755. item uses two lines.</p></li>
  756. </ul>
  757. <ol class="arabic simple">
  758. <li><p>This is a numbered list.</p></li>
  759. <li><p>It has two items too.</p></li>
  760. </ol>
  761. </div>
  762. </section>
  763. <section id="horizontal-list">
  764. <h3><a class="toc-backref" href="#id35" role="doc-backlink">Horizontal list</a><a class="headerlink" href="#horizontal-list" title="Link to this heading">¶</a></h3>
  765. <p>The <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-hlist" title="(in Sphinx v8.3.0)"><code class="xref rst rst-dir docutils literal notranslate"><span class="pre">..</span> <span class="pre">hlist::</span></code></a> transforms a bullet list into a more compact
  766. list.</p>
  767. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">hlist</span><span class="p">::</span>
  768. <span class="m">-</span> first list item
  769. <span class="m">-</span> second list item
  770. <span class="m">-</span> third list item
  771. <span class="c"> ...</span>
  772. </pre></div>
  773. </div>
  774. <div class="rst-example admonition">
  775. <p class="admonition-title">hlist</p>
  776. <table class="hlist"><tr><td><ul class="simple">
  777. <li><p>first list item</p></li>
  778. <li><p>second list item</p></li>
  779. <li><p>third list item</p></li>
  780. <li><p>next list item</p></li>
  781. </ul>
  782. </td><td><ul class="simple">
  783. <li><p>next list item xxxx</p></li>
  784. <li><p>next list item yyyy</p></li>
  785. <li><p>next list item zzzz</p></li>
  786. </ul>
  787. </td></tr></table>
  788. </div>
  789. </section>
  790. <section id="definition-list">
  791. <h3><a class="toc-backref" href="#id36" role="doc-backlink">Definition list</a><a class="headerlink" href="#definition-list" title="Link to this heading">¶</a></h3>
  792. <aside class="sidebar">
  793. <p class="sidebar-title">Note ..</p>
  794. <ul class="simple">
  795. <li><p>the term cannot have more than one line of text</p></li>
  796. <li><p>there is <strong>no blank line between term and definition block</strong> // this
  797. distinguishes definition lists (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#definition-lists">ref</a>) from block
  798. quotes (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#block-quotes">ref</a>).</p></li>
  799. </ul>
  800. </aside>
  801. <p>Each definition list (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#definition-lists">ref</a>) item contains a term,
  802. optional classifiers and a definition. A term is a simple one-line word or
  803. phrase. Optional classifiers may follow the term on the same line, each after
  804. an inline ‘ : ‘ (<strong>space, colon, space</strong>). A definition is a block indented
  805. relative to the term, and may contain multiple paragraphs and other body
  806. elements. There may be no blank line between a term line and a definition block
  807. (<em>this distinguishes definition lists from block quotes</em>). Blank lines are
  808. required before the first and after the last definition list item, but are
  809. optional in-between.</p>
  810. <p>Definition lists are created as follows:</p>
  811. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span>term 1 (up to a line of text)
  812. Definition 1.
  813. See the typo : this line is not a term!
  814. And this is not term&#39;s definition. <span class="gs">**There is a blank line**</span> in between
  815. the line above and this paragraph. That&#39;s why this paragraph is taken as
  816. <span class="gs">**block quote**</span> (<span class="na">:duref:</span><span class="nv">`ref &lt;block-quotes&gt;`</span>) and not as term&#39;s definition!
  817. term 2
  818. Definition 2, paragraph 1.
  819. Definition 2, paragraph 2.
  820. term 3 : classifier
  821. Definition 3.
  822. term 4 : classifier one : classifier two
  823. Definition 4.
  824. </pre></div>
  825. </div>
  826. <div class="rst-example admonition">
  827. <p class="admonition-title">definition list</p>
  828. <dl class="simple">
  829. <dt>term 1 (up to a line of text)</dt><dd><p>Definition 1.</p>
  830. </dd>
  831. </dl>
  832. <p>See the typo : this line is not a term!</p>
  833. <blockquote>
  834. <div><p>And this is not term’s definition. <strong>There is a blank line</strong> in between
  835. the line above and this paragraph. That’s why this paragraph is taken as
  836. <strong>block quote</strong> (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#block-quotes">ref</a>) and not as term’s definition!</p>
  837. </div></blockquote>
  838. <dl>
  839. <dt>term 2</dt><dd><p>Definition 2, paragraph 1.</p>
  840. <p>Definition 2, paragraph 2.</p>
  841. </dd>
  842. <dt>term 3<span class="classifier">classifier</span></dt><dd><p>Definition 3.</p>
  843. </dd>
  844. </dl>
  845. <p>term 4 : classifier one : classifier two</p>
  846. </div>
  847. </section>
  848. <section id="quoted-paragraphs">
  849. <h3><a class="toc-backref" href="#id37" role="doc-backlink">Quoted paragraphs</a><a class="headerlink" href="#quoted-paragraphs" title="Link to this heading">¶</a></h3>
  850. <p>Quoted paragraphs (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#block-quotes">ref</a>) are created by just indenting
  851. them more than the surrounding paragraphs. Line blocks (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#line-blocks">ref</a>) are a way of preserving line breaks:</p>
  852. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span>normal paragraph ...
  853. lorem ipsum.
  854. Quoted paragraph ...
  855. lorem ipsum.
  856. <span class="o">|</span> These lines are
  857. <span class="o">|</span> broken exactly like in
  858. <span class="o">|</span> the source file.
  859. </pre></div>
  860. </div>
  861. <div class="rst-example admonition">
  862. <p class="admonition-title">Quoted paragraph and line block</p>
  863. <p>normal paragraph …
  864. lorem ipsum.</p>
  865. <blockquote>
  866. <div><p>Quoted paragraph …
  867. lorem ipsum.</p>
  868. </div></blockquote>
  869. <div class="line-block">
  870. <div class="line">These lines are</div>
  871. <div class="line">broken exactly like in</div>
  872. <div class="line">the source file.</div>
  873. </div>
  874. </div>
  875. </section>
  876. <section id="field-lists">
  877. <span id="rest-field-list"></span><h3><a class="toc-backref" href="#id38" role="doc-backlink">Field Lists</a><a class="headerlink" href="#field-lists" title="Link to this heading">¶</a></h3>
  878. <aside class="sidebar">
  879. <p class="sidebar-title">bibliographic fields</p>
  880. <p>First lines fields are bibliographic fields, see <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html">Sphinx Field Lists</a>.</p>
  881. </aside>
  882. <p>Field lists are used as part of an extension syntax, such as options for
  883. directives, or database-like records meant for further processing. Field lists
  884. are mappings from field names to field bodies. They marked up like this:</p>
  885. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="nc">:fieldname:</span> Field content
  886. <span class="nc">:foo:</span> first paragraph in field foo
  887. second paragraph in field foo
  888. <span class="nc">:bar:</span> Field content
  889. </pre></div>
  890. </div>
  891. <div class="rst-example admonition">
  892. <p class="admonition-title">Field List</p>
  893. <dl class="field-list">
  894. <dt class="field-odd">fieldname<span class="colon">:</span></dt>
  895. <dd class="field-odd"><p>Field content</p>
  896. </dd>
  897. <dt class="field-even">foo<span class="colon">:</span></dt>
  898. <dd class="field-even"><p>first paragraph in field foo</p>
  899. <p>second paragraph in field foo</p>
  900. </dd>
  901. <dt class="field-odd">bar<span class="colon">:</span></dt>
  902. <dd class="field-odd"><p>Field content</p>
  903. </dd>
  904. </dl>
  905. </div>
  906. <p>They are commonly used in Python documentation:</p>
  907. <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">def</span><span class="w"> </span><span class="nf">my_function</span><span class="p">(</span><span class="n">my_arg</span><span class="p">,</span> <span class="n">my_other_arg</span><span class="p">):</span>
  908. <span class="w"> </span><span class="sd">&quot;&quot;&quot;A function just for me.</span>
  909. <span class="sd"> :param my_arg: The first of my arguments.</span>
  910. <span class="sd"> :param my_other_arg: The second of my arguments.</span>
  911. <span class="sd"> :returns: A message (just for me, of course).</span>
  912. <span class="sd"> &quot;&quot;&quot;</span>
  913. </pre></div>
  914. </div>
  915. </section>
  916. <section id="further-list-blocks">
  917. <h3><a class="toc-backref" href="#id39" role="doc-backlink">Further list blocks</a><a class="headerlink" href="#further-list-blocks" title="Link to this heading">¶</a></h3>
  918. <ul class="simple">
  919. <li><p>field lists (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#field-lists">ref</a>, with caveats noted in
  920. <a class="reference internal" href="#rest-field-list"><span class="std std-ref">Field Lists</span></a>)</p></li>
  921. <li><p>option lists (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#option-lists">ref</a>)</p></li>
  922. <li><p>quoted literal blocks (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#quoted-literal-blocks">ref</a>)</p></li>
  923. <li><p>doctest blocks (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#doctest-blocks">ref</a>)</p></li>
  924. </ul>
  925. </section>
  926. </section>
  927. <section id="admonitions">
  928. <h2><a class="toc-backref" href="#id40" role="doc-backlink">Admonitions</a><a class="headerlink" href="#admonitions" title="Link to this heading">¶</a></h2>
  929. <section id="sidebar">
  930. <h3><a class="toc-backref" href="#id41" role="doc-backlink">Sidebar</a><a class="headerlink" href="#sidebar" title="Link to this heading">¶</a></h3>
  931. <p>Sidebar is an eye catcher, often used for admonitions pointing further stuff or
  932. site effects. Here is the source of the sidebar <a class="reference internal" href="#rest-primer"><span class="std std-ref">on top of this page</span></a>.</p>
  933. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">sidebar</span><span class="p">::</span> KISS_ and readability_
  934. Instead of defining more and more roles, we at SearXNG encourage our
  935. contributors to follow principles like KISS_ and readability_.
  936. </pre></div>
  937. </div>
  938. </section>
  939. <section id="generic-admonition">
  940. <h3><a class="toc-backref" href="#id42" role="doc-backlink">Generic admonition</a><a class="headerlink" href="#generic-admonition" title="Link to this heading">¶</a></h3>
  941. <p>The generic <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#admonitions">admonition</a> needs a title:</p>
  942. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">admonition</span><span class="p">::</span> generic admonition title
  943. lorem ipsum ..
  944. </pre></div>
  945. </div>
  946. <div class="admonition-generic-admonition-title admonition">
  947. <p class="admonition-title">generic admonition title</p>
  948. <p>lorem ipsum ..</p>
  949. </div>
  950. </section>
  951. <section id="specific-admonitions">
  952. <h3><a class="toc-backref" href="#id43" role="doc-backlink">Specific admonitions</a><a class="headerlink" href="#specific-admonitions" title="Link to this heading">¶</a></h3>
  953. <p>Specific admonitions: <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#hint">hint</a>, <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#note">note</a>, <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#tip">tip</a> <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#attention">attention</a>,
  954. <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#caution">caution</a>, <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#danger">danger</a>, <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#error">error</a>, , <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#important">important</a>, and
  955. <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#warning">warning</a> .</p>
  956. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">hint</span><span class="p">::</span>
  957. lorem ipsum ..
  958. <span class="p">..</span> <span class="ow">note</span><span class="p">::</span>
  959. lorem ipsum ..
  960. <span class="p">..</span> <span class="ow">warning</span><span class="p">::</span>
  961. lorem ipsum ..
  962. </pre></div>
  963. </div>
  964. <div class="admonition hint">
  965. <p class="admonition-title">Hint</p>
  966. <p>lorem ipsum ..</p>
  967. </div>
  968. <div class="admonition note">
  969. <p class="admonition-title">Note</p>
  970. <p>lorem ipsum ..</p>
  971. </div>
  972. <div class="admonition tip">
  973. <p class="admonition-title">Tip</p>
  974. <p>lorem ipsum ..</p>
  975. </div>
  976. <div class="admonition attention">
  977. <p class="admonition-title">Attention</p>
  978. <p>lorem ipsum ..</p>
  979. </div>
  980. <div class="admonition caution">
  981. <p class="admonition-title">Caution</p>
  982. <p>lorem ipsum ..</p>
  983. </div>
  984. <div class="admonition danger">
  985. <p class="admonition-title">Danger</p>
  986. <p>lorem ipsum ..</p>
  987. </div>
  988. <div class="admonition important">
  989. <p class="admonition-title">Important</p>
  990. <p>lorem ipsum ..</p>
  991. </div>
  992. <div class="admonition error">
  993. <p class="admonition-title">Error</p>
  994. <p>lorem ipsum ..</p>
  995. </div>
  996. <div class="admonition warning">
  997. <p class="admonition-title">Warning</p>
  998. <p>lorem ipsum ..</p>
  999. </div>
  1000. </section>
  1001. </section>
  1002. <section id="tables">
  1003. <h2><a class="toc-backref" href="#id44" role="doc-backlink">Tables</a><a class="headerlink" href="#tables" title="Link to this heading">¶</a></h2>
  1004. <aside class="sidebar">
  1005. <p class="sidebar-title">Nested tables</p>
  1006. <p>Nested tables are ugly! Not all builder support nested tables, don’t use
  1007. them!</p>
  1008. </aside>
  1009. <p>ASCII-art tables like <a class="reference internal" href="#rest-simple-table"><span class="std std-ref">Simple tables</span></a> and <a class="reference internal" href="#rest-grid-table"><span class="std std-ref">Grid tables</span></a> might
  1010. be comfortable for readers of the text-files, but they have huge disadvantages
  1011. in the creation and modifying. First, they are hard to edit. Think about
  1012. adding a row or a column to a ASCII-art table or adding a paragraph in a cell,
  1013. it is a nightmare on big tables.</p>
  1014. <aside class="sidebar">
  1015. <p class="sidebar-title">List tables</p>
  1016. <p>For meaningful patch and diff use <a class="reference internal" href="#rest-flat-table"><span class="std std-ref">flat-table</span></a>.</p>
  1017. </aside>
  1018. <p>Second the diff of modifying ASCII-art tables is not meaningful, e.g. widening a
  1019. cell generates a diff in which also changes are included, which are only
  1020. ascribable to the ASCII-art. Anyway, if you prefer ASCII-art for any reason,
  1021. here are some helpers:</p>
  1022. <ul class="simple">
  1023. <li><p><a class="reference external" href="https://www.emacswiki.org/emacs/TableMode">Emacs Table Mode</a></p></li>
  1024. <li><p><a class="reference external" href="https://www.tablesgenerator.com/text_tables">Online Tables Generator</a></p></li>
  1025. </ul>
  1026. <section id="simple-tables">
  1027. <span id="rest-simple-table"></span><h3><a class="toc-backref" href="#id45" role="doc-backlink">Simple tables</a><a class="headerlink" href="#simple-tables" title="Link to this heading">¶</a></h3>
  1028. <p><a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#simple-tables">Simple tables</a> allow <em>colspan</em> but not <em>rowspan</em>. If
  1029. your table need some metadata (e.g. a title) you need to add the <code class="docutils literal notranslate"><span class="pre">..</span> <span class="pre">table::</span>
  1030. <span class="pre">directive</span></code> <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#table">(ref)</a> in front and place the table in its body:</p>
  1031. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">table</span><span class="p">::</span> foo gate truth table
  1032. <span class="nc">:widths:</span> grid
  1033. <span class="nc">:align:</span> left
  1034. ====== ====== ======
  1035. Inputs Output
  1036. ------------- ------
  1037. A B A or B
  1038. ====== ====== ======
  1039. False
  1040. --------------------
  1041. True
  1042. --------------------
  1043. True False True
  1044. (foo)
  1045. ------ ------ ------
  1046. False True
  1047. (foo)
  1048. ====== =============
  1049. </pre></div>
  1050. </div>
  1051. <div class="rst-example admonition">
  1052. <p class="admonition-title">Simple ASCII table</p>
  1053. <table class="docutils align-left" id="id11">
  1054. <caption><span class="caption-number">Table 12 </span><span class="caption-text">foo gate truth table</span><a class="headerlink" href="#id11" title="Link to this table">¶</a></caption>
  1055. <colgroup>
  1056. <col style="width: 33.3%" />
  1057. <col style="width: 33.3%" />
  1058. <col style="width: 33.3%" />
  1059. </colgroup>
  1060. <thead>
  1061. <tr class="row-odd"><th class="head" colspan="2"><p>Inputs</p></th>
  1062. <th class="head"><p>Output</p></th>
  1063. </tr>
  1064. <tr class="row-even"><th class="head"><p>A</p></th>
  1065. <th class="head"><p>B</p></th>
  1066. <th class="head"><p>A or B</p></th>
  1067. </tr>
  1068. </thead>
  1069. <tbody>
  1070. <tr class="row-odd"><td colspan="3"><p>False</p></td>
  1071. </tr>
  1072. <tr class="row-even"><td colspan="3"><p>True</p></td>
  1073. </tr>
  1074. <tr class="row-odd"><td><p>True</p></td>
  1075. <td><p>False
  1076. (foo)</p></td>
  1077. <td><p>True</p></td>
  1078. </tr>
  1079. <tr class="row-even"><td><p>False</p></td>
  1080. <td colspan="2"><p>True
  1081. (foo)</p></td>
  1082. </tr>
  1083. </tbody>
  1084. </table>
  1085. </div>
  1086. </section>
  1087. <section id="grid-tables">
  1088. <span id="rest-grid-table"></span><h3><a class="toc-backref" href="#id46" role="doc-backlink">Grid tables</a><a class="headerlink" href="#grid-tables" title="Link to this heading">¶</a></h3>
  1089. <p><a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#grid-tables">Grid tables</a> allow colspan <em>colspan</em> and <em>rowspan</em>:</p>
  1090. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">table</span><span class="p">::</span> grid table example
  1091. <span class="nc">:widths:</span> 1 1 5
  1092. +------------+------------+-----------+
  1093. <span class="o">|</span> Header 1 | Header 2 | Header 3 |
  1094. +============+============+===========+
  1095. <span class="o">|</span> body row 1 | column 2 | column 3 |
  1096. +------------+------------+-----------+
  1097. <span class="o">|</span> body row 2 | Cells may span columns.|
  1098. +------------+------------+-----------+
  1099. <span class="o">|</span> body row 3 | Cells may | - Cells |
  1100. +------------+ span rows. | - contain |
  1101. <span class="o">|</span> body row 4 | | - blocks. |
  1102. +------------+------------+-----------+
  1103. </pre></div>
  1104. </div>
  1105. <div class="rst-example admonition">
  1106. <p class="admonition-title">ASCII grid table</p>
  1107. <table class="docutils align-default" id="id12">
  1108. <caption><span class="caption-number">Table 13 </span><span class="caption-text">grid table example</span><a class="headerlink" href="#id12" title="Link to this table">¶</a></caption>
  1109. <colgroup>
  1110. <col style="width: 14.3%" />
  1111. <col style="width: 14.3%" />
  1112. <col style="width: 71.4%" />
  1113. </colgroup>
  1114. <thead>
  1115. <tr class="row-odd"><th class="head"><p>Header 1</p></th>
  1116. <th class="head"><p>Header 2</p></th>
  1117. <th class="head"><p>Header 3</p></th>
  1118. </tr>
  1119. </thead>
  1120. <tbody>
  1121. <tr class="row-even"><td><p>body row 1</p></td>
  1122. <td><p>column 2</p></td>
  1123. <td><p>column 3</p></td>
  1124. </tr>
  1125. <tr class="row-odd"><td><p>body row 2</p></td>
  1126. <td colspan="2"><p>Cells may span columns.</p></td>
  1127. </tr>
  1128. <tr class="row-even"><td><p>body row 3</p></td>
  1129. <td rowspan="2"><p>Cells may
  1130. span rows.</p></td>
  1131. <td rowspan="2"><ul class="simple">
  1132. <li><p>Cells</p></li>
  1133. <li><p>contain</p></li>
  1134. <li><p>blocks.</p></li>
  1135. </ul>
  1136. </td>
  1137. </tr>
  1138. <tr class="row-odd"><td><p>body row 4</p></td>
  1139. </tr>
  1140. </tbody>
  1141. </table>
  1142. </div>
  1143. </section>
  1144. <section id="flat-table">
  1145. <span id="rest-flat-table"></span><h3><a class="toc-backref" href="#id47" role="doc-backlink">flat-table</a><a class="headerlink" href="#flat-table" title="Link to this heading">¶</a></h3>
  1146. <p>The <code class="docutils literal notranslate"><span class="pre">flat-table</span></code> is a further developed variant of the <a class="reference external" href="https://return42.github.io/linuxdoc/linuxdoc-howto/table-markup.html#list-table-directives" title="(in LinuxDoc v20240924.dev1)"><span class="xref std std-ref">list tables</span></a>. It is a double-stage list similar to the
  1147. <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#list-table">list-table</a> with some additional features:</p>
  1148. <dl class="simple">
  1149. <dt>column-span: <code class="docutils literal notranslate"><span class="pre">cspan</span></code></dt><dd><p>with the role <code class="docutils literal notranslate"><span class="pre">cspan</span></code> a cell can be extended through additional columns</p>
  1150. </dd>
  1151. <dt>row-span: <code class="docutils literal notranslate"><span class="pre">rspan</span></code></dt><dd><p>with the role <code class="docutils literal notranslate"><span class="pre">rspan</span></code> a cell can be extended through additional rows</p>
  1152. </dd>
  1153. <dt>auto-span:</dt><dd><p>spans rightmost cell of a table row over the missing cells on the right side
  1154. of that table-row. With Option <code class="docutils literal notranslate"><span class="pre">:fill-cells:</span></code> this behavior can changed
  1155. from <em>auto span</em> to <em>auto fill</em>, which automatically inserts (empty) cells
  1156. instead of spanning the last cell.</p>
  1157. </dd>
  1158. <dt>options:</dt><dd><dl class="field-list simple">
  1159. <dt class="field-odd">header-rows<span class="colon">:</span></dt>
  1160. <dd class="field-odd"><p>[int] count of header rows</p>
  1161. </dd>
  1162. <dt class="field-even">stub-columns<span class="colon">:</span></dt>
  1163. <dd class="field-even"><p>[int] count of stub columns</p>
  1164. </dd>
  1165. <dt class="field-odd">widths<span class="colon">:</span></dt>
  1166. <dd class="field-odd"><p>[[int] [int] … ] widths of columns</p>
  1167. </dd>
  1168. <dt class="field-even">fill-cells<span class="colon">:</span></dt>
  1169. <dd class="field-even"><p>instead of auto-span missing cells, insert missing cells</p>
  1170. </dd>
  1171. </dl>
  1172. </dd>
  1173. <dt>roles:</dt><dd><dl class="field-list simple">
  1174. <dt class="field-odd">cspan<span class="colon">:</span></dt>
  1175. <dd class="field-odd"><p>[int] additional columns (<em>morecols</em>)</p>
  1176. </dd>
  1177. <dt class="field-even">rspan<span class="colon">:</span></dt>
  1178. <dd class="field-even"><p>[int] additional rows (<em>morerows</em>)</p>
  1179. </dd>
  1180. </dl>
  1181. </dd>
  1182. </dl>
  1183. <p>The example below shows how to use this markup. The first level of the staged
  1184. list is the <em>table-row</em>. In the <em>table-row</em> there is only one markup allowed,
  1185. the list of the cells in this <em>table-row</em>. Exception are <em>comments</em> ( <code class="docutils literal notranslate"><span class="pre">..</span></code> )
  1186. and <em>targets</em> (e.g. a ref to <a class="reference internal" href="#row-body-2"><span class="std std-ref">row 2 of table’s body</span></a>).</p>
  1187. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">flat-table</span><span class="p">::</span> <span class="s">``flat-table``</span> example
  1188. <span class="nc">:header-rows:</span> 2
  1189. <span class="nc">:stub-columns:</span> 1
  1190. <span class="nc">:widths:</span> 1 1 1 1 2
  1191. <span class="m">*</span> - <span class="na">:rspan:</span><span class="nv">`1`</span> head / stub
  1192. <span class="m">-</span> <span class="na">:cspan:</span><span class="nv">`3`</span> head 1.1-4
  1193. <span class="m">*</span> - head 2.1
  1194. <span class="m">-</span> head 2.2
  1195. <span class="m">-</span> head 2.3
  1196. <span class="m">-</span> head 2.4
  1197. <span class="m">*</span> .. row body 1 / this is a comment
  1198. <span class="m">-</span> row 1
  1199. <span class="m">-</span> <span class="na">:rspan:</span><span class="nv">`2`</span> cell 1-3.1
  1200. <span class="m">-</span> cell 1.2
  1201. <span class="m">-</span> cell 1.3
  1202. <span class="m">-</span> cell 1.4
  1203. <span class="m">*</span> .. Comments and targets are allowed on <span class="ge">*table-row*</span> stage.
  1204. <span class="p"> ..</span> <span class="nt">_`row body 2`:</span>
  1205. <span class="m">-</span> row 2
  1206. <span class="m">-</span> cell 2.2
  1207. <span class="m">-</span> <span class="na">:rspan:</span><span class="nv">`1`</span> <span class="na">:cspan:</span><span class="nv">`1`</span>
  1208. cell 2.3 with a span over
  1209. <span class="m">*</span> col 3-4 &amp;
  1210. <span class="m">*</span> row 2-3
  1211. <span class="m">*</span> - row 3
  1212. <span class="m">-</span> cell 3.2
  1213. <span class="m">*</span> - row 4
  1214. <span class="m">-</span> cell 4.1
  1215. <span class="m">-</span> cell 4.2
  1216. <span class="m">-</span> cell 4.3
  1217. <span class="m">-</span> cell 4.4
  1218. <span class="m">*</span> - row 5
  1219. <span class="m">-</span> cell 5.1 with automatic span to right end
  1220. <span class="m">*</span> - row 6
  1221. <span class="m">-</span> cell 6.1
  1222. <span class="m">-</span> ..
  1223. </pre></div>
  1224. </div>
  1225. <div class="rst-example admonition">
  1226. <p class="admonition-title">List table</p>
  1227. <table class="docutils align-default" id="id13">
  1228. <caption><span class="caption-number">Table 14 </span><span class="caption-text"><code class="docutils literal notranslate"><span class="pre">flat-table</span></code> example</span><a class="headerlink" href="#id13" title="Link to this table">¶</a></caption>
  1229. <colgroup>
  1230. <col style="width: 16.7%" />
  1231. <col style="width: 16.7%" />
  1232. <col style="width: 16.7%" />
  1233. <col style="width: 16.7%" />
  1234. <col style="width: 33.3%" />
  1235. </colgroup>
  1236. <thead>
  1237. <tr class="row-odd"><th class="head stub" rowspan="2"><p> head / stub</p></th>
  1238. <th class="head" colspan="4"><p> head 1.1-4</p></th>
  1239. </tr>
  1240. <tr class="row-even"><th class="head stub"><p>head 2.1</p></th>
  1241. <th class="head"><p>head 2.2</p></th>
  1242. <th class="head"><p>head 2.3</p></th>
  1243. <th class="head"><p>head 2.4</p></th>
  1244. </tr>
  1245. </thead>
  1246. <tbody>
  1247. <tr class="row-odd"><th class="stub"><p>row 1</p></th>
  1248. <td rowspan="3"><p> cell 1-3.1</p></td>
  1249. <td><p>cell 1.2</p></td>
  1250. <td><p>cell 1.3</p></td>
  1251. <td><p>cell 1.4</p></td>
  1252. </tr>
  1253. <tr class="row-even"><th class="stub"><p>row 2</p>
  1254. </th>
  1255. <td><p>cell 2.2</p>
  1256. </td>
  1257. <td colspan="2" rowspan="2"><p id="row-body-2">
  1258. cell 2.3 with a span over</p>
  1259. <ul class="simple">
  1260. <li><p>col 3-4 &amp;</p></li>
  1261. <li><p>row 2-3</p></li>
  1262. </ul>
  1263. </td>
  1264. </tr>
  1265. <tr class="row-odd"><th class="stub"><p>row 3</p></th>
  1266. <td><p>cell 3.2</p></td>
  1267. </tr>
  1268. <tr class="row-even"><th class="stub"><p>row 4</p></th>
  1269. <td><p>cell 4.1</p></td>
  1270. <td><p>cell 4.2</p></td>
  1271. <td><p>cell 4.3</p></td>
  1272. <td><p>cell 4.4</p></td>
  1273. </tr>
  1274. <tr class="row-odd"><th class="stub"><p>row 5</p></th>
  1275. <td colspan="4"><p>cell 5.1 with automatic span to right end</p></td>
  1276. </tr>
  1277. <tr class="row-even"><th class="stub"><p>row 6</p></th>
  1278. <td><p>cell 6.1</p></td>
  1279. <td colspan="3"></td>
  1280. </tr>
  1281. </tbody>
  1282. </table>
  1283. </div>
  1284. </section>
  1285. <section id="csv-table">
  1286. <h3><a class="toc-backref" href="#id48" role="doc-backlink">CSV table</a><a class="headerlink" href="#csv-table" title="Link to this heading">¶</a></h3>
  1287. <p>CSV table might be the choice if you want to include CSV-data from a outstanding
  1288. (build) process into your documentation.</p>
  1289. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">csv-table</span><span class="p">::</span> CSV table example
  1290. <span class="nc">:header:</span> .. , Column 1, Column 2
  1291. <span class="nc">:widths:</span> 2 5 5
  1292. <span class="nc">:stub-columns:</span> 1
  1293. <span class="nc">:file:</span> csv_table.txt
  1294. </pre></div>
  1295. </div>
  1296. <p>Content of file <code class="docutils literal notranslate"><span class="pre">csv_table.txt</span></code>:</p>
  1297. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">stub</span> <span class="n">col</span> <span class="n">row</span> <span class="mi">1</span><span class="p">,</span> <span class="n">column</span><span class="p">,</span> <span class="s2">&quot;loremLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy</span>
  1298. <span class="n">eirmod</span> <span class="n">tempor</span> <span class="n">invidunt</span> <span class="n">ut</span> <span class="n">labore</span> <span class="n">et</span> <span class="n">dolore</span> <span class="n">magna</span> <span class="n">aliquyam</span> <span class="n">erat</span><span class="p">,</span> <span class="n">sed</span> <span class="n">diam</span>
  1299. <span class="n">voluptua</span><span class="o">.</span><span class="s2">&quot;</span>
  1300. <span class="n">stub</span> <span class="n">col</span> <span class="n">row</span> <span class="mi">1</span><span class="p">,</span> <span class="s2">&quot;At vero eos et accusam et justo duo dolores et ea rebum. Stet clita</span>
  1301. <span class="n">kasd</span> <span class="n">gubergren</span><span class="p">,</span> <span class="n">no</span> <span class="n">sea</span> <span class="n">takimata</span> <span class="n">sanctus</span> <span class="n">est</span> <span class="n">Lorem</span> <span class="n">ipsum</span> <span class="n">dolor</span> <span class="n">sit</span> <span class="n">amet</span><span class="o">.</span><span class="s2">&quot;, column</span>
  1302. <span class="n">stub</span> <span class="n">col</span> <span class="n">row</span> <span class="mi">1</span><span class="p">,</span> <span class="n">column</span><span class="p">,</span> <span class="n">column</span>
  1303. </pre></div>
  1304. </div>
  1305. <div class="rst-example admonition">
  1306. <p class="admonition-title">CSV table</p>
  1307. <table class="docutils align-default" id="id14">
  1308. <caption><span class="caption-number">Table 15 </span><span class="caption-text">CSV table example</span><a class="headerlink" href="#id14" title="Link to this table">¶</a></caption>
  1309. <colgroup>
  1310. <col style="width: 23.1%" />
  1311. <col style="width: 38.5%" />
  1312. <col style="width: 38.5%" />
  1313. </colgroup>
  1314. <thead>
  1315. <tr class="row-odd"><th class="head stub"></th>
  1316. <th class="head"><p>Column 1</p></th>
  1317. <th class="head"><p>Column 2</p></th>
  1318. </tr>
  1319. </thead>
  1320. <tbody>
  1321. <tr class="row-even"><th class="stub"><p>stub col row 1</p></th>
  1322. <td><p>column</p></td>
  1323. <td><p>loremLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
  1324. eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
  1325. voluptua.</p></td>
  1326. </tr>
  1327. <tr class="row-odd"><th class="stub"><p>stub col row 1</p></th>
  1328. <td><p>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita
  1329. kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p></td>
  1330. <td><p>column</p></td>
  1331. </tr>
  1332. <tr class="row-even"><th class="stub"><p>stub col row 1</p></th>
  1333. <td><p>column</p></td>
  1334. <td><p>column</p></td>
  1335. </tr>
  1336. </tbody>
  1337. </table>
  1338. </div>
  1339. </section>
  1340. </section>
  1341. <section id="templating">
  1342. <h2><a class="toc-backref" href="#id49" role="doc-backlink">Templating</a><a class="headerlink" href="#templating" title="Link to this heading">¶</a></h2>
  1343. <aside class="sidebar">
  1344. <p class="sidebar-title">Build environment</p>
  1345. <p>All <em>generic-doc</em> tasks are running in the <a class="reference internal" href="makefile.html#make-install"><span class="std std-ref">Python environment (make install)</span></a>.</p>
  1346. </aside>
  1347. <p>Templating is suitable for documentation which is created generic at the build
  1348. time. The <a class="reference external" href="https://github.com/tardyp/sphinx-jinja">sphinx-jinja</a> extension evaluates <a class="reference external" href="https://jinja.palletsprojects.com/">jinja</a> templates in the <a class="reference internal" href="makefile.html#make-install"><span class="std std-ref">Python environment (make install)</span></a> (with SearXNG modules installed). We use this e.g. to build chapter:
  1349. <a class="reference internal" href="../user/configured_engines.html#configured-engines"><span class="std std-ref">Configured Engines</span></a>. Below the jinja directive from the
  1350. <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/docs/admin/engines.rst">git://docs/admin/engines.rst</a> is shown:</p>
  1351. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="gh">==================</span>
  1352. <span class="gh">Configured Engines</span>
  1353. <span class="gh">==================</span>
  1354. <span class="p">..</span> <span class="ow">sidebar</span><span class="p">::</span> Further reading ..
  1355. <span class="m">-</span> <span class="na">:ref:</span><span class="nv">`settings categories_as_tabs`</span>
  1356. <span class="m">-</span> <span class="na">:ref:</span><span class="nv">`engines-dev`</span>
  1357. <span class="m">-</span> <span class="na">:ref:</span><span class="nv">`settings engines`</span>
  1358. <span class="m">-</span> <span class="na">:ref:</span><span class="nv">`general engine configuration`</span>
  1359. <span class="p">..</span> <span class="ow">jinja</span><span class="p">::</span> searx
  1360. SearXNG supports {{engines | length}} search engines of which
  1361. {{enabled_engine_count}} are enabled by default.
  1362. Engines can be assigned to multiple <span class="na">:ref:</span><span class="nv">`categories &lt;engine categories&gt;`</span>.
  1363. The UI displays the tabs that are configured in :ref:`categories_as_tabs
  1364. &lt;settings categories_as_tabs&gt;`. In addition to these UI categories (also
  1365. called <span class="ge">*tabs*</span>), engines can be queried by their name or the categories they
  1366. belong to, by using a <span class="na">:ref:</span><span class="nv">`\!bing syntax &lt;search-syntax&gt;`</span>.
  1367. <span class="p">..</span> <span class="ow">contents</span><span class="p">::</span>
  1368. <span class="nc">:depth:</span> 2
  1369. <span class="nc">:local:</span>
  1370. <span class="nc">:backlinks:</span> entry
  1371. <span class="p">..</span> <span class="ow">jinja</span><span class="p">::</span> searx
  1372. {% for category, engines in categories_as_tabs.items() %}
  1373. tab <span class="s">``!{{category.replace(&#39; &#39;, &#39;_&#39;)}}``</span>
  1374. ---------------------------------------
  1375. {% for group, group_bang, engines in engines | group_engines_in_tab %}
  1376. {% if loop.length &gt; 1 %}
  1377. {% if group_bang %}group <span class="s">``{{group_bang}}``{% else %}{{group}}{% endif %}</span>
  1378. <span class="s"> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span>
  1379. <span class="s"> {% endif %}</span>
  1380. <span class="s"> .. flat-table::</span>
  1381. <span class="s"> :header-rows: 2</span>
  1382. <span class="s"> :stub-columns: 1</span>
  1383. <span class="s"> :widths: 10 1 10 1 1 1 1 1 1 1</span>
  1384. <span class="s"> * - :cspan:`5` Engines configured by default (in :ref:`settings.yml &lt;engine settings&gt;`)</span>
  1385. <span class="s"> - :cspan:`3` :ref:`Supported features &lt;engine file&gt;`</span>
  1386. <span class="s"> * - Name</span>
  1387. <span class="s"> - !bang</span>
  1388. <span class="s"> - Module</span>
  1389. <span class="s"> - Disabled</span>
  1390. <span class="s"> - Timeout</span>
  1391. <span class="s"> - Weight</span>
  1392. <span class="s"> - Paging</span>
  1393. <span class="s"> - Locale</span>
  1394. <span class="s"> - Safe search</span>
  1395. <span class="s"> - Time range</span>
  1396. <span class="s"> {% for mod in engines %}</span>
  1397. <span class="s"> * - `{{mod.name}} &lt;{{mod.about and mod.about.website}}&gt;`_</span>
  1398. <span class="s"> {%- if mod.about and mod.about.language %}</span>
  1399. <span class="s"> ({{mod.about.language | upper}})</span>
  1400. <span class="s"> {%- endif %}</span>
  1401. <span class="s"> - ``</span>!{{mod.shortcut}}<span class="s">``</span>
  1402. <span class="s"> - {%- if &#39;searx.engines.&#39; + mod.__name__ in documented_modules %}</span>
  1403. <span class="s"> :py:mod:`~searx.engines.{{mod.__name__}}`</span>
  1404. <span class="s"> {%- else %}</span>
  1405. <span class="s"> :origin:`{{mod.__name__}} &lt;searx/engines/{{mod.__name__}}.py&gt;`</span>
  1406. <span class="s"> {%- endif %}</span>
  1407. <span class="s"> - {{(mod.disabled and &quot;y&quot;) or &quot;&quot;}}</span>
  1408. <span class="s"> - {{mod.timeout}}</span>
  1409. <span class="s"> - {{mod.weight or 1 }}</span>
  1410. <span class="s"> {% if mod.engine_type == &#39;online&#39; %}</span>
  1411. <span class="s"> - {{(mod.paging and &quot;y&quot;) or &quot;&quot;}}</span>
  1412. <span class="s"> - {{(mod.language_support and &quot;y&quot;) or &quot;&quot;}}</span>
  1413. <span class="s"> - {{(mod.safesearch and &quot;y&quot;) or &quot;&quot;}}</span>
  1414. <span class="s"> - {{(mod.time_range_support and &quot;y&quot;) or &quot;&quot;}}</span>
  1415. <span class="s"> {% else %}</span>
  1416. <span class="s"> - :cspan:`3` not applicable ({{mod.engine_type}})</span>
  1417. <span class="s"> {% endif %}</span>
  1418. <span class="s"> {% endfor %}</span>
  1419. <span class="s"> {% endfor %}</span>
  1420. <span class="s"> {% endfor %}</span>
  1421. </pre></div>
  1422. </div>
  1423. <p>The context for the template is selected in the line <code class="docutils literal notranslate"><span class="pre">..</span> <span class="pre">jinja::</span> <span class="pre">searx</span></code>. In
  1424. sphinx’s build configuration (<a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/docs/conf.py">git://docs/conf.py</a>) the <code class="docutils literal notranslate"><span class="pre">searx</span></code> context
  1425. contains the <code class="docutils literal notranslate"><span class="pre">engines</span></code> and <code class="docutils literal notranslate"><span class="pre">plugins</span></code>.</p>
  1426. <div class="highlight-py notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">searx.search</span>
  1427. <span class="kn">import</span><span class="w"> </span><span class="nn">searx.engines</span>
  1428. <span class="kn">import</span><span class="w"> </span><span class="nn">searx.plugins</span>
  1429. <span class="n">searx</span><span class="o">.</span><span class="n">search</span><span class="o">.</span><span class="n">initialize</span><span class="p">()</span>
  1430. <span class="n">jinja_contexts</span> <span class="o">=</span> <span class="p">{</span>
  1431. <span class="s1">&#39;searx&#39;</span><span class="p">:</span> <span class="p">{</span>
  1432. <span class="s1">&#39;engines&#39;</span><span class="p">:</span> <span class="n">searx</span><span class="o">.</span><span class="n">engines</span><span class="o">.</span><span class="n">engines</span><span class="p">,</span>
  1433. <span class="s1">&#39;plugins&#39;</span><span class="p">:</span> <span class="n">searx</span><span class="o">.</span><span class="n">plugins</span><span class="o">.</span><span class="n">plugins</span>
  1434. <span class="p">},</span>
  1435. <span class="p">}</span>
  1436. </pre></div>
  1437. </div>
  1438. </section>
  1439. <section id="tabbed-views">
  1440. <h2><a class="toc-backref" href="#id50" role="doc-backlink">Tabbed views</a><a class="headerlink" href="#tabbed-views" title="Link to this heading">¶</a></h2>
  1441. <p>With <a class="reference external" href="https://github.com/djungelorm/sphinx-tabs">sphinx-tabs</a> extension we have <em>tabbed views</em>. To provide installation
  1442. instructions with one tab per distribution we use the <a class="reference external" href="https://github.com/djungelorm/sphinx-tabs#group-tabs">group-tabs</a> directive,
  1443. others are <a class="reference external" href="https://github.com/djungelorm/sphinx-tabs#basic-tabs">basic-tabs</a> and <a class="reference external" href="https://github.com/djungelorm/sphinx-tabs#code-tabs">code-tabs</a>. Below a <em>group-tab</em> example from
  1444. <a class="reference internal" href="../admin/buildhosts.html#docs-build"><span class="std std-ref">Build docs</span></a> is shown:</p>
  1445. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">tabs</span><span class="p">::</span>
  1446. <span class="p"> ..</span> <span class="ow">group-tab</span><span class="p">::</span> Ubuntu / debian
  1447. <span class="p"> ..</span> <span class="ow">code-block</span><span class="p">::</span> <span class="k">sh</span>
  1448. $<span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>shellcheck
  1449. <span class="p"> ..</span> <span class="ow">group-tab</span><span class="p">::</span> Arch Linux
  1450. <span class="p"> ..</span> <span class="ow">code-block</span><span class="p">::</span> <span class="k">sh</span>
  1451. $<span class="w"> </span>sudo<span class="w"> </span>pacman<span class="w"> </span>-S<span class="w"> </span>shellcheck
  1452. <span class="p"> ..</span> <span class="ow">group-tab</span><span class="p">::</span> Fedora / RHEL
  1453. <span class="p"> ..</span> <span class="ow">code-block</span><span class="p">::</span> sh
  1454. $ sudo dnf install ShellCheck
  1455. </pre></div>
  1456. </div>
  1457. </section>
  1458. <section id="math-equations">
  1459. <span id="math"></span><h2><a class="toc-backref" href="#id51" role="doc-backlink">Math equations</a><a class="headerlink" href="#math-equations" title="Link to this heading">¶</a></h2>
  1460. <aside class="sidebar">
  1461. <p class="sidebar-title">About LaTeX</p>
  1462. <ul class="simple">
  1463. <li><p><a class="reference external" href="http://vesta.informatik.rwth-aachen.de/ftp/pub/mirror/ctan/macros/latex/required/amsmath/amsldoc.pdf">amsmath user guide</a></p></li>
  1464. <li><p><a class="reference external" href="https://en.wikibooks.org/wiki/LaTeX/Mathematics">Mathematics</a></p></li>
  1465. <li><p><a class="reference internal" href="../admin/buildhosts.html#docs-build"><span class="std std-ref">Build docs</span></a></p></li>
  1466. </ul>
  1467. </aside>
  1468. <p>The input language for mathematics is LaTeX markup using the <a class="extlink-ctan reference external" href="https://ctan.org/pkg/amsmath">CTAN: amsmath</a>
  1469. package.</p>
  1470. <p>To embed LaTeX markup in reST documents, use role <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-math" title="(in Sphinx v8.3.0)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">:math:</span></code></a> for
  1471. inline and directive <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-math" title="(in Sphinx v8.3.0)"><code class="xref rst rst-dir docutils literal notranslate"><span class="pre">..</span> <span class="pre">math::</span></code></a> for block markup.</p>
  1472. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span>In <span class="na">:math:numref:</span><span class="nv">`schroedinger general`</span> the time-dependent Schrödinger equation
  1473. is shown.
  1474. <span class="p">..</span> <span class="ow">math</span><span class="p">::</span>
  1475. <span class="nc">:label:</span> schroedinger general
  1476. \mathrm{i}\hbar\dfrac{\partial}{\partial t} |\,\psi (t) \rangle =
  1477. \hat{H} |\,\psi (t) \rangle.
  1478. </pre></div>
  1479. </div>
  1480. <div class="rst-example admonition">
  1481. <p class="admonition-title">LaTeX math equation</p>
  1482. <p>In <a class="reference internal" href="#equation-schroedinger-general">(1)</a> the time-dependent Schrödinger equation
  1483. is shown.</p>
  1484. <div class="math" id="equation-schroedinger-general">
  1485. <p><span class="eqno">(1)<a class="headerlink" href="#equation-schroedinger-general" title="Link to this equation">¶</a></span><img src="../_images/math/a6a994cb6e7278ec30eaebe7e636046d3deccb5b.svg" alt="\mathrm{i}\hbar\dfrac{\partial}{\partial t} |\,\psi (t) \rangle =
  1486. \hat{H} |\,\psi (t) \rangle."/></p>
  1487. </div></div>
  1488. <p>The next example shows the difference of <code class="docutils literal notranslate"><span class="pre">\tfrac</span></code> (<em>textstyle</em>) and <code class="docutils literal notranslate"><span class="pre">\dfrac</span></code>
  1489. (<em>displaystyle</em>) used in a inline markup or another fraction.</p>
  1490. <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="s">``\tfrac``</span> <span class="gs">**inline example**</span> <span class="na">:math:</span><span class="nv">`\tfrac{\tfrac{1}{x}+\tfrac{1}{y}}{y-z}`</span>
  1491. <span class="s">``\dfrac``</span> <span class="gs">**inline example**</span> <span class="na">:math:</span><span class="nv">`\dfrac{\dfrac{1}{x}+\dfrac{1}{y}}{y-z}`</span>
  1492. </pre></div>
  1493. </div>
  1494. <div class="rst-example admonition">
  1495. <p class="admonition-title">Line spacing</p>
  1496. <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
  1497. eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
  1498. voluptua. …
  1499. <code class="docutils literal notranslate"><span class="pre">\tfrac</span></code> <strong>inline example</strong> <img class="math" src="../_images/math/3b8127a8eed95247f9249ea6c85e8e86df1baa82.svg" alt="\tfrac{\tfrac{1}{x}+\tfrac{1}{y}}{y-z}"/>
  1500. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
  1501. gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
  1502. <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
  1503. eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
  1504. voluptua. …
  1505. <code class="docutils literal notranslate"><span class="pre">\tfrac</span></code> <strong>inline example</strong> <img class="math" src="../_images/math/07c9ff4251510b06013159f4e45ec9ab97044096.svg" alt="\dfrac{\dfrac{1}{x}+\dfrac{1}{y}}{y-z}"/>
  1506. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
  1507. gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
  1508. </div>
  1509. </section>
  1510. </section>
  1511. <div class="clearer"></div>
  1512. </div>
  1513. </div>
  1514. </div>
  1515. <span id="sidebar-top"></span>
  1516. <div class="sphinxsidebar" role="navigation" aria-label="Main">
  1517. <div class="sphinxsidebarwrapper">
  1518. <p class="logo"><a href="../index.html">
  1519. <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/>
  1520. </a></p>
  1521. <h3><a href="../index.html">Table of Contents</a></h3>
  1522. <ul class="current">
  1523. <li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
  1524. <li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
  1525. <li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li>
  1526. <li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current">
  1527. <li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li>
  1528. <li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li>
  1529. <li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li>
  1530. <li class="toctree-l2"><a class="reference internal" href="extended_types.html">Extended Types</a></li>
  1531. <li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li>
  1532. <li class="toctree-l2"><a class="reference internal" href="result_types/index.html">Result Types</a></li>
  1533. <li class="toctree-l2"><a class="reference internal" href="templates.html">Simple Theme Templates</a></li>
  1534. <li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li>
  1535. <li class="toctree-l2"><a class="reference internal" href="plugins/index.html">Plugins</a></li>
  1536. <li class="toctree-l2"><a class="reference internal" href="answerers/index.html">Answerers</a></li>
  1537. <li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li>
  1538. <li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li>
  1539. <li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
  1540. <li class="toctree-l2 current"><a class="current reference internal" href="#">reST primer</a><ul>
  1541. <li class="toctree-l3"><a class="reference internal" href="#soft-skills">Soft skills</a></li>
  1542. <li class="toctree-l3"><a class="reference internal" href="#basic-inline-markup">Basic inline markup</a></li>
  1543. <li class="toctree-l3"><a class="reference internal" href="#basic-article-structure">Basic article structure</a><ul>
  1544. <li class="toctree-l4"><a class="reference internal" href="#rest-template">reST template</a></li>
  1545. <li class="toctree-l4"><a class="reference internal" href="#headings">Headings</a></li>
  1546. </ul>
  1547. </li>
  1548. <li class="toctree-l3"><a class="reference internal" href="#anchors-links">Anchors &amp; Links</a><ul>
  1549. <li class="toctree-l4"><a class="reference internal" href="#anchors">Anchors</a></li>
  1550. <li class="toctree-l4"><a class="reference internal" href="#link-ordinary-url">Link ordinary URL</a></li>
  1551. <li class="toctree-l4"><a class="reference internal" href="#smart-refs">Smart refs</a></li>
  1552. </ul>
  1553. </li>
  1554. <li class="toctree-l3"><a class="reference internal" href="#literal-blocks">Literal blocks</a><ul>
  1555. <li class="toctree-l4"><a class="reference internal" href="#rest-literal"><code class="docutils literal notranslate"><span class="pre">::</span></code></a></li>
  1556. <li class="toctree-l4"><a class="reference internal" href="#code-block"><code class="docutils literal notranslate"><span class="pre">code-block</span></code></a></li>
  1557. </ul>
  1558. </li>
  1559. <li class="toctree-l3"><a class="reference internal" href="#unicode-substitution">Unicode substitution</a></li>
  1560. <li class="toctree-l3"><a class="reference internal" href="#roles">Roles</a></li>
  1561. <li class="toctree-l3"><a class="reference internal" href="#figures-images">Figures &amp; Images</a><ul>
  1562. <li class="toctree-l4"><a class="reference internal" href="#dot-files-aka-graphviz">DOT files (aka Graphviz)</a></li>
  1563. <li class="toctree-l4"><a class="reference internal" href="#kernel-render-dot"><code class="docutils literal notranslate"><span class="pre">kernel-render</span></code> DOT</a></li>
  1564. <li class="toctree-l4"><a class="reference internal" href="#kernel-render-svg"><code class="docutils literal notranslate"><span class="pre">kernel-render</span></code> SVG</a></li>
  1565. </ul>
  1566. </li>
  1567. <li class="toctree-l3"><a class="reference internal" href="#list-markups">List markups</a><ul>
  1568. <li class="toctree-l4"><a class="reference internal" href="#bullet-list">Bullet list</a></li>
  1569. <li class="toctree-l4"><a class="reference internal" href="#horizontal-list">Horizontal list</a></li>
  1570. <li class="toctree-l4"><a class="reference internal" href="#definition-list">Definition list</a></li>
  1571. <li class="toctree-l4"><a class="reference internal" href="#quoted-paragraphs">Quoted paragraphs</a></li>
  1572. <li class="toctree-l4"><a class="reference internal" href="#field-lists">Field Lists</a></li>
  1573. <li class="toctree-l4"><a class="reference internal" href="#further-list-blocks">Further list blocks</a></li>
  1574. </ul>
  1575. </li>
  1576. <li class="toctree-l3"><a class="reference internal" href="#admonitions">Admonitions</a><ul>
  1577. <li class="toctree-l4"><a class="reference internal" href="#sidebar">Sidebar</a></li>
  1578. <li class="toctree-l4"><a class="reference internal" href="#generic-admonition">Generic admonition</a></li>
  1579. <li class="toctree-l4"><a class="reference internal" href="#specific-admonitions">Specific admonitions</a></li>
  1580. </ul>
  1581. </li>
  1582. <li class="toctree-l3"><a class="reference internal" href="#tables">Tables</a><ul>
  1583. <li class="toctree-l4"><a class="reference internal" href="#simple-tables">Simple tables</a></li>
  1584. <li class="toctree-l4"><a class="reference internal" href="#grid-tables">Grid tables</a></li>
  1585. <li class="toctree-l4"><a class="reference internal" href="#flat-table">flat-table</a></li>
  1586. <li class="toctree-l4"><a class="reference internal" href="#csv-table">CSV table</a></li>
  1587. </ul>
  1588. </li>
  1589. <li class="toctree-l3"><a class="reference internal" href="#templating">Templating</a></li>
  1590. <li class="toctree-l3"><a class="reference internal" href="#tabbed-views">Tabbed views</a></li>
  1591. <li class="toctree-l3"><a class="reference internal" href="#math-equations">Math equations</a></li>
  1592. </ul>
  1593. </li>
  1594. <li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
  1595. </ul>
  1596. </li>
  1597. <li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
  1598. <li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
  1599. </ul>
  1600. <h3>Project Links</h3>
  1601. <ul>
  1602. <li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
  1603. <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
  1604. <li><a href="https://searx.space">Public instances</a>
  1605. <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
  1606. </ul><h3>Navigation</h3>
  1607. <ul>
  1608. <li><a href="../index.html">Overview</a>
  1609. <ul>
  1610. <li><a href="index.html">Developer documentation</a>
  1611. <ul>
  1612. <li>Previous: <a href="makefile.html" title="previous chapter">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a>
  1613. <li>Next: <a href="searxng_extra/index.html" title="next chapter">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></ul>
  1614. </li>
  1615. </ul>
  1616. </li>
  1617. </ul>
  1618. <search id="searchbox" style="display: none" role="search">
  1619. <h3 id="searchlabel">Quick search</h3>
  1620. <div class="searchformwrapper">
  1621. <form class="search" action="../search.html" method="get">
  1622. <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
  1623. <input type="submit" value="Go" />
  1624. </form>
  1625. </div>
  1626. </search>
  1627. <script>document.getElementById('searchbox').style.display = "block"</script>
  1628. <div role="note" aria-label="source link">
  1629. <h3>This Page</h3>
  1630. <ul class="this-page-menu">
  1631. <li><a href="../_sources/dev/reST.rst.txt"
  1632. rel="nofollow">Show Source</a></li>
  1633. </ul>
  1634. </div>
  1635. </div>
  1636. </div>
  1637. <div class="clearer"></div>
  1638. </div>
  1639. <div class="footer" role="contentinfo">
  1640. &#169; Copyright SearXNG team.
  1641. </div>
  1642. </body>
  1643. </html>