Werner LEMBERG
2005-02-09 04:41:07 UTC
[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
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