[texhax] index entries in latex/makeindex
Zbigniew Nitecki
zbigniew.nitecki at tufts.edu
Tue Dec 16 16:26:42 CET 2008
In a book I am writing in latex (using makeindex to generate the
index) I am running into a confusing anomaly.
The following macros are among those I have to generate index entries:
***********************************************************************************
\newcommand{\namerefindex}[4]{\index{#2, #1 (#3-#4)}}%prints name,
date in index not text
\newcommand{\namerefsilent}[4]{#1\ #2\ (#3-#4)}%prints name, date in
text not index
\newcommand{\nameref}[4]{#1\ #2\ (#3-#4)\namerefindex{#1}{#2}{#3}{#4}}
%prints name, date in text
\newcommand{\namesubref}[5]{\index{#2, #1 (#3-#4)!#5}}%prints subentry
in index
**************************************************************************************
(the usage is: \nameref{Firstname}{Lastname}{Birthdate}{Deathdate}
and in the subref, #5 is an index entry under the entry above.
I have discovered that references made using \namerefsilent followed
by \namesubref
work fine, but those generated using \nameref fail to show up in the
index.
Any explanation?
Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155
telephones:
Office (617)627-3843
Dept. (617)627-3234
Dept. fax (617)627-3966
http://www.tufts.edu/~znitecki/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/texhax/attachments/20081216/2d3a1775/attachment.html
More information about the texhax
mailing list