summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/auto-pst-pdf
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-11-22 19:06:39 +0000
committerKarl Berry <karl@freefriends.org>2007-11-22 19:06:39 +0000
commit284aa701318ea975cf01c9c411a2d05751ec2352 (patch)
tree077b8af4d4a8ab0508a949350b1a7ddf6b5cc1ca /Master/texmf-dist/source/latex/auto-pst-pdf
parent424b6f42f4043d1047225e54e66dd2abad486f0b (diff)
auto-pst-pdf update (21nov07)
git-svn-id: svn://tug.org/texlive/trunk@5558 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/auto-pst-pdf')
-rw-r--r--Master/texmf-dist/source/latex/auto-pst-pdf/auto-pst-pdf.dtx569
-rw-r--r--Master/texmf-dist/source/latex/auto-pst-pdf/auto-pst-pdf.ins50
2 files changed, 619 insertions, 0 deletions
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
new file mode 100644
index 00000000000..7976b97fd4b
--- /dev/null
+++ b/Master/texmf-dist/source/latex/auto-pst-pdf/auto-pst-pdf.dtx
@@ -0,0 +1,569 @@
+% \iffalse
+%<*internal>
+\iffalse
+%</internal>
+%<*readme>
+________________________
+The auto-pst-pdf package
+v0.4 2007/11/18
+
+The package uses -shell-escape to execute pst-pdf.
+This makes it especially easy to integrate into the
+workflow of an editor with just "LaTeX" and "pdfLaTeX"
+buttons.
+
+Wrappers are provided for various psfrag-related
+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
+
+Copyright 2007
+Distributed under the LaTeX Project Public License
+%</readme>
+%<*internal>
+\fi
+\begingroup
+%</internal>
+%<*batchfile>
+\input docstrip.tex
+\keepsilent
+\preamble
+ __________________________________
+ Copyright (C) 2007 Will Robertson
+ License information appended.
+\endpreamble
+\postamble
+Copyright (C) 2007 by Will Robertson & Johannes Große
+
+Distributable under the LaTeX Project Public License,
+version 1.3c or higher (your choice). The latest version of
+this license is at: http://www.latex-project.org/lppl.txt
+
+This work is "maintained" (as per LPPL maintenance status)
+by Will Robertson.
+
+This work consists of the file auto-pst-pdf.dtx
+ and the derived files auto-pst-pdf.pdf,
+ auto-pst-pdf.sty, and
+ auto-pst-pdf.ins.
+\endpostamble
+\askforoverwritefalse
+\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}}
+%</batchfile>
+%<batchfile>\endbatchfile
+%<*internal>
+\generate{\file{\jobname.ins}{\from{\jobname.dtx}{batchfile}}}
+\nopreamble\nopostamble
+\generate{\file{README.txt}{\from{\jobname.dtx}{readme}}}
+\generate{\file{prepare.sh}{\from{\jobname.dtx}{prepare}}}
+\generate{\file{dtx-style.sty}{\from{\jobname.dtx}{dtx-style}}}
+\endgroup
+\immediate\write18{makeindex -s gind.ist -o \jobname.ind \jobname.idx}
+\immediate\write18{makeindex -s gglo.ist -o \jobname.gls \jobname.glo}
+%</internal>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+%\OnlyDescription
+\usepackage{dtx-style}
+\begin{document}
+ \DocInput{auto-pst-pdf.dtx}
+\end{document}
+%</driver>
+%
+%
+% \fi
+%
+% \GetFileInfo{\jobname.sty}
+% \CheckSum{0}
+% \makeatletter
+%
+% \title{The \pkg{auto-pst-pdf} package}
+% \author{Will Robertson \& Johannes Gro\ss{}e\\
+% \texttt{\color{gray}wspr 81 at gmail dot com}}
+% \date{\filedate \qquad \fileversion}
+%
+% \maketitle
+%
+% \section{Basic usage}
+% This package provides a wrapper around \pkg{pst-pdf} to automatically
+% accomodate for typesetting either with \DVI\ or \PDF\ output. With
+% default package option |[on]|, typesetting under pdf\/\LaTeX\ will
+% automatically initiate an auxiliary compilation of \LaTeX $\to$ |dvips| $\to$ |ps2pdf| $\to$ |pdfcrop| 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:\par
+% {\color{gray}|\usepackage[|\color{niceblue}|off|\color{gray}|]{auto-pst-pdf}|}
+%
+% \noindent
+% If the extension of your \LaTeX\ document is not |.tex|, then it must be declared when the package is loaded (\eg, like many others, I like to use |.ltx| to distinguish between Plain \TeX\ and \LaTeX\ files):\par
+% {\color{gray}|\usepackage[|\color{niceblue}|ext=ltx|\color{gray}|]{auto-pst-pdf}|}
+%
+% \section{Requirements}
+% pdf\TeX\ must be called with the |-shell-escape| option.
+% Requires the following packages: \pkg{ifplatform}, \pkg{pst-pdf}, \pkg{xkeyval}.
+%
+% Heiko Oberdiek's |pdfcrop| Perl script
+% \note{\url{http://www.ctan.org/tex-archive/support/pdfcrop/}}
+% must be installed for the default {\color{niceblue}|crop=on|} option (see section~\ref{sec:opt}).
+% Under Windows, a Perl installation
+% \note{Freely available: \url{http://www.activestate.com/Products/activeperl/index.plex}}
+% will also need to be installed even though |pdfcrop| itself is part of MiK\TeX.
+%
+% \section{Provided macros for including graphics}
+% Macros are provided to easily facilitate figures created by the
+% \textsc{Matlab} package \pkg{laprint}
+% \note{\url{http://www.uni-kassel.de/fb16/rat/matlab/laprint/}}
+% and the Mathematica package \pkg{MathPSfrag}
+% \note{\url{http://wwwth.mppmu.mpg.de/members/jgrosse/mathpsfrag/}}. Also,
+% a generic \pkg{psfrag}
+% \note{\url{http://www.ctan.org/tex-archive/help/Catalogue/entries/psfrag.html}}
+% wrapper is provided.
+%
+% \begin{tabular}{@{}lp{7cm}}
+% \cmd\mathfig\marg{filename} & \raggedright
+% insert a Mathematica graphic from \pkg{MathPSfrag}
+% (without |-psfrag| suffix)\arraybackslash \\
+% \cmd\matlabfig\marg{filename} &
+% insert a \textsc{Matlab} graphic from \pkg{laprint} \\
+% \cmd\psfragfig\marg{filename} &
+% insert an \EPS\ with \pkg{psfrag}
+% \end{tabular}
+%
+% \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.
+%
+% The above commands all accept an optional argument
+% which is passed to the underlying \cmd\includegraphics\ macro.
+%
+% \section{Advanced package options}\label{sec:opt}
+%
+% Better results are obtained by using |pdfcrop| in the auxiliary compilation process, and this is used by default. It is not installed by default, however, and will not always be required. Cropping can be controlled with the |crop| option:\par
+% {\color{gray}|\usepackage[|\color{niceblue}|crop=off|\color{gray}|]{auto-pst-pdf}|}
+%
+% \bigskip\noindent
+% The package automatically deletes the files generated during the auxiliary \LaTeX\ compilation. Which files are deleted are chosen by passing a list of file extensions to the |cleanup| option (no error message or warning is produced if a file is specified that does not exist). The default list is:\par
+% {\color{gray}|\usepackage[|\color{niceblue}|cleanup={log,aux,dvi,ps,pdf}|\color{gray}|]{auto-pst-pdf}|}
+%
+% \bigskip\noindent
+% The options passed individually to |latex|, |dvips|, |ps2pdf|, and |pdfcrop| in the auxiliary compilation process may all be customised, if you know what you're doing. The defaults for the latter three are\par
+% {\color{gray}|\usepackage[|{\color{niceblue}|dvips={-o -Ppdf}|}|,|}\par
+% {\color{white}|\usepackage[|{\color{niceblue}|pspdf={-dAutoRotatePages=/None}}|}\color{gray}|,|}\par
+% {\color{white}|\usepackage[|\color{niceblue}|pdfcrop={}|\color{gray}|]{auto-pst-pdf}|}
+%
+% \bigskip\noindent
+% The \LaTeX\ auxiliary compilation has some hard-coded options (see the source if you're interested), and further options can be appended if you wish. For example, to run the auxiliary compilation with more information written to the console, use the following package option:
+%
+% {\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.
+%
+% \StopEventually{}
+%
+% \clearpage
+%
+%
+% \part{\pkg{\jobname} implementation}
+%\iffalse
+%<*package>
+%\fi
+%
+% \section{Setup code}
+% This is the package.
+%
+% \begin{macrocode}
+\ProvidesPackage{auto-pst-pdf}[2007/11/18 v0.4 Wrapper for pst-pdf]
+% \end{macrocode}
+%
+% \PrintChanges
+% \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.}
+%
+% \paragraph{Required packages}
+% \pkg{pst-pdf} is loaded later on.
+% \begin{macrocode}
+\RequirePackage{ifpdf,xkeyval,ifplatform}
+% \end{macrocode}
+%
+% \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}
+\edef\app@pics{\jobname-pics.pdf}
+% \end{macrocode}
+%
+% \paragraph{Option processing}
+% \begin{macrocode}
+\DeclareOptionX{off}[]{\@app@off@true}
+\define@choicekey{auto-pst-pdf.sty}{crop}[\@tempa\@tempb]{on,off}{%
+ \ifcase\@tempb\relax
+ \@app@crop@true
+ \or
+ \@app@crop@false
+ \fi}
+\DeclareOptionX{on}[]{\@app@off@false}
+\DeclareOptionX{ext}{\def\app@ext{#1}}
+\DeclareOptionX{delay}{\@app@delay@true}
+\DeclareOptionX{latex}{%
+ \def\app@latex@opts{%
+ \ifwindows
+ -disable-write18
+ \else
+ -no-shell-escape
+ \fi
+ -jobname="\app@jobname"
+ -interaction=batchmode
+ #1}}
+\DeclareOptionX{dvips}{\def\app@dvips@opts{#1}}
+\DeclareOptionX{pspdf}{\def\app@pspdf@opts{#1}}
+\DeclareOptionX{pdfcrop}{\def\app@pdfcrop@opts{#1}}
+\DeclareOptionX{cleanup}{%
+ \let\app@rm@files\@empty
+ \@for\@ii:=#1\do{%
+ \edef\app@rm@files{\app@rm@files,\app@jobname.\@ii}}}
+\ExecuteOptionsX{%
+ ext=tex,
+ crop=on,
+ latex={},
+ dvips={-Ppdf},
+ pspdf={},
+ pdfcrop={},
+ cleanup={log,aux,dvi,ps,pdf}}
+\ifwindows
+ \ExecuteOptionsX{pspdf={}}
+\else
+ \ExecuteOptionsX{pspdf={-dAutoRotatePages=/None}}
+\fi
+\ProcessOptionsX
+% \end{macrocode}
+%
+% \paragraph{Shorthands}
+% \begin{macrocode}
+\def\app@exe{\immediate\write18}
+\def\app@nl{^^J\space\space\space\space}
+\newcommand\app@PackageError[2]{%
+ \PackageError{auto-pst-pdf}{\app@nl #1^^J}{#2}}
+\newcommand\app@PackageWarning[1]{%
+ \PackageWarning{auto-pst-pdf}{\app@nl #1^^JThis warning occured}}
+\newcommand\app@PackageInfo[1]{\PackageInfo{auto-pst-pdf}{#1}}
+% \end{macrocode}
+%
+% These are cute:
+% \begin{macrocode}
+\newcommand\OnlyIfFileExists[2]{\IfFileExists{#1}{#2}{}}
+\newcommand\NotIfFileExists[2]{\IfFileExists{#1}{}{#2}}
+% \end{macrocode}
+%
+% \begin{macro}{\app@convert}
+% \darg{command name}
+% \darg{source file}
+% \darg{destination file}
+% Check if the source file exists and calls the command to generate the destination file. If the final file is not created, generate an error.
+% \begin{macrocode}
+\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.}}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\app@compile}
+% First we define the entire |latex| $\to$ |dvips| $\to$ |ps2pdf| ($\to$ |pdfcrop|) command sequence. The actual call to the compilation macro follows thereafter. This macro contains the actual creation of the pdf container. Each processing step is in a separate macro to allow simple modification.
+% \begin{macrocode}
+\def\app@compile{%
+ \app@cleanup
+ \app@remove@container
+ \app@convert{latex}{\jobname.\app@ext}{\app@jobname.dvi}%
+ \app@convert{dvips}{\app@jobname.dvi}{\app@jobname.ps}%
+ \if@app@crop@
+ \app@convert{pstopdf}{\app@jobname.ps}{\app@jobname.pdf}%
+ \app@convert{pdfcrop}{\app@jobname.pdf}{\app@pics}%
+ \else
+ \app@convert{pstopdf}{\app@jobname.ps}{\app@pics}%
+ \fi
+ \IfFileExists{\app@pics}
+ {\app@cleanup}
+ {\app@PackageWarning{Could not create \app@pics.
+ Auxiliary files not deleted.}}}
+% \end{macrocode}
+% \end{macro}
+%
+% Command-line program to delete files:
+% \begin{macrocode}
+\edef\app@rm{\ifwindows del \else rm -- \fi}
+% \end{macrocode}
+%
+% \begin{macro}{\app@try@rm}
+% Macro to delete files (comma-separated) if they exist:
+% \begin{macrocode}
+\newcommand\app@try@rm[1]{%
+ \@for\@tempa:=#1\do{%
+ \OnlyIfFileExists{\@tempa}{\app@exe{\app@rm "\@tempa"}}}}
+% \end{macrocode}
+% \end{macro}
+%
+% Remove pdf picture container:
+% \begin{macrocode}
+\def\app@remove@container{\app@try@rm{\app@pics}}
+% \end{macrocode}
+% Clean up auxiliary files: (\cmd\app@rm@files\ defined by the |cleanup| package option)
+% \begin{macrocode}
+\def\app@cleanup{\app@try@rm{\app@rm@files}}
+% \end{macrocode}
+% \LaTeX:
+% \begin{macrocode}
+\def\app@cmd@latex#1#2{latex \app@latex@opts\space
+ "\let\noexpand\APPmakepictures\noexpand\empty\noexpand\input #1"}
+% \end{macrocode}
+% |dvips|:
+% \begin{macrocode}
+\def\app@cmd@dvips#1#2{dvips \app@dvips@opts\space -o "#2" "#1"}
+% \end{macrocode}
+% |ps2pdf|:
+% \begin{macrocode}
+\def\app@cmd@pstopdf#1#2{ps2pdf \app@pspdf@opts\space "#1" "#2"}
+% \end{macrocode}
+% |pdfcrop|:
+% \begin{macrocode}
+\def\app@cmd@pdfcrop#1#2{pdfcrop \app@pdfcrop@opts\space "#1" "#2"}
+% \end{macrocode}
+%
+% \begin{subsection}{Base functionality}
+%
+% For compilation, we use the |[notightpage]| option of |pst-pdf| and the
+% |pdfcrop| Perl script because Matlab-created \EPS\ figures (can) have elements
+% that extend ouside their bounding boxes, and end up with clipped
+% content after |ps2pdf|. Otherwise the script |ps4pdf| would be sufficient.
+%
+% \paragraph{pdf\LaTeX\ compilation}
+% Requires supplementary processing with \pkg{pst-pdf}:
+% \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
+ \fi
+ \if@app@crop@
+ \PassOptionsToPackage{notightpage}{pst-pdf}
+ \fi
+% \end{macrocode}
+%
+% \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 induced by this package:
+% \begin{macrocode}
+ \ifdefined\APPmakepictures
+ \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}
+%
+% After the requisite package options have been declared depending on the execution mode, it's now time to load the package:
+% \begin{macrocode}
+\RequirePackage{pst-pdf}
+% \end{macrocode}
+%
+% \end{subsection}
+%
+% \begin{subsection}{Extras for external packages}
+%
+% Commands are provided that mirror \cmd\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: SciLab, R, Maple, LabView, ... ?)
+%
+% \begin{macro}{\matlabfig}
+% We need to disable the scaling that laprint applies
+% to \cmd\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.
+% \begin{macrocode}
+\let\app@ig\includegraphics
+\newcommand\matlabfig[2][]{%
+ \begin{postscript}
+ \renewcommand\includegraphics[2][]{\app@ig[#1]{##2}}
+ \input{#2}
+ \end{postscript}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mathfig}
+% For Mathematica's \pkg{MathPSfrag} output
+% \begin{macrocode}
+\newcommand\mathfig[2][]{%
+ \begin{postscript}
+ \input{#2-psfrag}%
+ \includegraphics[#1]{#2-psfrag}%
+ \end{postscript}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\psfragfig}
+% \EPS\ graphics via \pkg{psfrag}.
+% Include your psfrag commands in the files \meta{document}-psfrag.tex
+% and/or \meta{figname}-psfrag.tex, where \meta{document} is the filename of the
+% main document and \meta{figname} is the filename of the graphics
+% inserted.
+% \begin{macrocode}
+\newcommand\psfragfig[2][]{%
+ \begin{postscript}
+ \InputIfFileExists{#2-psfrag}{}{}%
+ \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}
+% \end{macro}
+%
+% \end{subsection}
+%
+%\iffalse
+%</package>
+%<*dtx-style>
+% \begin{macrocode}
+\ProvidesPackage{dtx-style}
+\errorcontextlines=999
+
+\setcounter{IndexColumns}{2}
+\renewenvironment{theglossary}
+ {\small\list{}{}
+ \item\relax
+ \glossary@prologue\GlossaryParms
+ \let\item\@idxitem \ignorespaces
+ \def\pfill{\hspace*{\fill}}}
+ {\endlist}
+
+\usepackage[svgnames]{xcolor}
+\usepackage{array,booktabs,calc,enumitem,fancyvrb,hyperref}
+\usepackage[off]{auto-pst-pdf}
+\usepackage[sc,osf]{mathpazo}
+
+\linespread{1.1} % A bit more space between lines
+\frenchspacing % Remove ugly extra space after punctuation
+
+\definecolor{niceblue}{rgb}{0.2,0.4,0.8}
+\def\theCodelineNo{\textcolor{niceblue}{\sffamily\tiny\arabic{CodelineNo}}}
+
+\newcommand*\name[1]{{#1}}
+\newcommand*\pkg[1]{\textsf{#1}}
+\newcommand*\feat[1]{\texttt{#1}}
+\newcommand*\opt[1]{\texttt{#1}}
+
+\newcommand\note{\unskip\footnote}
+
+\let\latin\textit
+\def\eg{\latin{e.g.}}
+\def\Eg{\latin{E.g.}}
+\def\ie{\latin{i.e.}}
+\def\etc{\@ifnextchar.{\latin{etc}}{\latin{etc.}\@}}
+
+\def\DVI{\textsc{dvi}}
+\def\PDF{\textsc{pdf}}
+\def\EPS{\textsc{eps}}
+
+\def\MacOSX{Mac~OS~X}
+\def\ascii{\textsc{ascii}}
+\def\CTAN{\textsc{ctan}}
+
+\newcounter{argument}
+\g@addto@macro\endmacro{\setcounter{argument}{0}}
+\newcommand*\darg[1]{%
+ \stepcounter{argument}%
+ {\ttfamily\char`\#\theargument~:~}#1\par\noindent\ignorespaces}
+\newcommand*\doarg[1]{%
+ \stepcounter{argument}%
+ {\ttfamily\makebox[0pt][r]{[}\char`\#\theargument]:~}#1\par\noindent\ignorespaces}
+
+\def\codeline{\par\hspace{\parindent}}% two \indents in total
+
+\setlength\parindent{2em}
+\hfuzz2pt
+% \end{macrocode}
+%</dtx-style>
+%<*prepare>
+% \begin{macrocode}
+rm auto-pst-pdf.zip
+mv README.txt README
+
+zip auto-pst-pdf.zip auto-pst-pdf.dtx auto-pst-pdf.ins auto-pst-pdf.pdf README example.tex example-psfrag.tex example.eps
+% \end{macrocode}
+%</prepare>
+%
+%\fi
+%
+% \typeout{*************************************************************}
+% \typeout{*}
+% \typeout{* To finish the installation you have to move the following}
+% \typeout{* file into a directory searched by XeTeX:}
+% \typeout{*}
+% \typeout{* \space\space\space auto-pst-pdf.sty}
+% \typeout{*}
+% \typeout{*************************************************************}
+%
+\endinput
diff --git a/Master/texmf-dist/source/latex/auto-pst-pdf/auto-pst-pdf.ins b/Master/texmf-dist/source/latex/auto-pst-pdf/auto-pst-pdf.ins
new file mode 100644
index 00000000000..2ac6a85140e
--- /dev/null
+++ b/Master/texmf-dist/source/latex/auto-pst-pdf/auto-pst-pdf.ins
@@ -0,0 +1,50 @@
+%%
+%% This is file `auto-pst-pdf.ins',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% auto-pst-pdf.dtx (with options: `batchfile')
+%% __________________________________
+%% Copyright (C) 2007 Will Robertson
+%% License information appended.
+\input docstrip.tex
+\keepsilent
+\preamble
+ __________________________________
+ Copyright (C) 2007 Will Robertson
+ License information appended.
+\endpreamble
+\postamble
+Copyright (C) 2007 by Will Robertson & Johannes Große
+
+Distributable under the LaTeX Project Public License,
+version 1.3c or higher (your choice). The latest version of
+this license is at: http://www.latex-project.org/lppl.txt
+
+This work is "maintained" (as per LPPL maintenance status)
+by Will Robertson.
+
+This work consists of the file auto-pst-pdf.dtx
+ and the derived files auto-pst-pdf.pdf,
+ auto-pst-pdf.sty, and
+ auto-pst-pdf.ins.
+\endpostamble
+\askforoverwritefalse
+\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}}
+\endbatchfile
+%% Copyright (C) 2007 by Will Robertson & Johannes Große
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Will Robertson.
+%%
+%% This work consists of the file auto-pst-pdf.dtx
+%% and the derived files auto-pst-pdf.pdf,
+%% auto-pst-pdf.sty, and
+%% auto-pst-pdf.ins.
+%%
+%% End of file `auto-pst-pdf.ins'.