From 65e872afda15da66eaaf7efe40b3f57045e08b9b Mon Sep 17 00:00:00 2001 From: Manuel Pégourié-Gonnard Date: Mon, 14 Jun 2010 11:22:59 +0000 Subject: Quote \jobname in lualatex formats if it contains spaces. git-svn-id: svn://tug.org/texlive/trunk@18968 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/latexconfig/dvilualatex.ini | 3 +++ Master/texmf-dist/tex/latex/latexconfig/lualatex.ini | 4 +++- .../tex/latex/latexconfig/lualatexquotejobname.tex | 16 ++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.tex (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/latexconfig/dvilualatex.ini b/Master/texmf-dist/tex/latex/latexconfig/dvilualatex.ini index f0c47ffaeec..c213f6193b3 100644 --- a/Master/texmf-dist/tex/latex/latexconfig/dvilualatex.ini +++ b/Master/texmf-dist/tex/latex/latexconfig/dvilualatex.ini @@ -7,4 +7,7 @@ % % the usual format initialization. \scrollmode +\let\dump\relax \input latex.ltx +\input lualatexquotejobname.tex +\pdfprimitive\dump diff --git a/Master/texmf-dist/tex/latex/latexconfig/lualatex.ini b/Master/texmf-dist/tex/latex/latexconfig/lualatex.ini index 225bd4ced4f..ccab0f74f52 100644 --- a/Master/texmf-dist/tex/latex/latexconfig/lualatex.ini +++ b/Master/texmf-dist/tex/latex/latexconfig/lualatex.ini @@ -4,5 +4,7 @@ \input pdftexconfig.tex % pdf output by default. \scrollmode +\let\dump\relax \input latex.ltx - +\input lualatexquotejobname.tex +\pdfprimitive\dump 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 -- cgit v1.2.3