bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-texinfo] Feature Request: New <c>table options for other built


From: Gavin Smith
Subject: Re: [help-texinfo] Feature Request: New <c>table options for other built-in indices
Date: Sat, 23 Jul 2016 12:25:10 +0100

On 23 July 2016 at 09:58, Gavin Smith <address@hidden> wrote:
> On 23 July 2016 at 09:33, Gavin Smith <address@hidden> wrote:
> The problem comes down to the following in hyperbole.kys:
>
> \entry {\code {\bkbd {C-c @}}}{38}

It's actually due to this line in hyperbole.texi:

@kitem C-c @@
Copy a <tree> to an outgoing mail message.

>
> Here @} is viewed as a single control sequence, so a } is absorbed and
> there is one too few.

This is not quite what is happening.

What I think the real explanation is is that in the macro definition

@macro bkbd {arg}
@address@hidden
@end macro

an @-sign immediately follows \arg\. The argument is "C-c @" (from the
sorted index file), and the @-sign at the end of the argument combines
with the @-sign after the argument. Then the } afterwards is left
over. That's what I think is happening, anyway.

Normally the argument would be "C-c @@", but there is a round trip via
the index file which makes it become "C-c @". In \indexdummies in
texinfo.tex there is a comment

  address@hidden@}% change to @@ when we switch to @ as escape char in index 
files.

and maybe the index file should contain "C-c \@" instead. Presumably
"@" was thought to be the right choice here because \ is used as the
escape character in the index files, not @. However, when expanding a
macro, we do want @ to be the escape character, because we want
@-commands in macros in index entries to work, and not to have @-signs
typeset literally.

This failure also depends on the way that the expansion of
user-defined macros works. It's done using \scantokens which re-reads
the substituted macro body character by character, which allows
control sequences to appear and disappear (in this context only, I
think).

I'll try changing the code in \indexdummies and see what happens.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]