Book logo xindy

A Flexible Indexing System


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Package for writing raw-indices



Hi,

> inas@mib.harz.de (Andreas Schlechte) wrote on Fri, 14 Mar 1997 15:50:13 +0100 (MET):
> : >    \usepackage{german}
> : > results in something like
> : >    (indexentry :tkey ( ( \active@dq \dq@prtct{E}uler\errhelp {Use `` for
> : >    a simple double quote character.}\errmessage {german: The command ")

> German-Style makes the " an active character which expands to a
> serious of unexpandable tokens...  if in expand-only mode.  I.e., the
> active " is a `fragile' command (to use LaTeX's words).

Indeed. This caused me to insert an extra handling for german.sty.
But as you mentioned the use of \@santize is a better way to solve
the problem.

> No, Andi, what should be done in your xindy.sty is to ensure that all
> punctuation characters (think of `french.sty' for an active colon ":"
> or `spanish.sty/.ldf' for activated single quotes), which are used as
> part of the generated xindy raw index file, should be read using
> category code `other' ...or should be prefixed by \string.

Well, I thought of this already, but didn't know which chars I had
to regard. I didn't know that \@sanitize is the macro I was looking
for.

> Mmmmh, you should look at the code of \index ("ltidxglo.dtx"), which
> uses \@sanitize before reading its arguments to ensure that all
> characters will have the expected category codes (and which fails each
> time \index{...} is used inside a user-defined macro).

Is there a way, to write a macro which can be used inside user-defined
macros, too? Perhaps, one could support a macro inside xindy.sty,
which can be used to define user-defined macros using \indexindy?

> If the same is done in \indexindy, the currently used \mdqoff and
> \ifx\@undefined\germanTeX switch isn't needed anymore (because
> `german.sty' adds " to the list of characters to be \@sanitize'd).
> I.e., \indexindy should be defined as

> \newcommand{\indexindy}{%
>   \@bsphack        %% to handle `space factor' etc.
>   \begingroup
>     \toks@{}%
>     \@sanitize \catcode`\\=\active
>     \indexindy@
> }

> and after the "\endgroup" of \indexindy@ a "\@esphack" should be added
> for completion, read "ltspace.dtx" for comments about spacing and
> \@bsphack/\@esphack.

Well thanks a lot for this help. I implemented this version in the style
and it's doing fine. BTW: I often search various commands and infos in
the lt*.dtx-files. But there are too much to find the required information
in a tolerant time. Do you now, if there is a overview of the contents
of the dtx-file, somewhere in the net?

I won't post the new version right now, cause I'm currently doing
some minor changes on spacing and the .idx-output. I will post it
as soon as possible.


Best Regards,

 Andi