mystmd icon indicating copy to clipboard operation
mystmd copied to clipboard

📖 Add Index support to MyST

Open fwkoch opened this issue 1 year ago • 1 comments
trafficstars

This addresses https://github.com/jupyter-book/mystmd/issues/190

It replicates the Sphinx functionality described here: https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#index-generating-markup

There is an index role, index directive, and genindex directive to locate the index. (This last feature is slightly different from Sphinx where genindex is a "magic" toc entry; as a directive, genindex follows existing MyST patterns better.)

For the web build, we use a definitionList to make an index that looks something like:

image

The index functionality was also hooked into latex export using the imakeidx package:

image

fwkoch avatar Jul 31 '24 07:07 fwkoch