[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: backslash no longer works in indices
From: |
Karl Berry |
Subject: |
Re: backslash no longer works in indices |
Date: |
Mon, 22 Aug 2011 00:18:34 GMT |
Regarding backslashes and @macro, here is a reduced example file
producing the same error.
\input texinfo
@setfilename backmac
@macro funindex {TEXT}
@findex \TEXT\
@end macro
@funindex \q
@printindex fn
@bye
It took me a while to remember, but this is actually documented not to
work. In the Invoking Macros node of the manual:
In addition to the comma, characters that need to be quoted in macro
arguments are curly braces and backslash.
There is also a caveat:
Unfortunately, this has not been reliably implemented in TeX. When
macros are used in the argument to other commands, for example, errors
or incorrect output (the `\' "escape" being included literally) are
likely to result.
Nevertheless, if I change the @funindex arg from \q to \\q, I get the
expected output, an index entry for "\q". So as long as the macro
invocations and definitions don't get even more complicated, I guess we
aren't running afoul of the caveat. (This by way of warning. :)
Although we all wish that user-defined macros could have the same
behavior as normal commands, they don't and never will, in their current
form.
Best,
k
- backslash no longer works in indices, Werner LEMBERG, 2011/08/18
- Re: backslash no longer works in indices, Karl Berry, 2011/08/18
- Re: backslash no longer works in indices,
Karl Berry <=
- Re: backslash no longer works in indices, Werner LEMBERG, 2011/08/22
- Re: backslash no longer works in indices, Werner LEMBERG, 2011/08/23
- Re: backslash no longer works in indices, Karl Berry, 2011/08/23
- Re: backslash no longer works in indices, Werner LEMBERG, 2011/08/24
- Re: backslash no longer works in indices, Karl Berry, 2011/08/24
- Re: backslash no longer works in indices, Werner LEMBERG, 2011/08/25
- Re: backslash no longer works in indices, Karl Berry, 2011/08/25