LaTeX forum ⇒ MakeIndex, Nomenclature, Glossaries and AcronymsMakeindex: group extra sorted subentries that have |see

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Posts: 80
Joined: Wed Apr 17, 2019 12:51 pm

Makeindex: group extra sorted subentries that have |see

Postby user49915 » Wed Mar 25, 2020 8:35 pm

Let us create a source file mwe.tex containing

\newcommand{\indexUSeWithSubsubentryAsGer}[4]{\index{000#1 #2 #3@\foreignlanguage{USenglish}{#1}!\foreignlanguage{USenglish}{#2}!\foreignlanguage{USenglish}{#3}|see{#4}}} % for 3-level USenglish English -> German "siehe" entries
\index{Zustandsraum!lokaler}\emph{geteilter Zustandsraum} (engl.\@ \indexUSeWithSubsubentryAsGer{space}{state}{shared}{Zustandsraum, geteilter}\emph{\foreignlanguage{USenglish}{shared state space}})

\index{Zustandsraum!geteilter}\emph{lokaler Zustandsraum} (engl.\@ \indexUSeWithSubsubentryAsGer{space}{state}{local}{Zustandsraum, lokaler}\emph{\foreignlanguage{USenglish}{local state space}})


and feed it to the loop pdflatex mwe && makeindex mwe. The intention of 000 above is to obtain first an index of English terms then followed by an index of German terms. The result is this:
page1.png (22.89 KiB) Viewed 1461 times

page2.png (47.65 KiB) Viewed 1461 times

However, you expected that the subentries would be grouped compactly, as in

    local, siehe Zustandsraum, lokaler
    shared, siehe Zustandsraum, geteilter

  geteilter, 1
  lokaler, 1

How to make the pdflatex-makeindex loop do it? (Aside: please stay with pdflatex and makeindex programs. If possible, do not switch to [xe|lua]latex, do not abandon makeindex, and retain English-language switches (which are useful in case of differences in ligatures, microtyping in general, and hyphenation). As you might imagine, the actual, non-minimal source file is a large book with its own ecosystem of hacks around indexing that jive with each other, and switching to another setup is very likely to incur a different question.)

Crossposts: ,,p,110783.html .
Last edited by user49915 on Thu Mar 26, 2020 11:57 am, edited 3 times in total.

User avatar
Ijon Tichy
Posts: 502
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Wed Mar 25, 2020 10:29 pm

User avatar
Ijon Tichy
Posts: 502
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Thu Mar 26, 2020 12:28 am

Can you please translate the accepted answer given on TeXwelt, that the users, who do not understand German, can also read and understand it? IMHO in the principle of reciprocity this would be fair and appropriate after you've thrown the same question into at least four forums in two different languages.

Return to “MakeIndex, Nomenclature, Glossaries and Acronyms”

Who is online

Users browsing this forum: No registered users and 2 guests