[texhax] indexing problem

Ben Fortson fortsonb at umich.edu
Mon May 15 19:16:22 CEST 2006

Dear Lars (and others),

Thanks for your response. At the end of this message is a dummy version of 
the type of thing I've been dealing with. I think I've at least pinpointed 
the culprit: using a macro as an index entry. (Putting \protect in front of 
it doesn't help.) Let me explain a bit about this project; I apologize for 
the length of the email, but I'd rather lay out all the issues. The book is 
about languages, and the index contains words from various languages 
organized according to the languages and language families from which they 
are taken. Each word to be indexed is technically a subentry or a 
subsubentry, with the entry being the language family or language family 
branch and the subentry being the name of the language the word is in. Thus 
the main text and footnotes are tagged with sequences of the type 
\index{LanguageFamily!word} and \index{LanguageFamily!Language!word}. To 
save time typing, I created macros for the language names; these are 
apparently what are causing the trouble. If I don't use the macros, 
everything works fine.

The finished index will look something like this:


   word1  {subentry}


   ward4   {subentry}

INDIC  {entry}

Sanskrit  {subentry}

   word6   {subsubentry}
   word8  (etc.)

Middle and Modern Indic  {subentry}

   word9   {subsubentry}
   word10  {etc.}

Due to the nature of this particular project and the specialists who will 
be reading it, the languages are not listed alphabetically. Hence in the 
dummy below I have used the \index{key at value} format for each language 
name, using letters and numbers. Proto-Indo-European comes before 
Anatolian, which comes before Indic, and within Indic Sanskrit precedes 
Middle and Modern Indic.

To repeat the problem: the words in the footnote are being listed 
separately in the index from the words in the main text. I would, needless 
to say, prefer that a solution be available where I could avoid having to 
replace all my macros with the spelled-out versions of the language names, 
though this would of course not be hugely difficult to do. I was also 
originally hoping that I could encode in the macro the alpha order, so 
instead of defining e.g. \pie as done below, I could define it as 
a@\textbf{PROTO-INDO-EUROPEAN}; but that wound up not working. (I can go 
into that in another email if necessary.)

So here's the dummy; thanks again for any help.



\newcommand{\mind}{Middle and Modern Indic}

\index{a@\pie!Natio}Natio \index{c@\ind!1@\sk!est}est \index{b@\an! 
omnis}omnis \index{c@\ind!2@\mind!Gallorum}Gallorum \index{c@\ind!1@ 
\sk!admodum}admodum \index{c@\ind!1@\sk!dedita}dedita \index{c@\ind!2@ 
\mind!religionibus}religionibus, \index{a@\pie!atque}atque \index{c@ 
\ind!1@\sk!ob}ob \index{c@\ind!1@\sk!eam}eam \index{c@\ind!2@\mind! 
causam}causam \index{c@\ind!2@\mind!qui}qui \index{c@\ind!2@\mind! 
sunt}sunt \index{c@\ind!2@\mind!affecti}affecti \index{a@\pie! 
gravioribus}gravioribus \index{b@\an!morbis}morbis \index{a@\pie! 
quique}quique \index{b@\an!in}in \index{c@\ind!1@\sk!proeliis} proeliis 
periculisque versantur aut pro victimis homines immolant aut  se 
immolaturos vovent, administrisque ad ea\footnote{\index{a@\pie! 
Nationz}Nationz \index{c@\ind!1@\sk!estz}estz \index{b@\an!omnisz} omnisz 
\index{c@\ind!2@\mind!Gallorumz}Gallorumz \index{c@\ind!1@\sk! 
admodumz}admodumz \index{c@\ind!1@\sk!deditaz}deditaz \index{c@\ind!2@ 
\mind!religionibusz}religionibusz, \index{a@\pie!atquez}atquez \index 
{c@\ind!1@\sk!obz}obz \index{c@\ind!1@\sk!eamz}eamz \index{c@\ind!2@ 
\mind!causamz}causamz \index{c@\ind!2@\mind!quiz}quiz \index{c@\ind!2@ 
\mind!suntz}suntz \index{c@\ind!2@\mind!affectiz}affectiz \index{a@ 
\pie!gravioribusz}gravioribusz \index{b@\an!morbisz}morbisz \index{a@ 
\pie!quiquez}quiquez \index{b@\an!inz}inz \index{c@\ind!1@\sk! 
proeliisz}proeliisz} sacrificia druidibus utuntur, quod pro vita  hominis 
nisi hominis vita reddatur, non posse deorum immortalium  numen placari 
arbitrantur, publiceque eiusdem generis habent  instituta sacrificia. Alii 
immani magnitudine simulacra habent.



--Ben Fortson

--On Monday, May 15, 2006 10:09 AM +0200 Lars Madsen <daleif at imf.au.dk> 

> fortsonb at umich.edu :
> > To whoever can help:
> >
> > I'm trying to create an index (using makeindex in LaTeX) from a file
> > that has footnotes, where some of the words to be indexed are in the
> > footnotes. The problem is that the index that is generated comes out in
> > two separate parts: one section with the entries that appear in the
> > main text, and another section (separately alphabetized) that lists the
> > entries appearing in the footnotes.
> >
> > Is there a trick to getting a unified index?
> >
> > Thanks for any assistance,
> >
> could you provide an example where we could see this effect?
> /daleif
> ``You cannot help men permanently by doing for them
> what they could and should do for themselves. ''
>   -- Abraham Lincoln

More information about the texhax mailing list