From f72496530038975ab17ea1bef0d912ed2ad585f1 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 18 Mar 2008 23:00:45 +0000 Subject: auto-pst-pdf update (18mar08) git-svn-id: svn://tug.org/texlive/trunk@7014 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/auto-pst-pdf/auto-pst-pdf.sty | 62 +++++++++++----------- 1 file changed, 30 insertions(+), 32 deletions(-) (limited to 'Master/texmf-dist/tex/latex/auto-pst-pdf') diff --git a/Master/texmf-dist/tex/latex/auto-pst-pdf/auto-pst-pdf.sty b/Master/texmf-dist/tex/latex/auto-pst-pdf/auto-pst-pdf.sty index ab2b813761c..6eb05a77f30 100644 --- a/Master/texmf-dist/tex/latex/auto-pst-pdf/auto-pst-pdf.sty +++ b/Master/texmf-dist/tex/latex/auto-pst-pdf/auto-pst-pdf.sty @@ -8,10 +8,9 @@ %% __________________________________ %% Copyright (C) 2007 Will Robertson %% License information appended. -\ProvidesPackage{auto-pst-pdf}[2007/11/18 v0.4 Wrapper for pst-pdf] +\ProvidesPackage{auto-pst-pdf}[2008/03/14 v0.5 Wrapper for pst-pdf] \RequirePackage{ifpdf,xkeyval,ifplatform} \newif\if@app@off@ -\newif\if@app@delay@ \newif\if@app@crop@ \def\app@suffix{autopp} \edef\app@jobname{\jobname-\app@suffix} @@ -25,7 +24,6 @@ \fi} \DeclareOptionX{on}[]{\@app@off@false} \DeclareOptionX{ext}{\def\app@ext{#1}} -\DeclareOptionX{delay}{\@app@delay@true} \DeclareOptionX{latex}{% \def\app@latex@opts{% \ifwindows @@ -69,7 +67,7 @@ \def\app@convert#1#2#3{% \OnlyIfFileExists{#2}{% \app@exe{\csname app@cmd@#1\endcsname{#2}{#3}}% - \NotIfFileExists{#3}{\app@PackageError{Creation of #3 failed.}}}} + \NotIfFileExists{#3}{\app@PackageWarning{Creation of #3 failed.}}}} \def\app@compile{% \app@cleanup \app@remove@container @@ -98,48 +96,43 @@ \def\app@cmd@pdfcrop#1#2{pdfcrop \app@pdfcrop@opts\space "#1" "#2"} \ifpdf \if@app@off@\else - \newcommand\CompilePics{% - \ifshellescape - \app@exe{echo " "} - \app@exe{echo "-------------------------------------------------"} - \app@exe{echo "auto-pst-pdf: Auxiliary LaTeX compilation"} - \app@exe{echo "-------------------------------------------------"} - \app@compile - \app@exe{echo "-------------------------------------------------"} - \app@exe{echo "auto-pst-pdf: End auxiliary LaTeX compilation"} - \app@exe{echo "-------------------------------------------------"} - \else - \app@PackageError{% - "shell escape" (or "write18") is not enabled:\app@nl - auto-pst-pdf will not work!} - {You need to run LaTeX with the equivalent of - "pdflatex -shell-escape"\app@nl - Or turn off auto-pst-pdf.} - \fi} - \if@app@delay@\else\CompilePics\fi + \ifshellescape + \app@exe{echo " "} + \app@exe{echo "-------------------------------------------------"} + \app@exe{echo "auto-pst-pdf: Auxiliary LaTeX compilation"} + \app@exe{echo "-------------------------------------------------"} + \app@compile + \app@exe{echo "-------------------------------------------------"} + \app@exe{echo "auto-pst-pdf: End auxiliary LaTeX compilation"} + \app@exe{echo "-------------------------------------------------"} + \else + \app@PackageError{% + "shell escape" (or "write18") is not enabled:\app@nl + auto-pst-pdf will not work!} + {You need to run LaTeX with the equivalent of + "pdflatex -shell-escape"\app@nl + Or turn off auto-pst-pdf.}% + \fi \fi \if@app@crop@ \PassOptionsToPackage{notightpage}{pst-pdf} \fi \else - \ifdefined\APPmakepictures + \ifx\APPmakepictures\@undefined + \PassOptionsToPackage{inactive}{pst-pdf} + \else \if@app@crop@ \PassOptionsToPackage{notightpage}{pst-pdf} \fi - \else - \PassOptionsToPackage{inactive}{pst-pdf} \fi - \AtBeginDocument{% - \gdef\ppf@other@extensions{.png,.pdf,.jpg,.jpeg,.PNG,.PDF,.JPG,.JPEG} - \edef\Gin@extensions{\Gin@extensions,.mps} - \DeclareGraphicsRule{.mps}{eps}{*}{}} \fi \RequirePackage{pst-pdf} \let\app@ig\includegraphics \newcommand\matlabfig[2][]{% \begin{postscript} - \renewcommand\includegraphics[2][]{\app@ig[#1]{##2}} - \input{#2} + \renewcommand\resizebox[3]{##3}% + \renewcommand\includegraphics[2][]{\app@ig[#1]{##2}}% + \input{#2}% \end{postscript}} \newcommand\mathfig[2][]{% \begin{postscript} @@ -147,8 +140,13 @@ \includegraphics[#1]{#2-psfrag}% \end{postscript}} \newcommand\psfragfig[2][]{% + \@ifnextchar[ + {\app@psfragfig[#1]{#2}} + {\app@psfragfig[#1]{#2}[]}} +\def\app@psfragfig[#1]#2[#3]{% \begin{postscript} \InputIfFileExists{#2-psfrag}{}{}% + #3 \includegraphics[#1]{#2}% \end{postscript}} \InputIfFileExists{\jobname-psfrag}{}{} -- cgit v1.2.3