I try to pass the content of a Tex variable to lua, but I don't use luacode. Is there a way to avoid it ?
\documentclass{article}
%\usepackage{pgfkeys}
%\pgfkeys{
% JobName/.code={\directlua{ JobName = \jobname }},
% JobName,
%}
\begin{document}
\directlua{ JobName = \jobname }
\directlua{ tex.print ("The job name is :" .. JobName) }
\end{document}