[tex-eplain] \sidx not catcode-clean

Dorai Sitaram dorai at ccs.neu.edu
Sun Apr 23 16:56:11 CEST 2006


Oleg wrote
> 
> However, after thinking some more about this, I still
> believe that changing the default behavior of the indexing
> macros would have the problem of compatibility.  For
> example, now these three commands yield the same index
> entry:
> 
>   \idx{foo bar}
>   \idx{foo  bar}
>   \idx{foo
>        bar}
> 
> but if we start reading the arguments verbatim, they will
> all become separate entries.  Shucks.

Is this simply because of the variant spacing?  I think the need for
verbatim is felt for characters like # & % $ and the like only, not for
spaces and tabs and newlines.  It would be quite satisfactory for the
indexing command to do 

\uncatcodespecials
\catcode`\{=1
\catcode`\}=2
\catcode`\ =10
% and other exceptions 

Preserving the severalness of verbatim spaces in the index serves no
legible purpose I can think of.  If we really needed to document verbatim
spaces in the index, we would need to show them with some visible artifice
anyway, as DEK did with that lowered square cup thingy.

Dorai


More information about the tex-eplain mailing list