[tex-eplain] Index proofing

john@wexfordpress.net john@wexfordpress.net
4 Feb 2001 12:22:59 -0800


On Sun, 04 February 2001, Dorai Sitaram wrote:

> 
> John Culleton writes:
> > 
> > Now I have another one. In theory I can just stick an @ in the string and have the system sort on one string but print another. That doesn't work in my case however.
> > 
> > I use a string like:
> > 
> > \sidxmarked\sur{YEARY@LITTON -  YEARY  CEM.} 
> > 
> > and what I get in the foo.idx file is a bit redundant and won't work as is. Specifically:
> > 
> > \indexentry{YEARY@LITTON - YEARY CEM.@\sur {YEARY@LITTON - YEARY CEM.}}{981}
> > 
> > (this is all one line of course.)
> > 
> > 
> > Now I can edit this down manally to :
> > 
> > \indexentry{YEARY@\sur {LITTON - YEARY CEM.}}{981}
> > 
> > which works, but given hundreds of such entries I find this a bit tedious and impacts my schedule seriously.
> > 
> > For the curious my \sur command is simply
> > 
> > \def\sur#1{\bf#1}
> > 
> > So, how does one indicate a different sort key in the \sidxmarked command? 
> > 
> > In parallel to the earlier case, eplain can handle the makeindex output correctly. It is on the input preparation for makeindex side that things fall apart. 
> > 
> 
> makeindex treats the characters @, |, !, and " specially.
> To get these characters as is, prefix them with the
> escape character ".  Thus, "@ becomes just @.  " itself
> doesn't need escaping if it is already preceded by
> a \.
> 
> So your example should be entered in your TeX source
> file as
> 
> \sidxmarked\sur{YEAR"@LITTON -  YEARY  CEM.}
> 
> See section A.2.3 ("The Fine Print") in the LaTeX manual,
> 2nd ed.  The description there is format-independent,
> so long as you're using makeindex. 
> 
There are two problems with your solution. It doesn't agree with the  eplain.tex manual  which does not specify a " when using the @ to separate the sort key from the index text. (See the last paragraph of Section 4.11.1.1. The example given there is

\sidx{Ap-weight@$A_\pi$-weight}

And, more importantly, your suggestion doesn't work.  For LITTON-YEARY CEM.  I need an entry unter L and another under Y. Using your technique I just get the L entry.  Assuming that the example given above does work then I suppose I could use. \sidx instead of sidmarked. Then I would have to rewrite the \item command to include \bf.

I'll keep fiddling. Thanks for your reply.

Please visit http://wexfordpress.com
Typesetting and indexing services. Your sample chapter 
indexed & typeset free!
Personal page is http://wexfordpress.com/john.html