[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: backslashes, macros, indexes, texinfo
From: |
David Kastrup |
Subject: |
Re: backslashes, macros, indexes, texinfo |
Date: |
Tue, 23 Jun 2015 19:46:34 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Gavin Smith <address@hidden> writes:
> 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.)
I haven't yet been able to find the time for processing your previous
input so it hasn't had yet a chance to get 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.
[...]
> 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?
It seems like a reasonable idea to quote { } inside of braces in order
to allow for unmatched braces. If one quotes those, one needs to quote
\ for obvious reasons. I would guess that this had been the original
motivation for the quoting business.
Distinguishing those two cases in the described manner should cover the
LilyPond use case I think. We don't use braces on the indexing macros
in question.
--
David Kastrup
- backslashes, macros, indexes, texinfo, Karl Berry, 2015/06/01
- Re: backslashes, macros, indexes, texinfo, Werner LEMBERG, 2015/06/02
- Re: backslashes, macros, indexes, texinfo, David Kastrup, 2015/06/02
- Re: backslashes, macros, indexes, texinfo, Gavin Smith, 2015/06/23
- Re: backslashes, macros, indexes, texinfo,
David Kastrup <=
- Re: backslashes, macros, indexes, texinfo, Gavin Smith, 2015/06/24
- Re: backslashes, macros, indexes, texinfo, Gavin Smith, 2015/06/24