[luatex] Strange behavior of tex.print.
Heiko Oberdiek
heiko.oberdiek at googlemail.com
Sat Apr 30 12:58:59 CEST 2011
On Sat, Apr 30, 2011 at 12:03:35PM +0200, Paul Isambert wrote:
> Le 29/04/2011 12:36, Heiko Oberdiek a écrit :
> >On Fri, Apr 29, 2011 at 09:46:27AM +0200, Paul Isambert wrote:
> >
> >>Le 29/04/2011 09:25, Ulrike Fischer a écrit :
> >>>tex.print(9, "c", "\relax") --gives "cflflelax" why?
> >>Thanks Patrick and Ulrike, the second fl is indeed \r, I missed
> >>that; now the questions is: why are end-of-line characters printed
> >>as if they had catcode 12?
> >Perhaps in your case is \catcode\endlinechar=12?
>
> No. I tested with usual catcodes around. But does this mean that you
> don't encounter the problem, Heiko, and so perhaps it's
> version-bound? (Mine is v.0.66 rev 4136).
I also get tokens with catcode 12 in case of unknown catcode tables:
\catcode`\{=1
\catcode`\}=2
\catcode`\#=6
\def\msg#{\immediate\write16}
\edef\x{\directlua{tex.print(100, "", "")}}
\begingroup
\lccode`\!=\endlinechar
\lowercase{\endgroup
\def\y{!}
}
\ifx\x\y
\msg{* Catcode of endlinechar: 12}%
\else
\msg{* ??}%
\fi
\csname @@end\endcsname\end
Versions:
* beta-0.60.2-2010071217 (TeX Live 2010) (rev 3736)
* branches/0.70.x beta-0.67.0-2011042412 (rev 4171)
Yours sincerely
Heiko Oberdiek
More information about the luatex
mailing list