reStructuredText¶
Other cheat sheets¶
Headings¶
#####
Parts
#####
********
Chapters
********
========
Sections
========
Subsections
-----------
Subsubsections
^^^^^^^^^^^^^^
Paragraphs
""""""""""
Code snippets¶
Unhighlighted¶
Inline code snippets look like ``this``
.
Code blocks are done ::
like this.
(The indented text is what will be in the block.)
Highlighted¶
To highlight an inline snippet in, for instance, Bash, register a new role:
.. role:: bash(code)
:language: bash
Then use the role :bash:`echo "like this"`
. More information on roles can be found here.
To highlight a code snippet, use the code
directive:
.. code:: bash
echo "Like this."
More information on directives can be found here.
A list of valid languages can be found here.
Tables¶
For tables with long entries, it is easier to use the list-table
syntax.
.. list-table:: Table Name
:widths: auto
:header-rows: 1
:stub-columns: 1
* - This and
- this is part of
- the header row.
* - This is a column header.
- This is part of
- the second row.
This and | this is part of | the header row. |
---|---|---|
This is a column header. | This is part of | the second row. |
See here for all the table directives.
Images¶
The logo on the front-page README is inserted by the following:
.. image:: ionchypedia.png
:alt: i⚛️nchypedia in rainbow text over a black background
:width: 100%
Newlines¶
Use the following directive in order to use |br|
to insert newlines:
.. |br| raw:: html
<br/>