Debian Codegraph @

texmf-dist/source/latex/auto-pst-pdf/auto-pst-pdf.dtx

raw
1 % \iffalse
2 %<*internal>
3 \begingroup
4 \input docstrip.tex
5 \keepsilent\askforoverwritefalse
6 \nopreamble\nopostamble
7 \generate{\file{dtx-style.sty}{\from{\jobname.dtx}{dtx-style}}}
8 \endgroup
9 \immediate\write18{makeindex -s gind.ist -o \jobname.ind \jobname.idx}
10 \immediate\write18{makeindex -s gglo.ist -o \jobname.gls \jobname.glo}
11 %</internal>
12 %
13 %<*driver>
14 \documentclass{ltxdoc}
15 \EnableCrossrefs
16 \CodelineIndex
17 \RecordChanges
18 %\OnlyDescription
19 \usepackage{dtx-style}
20 \begin{document}
21 \DocInput{auto-pst-pdf.dtx}
22 \end{document}
23 %</driver>
24 %
25 %
26 % \fi
27 %
28 % \GetFileInfo{\jobname.sty}
29 % \CheckSum{0}
30 % \makeatletter
31 %
32 % \title{The \pkg{auto-pst-pdf} package}
33 % \author{Will Robertson \& Johannes Gro\ss{}e\\
34 % \texttt{\color{gray}wspr 81 at gmail dot com}}
35 % \date{\filedate \qquad \fileversion}
36 %
37 % \maketitle
38 %
39 % \section{Future plans}
40 % This package is no longer being actively developed
41 % (although I'm happy to add small features and fix bugs). I (Will Robertson) first
42 % wrote \pkg{auto-pst-pdf} to aid the use of \pkg{psfrag} in pdf\LaTeX\ documents. The newer
43 % \pkg{pstool} package does this in a more efficient and convenient manner,
44 % and I suggest using that package instead if that's what you're using this package for.
45 % However, \pkg{pstool} does not yet support full \pkg{pst-pdf} usage, so \pkg{auto-pst-pdf}
46 % is certainly not deprecated yet.
47 %
48 % \section{Basic usage}
49 % This package provides a wrapper around \pkg{pst-pdf} to automatically
50 % accomodate for typesetting either with \DVI\ or \PDF\ output. With
51 % default package option |[on]|, typesetting under pdf\/\LaTeX\ will
52 % automatically initiate an auxiliary compilation of \LaTeX $\to$ |dvips|
53 % $\to$ |ps2pdf| $\to$ |pdfcrop| to generate the required \PDF\ figures for the document.
54 %
55 % After this has been done and the figures no longer need to be
56 % re-generated, the package can be given the |[off]| option to save
57 % compilation time:\par
58 % {\color{gray}|\usepackage[|\color{niceblue}|off|\color{gray}|]{auto-pst-pdf}|}
59 %
60 % \noindent
61 % If the extension of your \LaTeX\ document is not |.tex|, then it must be declared when the package is loaded (\eg, I like to use |.ltx| to distinguish between Plain \TeX\ and \LaTeX\ files):\par
62 % {\color{gray}|\usepackage[|\color{niceblue}|ext=ltx|\color{gray}|]{auto-pst-pdf}|}
63 %
64 % \section{Requirements}
65 % pdf\TeX\ must be called with the |-shell-escape| option.
66 % Requires the following packages: \pkg{ifplatform}, \pkg{pst-pdf}, \pkg{xkeyval}.
67 %
68 % Heiko Oberdiek's |pdfcrop| Perl script
69 % \note{\url{http://www.ctan.org/tex-archive/support/pdfcrop/}}
70 % must be installed for the default {\color{niceblue}|crop=on|} option (see section~\ref{sec:opt}).
71 % Under Windows, a Perl installation
72 % \note{Freely available: \url{http://www.activestate.com/Products/activeperl/index.plex}}
73 % will also need to be installed even though |pdfcrop| itself is part of MiK\TeX.
74 %
75 % \section{Provided macros for including graphics}
76 % Macros are provided to easily facilitate figures created by the
77 % \textsc{Matlab} package \pkg{laprint}
78 % \note{\url{http://www.uni-kassel.de/fb16/rat/matlab/laprint/}}
79 % and the Mathematica package \pkg{MathPSfrag}
80 % \note{\url{http://wwwth.mppmu.mpg.de/members/jgrosse/mathpsfrag/}}. Also,
81 % a generic \pkg{psfrag}
82 % \note{\url{http://www.ctan.org/tex-archive/help/Catalogue/entries/psfrag.html}}
83 % wrapper is provided.
84 %
85 % \begin{trivlist}\item[]
86 % \begin{tabular}{@{\hskip 2em}lp{7cm}}
87 % \cmd\mathfig\marg{filename} & \raggedright
88 % insert a Mathematica graphic from \pkg{MathPSfrag}
89 % (without |-psfrag| suffix)\arraybackslash \\
90 % \cmd\matlabfig\marg{filename} &
91 % insert a \textsc{Matlab} graphic from \pkg{laprint} \\
92 % \cmd\psfragfig\marg{filename} &
93 % insert an \EPS\ with \pkg{psfrag}
94 % \end{tabular}
95 % \end{trivlist}
96 %
97 % \noindent The above commands all accept an optional argument
98 % which is passed to the underlying \cmd\includegraphics\ macro.
99 %
100 % The \cmd\matlabfig\ command meddles slightly with the output of
101 % \pkg{laprint}; the font sizes in the figure will always be as
102 % originally defined. (This is unavoidable I'm afraid.)
103 %
104 % For the \cmd\psfragfig\ command, \pkg{psfrag} statements are input
105 % from either or both of the files \meta{document}|-psfrag.tex| and
106 % \meta{filename}|-psfrag.tex| if they exist. Furthermore, supplementary
107 % \cmd\psfrag\ statements can be added in a trailing optional argument:
108 %
109 % |\psfragfig|\oarg{graphics options}\marg{filename}\oarg{psfrag statements}
110 %
111 % \noindent Manual \cmd\psfrag s override those in \meta{filename}|-psfrag.tex|
112 % which in turn override those in \meta{document}|-psfrag.tex|.
113 %
114 %
115 % \section{Advanced package options}\label{sec:opt}
116 %
117 % 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 with this tool can be controlled with the |crop| option:
118 %
119 % {\color{gray}|\usepackage[|\color{niceblue}|crop=off|\color{gray}|]{auto-pst-pdf}|}
120 %
121 % \bigskip\noindent
122 % 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
123 % {\color{gray}|\usepackage[|\color{niceblue}|cleanup={log,aux,dvi,ps,pdf}|\color{gray}|]{auto-pst-pdf}|}
124 %
125 % \bigskip\noindent
126 % If you're using cross-references of any kind within the graphics being processed by
127 % \pkg{pst-pdf}, it will be necessary to perform the auxiliary compilation more than once
128 % to resolve them. The exact number will vary by exact application, and must be set explicitly:\par
129 % {\color{gray}|\usepackage[|\color{niceblue}|runs=2|\color{gray}|]{auto-pst-pdf}|}
130 %
131 % \bigskip\noindent
132 % 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
133 % {\color{gray}|\usepackage[|{\color{niceblue}|dvips={-o -Ppdf}|}|,|}\par
134 % {\color{white}|\usepackage[|{\color{niceblue}|pspdf={-dAutoRotatePages=/None}}|}\color{gray}|,|}\par
135 % {\color{white}|\usepackage[|\color{niceblue}|pdfcrop={}|\color{gray}|]{auto-pst-pdf}|}
136 %
137 % \bigskip\noindent
138 % 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:
139 %
140 % {\color{gray}|\usepackage[|\color{niceblue}|latex={-interaction=nonstopmode}|\color{gray}|]{auto-pst-pdf}|}
141 %
142 % \bigskip\noindent
143 % Any package options that are not recognised are passed on to \pkg{pst-pdf}. As an example,
144 %
145 % {\color{gray}|\usepackage[|\color{niceblue}|final|\color{gray}|]{auto-pst-pdf}|}
146 %
147 % \noindent will load \pkg{pst-pdf} with the \texttt{final} package option, possibly overriding
148 % a global \texttt{draft} option from the class loading.
149 %
150 % \section{Acknowledgements}
151 %
152 % 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.
153 %
154 % \StopEventually{}
155 %
156 % \clearpage
157 %
158 %
159 % \part{\pkg{\jobname} implementation}
160 %\iffalse
161 %<*package>
162 %\fi
163 %
164 % \section{Setup code}
165 % This is the package.
166 %
167 % \begin{macrocode}
168 \ProvidesPackage{auto-pst-pdf}[2020/10/08 v0.7 Wrapper for pst-pdf]
169 % \end{macrocode}
170 %
171 % \PrintChanges
172 % \changes{v0.7}{2020/10/07}{Security fix for Windows.}
173 % \changes{v0.6}{2009/04/26}{Pass unknown options to \pkg{pst-pdf}.}
174 % \changes{v0.6}{2009/04/26}{\texttt{runs} option added (thanks Joseph!!)}
175 % \changes{v0.5}{2007/11/22}{\texttt{delay} option removed. Keep it simple, stupid!!}
176 % \changes{v0.4}{2007/11/11}{Will sorted it all out.}
177 % \changes{v0.4}{2007/11/09}{Johannes tinkered with the code. Will will improve. :-)}
178 % \changes{v0.3}{2007/11/09}{Too many changes to list. Command execution totally re-written.}
179 %
180 % \paragraph{Required packages}
181 % \pkg{pst-pdf} is loaded later on.
182 % \begin{macrocode}
183 \RequirePackage{ifpdf,xkeyval,ifplatform}
184 % \end{macrocode}
185 %
186 % \paragraph{Things we need}
187 % \begin{macrocode}
188 \newif\if@app@off@
189 \newif\if@app@crop@
190 \newcounter{app@runs}
191 \def\app@suffix{autopp}
192 \edef\app@jobname{\jobname-\app@suffix}
193 \edef\app@pics{\jobname-pics.pdf}
194 % \end{macrocode}
195 %
196 % \paragraph{Option processing}
197 % \begin{macrocode}
198 \DeclareOptionX{off}[]{\@app@off@true}
199 \define@choicekey{auto-pst-pdf.sty}{crop}[\@tempa\@tempb]{on,off}{%
200 \ifcase\@tempb\relax
201 \@app@crop@true
202 \or
203 \@app@crop@false
204 \fi}
205 \DeclareOptionX{on}[]{\@app@off@false}
206 \DeclareOptionX{ext}{\def\app@ext{#1}}
207 \DeclareOptionX{latex}{%
208 \def\app@latex@opts{%
209 \ifwindows
210 -disable-write18
211 \else
212 -no-shell-escape
213 \fi
214 -jobname="\app@jobname"
215 -interaction=batchmode
216 #1}}
217 \DeclareOptionX{dvips}{\def\app@dvips@opts{#1}}
218 \DeclareOptionX{pspdf}{\def\app@pspdf@opts{#1}}
219 \DeclareOptionX{pdfcrop}{\def\app@pdfcrop@opts{#1}}
220
221 \DeclareOptionX{cleanup}{%
222 \let\app@rm@files\@empty
223 \@for\@ii:=#1\do{%
224 \edef\app@rm@files{\app@rm@files,\app@jobname.\@ii}}}
225
226 \DeclareOptionX{runs}{%
227 \setcounter{app@runs}{#1}% support calc
228 \ifnum\c@app@runs > \z@
229 \else
230 \app@PackageWarning{The number of runs must be at least one.}%
231 \c@app@runs\@ne
232 \fi}
233
234 \DeclareOptionX*{\PassOptionsToPackage{\CurrentOption}{pst-pdf}}
235
236 \ExecuteOptionsX{%
237 ext=tex,
238 crop=on,
239 latex={},
240 dvips={-Ppdf},
241 pdfcrop={},
242 cleanup={log,aux,dvi,ps,pdf},
243 runs=1
244 }
245 \ifwindows
246 \ExecuteOptionsX{pspdf={}}
247 \else
248 \ExecuteOptionsX{pspdf={-dAutoRotatePages=/None}}
249 \fi
250 \ProcessOptionsX
251 % \end{macrocode}
252 %
253 % \paragraph{Shorthands}
254 % \begin{macrocode}
255 \def\app@exe{\immediate\write18}
256 \def\app@nl{^^J\space\space\space\space}
257 \newcommand\app@PackageError[2]{%
258 \PackageError{auto-pst-pdf}{\app@nl #1^^J}{#2}}
259 \newcommand\app@PackageWarning[1]{%
260 \PackageWarning{auto-pst-pdf}{\app@nl #1^^JThis warning occured}}
261 \newcommand\app@PackageInfo[1]{\PackageInfo{auto-pst-pdf}{#1}}
262 % \end{macrocode}
263 %
264 % These are cute:
265 % \begin{macrocode}
266 \newcommand\OnlyIfFileExists[2]{\IfFileExists{#1}{#2}{}}
267 \newcommand\NotIfFileExists[2]{\IfFileExists{#1}{}{#2}}
268 % \end{macrocode}
269 %
270 % \begin{macro}{\app@convert}
271 % \darg{command name}
272 % \darg{source file}
273 % \darg{destination file}
274 % 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.
275 % \begin{macrocode}
276 \def\app@convert#1#2#3{%
277 \OnlyIfFileExists{#2}{%
278 \app@exe{\csname app@cmd@#1\endcsname{#2}{#3}}%
279 \NotIfFileExists{#3}{\app@PackageWarning{Creation of #3 failed.}}}}
280 % \end{macrocode}
281 % \changes{v0.5}{2007/11/21}{Fix PackageError (should have been a warning).}
282 % \end{macro}
283 %
284 % \begin{macro}{\app@compile}
285 % 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.
286 % \begin{macrocode}
287 \def\app@compile{%
288 \app@cleanup
289 \app@remove@container
290 \loop\ifnum\c@app@runs > \@ne
291 \app@convert{extralatex}{\jobname.\app@ext}{\[email protected]}%
292 \advance\c@app@runs\m@ne
293 \repeat
294 \app@convert{latex}{\jobname.\app@ext}{\[email protected]}%
295 \app@convert{dvips}{\[email protected]}{\[email protected]}%
296 \if@app@crop@
297 \app@convert{pstopdf}{\[email protected]}{\[email protected]}%
298 \app@convert{pdfcrop}{\[email protected]}{\app@pics}%
299 \else
300 \app@convert{pstopdf}{\[email protected]}{\app@pics}%
301 \fi
302 \IfFileExists{\app@pics}
303 {\app@cleanup}
304 {\app@PackageWarning{Could not create \app@pics.
305 Auxiliary files not deleted.}}}
306 % \end{macrocode}
307 % \end{macro}
308 %
309 % Command-line program to delete files:
310 % \begin{macrocode}
311 \edef\app@rm{\ifwindows del \else rm -- \fi}
312 % \end{macrocode}
313 %
314 % \begin{macro}{\app@try@rm}
315 % Macro to delete files (comma-separated) if they exist:
316 % \begin{macrocode}
317 \newcommand\app@try@rm[1]{%
318 \@for\@tempa:=#1\do{%
319 \edef\@tempa{\@tempa}%
320 \ifx\@tempa\@empty\else
321 \OnlyIfFileExists{\@tempa}{\app@exe{\app@rm "\@tempa"}}%
322 \fi
323 }}
324 % \end{macrocode}
325 % \end{macro}
326 %
327 % Remove pdf picture container:
328 % \begin{macrocode}
329 \def\app@remove@container{\app@try@rm{\app@pics}}
330 % \end{macrocode}
331 % Clean up auxiliary files: (\cmd\app@rm@files\ defined by the |cleanup| package option)
332 % \begin{macrocode}
333 \def\app@cleanup{\app@try@rm{\app@rm@files}}
334 % \end{macrocode}
335 % \LaTeX:
336 % \begin{macrocode}
337 \def\app@cmd@latex#1#2{latex \app@latex@opts\space
338 "\unexpanded{\let\APPmakepictures\empty\input} #1"}
339 \def\app@cmd@extralatex#1#2{latex \app@latex@opts\space
340 "\unexpanded{\let\APPmakepictures\undefined\input} #1"}
341 % \end{macrocode}
342 % |dvips|:
343 % \begin{macrocode}
344 \def\app@cmd@dvips#1#2{dvips \app@dvips@opts\space -o "#2" "#1"}
345 % \end{macrocode}
346 % |ps2pdf|:
347 % \begin{macrocode}
348 \def\app@cmd@pstopdf#1#2{ps2pdf \app@pspdf@opts\space "#1" "#2"}
349 % \end{macrocode}
350 % |pdfcrop|:
351 % \begin{macrocode}
352 \def\app@cmd@pdfcrop#1#2{pdfcrop \app@pdfcrop@opts\space "#1" "#2"}
353 % \end{macrocode}
354 %
355 % \begin{subsection}{Base functionality}
356 %
357 % For compilation, we use the |[notightpage]| option of |pst-pdf| and the
358 % |pdfcrop| Perl script because \EPS\ figures can have elements
359 % that extend ouside their bounding boxes, and end up with clipped
360 % content after |ps2pdf|. Otherwise the script |ps4pdf| would be sufficient.
361 %
362 % \paragraph{pdf\LaTeX\ compilation}
363 % Requires supplementary processing with \pkg{pst-pdf}:
364 % \begin{macrocode}
365 \ifpdf
366 \if@app@off@\else
367 \ifshellescape
368 \app@exe{echo " "}
369 \app@exe{echo "-------------------------------------------------"}
370 \app@exe{echo "auto-pst-pdf: Auxiliary LaTeX compilation"}
371 \app@exe{echo "-------------------------------------------------"}
372 \app@compile
373 \app@exe{echo "-------------------------------------------------"}
374 \app@exe{echo "auto-pst-pdf: End auxiliary LaTeX compilation"}
375 \app@exe{echo "-------------------------------------------------"}
376 \else
377 \app@PackageError{%
378 "shell escape" (or "write18") is not enabled:\app@nl
379 auto-pst-pdf will not work!}
380 {You need to run LaTeX with the equivalent of
381 "pdflatex -shell-escape"\app@nl
382 Or turn off auto-pst-pdf.}%
383 \fi
384 \fi
385 \if@app@crop@
386 \PassOptionsToPackage{notightpage}{pst-pdf}
387 \fi
388 % \end{macrocode}
389 % \changes{v0.5}{2008/03/14}{Removed mucking about with image extensions.}
390 %
391 % \paragraph{\LaTeX\ compilation}
392 % Either we're calling |latex| from within a pdf\LaTeX\ run (see above) or the document is being compiled as usual.
393 % \begin{macrocode}
394 \else
395 % \end{macrocode}
396 % \LaTeX\ compilation from scratch (as in `|latex| \meta{document}|.tex|`) --- here the |postscript| environment does nothing and document is processed `normally':
397 % \changes{v0.5}{2007/11/22}{Removed \cs{ifdefined} to avoid e-\TeX.}
398 % \begin{macrocode}
399 \ifx\APPmakepictures\@undefined
400 \PassOptionsToPackage{inactive}{pst-pdf}
401 % \end{macrocode}
402 % \LaTeX\ compilation induced by this package:
403 % \begin{macrocode}
404 \else
405 \if@app@crop@
406 \PassOptionsToPackage{notightpage}{pst-pdf}
407 \fi
408 \fi
409 \fi
410 % \end{macrocode}
411 %
412 % After the requisite package options have been declared depending on the execution mode, it's now time to load the package:
413 % \begin{macrocode}
414 \RequirePackage{pst-pdf}
415 % \end{macrocode}
416 %
417 % \end{subsection}
418 %
419 % \begin{subsection}{Extras for external packages}
420 %
421 % Commands are provided that mirror \cmd\includegraphics\ (and similarly
422 % accept an optional argument) for the output of different
423 % psfrag-related packages. This provides a consistent and easy way to
424 % include such figures in the document.
425 %
426 % Please suggest wrappers for other packages that output psfrag figures
427 % (for example: SciLab, R, Maple, LabView, Sage, ... ?)
428 %
429 % \begin{macro}{\matlabfig}
430 % We need to disable the scaling that laprint applies
431 % to \cmd\includegraphics\ in here, because otherwise labels that extend
432 % outside the bounding box of the generated PostScript file will
433 % change the intended width of the graphic.
434 % \begin{macrocode}
435 \let\app@ig\includegraphics
436 \newcommand\matlabfig[2][]{%
437 \begin{postscript}
438 \renewcommand\resizebox[3]{##3}%
439 \renewcommand\includegraphics[2][]{\app@ig[#1]{##2}}%
440 \input{#2}%
441 \end{postscript}}
442 % \end{macrocode}
443 % \changes{v0.5}{2007/11/21}{Redefine \cmd\resizebox\ for \texttt{laprint}.}
444 % \end{macro}
445 %
446 % \begin{macro}{\mathfig}
447 % For Mathematica's \pkg{MathPSfrag} output
448 % \begin{macrocode}
449 \newcommand\mathfig[2][]{%
450 \begin{postscript}
451 \input{#2-psfrag}%
452 \includegraphics[#1]{#2-psfrag}%
453 \end{postscript}}
454 % \end{macrocode}
455 % \end{macro}
456 %
457 % \begin{macro}{\psfragfig}
458 % \EPS\ graphics via \pkg{psfrag}.
459 % Include your psfrag commands in the files \meta{document}-psfrag.tex
460 % and/or \meta{figname}-psfrag.tex, where \meta{document} is the filename of the
461 % main document and \meta{figname} is the filename of the graphics
462 % inserted.
463 % \begin{macrocode}
464 \newcommand\psfragfig[2][]{%
465 \@ifnextchar[
466 {\app@psfragfig[#1]{#2}}
467 {\app@psfragfig[#1]{#2}[]}}
468 \def\app@psfragfig[#1]#2[#3]{%
469 \begin{postscript}
470 \InputIfFileExists{#2-psfrag}{}{}%
471 #3
472 \includegraphics[#1]{#2}%
473 \end{postscript}}
474 % \end{macrocode}
475 % Finally, input any psfrag commands associated with the document:
476 % \begin{macrocode}
477 \InputIfFileExists{\jobname-psfrag}{}{}
478 % \end{macrocode}
479 % \changes{v0.5}{2007/11/21}{Extend \cmd\psfragfig\ to accept arbitrary input for extra \cmd\psfrag\ commands.}
480 % \end{macro}
481 %
482 % \end{subsection}
483 %
484 %\iffalse
485 %</package>
486 %<*dtx-style>
487 % \begin{macrocode}
488 \ProvidesPackage{dtx-style}
489 \errorcontextlines=999
490
491 \setcounter{IndexColumns}{2}
492 \renewenvironment{theglossary}
493 {\small\list{}{}
494 \item\relax
495 \glossary@prologue\GlossaryParms
496 \let\item\@idxitem \ignorespaces
497 \def\pfill{\hspace*{\fill}}}
498 {\endlist}
499
500 \usepackage[svgnames]{xcolor}
501 \usepackage{array,booktabs,calc,enumitem,fancyvrb,hyperref}
502 \usepackage[off]{auto-pst-pdf}
503 \usepackage[sc,osf]{mathpazo}
504
505 \hypersetup{colorlinks,linkcolor=black,urlcolor=black}
506
507 \linespread{1.1} % A bit more space between lines
508 \frenchspacing % Remove ugly extra space after punctuation
509
510 \definecolor{niceblue}{rgb}{0.2,0.4,0.8}
511 \def\theCodelineNo{\textcolor{niceblue}{\sffamily\tiny\arabic{CodelineNo}}}
512
513 \newcommand*\name[1]{{#1}}
514 \newcommand*\pkg[1]{\textsf{#1}}
515 \newcommand*\feat[1]{\texttt{#1}}
516 \newcommand*\opt[1]{\texttt{#1}}
517
518 \newcommand\note{\unskip\footnote}
519
520 \let\latin\textit
521 \def\eg{\latin{e.g.}}
522 \def\Eg{\latin{E.g.}}
523 \def\ie{\latin{i.e.}}
524 \def\etc{\@ifnextchar.{\latin{etc}}{\latin{etc.}\@}}
525
526 \def\DVI{\textsc{dvi}}
527 \def\PDF{\textsc{pdf}}
528 \def\EPS{\textsc{eps}}
529
530 \def\MacOSX{Mac~OS~X}
531 \def\ascii{\textsc{ascii}}
532 \def\CTAN{\textsc{ctan}}
533
534 \newcounter{argument}
535 \g@addto@macro\endmacro{\setcounter{argument}{0}}
536 \newcommand*\darg[1]{%
537 \stepcounter{argument}%
538 {\ttfamily\char`\#\theargument~:~}#1\par\noindent\ignorespaces}
539 \newcommand*\doarg[1]{%
540 \stepcounter{argument}%
541 {\ttfamily\makebox[0pt][r]{[}\char`\#\theargument]:~}#1\par\noindent\ignorespaces}
542
543 \def\codeline{\par\hspace{\parindent}}% two \indents in total
544
545 \setlength\parindent{2em}
546 \hfuzz2pt
547 % \end{macrocode}
548 %</dtx-style>
549 %
550 %\fi
551 %
552 % \typeout{*************************************************************}
553 % \typeout{*}
554 % \typeout{* To finish the installation you have to move the following}
555 % \typeout{* file into a directory searched by XeTeX:}
556 % \typeout{*}
557 % \typeout{* \space\space\space auto-pst-pdf.sty}
558 % \typeout{*}
559 % \typeout{*************************************************************}
560 %
561 \endinput