6

In the following nearly-MWE I get an index-entry for simple, example and one for ex, see example, but I don't get one for example, see simple, example.

How can I get an indexentry like the last one?

\documentclass{scrartcl}

\usepackage{makeidx}
\makeindex

\begin{document}

Here it is a simple example\index{simple!example}

\index{example|see{simple!example}}
\index{ex|see{example}}
\printindex
\end{document}

compile with

xelatex mwe.tex
makeindex mwe.idx
xelatex mwe.tex

Exact wording like described does not matter, important is that I can have a see to a sub- or sub-sub-entry instead of a toplevel one.

1 Answer 1

6

Blame myself, just stumbled upon a solution…

Instead of writing the see-clause as you write the actual index, you have to write the see-clause as you want to see it in the document.

So instead of writing \index{example|see{simple!example}}, you have to write \index{example|see{simple, example}}.

So the MWE would be:

\documentclass{scrartcl}

\usepackage{makeidx}
\makeindex

\begin{document}

Here it is a simple example\index{simple!example}

\index{example|see{simple, example}}
\index{ex|see{example}}
\printindex
\end{document}
1
  • 1
    MakeIndex does nothing with the argument to see, apart packing it as the argument to \see in the .ind file.
    – egreg
    Commented Jun 22, 2014 at 11:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .