New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding index cross-references for definitions where index entry is for a different term #2067
Comments
If we redefine \newcommand{\defnx}[2]{%
\indexdefn{#2}%
\ifthenelse{\NOT\equal{#1}{#2}}{%
\indextext{#1|see{#2}}%
}{}%
\textit{#1}%
} then |
Issue #1033 is related; we did decide that the page numbers go with the decomposed index entry. (That doesn't mean we should not have "see" entries for the other form.) |
@godbyk, I'm avoiding the \ifthenelse for now. I have |
Yes. As long as I can go to T in the index and find "trivially copyable class" in some form or another I think that's fine. Currently it's not there at all under T. I tried using additional packages so I could replace the "|" with ", " in the index entry, but didn't get it working. Breaking it into two arguments seems like a better solution. |
In #2080, there is a specific change to create a \defnc for compound defined terms with uniform indexing. We should form an opinion whether that's the way to go, and then apply it everywhere. |
@jensmaurer Why are we avoiding The definition of |
@godbyk: The point is not the |
@jensmaurer Ah, sorry. My brain was still in Try replacing the existing \usepackage{xstring}
\newcommand{\defnx}[2]{%
\indexdefn{#2}%
\ifthenelse{\NOT\equal{#1}{#2}}{%
\StrSubstitute{#2}{!}{, }[\stdtemp]%
\indextext{#1|see{\stdtemp}}%
}{}%
\textit{#1}%
} It replaces all instances of |
@godbyk: Ah. So, we get the correct "see" when using exclamation marks once xindy lands (see #1917). Thanks. |
@jensmaurer Yeah. xindy actually checks to see if the cross-reference target exists and complains if it doesn't. It's found a few errors in our current indexing. It's true that it reduces the number of words you have to type, but only for that particular construction. If you want to do any other type of cross-reference, you're stuck using |
Editorial meeting consensus: \defnc as presented in #2080 is approved and even liked by the Project Editor. Yes, it covers only two-part terms, but that's likely > 95% of the cases, so good enough. |
"trivially copyable class" was fixed. There's no point in leaving this open. Please create a new issue for specific bad index entries. |
We have:
This defines the term trivially copyable class but adds an index subentry for "class, trivially copyable". That means "trivially copyable class" can't be found in the index!
We need to manually add that entry (see #2065 for that change):
Is there any way to automate that through
\defnx
or some other macro, or at least make it easier? Maybe something like this (although it would need to replacefoo!bar
withfoo, bar
in#2
):The text was updated successfully, but these errors were encountered: