I am a newbie in LuaTeX, but it is very interesting.
Sometimes, I need process some macro arguments by Lua code, so it will be useful that if we can access the variables defined in Lua. An example:
\def\foo#1{%
\directlua{var = [[#1]] .. " " .. system}
% other part of this macro
...}
\foo{typesetting}
\bye
how can I access the var
defined in the \directlua
? Say, after \foo{typesetting}
, I can get typesetting system
by only using the var
.
Another question is that
how can I access the TeX command in \directlua environment
?