diff options
-rwxr-xr-x | Build/tools/tpm-ctan-check | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/auto-pst-pdf/README | 40 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/auto-pst-pdf/auto-pst-pdf.sty | 134 | ||||
-rw-r--r-- | Master/texmf-dist/tpm/auto-pst-pdf.tpm | 23 | ||||
-rw-r--r-- | Master/texmf/lists/auto-pst-pdf | 6 | ||||
-rw-r--r-- | Master/texmf/tpm/collection-pstricks.tpm | 1 |
6 files changed, 205 insertions, 1 deletions
diff --git a/Build/tools/tpm-ctan-check b/Build/tools/tpm-ctan-check index e12022d2516..91af05811e4 100755 --- a/Build/tools/tpm-ctan-check +++ b/Build/tools/tpm-ctan-check @@ -12,7 +12,7 @@ my @WorkingTPM = qw( alnumsec altfont ams amscls amsldoc-it amsltx2 amsmath amsrefs amsthdoc-it apacite appendix arabi arabtex archaic arcs arev armenian arrayjob arydshln ascii assignment attachfile - aurical + aurical auto-pst-pdf babelbib beamer beamer-tut-pt begriff bera betababel bezos bghyphen bibhtml bibleref bibtopic bibunits bigfoot birthday bitfield blacklettert1 blindtext booklet bophook diff --git a/Master/texmf-dist/doc/latex/auto-pst-pdf/README b/Master/texmf-dist/doc/latex/auto-pst-pdf/README new file mode 100644 index 00000000000..13c7875acf2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/auto-pst-pdf/README @@ -0,0 +1,40 @@ +____________
+AUTO-PST-PDF
+
+BASIC USAGE
+This package provides a wrapper around pst-pdf to automatically
+accomodate for typesetting either with DVI or PDF output. With
+default package option [on], typesetting under pdfLaTeX will
+automatically initiate a LaTeX->dvips->ps2pdf->pdfcrop run to
+generate the required PDF figures for the document.
+
+After this has been done and the figures no longer need to be
+re-generated, the package can be given the [off] option to save
+compilation time.
+
+REQUIREMENTS
+pdfTeX must be called with the --shell-escape option, and Heiko
+Oberdiek's pdfcrop Perl script must be installed.
+
+Loads the following packages for convenience:
+ color,graphicx,psfrag,pst-pdf
+
+Requires e-TeX because I'm lazy.
+
+ADDITIONAL USAGE
+Macros are provided to easily facilitate figures created by the
+MATLAB package laprint and the Mathematica package MathPSfrag. Also,
+a generic psfrag wrapper is provided.
+
+ \mathfig{<filename>} - insert a Mathematica graphic
+ (without -psfrag suffix)
+ \matlabfig{<filename>} - insert a Matlab graphic
+ \psfragfig{<filename>} - insert an EPS with psfrag statements
+ in either or both of the files
+ <document>-psfrag.tex
+ <filename>-psfrag.tex
+
+The above commands also accept an optional argument
+which is passed to \includegraphics.
+_________________________
+Will Robertson, Nov. 2006
\ No newline at end of file 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 new file mode 100644 index 00000000000..b5c25c5bfe1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/auto-pst-pdf/auto-pst-pdf.sty @@ -0,0 +1,134 @@ +% AUTO-PST-PDF +% This is the auto-pst-pdf package, by Will Robertson. +% Proper documentation forthcoming (if ever). +% +% This document may be distributed under the terms and conditions of +% the LaTeX Project Public License, version 1.3c or later (your preference): +% <http://www.latex-project.org/lppl.txt> +% +% The package is "maintained" by Will Robertson. +% Contact: <wspr81 [at] gmail [dot] com> +% Copyright 2006 by Will Robertson +% +% BASIC USAGE +% This package provides a wrapper around pst-pdf to automatically +% accomodate for typesetting either with DVI or PDF output. With +% default package option [on], typesetting under pdfLaTeX will +% automatically initiate a LaTeX->dvips->ps2pdf->pdfcrop run to +% generate the required PDF figures for the document. +% +% After this has been done and the figures no longer need to be +% re-generated, the package can be given the [off] option to save +% compilation time. +% +% REQUIREMENTS +% pdfTeX must be called with the --shell-escape option, and Heiko +% Oberdiek's pdfcrop Perl script must be installed. +% +% Loads the following packages for convenience: +% color,graphicx,psfrag,pst-pdf +% +% Requires e-TeX because I'm lazy. +% +% ADDITIONAL USAGE +% Macros are provided to easily facilitate figures created by the +% MATLAB package laprint and the Mathematica package MathPSfrag. Also, +% a generic psfrag wrapper is provided. +% +% \mathfig{<filename>} - insert a Mathematica graphic +% (without -psfrag suffix) +% \matlabfig{<filename>} - insert a Matlab graphic +% \psfragfig{<filename>} - insert an EPS with psfrag statements +% in either or both of the files +% <document>-psfrag.tex +% <filename>-psfrag.tex +% +% The above commands also accept an optional argument +% which is passed to \includegraphics. + +%% Declaration +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{auto-pst-pdf} + [2006/11/30 v0.1 Wrapper for pst-pdf] + +%% Package options +\newif\if@apstpdf@off@ +\@apstpdf@off@false +\DeclareOption{off}{\@apstpdf@off@true} +\DeclareOption{on}{\@apstpdf@off@false} +\ExecuteOptions{on} +\ProcessOptions + +\RequirePackage{ifpdf,etex,color,graphicx,psfrag} + +%%%%%%%%%%%%%%%%%%%%%% +%% Base functionality: +% +% For compilation, we use the [notightpage] pst-pdf option and the +% pdfcrop Perl script because Matlab-created EPS figures have elements +% that extend ouside their bounding boxes, and end up with clipped +% content after ps2pdf. +% +% Otherwise the script ps4pdf would be sufficient. + +\ifpdf +% pdfLaTeX compilation; requires supplementary processing for psfrag to work: + \unless\if@apstpdf@off@ + \immediate\write18{latex -disable-write18 "\unexpanded{\let\APPmakepictures\empty\input}{\jobname.tex}"} + \immediate\write18{dvips -o \jobname-pics.ps \jobname.dvi} + \immediate\write18{ps2pdf \jobname-pics.ps \jobname-pics-nocrop.pdf} + \immediate\write18{pdfcrop \jobname-pics-nocrop.pdf \jobname-pics.pdf} + \fi + \RequirePackage[notightpage]{pst-pdf} +\else + \ifdefined\APPmakepictures +% LaTeX compilation induced by this package: + \RequirePackage[notightpage]{pst-pdf} + \else +% LaTeX compilation from scratch (as in `latex \jobname.tex`): + \newenvironment{postscript}{}{} + \fi +\fi + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Extras for external packages: +% +% Commands are provided that mirror \includegraphics (and similarly +% accept an optional argument) for the output of different +% 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: R, Maple, LabView, ... ?) + +%% Matlab's laprint: +% We need to disable the scaling that laprint applies +% to \includegraphics in here, because otherwise labels that extend +% outside the bounding box of the generated PostScript file will +% change the intended width of the graphic. +\let\apstpdf@ig\includegraphics +\newcommand\matlabfig[2][]{% + \begin{postscript} + \renewcommand\includegraphics[2][]{\apstpdf@ig[#1]{##2}} + \input{#2} + \end{postscript}} + +%% Mathematica's MathPSfrag output: +\newcommand\mathfig[2][]{% + \begin{postscript} + \input{#2-psfrag}% + \includegraphics[#1]{#2-psfrag}% + \end{postscript}} + +%% Regular old EPS graphics: +% Include your psfrag commands in the files <document>-psfrag.tex +% and/or <figname>-psfrag.tex, where <document> is the filename of the +% main document and <figname> is the filename of the graphics +% inserted. +\newcommand\psfragfig[2][]{% + \begin{postscript} + \InputIfFileExists{#1-psfrag}{}{}% + \includegraphics[#1]{#2}% + \end{postscript}} + +\InputIfFileExists{\jobname-psfrag}{}{}% diff --git a/Master/texmf-dist/tpm/auto-pst-pdf.tpm b/Master/texmf-dist/tpm/auto-pst-pdf.tpm new file mode 100644 index 00000000000..46f90456c40 --- /dev/null +++ b/Master/texmf-dist/tpm/auto-pst-pdf.tpm @@ -0,0 +1,23 @@ +<!DOCTYPE rdf:RDF SYSTEM "../../support/tpm.dtd"> +<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:TPM="http://texlive.dante.de/"> + <rdf:Description about="http://texlive.dante.de/texlive/Package/auto-pst-pdf.zip"> + <TPM:Name>auto-pst-pdf</TPM:Name> + <TPM:Type>Package</TPM:Type> + <TPM:Date>2006/11/28 16:10:00</TPM:Date> + <TPM:Version></TPM:Version> + <TPM:Creator>karl</TPM:Creator> + <TPM:Title>The auto-pst-pdf package.</TPM:Title> + <TPM:Description></TPM:Description> + <TPM:Author></TPM:Author> + <TPM:Size>6296</TPM:Size> + <TPM:License></TPM:License> + <TPM:Build/> + <TPM:RunFiles size="5716"> +texmf-dist/tex/latex/auto-pst-pdf/auto-pst-pdf.sty +texmf-dist/tpm/auto-pst-pdf.tpm + </TPM:RunFiles> + <TPM:DocFiles size="1478">texmf-dist/doc/latex/auto-pst-pdf/README</TPM:DocFiles> + <TPM:Provides>Package/auto-pst-pdf</TPM:Provides> + </rdf:Description> +</rdf:RDF> + diff --git a/Master/texmf/lists/auto-pst-pdf b/Master/texmf/lists/auto-pst-pdf new file mode 100644 index 00000000000..f18b0283532 --- /dev/null +++ b/Master/texmf/lists/auto-pst-pdf @@ -0,0 +1,6 @@ +texmf-dist/doc/latex/auto-pst-pdf/README + +texmf-dist/tex/latex/auto-pst-pdf/auto-pst-pdf.sty +texmf-dist/tpm/auto-pst-pdf.tpm + +texmf/lists/auto-pst-pdf diff --git a/Master/texmf/tpm/collection-pstricks.tpm b/Master/texmf/tpm/collection-pstricks.tpm index 9098408db05..bd0cea035f1 100644 --- a/Master/texmf/tpm/collection-pstricks.tpm +++ b/Master/texmf/tpm/collection-pstricks.tpm @@ -16,6 +16,7 @@ </TPM:Build> <TPM:RunFiles size="2276">texmf/tpm/collection-pstricks.tpm</TPM:RunFiles> <TPM:Requires> + <TPM:Package name="auto-pst-pdf"/> <TPM:Package name="makeplot"/> <TPM:Package name="pdftricks"/> <TPM:Package name="pst-3d"/> |