[NTG-context] Howto use the lua io.read() function only in the first context run?

Romain Diss romain.diss at yahoo.fr
Tue Mar 15 21:04:44 CET 2016


Hi all,

I want to write a cld document with some data read on the standard
input. I'm using the lua io.read() function but it's launched at every
context passes (depending on the case, it is launched 2 to 3 times).

-- Minimum not working example
local name = io.read()
context.startdocument()
context("Hello " .. name)
context.stopdocument()

Thanks in advance.

-- 
Romain Diss


More information about the ntg-context mailing list