[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Current texinfo.tex breaks gawk doc
From: |
Gavin Smith |
Subject: |
Re: Current texinfo.tex breaks gawk doc |
Date: |
Sun, 4 Oct 2015 09:58:58 +0100 |
On 4 October 2015 at 09:25, Gavin Smith <address@hidden> wrote:
> I'm investigating. It is not the multitable that is the problem, and
> the problem only occurs for PDF output, not when creating DVI. It's
> probably the use of @email that is breaking it.
So the error message looks like this:
! Undefined control sequence.
@passargtomacro #1#2->@def @the_macro
address@hidden @pending_backslash
address@hidden @fi...
It's saying that @the_macro is undefined, but we are defining it. This
looks like the problem of complete expansion happening without
execution (in TeX terminology).
>From the log of macro expansion:
@xprocessmacroarg ->@passargtomacro @eatspaces
@passargtomacro #1#2->@def @the_macro address@hidden @pending_backslash
address@hidden @finis
h address@hidden address@hidden @arg_result address@hidden @next_token
address@hidden @add_segment address@hidden
\
#1<address@hidden
#2<-bug-gawk@@gnu.org
! Undefined control sequence.
@passargtomacro #1#2->@def @the_macro
Earlier in the log:
@email #1->@doemail #1,,@finish
#1<address@hidden {bug-gawk@@gnu.org}
@doemail #1,#2,address@hidden ->@begingroup @unsepspaces @pdfurl
{mailto:address@hidden
0 = @hbox address@hidden address@hidden @wd 0>address@hidden address@hidden
@code address@hidden @endli
nk @endgroup
#1<address@hidden {bug-gawk@@gnu.org}
#2<-
#3<-
@xprocessmacroarg is part of the macro definition, and it's in the
argument to @email. The definition of @email (for PDF) has a comment:
% it seems we really need yet another set of dummies; have not
% tried to figure out what each command should do in the context
% of @url. for now, just make @/ a no-op, that's the only one
% people have actually reported a problem with.
The "dummies" are used for the index files, because writing to an
output file causes expansion, without execution, which is the problem
we have here.
This change appears to fix it, at least for the gawk manual:
Index: texinfo.tex
===================================================================
--- texinfo.tex (revision 6638)
+++ texinfo.tex (working copy)
@@ -1416,6 +1416,7 @@
\normalturnoffactive
address@hidden@}%
\let\/=\empty
+ \let\xprocessmacroarg\eatspaces
\makevalueexpandable
% do we want to go so far as to use \indexnofonts instead of just
% special-casing \var here?
I'll commit this and hopefully that's good enough for now. I dare say
this isn't perfect, but I expect there aren't many email addresses or
URL's with backslashes in them (backslashes is what \xprocessmacroarg
was handling), and even fewer output via macros. As the comment
indicates, a more general solution is probably needed to be 100%
correct.
Looking at the gawk manual output, I notice the entries for part pages
in the TOC are badly broken: I'll look into this.