summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/standalone/standalone.cls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/standalone/standalone.cls')
-rw-r--r--Master/texmf-dist/tex/latex/standalone/standalone.cls25
1 files changed, 22 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/standalone/standalone.cls b/Master/texmf-dist/tex/latex/standalone/standalone.cls
index a5d9474da06..34eeb872bda 100644
--- a/Master/texmf-dist/tex/latex/standalone/standalone.cls
+++ b/Master/texmf-dist/tex/latex/standalone/standalone.cls
@@ -18,8 +18,8 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{standalone}[%
- 2012/05/05
- v1.1
+ 2012/05/20
+ v1.1a
Class to compile TeX sub-files standalone]
\newif\ifstandalone
\standalonetrue
@@ -776,6 +776,7 @@
\sa@convertfalse
\fi
\ifsa@convert
+\let\sa@convert@stop\stop
\begingroup
\let\on@line\@gobble
\def\sa@convert#1{%
@@ -793,10 +794,27 @@
}{%
\def\filemodbefore{}%
}}}}%
+ \edef\@tempa{\jobname}
+ \edef\@tempb{\sa@convert@subjobname}
+ \@onelevel@sanitize\@tempa
+ \@onelevel@sanitize\@tempb
+ \@tempswafalse
+ \ifx\@tempa\@tempb
+ \@tempswatrue
+ \edef\infile@filemodbefore{\csname pdffilemoddate\endcsname{\infile}}%
+ \else
+ \global\let\sa@convert@stop\relax
+ \fi
\immediate\write18{\sa@convert@latex\space\sa@convert@latexoptions\space
-jobname \sa@convert@quote\sa@convert@subjobname\sa@convert@quote\space
\sa@convert@quote\string\expandafter\string\def\string\csname\space
sa@internal@run\string\endcsname{1}\string\input{\sa@convert@mainfile}\sa@convert@quote}%
+ \if@tempswa
+ \edef\infile@filemodafter{\csname pdffilemoddate\endcsname{\infile}}%
+ \ifx\infile@filemodbefore\infile@filemodafter
+ \global\let\sa@convert@stop\relax
+ \fi
+ \fi
\edef\sa@convert@precommand{\sa@convert@precommand}%
\ifx\sa@convert@precommand\@empty\else
\immediate\write18{\sa@convert@precommand}%
@@ -854,6 +872,7 @@
\relax% 0
\sa@convert@failuremsg
{standalone}{Shell escape disabled! Cannot convert file '\infile'.}{}%
+ \global\let\sa@convert@stop\relax
\or% 1
\sa@convert{Conversion unsuccessful!\MessageBreak
There might be something wrong with your\MessageBreak
@@ -862,7 +881,7 @@
\sa@convert{Conversion failed! Please ensure that shell escape\MessageBreak is enabled (e.g. use '-shell-escape').}%
\fi
\endgroup
-\expandafter\stop
+\expandafter\sa@convert@stop
\fi
\begingroup
\toks@\expandafter{%