[tex-eplain] Index proofing

Dorai Sitaram ds26@gte.com
Sun, 4 Feb 2001 12:24:23 -0500 (EST)


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. 

--d