summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pstool
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/pstool')
-rw-r--r--Master/texmf-dist/tex/latex/pstool/pstool.sty18
1 files changed, 11 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/pstool/pstool.sty b/Master/texmf-dist/tex/latex/pstool/pstool.sty
index c29683cf6f8..89fd0b24ff9 100644
--- a/Master/texmf-dist/tex/latex/pstool/pstool.sty
+++ b/Master/texmf-dist/tex/latex/pstool/pstool.sty
@@ -1,6 +1,6 @@
% TODO: convert this package into expl3 syntax (will save many lines of code).
-\ProvidesPackage{pstool}[2013/03/11 v1.5a
+\ProvidesPackage{pstool}[2013/03/11 v1.5b
Wrapper for processing PostScript/psfrag figures]
% External packages:
@@ -390,10 +390,10 @@
\fi
% Finish up: (implies success!)
\pstool@endprocess{%
- \pstool@cleanup
\pstool@includegraphics{\pstool@path\pstool@filestub}%
% Emulate \cs{include} (sort of) and have the main document load the auxiliary aux file, in a manner of speaking:
\pstool@write@aux
+ \pstool@cleanup
}%
\pstool@echo@verbose{^^J=== pstool: end processing ===^^J}%
\endgroup
@@ -443,9 +443,11 @@
% We need to cache the aux file, so here goes.
% This is because the aux file is cleared for writing after \cs{begin{document}}.
-\IfFileExists{\jobname.oldaux}{\immediate\write18{\pstool@rm@cmd \jobname.oldaux}}{}
-\immediate\write18{\pstool@cp@cmd \jobname.aux \jobname.oldaux}
-\AtEndDocument{\immediate\write18{\pstool@rm@cmd \jobname.oldaux}}
+\ifpdf
+ \IfFileExists{\jobname.oldaux}{\immediate\write18{\pstool@rm@cmd \jobname.oldaux}}{}
+ \immediate\write18{\pstool@cp@cmd \jobname.aux \jobname.oldaux}
+ \AtEndDocument{\immediate\write18{\pstool@rm@cmd \jobname.oldaux}}
+\fi
\edef\pstool@auxmarker#1{\string\@percentchar\space <#1PSTOOLLABELS>}
\edef\pstool@auxmarker@text#1{\@percentchar <#1PSTOOLLABELS>}
@@ -507,10 +509,12 @@
}^^J%
\fi
% And the document body to place the graphic on a page of its own:
- \noexpand\@input{\jobname.oldaux}^^J^^J%
+ \noexpand\@input{\jobname.oldaux}^^J%
+ \noexpand\makeatother^^J^^J%
\noexpand\begin{document}^^J%
+ \noexpand\makeatletter^^J%
\unexpanded{\immediate\write\@mainaux}{\pstool@auxmarker*}^^J%
- \noexpand\makeatother^^J%
+ \noexpand\makeatother^^J^^J%
\unexpanded{%
\centering\null\vfill^^J%
}%