From dd92320637427aa7d3a3bced788047134a4c0281 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 5 Nov 2013 01:02:00 +0000 Subject: pstool (4nov13) git-svn-id: svn://tug.org/texlive/trunk@32065 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/pstool/pstool.sty | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'Master/texmf-dist/tex/latex/pstool') 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% }% -- cgit v1.2.3