summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pstool
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-11-05 01:02:00 +0000
committerKarl Berry <karl@freefriends.org>2013-11-05 01:02:00 +0000
commitdd92320637427aa7d3a3bced788047134a4c0281 (patch)
tree76f2cc4c5eb489832597f8b5125d15676f0f0f07 /Master/texmf-dist/tex/latex/pstool
parentbaa1a11ec018b10ac2285d3fa0a65ba8a1d69d4d (diff)
pstool (4nov13)
git-svn-id: svn://tug.org/texlive/trunk@32065 c570f23f-e606-0410-a88d-b1316a301751
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%
}%