[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with texinfo.tex 6.0
From: |
David Kastrup |
Subject: |
Re: Problem with texinfo.tex 6.0 |
Date: |
Wed, 01 Jul 2015 19:25:42 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Gavin Smith <address@hidden> writes:
> On 1 July 2015 at 17:39, David Kastrup <address@hidden> wrote:
>> There is no @relative in the source file: the requisite source reads
>>
>> @warning{Motifs to be inverted should be expressed in absolute form
>> or be first converted to absolute form by enclosing them in a
>> @code{\relative} block.}
>>
>> The definition of @warning is
>
> I reproduced this. When I doubled the backslash before "relative", it
> worked. The argument to @warning contains a backslash, which is an
> active character. This is the case even though it's nested within the
> argument to another command.
>
> According to the Texinfo manual, " If a macro invocation includes
> another command (including a recursive invocation of itself), any
> commas in the nested command invocation(s) are quoted by default."
> Unfortunately, this doesn't appear to extend to backslashes.
>
> \ would have to be set as non-active before reading the argument for
> @code, and switched back afterwards.
Ugh. So inside of the @warning argument, ",", "{", "}" need quoting
with \ unless they are part of a macro argument themselves.
At any rate, what you cite from the Texinfo manual converns macros with
multiple arguments. For the one-argument macro that is at bay here, we
rather have
1. If a macro takes only one argument, all commas in its invocation
are quoted by default. For example:
@macro TRYME{text}
@strong{TRYME: \text\}
@end macro
@TRYME{A nice feature, though it can be dangerous.}
will produce the following output
*TRYME: A nice feature, though it can be dangerous.*
And indeed, it can. Namely, 'makeinfo' does not control the number
of arguments passed to one-argument macros, so be careful when you
invoke them.
So it would appear that for the one-argument situation, some sort of
quoting/protection/whatever of \ would seem warranted.
--
David Kastrup