bug-texinfo
[Top][All Lists]
Advanced

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

Re: backslashes, macros, indexes, texinfo


From: Gavin Smith
Subject: Re: backslashes, macros, indexes, texinfo
Date: Tue, 23 Jun 2015 18:38:40 +0100

On 2 June 2015 at 10:12, David Kastrup <address@hidden> wrote:

> So I suspect that TeX may currently be the only backend that actually
> tries, however imperfectly, matching the documentation, thus diverging
> from the other backends.

One more email on this. (Sorry if it's getting boring.) One point that
may have been missed is that it appears that in makeinfo 4.13, there
was a difference depending on whether the argument was in braces or
not. The following input:

\input texinfo
@setfilename macro-backslash.info
@settitle Macro Backslash Test

@macro funindex {TEXT}
@findex X\TEXT\Y
@c
@end macro

@node Top
@chapter Chapter One

@funindex{\\yesbrace}
@funindex \\nobrace

@printindex fn

@bye

produces the following output:

This is macro-backslash.info, produced by makeinfo version 4.13 from
backslashopen.texi.


File: macro-backslash.info,  Node: Top,  Up: (dir)

1 Chapter One
*************

[inde]
* Menu:

* X\\nobraceY:                           Top.                   (line 8)
* X\yesbraceY:                           Top.                   (line 8)



Tag Table:
Node: Top0

End Tag Table

As you can see the backslash remains doubled when no braces were used.

The changes to texinfo.tex were made following this report:
http://lists.gnu.org/archive/html/bug-texinfo/2010-06/msg00003.html,
where the macro was being used with braces. The macro was @dvar in

@defmac m4_split (@var{string}, @dvar{regexp, [\t ]+})

Until the change, a doubled up backslash resulted in a doubled up
backslash, unlike the single backslash produced by makeinfo.
(http://lists.gnu.org/archive/html/bug-texinfo/2010-06/msg00007.html)

But then later there was a report about a case where braces were *not*
being used: http://lists.gnu.org/archive/html/bug-texinfo/2011-08/msg00002.html.
Called like

@funindex \relative
@funindex relative

That report agrees with the test I just did that "\\" is kept as-is by
makeinfo 4.13. 
(http://lists.gnu.org/archive/html/bug-texinfo/2011-08/msg00002.html.)

So it appears that texinfo.tex was changed to match the behaviour of
makeinfo in one case, but in doing so a mismatch with another case was
introduced.

I think it would be easy to turn off the backslash interpretation for
whole-line arguments to macros, given without being enclosed in
braces. I can try to propose something if people think is a good idea?



reply via email to

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