On 10 August 2015 at 21:11, David Kastrup <[email protected]> wrote:

> This would be Documentation/de/out-www/notation/repeats.texi, with the
> construct
>
> @warning{Wenn man @code{@bs{}relative} innerhalb von @code{@bs{}repeat}
> notiert, ohne den @code{Voice}-Kontext explizit zu beginnen, erscheinen
> zusätzliche (ungewollte) Systeme.  Sie auch @rprogram{Ein zusätzliches System 
> erscheint}.}
>
> With the definitions
>
> @macro warning{TEXT}
> @quotation
> @quotation
> @cartouche
> @b{Note:} \TEXT\
> @end cartouche
> @end quotation
> @end quotation
> @end macro
>
> and (I think)
>
> @macro rprogram{TEXT}
> @vindex \TEXT\
> @ref{\TEXT\,,,usage,Application Usage}
> @end macro
>

@bs has to be defined for this to work, and @documentencoding UTF-8 is
also needed for this to break.

Here's where it goes wrong:

@arg ->Ein zusätzliches System erscheint@macroargdummy

<C3>->@UTFviiiTwoOctets <C3>

@UTFviiiTwoOctets #1#2->@expandafter @UTFviiiDefined @csname u8:#1@string #2@en
dcsname
#1<-<C3>
#2<-<A4>

@UTFviiiDefined #1->@ifx #1@relax @message {@linenumber Unicode char @string #1
 not defined for Texinfo}@else @expandafter #1@fi
#1<-@u8:ä

@u8:ä ->@"a

@"#1->{@accent "7F #1}
#1<-a

We'd changed the catcode of ^^c3 to 12, away from 13 (in
\setnonasciicharscatcodeglobal), but it is still being expanded.

When looking at the log file, I noticed a funny order of execution.
What was happening, was that the call to the inner macro was being
processed inside \eatspaces. This was bad news: the cat codes were
fixed when the argument to \eatspaces were read, and the cat code
changes for the argument to the inner macro were ineffectual.

This effect can even be seen with the current, official texinfo.tex:

\input texinfo
@setfilename

@macro Mac {ARG}
\ARG\
@end macro

@Mac{\\}

@code{@Mac{\\}}
@bye

In the second invocation, the backslashes are doubled, because the
catcode of \ was fixed as 13 when the argument to @code was read. In
the first, the catcode of \ is changed to 0 so the control sequence \\
is recognized, yielding a single backslash.

I don't have a solution to suggest yet.

Attachment: deutschu8.texi
Description: TeXInfo document

Reply via email to