summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.tex6
1 files changed, 4 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.tex b/Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.tex
index 779ea32b5cb..cea56d72bcd 100644
--- a/Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.tex
+++ b/Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.tex
@@ -25,11 +25,12 @@
%
% This file is inputed after latex.ltx.
%
+\makeatletter
\everyjob\expandafter{\the\everyjob
\ifcase\directlua{
tex.sprint(callback.list().process_jobname == nil and 0 or 1)}\relax
% no callback, do what we can in TeX
- \begingroup \makeatletter
+ \begingroup
% strip quotes from job name and count them
\def\stripquotes#1"#2\@nil{%
\edef\clean{\clean#1}%
@@ -51,11 +52,12 @@
\else
\edef\fixjobname{\def\noexpand\jobname{"\clean"}}%
\fi}%
- \edef\dotest{\noexpand\testsp\clean\space\relax}\dotest
+ \edef\dotest{\noexpand\testsp\clean\space\noexpand\@nil}\dotest
% do it after closing the group
\expandafter\endgroup\fixjobname
\or % callback available, use it
% function in a separate file for convenience (uses %, ~, etc)
\directlua{dofile(assert(kpse.find_file("lualatexquotejobname.lua")))}
\fi}
+\makeatother
\endinput