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: Mon, 22 Jun 2015 00:37:46 +0100

On 2 June 2015 at 10:12, David Kastrup <address@hidden> wrote:
> Karl Berry <address@hidden> writes:
>
>> 6) I recognize that you want me to just omit the \catcode`\\=0.  That
>> may solve your problem, but it creates problems for other people doing
>> other things with @macro.  For instance, you're invoking the macro with
>> a whole-line argument; macros taking braced arguments have a different
>> set of problems in this area.
>
> Why would one do _any_ backslash processing on whole-line arguments?

I think it would be possible not to, the bits to change in texinfo.tex
would be handling of 1-arg macros in \defmacro (recursive and
non-recursive), and their calls to \braceorline, which instead of
calling \macroargctxt could call another macro that doesn't do the
\catcode`\\=0 change.

However, you would still want to interpret backslashes, so that "\\",
"\{" and "\}" (and maybe "\,") would be interpreted as "\", "{", "}"
and "," respectively, while leaving "\a" as "\a" for any other
character "a". You'd want to do this for compatibility with existing
documents and makeinfo implementations. I've been experimenting with
making "\" an active character to try to get this to work, however
it's not there yet. (I'm still struggling to "grok" TeX; I've been
working with "TeX by Topic" which has gotten me a lot further than any
of my previous attempts.)

> I don't see where the documentation states that macro arguments need to
> get requoted at every call level.

You point out a real problem here: if one macro calls another with an
argument it was passed itself containing a \, { or }, I don't think we
have a way to "re-quote" the argument for onwards passing. This would
be true even if these characters were given with @-commands, like
@comma or @lbracechar. I don't know if this has ever been a problem in
practice, but it is has been or should be in future, it would seem
that we'd need a command like @quoteforpassingtoamacro which could do
this.

> And I'm pretty sure that the current texinfo.tex behavior does _not_
> match the HTML creation we use (which is why we needed to change
> texinfo.tex in the first place).

Are you using texi2html for HTML output, and this functions
differently to makeinfo?



reply via email to

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