[Dev-luatex] .BEILMOPS or how I stopped worrying and love Open Source
Heiko Oberdiek
oberdiek at uni-freiburg.de
Thu Dec 13 18:53:21 CET 2007
On Thu, Dec 13, 2007 at 06:18:24PM +0100, David Kastrup wrote:
> Heiko Oberdiek <oberdiek at uni-freiburg.de> writes:
>
> > On Thu, Dec 13, 2007 at 02:40:07PM +0100, Taco Hoekwater wrote:
> >
> >> General remark: suck attempts to squeeze tex input to behave
> >> like lua source code are hard to debug and even harder to
> >> predict. It is much less confusing if you create either an
> >> environment like
> >>
> >> \startluacode
> >> ..
> >> \stopluacode
> >>
> >> with appropriate catcode changes,
> >
> > And \endlinechar=10 \catcode10=12 to enable the Lua parser
> > seeing multiple lines instead of one merged huge line.
>
> What's the beef with that? Except inside of strings (where \n will work
> fine), the Lua parser does not consider line endings to be different
> from spaces.
\catcode`\{=1
\catcode`\}=2
\directlua0{
do
local foo
error("Error in third line")
end
}
\endlinechar=10 %
\directlua0{%
do
local foo
error("Same line, but useful line number")
end
}%
\endlinechar=13 %
\end
luatex --ini test
This is LuaTeX, Version snapshot-0.20.0-2007120612 (Web2C 7.5.6) (INITEX)
(test.tex
! LuaTeX error [string "luas[0]"]:1: Error in third line.
l.8 }
?
! LuaTeX error [string "luas[0]"]:3: Same line, but useful line number.
l.15 }
%
?
)
No pages of output.
Transcript written on test.log.
Yours sincerely
Heiko <oberdiek at uni-freiburg.de>
More information about the dev-luatex
mailing list