reStructuredText Markup Examples

Link To Better Examples

I was setting out to write some examples to illustrate the syntax of reStructuredText mark up. When I searched for reference material I found something that I did not feel I could improve upon.

So go there for examples.

For the sake of illustration I am showing here the RST code for the links to those examples.

Inline: `Quickref <https://docutils.sourceforge.io/docs/user/rst/quickref.html>`_

Deferred: `Quickref`_

.. _`Quickref`: https://docutils.sourceforge.io/docs/user/rst/quickref.html

Inline: Quickref

Deferred: Quickref

Source level Links

When using Pelican we can also link to ".rst" source files, the compiler converts them to links to the generated ".html" files.

Note that absolute links are relative to the "content/" directory.

`Relative file link to Markdown Examples <{filename}./md-examples-en.rst>`_

`Absosulte file link to Emacs Tip <{filename}/examples/emacs-cmd-en.rst>`_

`Deferred link to Emacs Tip`_

.. _`Deferred link to Emacs Tip`: {filename}/examples/emacs-cmd-en.rst

Relative link to Markdown Examples

Absosulte link to Emacs Insert Tip

Deferred link to Emacs Tip

Footnotes

I always have trouble remembering how to do footnotes. So I include them here for reference.

Numbered Footnotes

Footnote references, like [5]_.
Note that footnotes may get
rearranged, e.g., to the bottom of
the "page".

.. [5] A numerical footnote. Note
   there's no colon after the ``]``.

Autonumbered Footnotes

Autonumbered footnotes are
possible, like using [#]_ and [#]_.

.. [#] This is the first one.
.. [#] This is the second one.

They may be assigned 'autonumber
labels' - for instance,
[#fourth]_ and [#third]_.

.. [#third] a.k.a. third_

.. [#fourth] a.k.a. fourth_

Auto symbol Footnotes

Auto-symbol footnotes are also
possible, like this: [*]_ and [*]_.

.. [*] This is the first one.
.. [*] This is the second one.
Published by Pierre Bernatchez in «mark up languages». Key Words: reStructuredText, examples, how to