[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: @math and @findex trouble
From: |
Karl Berry |
Subject: |
Re: @math and @findex trouble |
Date: |
Fri, 17 Jan 2003 12:25:45 -0500 |
@subsection Laplacian (@math{\nabla^2}) operators
Unfortunately I see no practical way to fix this. The problem is that
the TeX catcode of \ is set to an ordinary character before the @math
command is ever expanded. So by the time we get around to doing @math,
we already have the sequence of characters \, n, a, etc., and there's no
way to recombine them into a control sequence.
Long term, there are a couple alternatives that would make this work,
namely (a) have makeinfo output TeX, and/or (b) adding all the math
commands to Texinfo (ugh).
Meanwhile, there is a kludge workaround. Use @nabla after all (so that
TeX outputs the right thing), and define an @nabla macro in Texinfo (so
that makeinfo does not complain):
@ifnottex
@macro nabla
\\nabla
@end macro
@end ifnottex
@chapter Laplacian (@address@hidden ^2}) operators
A macro will be needed for each math control sequence used in commands
which read the entire line as an argument (at least) -- besides the
sectioning commands, this includes the index commands, etc.
Outside of those contexts (in regular running text), it's better to use
\ instead of @ as the escape character, as we discussed before, since
then you don't have to define the macros.
Unfortunately this workaround exposed yet another problem. If the input
is @nabla^2, makeinfo thinks that entire string (`nabla^2') is the macro
name, not just nabla. So you have to add an extra space. Although this
is by design, it's painful in this context. I'll see about terminating
macro names at ^ and _, at least.
Thanks for the report, sorry there's no better immediate fix.
Hope this helps,
karl
- Re: @math and @findex trouble, (continued)