[luatex] variable arguments in luatex

Axel Kittenberger axel.kittenberger at univie.ac.at
Mon May 4 08:50:25 CEST 2020


As long time Lua coder I recently started with luatex.

I just wanted to use some Lua core functionality like this

https://www.lua.org/pil/5.2.html

function myfunc( ... )
   for _,v in ipairs(arg) do
     dosomething( v )
   end
end

to discover "arg" seems to be overwritten by the command line arguments 
instead of the function call arguments.

So how do vararg functions work in luatex and why is a Lua language core 
variable being overwritten?

PS: Has someone already written a tikz wrapper in Lua? I like tikz, but 
pgf stuff when doing non trivial math gets me crazy, thats why I want to 
move this tu Lua space.

Kind regards, Axel



More information about the luatex mailing list.