Substitution

Substitutions

Substitutions syntax is

.. |biohazard| image:: biohazard.png

The |biohazard| symbol must be used on containers used to dispose of medical waste.

The biohazard symbol must be used on containers used to dispose of medical waste.

Or if you want to do a literal text replacement use:

.. |doctest| replace:: :mod:`doctest`

I really like |doctest|.

I really like doctest .

conf.py

Use of rst_prolog

Note

Substitutions are really useful, especially when put into in conf.py by using rst_prolog.

Example in this conf.py file which define |sphinx|.

sphinx = sphinx

rst_prolog = """
.. |sphinx| image:: /images/documentation.png
"""