summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-03-18 23:00:45 +0000
committerKarl Berry <karl@freefriends.org>2008-03-18 23:00:45 +0000
commitf72496530038975ab17ea1bef0d912ed2ad585f1 (patch)
treedd0057defd11868f6cf0bbeee232d222119773e1
parentd0aa043c2500e3a3ef7515f204476313f6fb8cf8 (diff)
auto-pst-pdf update (18mar08)
git-svn-id: svn://tug.org/texlive/trunk@7014 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/auto-pst-pdf/README7
-rw-r--r--Master/texmf-dist/doc/latex/auto-pst-pdf/auto-pst-pdf.pdfbin139538 -> 143161 bytes
-rw-r--r--Master/texmf-dist/doc/latex/auto-pst-pdf/example.tex5
-rw-r--r--Master/texmf-dist/source/latex/auto-pst-pdf/auto-pst-pdf.dtx121
-rw-r--r--Master/texmf-dist/tex/latex/auto-pst-pdf/auto-pst-pdf.sty62
5 files changed, 96 insertions, 99 deletions
diff --git a/Master/texmf-dist/doc/latex/auto-pst-pdf/README b/Master/texmf-dist/doc/latex/auto-pst-pdf/README
index e252bcd5796..011b16d84a7 100644
--- a/Master/texmf-dist/doc/latex/auto-pst-pdf/README
+++ b/Master/texmf-dist/doc/latex/auto-pst-pdf/README
@@ -1,6 +1,6 @@
________________________
The auto-pst-pdf package
-v0.4 2007/11/18
+v0.5 2008/03/14
The package uses -shell-escape to execute pst-pdf.
This makes it especially easy to integrate into the
@@ -12,11 +12,6 @@ features so that Matlab figures via laprint, Mathematica
figures via MathPSfrag, and regular psfrag figures can
all be input consistently and easily.
-v0.4 adds options to change the commandline flags
-passed to the auxiliary programs, improves robustness
-and flexibility, and simplifies the output from using
-the package.
-
Will Robertson - wspr 81 at gmail dot com
Johannes Große
diff --git a/Master/texmf-dist/doc/latex/auto-pst-pdf/auto-pst-pdf.pdf b/Master/texmf-dist/doc/latex/auto-pst-pdf/auto-pst-pdf.pdf
index 2f92697b59f..dcae284b64c 100644
--- a/Master/texmf-dist/doc/latex/auto-pst-pdf/auto-pst-pdf.pdf
+++ b/Master/texmf-dist/doc/latex/auto-pst-pdf/auto-pst-pdf.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/auto-pst-pdf/example.tex b/Master/texmf-dist/doc/latex/auto-pst-pdf/example.tex
index 7449e1cf9d2..76fd385d6e9 100644
--- a/Master/texmf-dist/doc/latex/auto-pst-pdf/example.tex
+++ b/Master/texmf-dist/doc/latex/auto-pst-pdf/example.tex
@@ -2,5 +2,8 @@
\usepackage{psfrag}
\usepackage[latex={-interaction=nonstopmode}]{auto-pst-pdf}
\begin{document}
-\fbox{\psfragfig{example}}
+psfrag example with replacements defined in example-psfrag.tex:\par
+\fbox{\psfragfig{example}}\par
+the same example with a psfrag override:\par
+\fbox{\psfragfig{example}[\psfrag{[Mp]}{$M_P*$}]}
\end{document}
diff --git a/Master/texmf-dist/source/latex/auto-pst-pdf/auto-pst-pdf.dtx b/Master/texmf-dist/source/latex/auto-pst-pdf/auto-pst-pdf.dtx
index 7976b97fd4b..49fbc84972f 100644
--- a/Master/texmf-dist/source/latex/auto-pst-pdf/auto-pst-pdf.dtx
+++ b/Master/texmf-dist/source/latex/auto-pst-pdf/auto-pst-pdf.dtx
@@ -5,7 +5,7 @@
%<*readme>
________________________
The auto-pst-pdf package
-v0.4 2007/11/18
+v0.5 2008/03/14
The package uses -shell-escape to execute pst-pdf.
This makes it especially easy to integrate into the
@@ -17,11 +17,6 @@ features so that Matlab figures via laprint, Mathematica
figures via MathPSfrag, and regular psfrag figures can
all be input consistently and easily.
-v0.4 adds options to change the commandline flags
-passed to the auxiliary programs, improves robustness
-and flexibility, and simplifies the output from using
-the package.
-
Will Robertson - wspr 81 at gmail dot com
Johannes Große
@@ -132,7 +127,8 @@ This work consists of the file auto-pst-pdf.dtx
% \note{\url{http://www.ctan.org/tex-archive/help/Catalogue/entries/psfrag.html}}
% wrapper is provided.
%
-% \begin{tabular}{@{}lp{7cm}}
+% \begin{trivlist}\item[]
+% \begin{tabular}{@{\hskip 2em}lp{7cm}}
% \cmd\mathfig\marg{filename} & \raggedright
% insert a Mathematica graphic from \pkg{MathPSfrag}
% (without |-psfrag| suffix)\arraybackslash \\
@@ -141,14 +137,24 @@ This work consists of the file auto-pst-pdf.dtx
% \cmd\psfragfig\marg{filename} &
% insert an \EPS\ with \pkg{psfrag}
% \end{tabular}
+% \end{trivlist}
+%
+% \noindent The above commands all accept an optional argument
+% which is passed to the underlying \cmd\includegraphics\ macro.
+%
+% The \cmd\matlabfig\ command meddles slightly with the output of
+% \pkg{laprint}; the font sizes in the figure will always be as
+% originally defined. (This is unavoidable I'm afraid.)
%
-% \noindent
% For the \cmd\psfragfig\ command, \pkg{psfrag} statements are input
% from either or both of the files \meta{document}|-psfrag.tex| and
-% \meta{filename}|-psfrag.tex| if they exist.
+% \meta{filename}|-psfrag.tex| if they exist. Furthermore, supplementary
+% \cmd\psfrag\ statements can be added in a trailing optional argument:\par
+% |\psfrag|\oarg{graphics options}\marg{filename}\oarg{psfrag statements}
+%
+% \noindent Manual \cmd\psfrag s override those in \meta{filename}|-psfrag.tex|
+% which in turn override those in \meta{document}|-psfrag.tex|.
%
-% The above commands all accept an optional argument
-% which is passed to the underlying \cmd\includegraphics\ macro.
%
% \section{Advanced package options}\label{sec:opt}
%
@@ -170,12 +176,10 @@ This work consists of the file auto-pst-pdf.dtx
%
% {\color{gray}|\usepackage[|\color{niceblue}|latex={-interaction=nonstopmode}|\color{gray}|]{auto-pst-pdf}|}
%
-% \section{Customisation}
%
-% If you want to customise the auxiliary process, this package provides
-% the |delay| package option that does not execute the \pkg{pst-pdf}
-% processing. Then the \cmd\app@compile\ macro can be re-defined to do whatever you like
-% and the macro \cmd\CompilePics\ will invoke the auxiliary process.
+% \section{Acknowledgements}
+%
+% Many thanks to the authors of \pkg{pst-pdf}, \pkg{psfrag}, \pkg{laprint}, \pkg{MathPSfrag}, and \pkg{pdfcrop}. This package could not exist without their combined efforts over many years. Finally, Gernot \textsc{Hassenfplug} deserves special mention for extensive testing, feature suggestions, and moral support |:)| Thanks, mate.
%
% \StopEventually{}
%
@@ -191,10 +195,11 @@ This work consists of the file auto-pst-pdf.dtx
% This is the package.
%
% \begin{macrocode}
-\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]
% \end{macrocode}
%
% \PrintChanges
+% \changes{v0.5}{2007/11/22}{\texttt{delay} option removed. Keep it simple, stupid!}
% \changes{v0.4}{2007/11/11}{Will sorted it all out.}
% \changes{v0.4}{2007/11/09}{Johannes tinkered with the code. Will will improve. :-)}
% \changes{v0.3}{2007/11/09}{Too many changes to list. Command execution totally re-written.}
@@ -208,7 +213,6 @@ This work consists of the file auto-pst-pdf.dtx
% \paragraph{Things we need}
% \begin{macrocode}
\newif\if@app@off@
-\newif\if@app@delay@
\newif\if@app@crop@
\def\app@suffix{autopp}
\edef\app@jobname{\jobname-\app@suffix}
@@ -226,7 +230,6 @@ This work consists of the file auto-pst-pdf.dtx
\fi}
\DeclareOptionX{on}[]{\@app@off@false}
\DeclareOptionX{ext}{\def\app@ext{#1}}
-\DeclareOptionX{delay}{\@app@delay@true}
\DeclareOptionX{latex}{%
\def\app@latex@opts{%
\ifwindows
@@ -286,8 +289,9 @@ This work consists of the file auto-pst-pdf.dtx
\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.}}}}
% \end{macrocode}
+% \changes{v0.5}{2007/11/21}{Fix PackageError (should have been a warning).}
% \end{macro}
%
% \begin{macro}{\app@compile}
@@ -363,58 +367,48 @@ This work consists of the file auto-pst-pdf.dtx
% \begin{macrocode}
\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}
-% \end{macrocode}
-% Execute the compilation process unless the user is daring and wishes to do so themselves:
-% \begin{macrocode}
- \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
% \end{macrocode}
+% \changes{v0.5}{2008/03/14}{Removed mucking about with image extensions.}
%
% \paragraph{\LaTeX\ compilation}
% Either we're calling |latex| from within a pdf\LaTeX\ run (see above) or the document is being compiled as usual.
% \begin{macrocode}
\else
% \end{macrocode}
+% \LaTeX\ compilation from scratch (as in `|latex| \meta{document}|.tex|`) --- here the |postscript| environment does nothing and document is processed `normally':
+% \changes{v0.5}{2007/11/22}{Removed \cs{ifdefined} to avoid e-\TeX.}
+% \begin{macrocode}
+ \ifx\APPmakepictures\@undefined
+ \PassOptionsToPackage{inactive}{pst-pdf}
+% \end{macrocode}
% \LaTeX\ compilation induced by this package:
% \begin{macrocode}
- \ifdefined\APPmakepictures
+ \else
\if@app@crop@
\PassOptionsToPackage{notightpage}{pst-pdf}
\fi
-% \end{macrocode}
-% \LaTeX\ compilation from scratch (as in `|latex| \meta{document}|.tex|`) --- here the |postscript| environment does nothing and document is processed `normally':
-% \begin{macrocode}
- \else
- \PassOptionsToPackage{inactive}{pst-pdf}
\fi
-% \end{macrocode}
-% Bug fix for |pst-pdf| (apparently):
-% \begin{macrocode}
- \AtBeginDocument{%
- \gdef\ppf@other@extensions{.png,.pdf,.jpg,.jpeg,.PNG,.PDF,.JPG,.JPEG}
- \edef\Gin@extensions{\Gin@extensions,.mps}
- \DeclareGraphicsRule{.mps}{eps}{*}{}}
\fi
% \end{macrocode}
%
@@ -432,8 +426,8 @@ This work consists of the file auto-pst-pdf.dtx
% psfrag-related packages. This provides a consistent and easy way to
% include such figures in the document.
%
-% Please suggest wrappers for other packages that output psfrag
-% (for example: SciLab, R, Maple, LabView, ... ?)
+% Please suggest wrappers for other packages that output psfrag figures
+% (for example: SciLab, R, Maple, LabView, Sage, ... ?)
%
% \begin{macro}{\matlabfig}
% We need to disable the scaling that laprint applies
@@ -444,10 +438,12 @@ This work consists of the file auto-pst-pdf.dtx
\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}}
% \end{macrocode}
+% \changes{v0.5}{2007/11/21}{Redefine \cmd\resizebox\ for \texttt{laprint}.}
% \end{macro}
%
% \begin{macro}{\mathfig}
@@ -469,16 +465,21 @@ This work consists of the file auto-pst-pdf.dtx
% inserted.
% \begin{macrocode}
\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}}
% \end{macrocode}
% Finally, input any psfrag commands associated with the document:
-% (actually, does this work?!?)
% \begin{macrocode}
\InputIfFileExists{\jobname-psfrag}{}{}
% \end{macrocode}
+% \changes{v0.5}{2007/11/21}{Extend \cmd\psfragfig\ to accept arbitrary input for extra \cmd\psfrag\ commands.}
% \end{macro}
%
% \end{subsection}
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}{}{}