0

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}

1 Answer 1

4

You need a Lua string assignment so

JobName = "\jobname"

or

\directlua{ JobName = "\luaescapestring{\jobname}" }

If you need exotic filenames

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .