[Dev-luatex] pdf.obj() removes leading white space

Reinhard Kotucha reinhard.kotucha at web.de
Mon Mar 10 22:28:16 CET 2014


On 2014-03-09 at 18:52:25 +0100, Hans Hagen wrote:

 > As we're supposedly talking latex here it's a bit off topic for this 
 > list but anyway ...

Hi Hans,
first of all, thank you very much.  It's much clearer now.  Sorry for
using LaTeX instead of plain TeX or ConTeXt, but it turned out that
then your answer would be less helpful. ;)

luacode.sty sets \catcode32=10 at the beginning indeed.  Hence no
chance to change it outside the luacode environment.

 > The easiest solution is to just load the file using lua's "dofile",
 > so something:
 > 
 > \luadirect{dofile("xml.lua")}

This works fine in my MWE.  I think that groked now why leading spaces
are pertained in my project but not in the MWE.  The MWE is a TeX file
which loads xml.lua wrapped into a luacode environment loaded with
\input.

My project is much more complex.  The main Lua file is loaded the same
way as in the MWE.  But it loads a bunch of other Lua files (also
xml.lua) with require().  It seems that with require() has the same
effect as dofile().

After all, you helped me a lot and I think that I can continue now
with what I have without the fear that I break everything when I
change something anywhere else.

Thanks a lot,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the dev-luatex mailing list