1

How would to see in the index:

Borel, Émile, 6
   set, 7

I tried with

\index{Borel!set}
\index{Borel@Borel, Émile} 

but it doesn't work. Is there any wy to get it?

\documentclass{article}
\usepackage{makeidx}
\makeindex
\begin{document}
\section{Introduction}
\index{Borel!set}
\index{Borel@Borel, Émile} 
\printindex
\end{document}
  • I've removed the lualatex tag as it's not specific to the TeX format. – Nicola Talbot Nov 27 '18 at 12:47
2

You need to ensure that the top-level part exactly matches in both cases:

\documentclass{article}
\usepackage{makeidx}
\makeindex
\begin{document}
\section{Introduction}
\index{Borel@Borel, Émile!set}
\index{Borel@Borel, Émile}
\printindex
\end{document}

image of index

If you just have \index{Borel!set} then the parent is assumed to be just \index{Borel}, which isn't the same (from makeindex's point of view) as \index{Borel@Borel, Émile}.

This need for an exact match is a requirement of makeindex. An alternative is to use texindy instead, which concatenates entries with the same sort value. That should work for the MWE in your question. (It might be a bit more complicated if you are using a custom makeindex style file in your actual document.)

  • Yes, my unwritten desire was not to write the whole name every time. If no other solution comes up, I'll accept this one. Thank you. – PeptideChain Nov 27 '18 at 12:51
  • @PeptideChain Unfortunately it has to exactly match, but an alternative approach would be to use the glossaries interface instead, where all the information only needs to be entered once and you can reference it by label. If you're interested I can add that as an alternative in my answer. – Nicola Talbot Nov 27 '18 at 13:01
  • No, thank you. That would be a to big change for a small advantage. – PeptideChain Nov 27 '18 at 13:07
  • 1
    @PeptideChain It's just occurred to me that there is another solution. You could use texindy instead of makeindex. That concatenates terms with the same sort value. It also supports UTF-8, which makeindex doesn't. – Nicola Talbot Nov 27 '18 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.