[texinfo-pretest] conditional macros problem
Werner LEMBERG
wl at gnu.org
Tue Feb 8 23:41:07 EST 2005
[texinfo 4.8]
I want a macro @LE which produces a real less-than sign in TeX output
and `<=' everywhere else. I tried this simple version (which fails if
used within @math):
@tex
\gdef\LE{$\le$}
@end tex
@ifnottex
@macro LE
<=
@end macro
@end ifnottex
...
a @LE{} b
This works fine for both `makeinfo' and `tex'. Now my problem: I need
to pass --macro-expand to `makeinfo' before calling. Consequently, it
expands to
a <= b
instead of staying unexpanded.
Passing --iftex isn't a solution since I get fatal errors. Any ideas?
To make this work I can only imagine to introduce a new environment
`@emacro' which makes --macro-expand register the definition without
expanding the macro. In all other cases it behaves like @macro.
@tex
\gdef\LE{$\le$}
@end tex
@ifnottex
@emacro LE
<=
@end emacro
@end ifnottex
Werner
More information about the texinfo-pretest
mailing list