\index{Dikshit, S. Balkrishna@{D\^{\i}kshit, S. B\^{a}lk\d{r}ish\d{n}a}}
produced an entry in the .idx file of
\indexentry{Dikshit, S. Balkrishna@{D\^{\i}kshit, S. B\^{a}lk\d{r}ish\d{n}a}}{298}
whether or not the \index command was in a footnote or the text.
Now, in preparing the 3rd edition, I find that the \index command produces
exactly the above if the \index command is in the text, but produces
\indexentry{Dikshit, S. Balkrishna@{D\^{\i }kshit, S. B\^{a}lk\d {r}ish\d {n}a}|hyperpage}{304}
if the \index command is in a footnote; of course this results in split index
entries that should be combined.
The .log and .ilg files in 2000/2001 contain
This is TeX, Version 3.14159 (Web2C 7.3.1) (format=latex 2001.3.20) 9 JUL 2001 11:42
**book.tex
(book.tex
LaTeX2e <2000/06/01>
and
This is makeindex, portable version 2.12 [26-May-1993].
respectively, while for the cuurent runs (for the new edition) the same logs
have:
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) (format=latex 2006.11.12) 12 NOV 2006 15:46
entering extended mode
**book.tex
(./book.tex
LaTeX2e <2003/12/01>
and
This is makeindex, version 2.14 [02-Oct-2002] (kpathsea + Thai support).
respectively.
Question: What is the cleanest way to get all of the index entries to be
identical, footnote or not? The same problems occur whnever there are
diacritical marks, Chinese characters, etc. in the index entries for both
footnotes and main text.
--
Professor Edward M. Reingold Email: rein...@iit.edu
Department of Computer Science Voice: (312) 567-3309
Illinois Institute of Technology Assistant: (312) 567-5152
Stuart Building Fax: (312) 567-5067
10 West 31st Street, Suite 236
Chicago, IL 60616-3729 U.S.A.
> Question: What is the cleanest way to get all of the index entries
> to be identical, footnote or not?
Use the 'index' package instead of 'makeidx'.
--
Sender address blackholed; do not reply to From: address.
You can still reach me by email at: plehman gmx net.
> Edward M. Reingold wrote:
>
> > Question: What is the cleanest way to get all of the index entries
> > to be identical, footnote or not?
>
> Use the 'index' package instead of 'makeidx'.
That package conflicts with the (many, many) other packages I need.
> Apologies for the long introduction to my question, but the details are
> important. When the 2nd edition of my book was prepared in 2000/2001 index
> entries such as
>
> \index{Dikshit, S. Balkrishna@{D\^{\i}kshit, S. B\^{a}lk\d{r}ish\d{n}a}}
>
> produced an entry in the .idx file of
>
> \indexentry{Dikshit, S. Balkrishna@{D\^{\i}kshit, S. B\^{a}lk\d{r}ish\d{n}a}}{298}
>
> whether or not the \index command was in a footnote or the text.
>
> Now, in preparing the 3rd edition, I find that the \index command produces
> exactly the above if the \index command is in the text, but produces
>
> \indexentry{Dikshit, S. Balkrishna@{D\^{\i }kshit, S. B\^{a}lk\d {r}ish\d {n}a}|hyperpage}{304}
>
> if the \index command is in a footnote; of course this results in split index
> entries that should be combined.
\index reads its argument in verbatim manner, especially the catcode
are changed. Example: \i is read as character '\' with catcode 12
(other) and 'i' with normal catcode 11 (letter). Therefore you get,
what you expect.
Inside the argument of \footnote or any other macro the whole
argument is read with \index and its argument. Thus if \index is
executed later, the catcode changes haven't an effect, because
the argument of \index is already read. Example: \i is now a
macro. Macros whose name consists of letters are written with an
appended space: '\i '
> Question: What is the cleanest way to get all of the index entries to be
> identical, footnote or not? The same problems occur whnever there are
> diacritical marks, Chinese characters, etc. in the index entries for both
> footnotes and main text.
* Manual solution:
Use \string, if \index is used inside arguments:
\index{...\^{\string\i}, ...\string\d{n}...}
* Or redefine \index that the argument is no longer read as verbatim:
\newcommand*{\OriginalIndex}{}
\let\OriginalIndex\index
\renewcommand*{\index}[1]{\OriginalIndex{#1}}
* Or use XIndy, AFAIK it deals with such kind of problems.
Yours sincerely
Heiko <ober...@uni-freiburg.de>