1 %% LaTeX2e file `asyprocess.sty'
2 %% generated by the `filecontents' environment
3 %% from source `asyfig' on 2010/02/25.
5 \ProvidesPackage{asyprocess}
8 \RequirePackage{ifmtarg,ifpdf,catchfile,ifplatform,color,graphicx}
9 \RequirePackage[active,tightpage]{preview}
13 \def\asy@status{asyprocess-statusfile.txt}
15 \edef\@tempa{\detokenize{-comp}}
16 \@temptokena{\def\asy@strip@comp#1}
17 \expandafter\the\expandafter\@temptokena\@tempa#2\@nil{%
20 \PackageError{asyprocess}{%
21 The \string\jobname\space of this compilation must end with `-comp'%
23 You must set the \cmd\jobname\ with the equivalent of^^J\space\space
24 pdflatex -jobname=XYZ-comp ...%
27 \edef\asy@compname{#1}}
28 \expandafter\expandafter\expandafter
29 \asy@strip@comp\expandafter\jobname\@tempa\@nil
31 \newcommand\ProcessAsy{%
33 asy -wait -inlinetex -tex \ifpdf pdf\fi latex
34 \asy@compname\space 2> \asy@status}%
35 \CatchFileDef{\@tempb}{\asy@status}{}%
36 \immediate\write18{\ifwindows del \else rm \fi \asy@status}
37 \ifx\@tempb\@par@macro
40 \g@addto@macro\@tempb{^^J^^J%
41 ------------ ASY ERROR ------------^^J%
42 -----------------------------------}%
43 \expandafter\@firstofone
47 -----------------------------------^^J%
48 ------------ ASY ERROR ------------^^J}
49 \typeout{\expandafter\strip@prefix\meaning\@tempb}
55 \input{\asy@compname_}
58 \AtBeginDocument{\InputIfFileExists{\asy@compname_.pre}{}{}}