blob: 19a1f8845e1869c77f5fd90f60ae61f8a8bba460 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
|