6.2. Build a glossary¶
Here, we will quickly show how to automatically build a glossary with Sphinx. It doesn’t require any Sphinx extension.
Add terms in your glossary via the command
:term:. For example, in the docstring ofSinglePlot, change**RAS+**to:term:`RAS+`.Create a glossary page at
docs/glossary.rst. Put the glossary in there via the.. glossary::command, and define your terms:
docs/glossary.rst
Glossary
========
.. glossary::
:sorted:
RAS+
`<https://nipy.org/nibabel/coordinate_systems.html#naming-reference-spaces>`_
Add the glossary in the table of content in
docs/index.rst:
.. toctree::
:maxdepth: 1
:hidden:
installation
getting_started
user_guide/index
auto_examples/index
api/index
glossary
Build your documentation. You should see the glossary page, with the definition of
RAS+inside.
If you don’t manage to run the tutorial
git reset --hard 5c5e3c6a1433b9b592f0b7919d7252550d797f60