> On Tue, Nov 28, 2000 at 10:30:34AM +0100, Rainer Dorsch wrote:
> >
> > Hi,
> >
> > I am not sure, if this is a known problem, but underscores in index entires
> > have to be quoted, e.g. CVS_ROOT. Otherwise an error is thrown at the
> > beginning of the document.
> >
> > This was quite confusing to a student using lyx for the first time and being
> > obviously not a latex expert.
> >
> > Thanks.
>
> Not speaking for the developers, but I think this should simply be
> documented; mathemathic formulae and other tricks are valid in an
> index entry.
>
Just fYI my recent document with oodles of underscores (function names like
__mp__do_inject all over te place) even contians a technical fix. After a while the
messages due to missing \s before _s start to become too annoying.
First a u@line amcro is defined which expands to _ in math mode and \_ otherwise (with
normal underscores). Thet I change _ to be an active character and define it as
u@line. This results in _ working as normal in math formulae and as an abbreviation
for \_ outside math mode (\_ still works). Expanding the macro does the right thing
because when the macro was defined the normal category codes were attatched and once
attatched category codes do not change. (The same principle can be applied to do
filenames containing spaces, and other TeXnical moves).
I should be obvious I am not a *TeX novice. I frequently use plain TeX constructs in
LaTeX documents (and have used LaTeX size changing comands inside \valign). I do not
think the TeXnical moves above are advisable for novices (and impossible within plain
LaTeX).
BTW Index entires are more tricky that because ! is also magic. Whether LyX should
escape them or not is a more difficult call, because you might prefer then unescaped
for convient sub-entires.
--
Duncan (-:
"software industry, the: unique industry where selling substandard goods is
legal and you can charge extra for fixing the problems."