############################ ReStructuredText Style Guide ############################ This page describes how reStructuredText (reST) is written for DM documentation through examples. The :ref:`last section documents our formatting conventions `. For more general guides to writing reStructuredText, see Sphinx's `reStructuredText Primer `_ and the `docutils Quick reStructuredText guide `_. See the pages on :doc:`writing documentation for packages ` and :doc:`Python docstrings ` for specific reST usage in those contexts. .. _rst-intro-sample: Sample ====== .. literalinclude:: rst_sample.rst :language: rst :lines: 2- .. lines field above omits :orphan: field from sample display :doc:`See this sample rendered `. .. _rst-inline-styles: Inline Text Styling =================== Italics ``*italic text*`` → *italic text*. Bold ``**bold text**`` → **bold text**. Monospace ````monospace text```` → ``monospace text``. When referring to code objects, it's better to use markup that links to the object's API documentation (see the :ref:`rst-code-link` section). Inline math ``:math:`\sqrt{16}``` → :math:`\sqrt{16}` (See also the :ref:`Math ` section). .. note:: Inline styles can't be nested For example, you *can't* write ``*see :ref:`this page