summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.tex')
-rw-r--r--Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.tex16
1 files changed, 16 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.tex b/Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.tex
new file mode 100644
index 00000000000..19a1f8845e1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.tex
@@ -0,0 +1,16 @@
+% $Id$
+% Manuel Pegourie-Gonnard, originally written 2010. WTFPL v2.
+%
+% Quote \jobname if it contains spaces, similarly to what pdfTeX does.
+%
+\everyjob\expandafter{\the\everyjob
+ \begingroup
+ \def\testsp#1 #2\relax{%
+ \ifx\relax#2\relax
+ \let\fixjobname\empty
+ \else
+ \edef\fixjobname{\def\noexpand\jobname{"\jobname"}}%
+ \fi}%
+ \edef\dotest{\noexpand\testsp\jobname\space\relax}\dotest
+ \expandafter\endgroup\fixjobname}
+\endinput