spatialaudio / nbsphinx

:ledger: Sphinx source parser for Jupyter notebooks
https://nbsphinx.readthedocs.io/
MIT License
441 stars 129 forks source link

Using glossary in Sphinx context #589

Open miohtama opened 2 years ago

miohtama commented 2 years ago

I can have a Sphinx glossary and refer to the glossary terms with :term:a very difficult word` syntax in restructured text.

Is there a way to do the same in nbsphinx and Markdown context? Something that would be hardcoded links to the glossary.

mgeier commented 2 years ago

You could try this (assuming your term is My Term):

[link to my term](my-rst-file-with-the-glossary.rst#term-My-Term)

Note that Sphinx prefixes the link target with term- and spaces are replaced by hyphens. In case of doubt you can look at the generated HTML file in the browser to see the exact link target.

Also note that you should use the .rst file in the link (not the .html file!).

Does that work for you?

miohtama commented 2 years ago

Thank you so much - I will try this out.