diff options
author | jfbu <jfbu@free.fr> | 2021-01-26 18:53:45 +0100 |
---|---|---|
committer | jfbu <jfbu@free.fr> | 2021-01-26 19:18:47 +0100 |
commit | f937facc69042a163a94f8d84635efeca0783cd0 (patch) | |
tree | 8659f0fe5f1f997ed6caf1209884cde0693299f9 /sphinx/application.py | |
parent | 9f2f6b0037b5e6c6ec4c64a52b95c21c858809ab (diff) | |
download | sphinx-git-f937facc69042a163a94f8d84635efeca0783cd0.tar.gz |
Fix #8214: duplicate entries in latex index if term also in glossary
This makes .idx files contain \spxentry{..} with no space, whether or
not the \index latex command is encountered in main text or e.g. in a
label of a description list (like happens for terms from a glossary).
Xindy does not care about spaces, but Makeindex doesn't merge entries
whose typesetting is to be done via \spxentry{..} or \spxentry {..}.
An alternative work-around would be for Sphinx LaTeX writer to use some
wrapper, say, \sphinxindexwrap, only to fetch the argument and force TeX
tokenization and then hand over it to \index command.
But we choose to let \spxentry expand to its own name, with no trailing
space (it gets its final definition only from the python.ist file in
case of Makeindex).
In case both the :index: role and the glossary are on same page, Xindy
and Makeindex behave differently: the former gives only once the page
number, the latter issues them twice (but the indexed term only once),
and there is warning in the .ilg file. But this is unrelated and we
can't do here anything about it.
Diffstat (limited to 'sphinx/application.py')
0 files changed, 0 insertions, 0 deletions