[luatex] writing to log/term

Arno Trautmann Arno.Trautmann at gmx.de
Sat Nov 19 14:12:44 CET 2011


Hi all,

again I thoguht this would be a simple task, but I do not manage to do it.
I want to print a message to the terminal, wailt for some time, print 
something else, and then the compilaton should go on. This should happen 
anywhere on a page. Naive as I am, I tried to do this:

some text

\directlua{
   delay = 1
   clock = os.clock
   texio.write_nl("first comment")
   t0 = clock()
   while clock() - t0 <= delay do end
   t0 = clock()
   texio.write_nl("second comment")
   while clock() - t0 <= delay do end
}

more text
\bye

But the result is that LuaTeX waits for the total delay on the page, 
then prints out everything together. I guess that is because TeX 
collects all messages until shipout and only then prints it all? If so, 
is there another way to write messages to the terminal using the Lua side?

cheers
Arno


More information about the luatex mailing list