[tex-eplain] Indexing causes erors.

Oleg Katsitadze olegkat at gmail.com
Sat Jun 28 18:20:20 CEST 2008


On Fri, Jun 27, 2008 at 01:01:42PM -0500, Dan Luecking wrote:
> This is likely a consequence of having a following optional argument.

\@idxwrite explicitly calls \ignorespaces for silent macros at the end
of processing, so the following spaces were meant to be ignored.

> One way to deal with this is to put silent indexing commands before
> the term they index: "\sidx{foo}Foo is ...".

I would bet this is how \sidx was meant to be used.  Arguably,
indexing "points" make more sense in front of the indexed term rather
than after (although the non-silent command do place it after the
term).  But more importantly, this allows something like the
following:

  \indent
  \sidx{polar bear}
  \sidx{bear}[polar]
  \sidx{Ursus maritimus}
  Polar bears live only in the northern Arctic.

without having to worry about adding `%' after each \sidx{...}.

Best,
Oleg


More information about the tex-eplain mailing list