summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/pstool/.tex16
-rw-r--r--Master/texmf-dist/doc/latex/pstool/README19
-rw-r--r--Master/texmf-dist/doc/latex/pstool/example-pstool.tex2
-rw-r--r--Master/texmf-dist/doc/latex/pstool/example.aux4
-rw-r--r--Master/texmf-dist/doc/latex/pstool/example.log536
-rw-r--r--Master/texmf-dist/doc/latex/pstool/example.pdfbin54480 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pstool/example.synctex204
-rw-r--r--Master/texmf-dist/doc/latex/pstool/example.tex85
-rw-r--r--Master/texmf-dist/doc/latex/pstool/pstool.pdfbin456847 -> 336653 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pstool/subdir/trial2-psfrag.pdfbin8487 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pstool/trial.pdfbin10520 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pstool/trial2.eps977
-rw-r--r--Master/texmf-dist/doc/latex/pstool/trial2.tex2
-rw-r--r--Master/texmf-dist/source/latex/pstool/pstool.tex734
-rw-r--r--Master/texmf-dist/tex/latex/pstool/pstool.sty413
15 files changed, 1915 insertions, 1077 deletions
diff --git a/Master/texmf-dist/doc/latex/pstool/.tex b/Master/texmf-dist/doc/latex/pstool/.tex
deleted file mode 100644
index 3c2f1bb730f..00000000000
--- a/Master/texmf-dist/doc/latex/pstool/.tex
+++ /dev/null
@@ -1,16 +0,0 @@
-\pdfoutput =0
-\let \origdocument \document
-\let \EndPreamble \endinput
-\def \document {\endgroup \endinput }
-\input {example}
-\usepackage [active,tightpage]{preview}
-\let \document \origdocument
-\pagestyle {empty}
-\begin {document}
-\centering \null \vfill
-\begin {preview}
-\or
-\includegraphics []{\relax }
-\end {preview}
-\vfill \end {document}
-
diff --git a/Master/texmf-dist/doc/latex/pstool/README b/Master/texmf-dist/doc/latex/pstool/README
index eb8a115643b..04b6f4093e5 100644
--- a/Master/texmf-dist/doc/latex/pstool/README
+++ b/Master/texmf-dist/doc/latex/pstool/README
@@ -1,9 +1,9 @@
__________________
The pstool package
-v1.3
+v1.5
A package like "pst-pdf" for processing PostScript graphics
-with psfrag labels within pdfLaTeX documets. The difference
+with psfrag labels within pdfLaTeX documents. The difference
with this package is that every graphic is compiled individually,
drastically speeding up compilation time when only a single
figure needs re-processing.
@@ -18,11 +18,24 @@ except pstool.ins (and the PDF file, obviously).
Please see the PDF documentation for further information.
Will Robertson & Zebb Prime
-Copyright 2008-2009
+Copyright 2008-2013
____________________
Brief change history
+v1.5, February 2013:
+ - Fix =/# mixup in Windows ps2pdf options.
+ - Check the .tex file for newness when regenerating figures.
+ - Add [macro-file=...] for a global file to retrieve psfrag macros
+ (default is "\jobname-pstool.tex").
+ Thanks to Heinrich Kruger for suggestions for the above.
+ - Cross-references and citations within external graphics are now supported.
+
+v1.4, November 2010:
+ - More robust parsing of the main input file to read in the preamble.
+ Therefore, \EndPreamble is now required much less often.
+ - Apparently unreleased to CTAN, oops :)
+
v1.3, July 2009:
- [bitmap] option to control compression of bitmap graphics,
- Package options may now be set anywhere with \pstoolsetup{},
diff --git a/Master/texmf-dist/doc/latex/pstool/example-pstool.tex b/Master/texmf-dist/doc/latex/pstool/example-pstool.tex
new file mode 100644
index 00000000000..2748ab88106
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pstool/example-pstool.tex
@@ -0,0 +1,2 @@
+
+\psfrag{[epsv]}{$\epsilon_V$}%
diff --git a/Master/texmf-dist/doc/latex/pstool/example.aux b/Master/texmf-dist/doc/latex/pstool/example.aux
deleted file mode 100644
index 73a39c44956..00000000000
--- a/Master/texmf-dist/doc/latex/pstool/example.aux
+++ /dev/null
@@ -1,4 +0,0 @@
-\relax
-\providecommand*{\memsetcounter}[2]{}
-\memsetcounter{lastsheet}{1}
-\memsetcounter{lastpage}{1}
diff --git a/Master/texmf-dist/doc/latex/pstool/example.log b/Master/texmf-dist/doc/latex/pstool/example.log
deleted file mode 100644
index 7bdcdb6564d..00000000000
--- a/Master/texmf-dist/doc/latex/pstool/example.log
+++ /dev/null
@@ -1,536 +0,0 @@
-This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009) (format=pdflatex 2009.7.15) 21 JUL 2009 10:53
-entering extended mode
- \write18 enabled.
- %&-line parsing enabled.
-**example.tex
-(./example.tex
-LaTeX2e <2005/12/01>
-Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
-yphenation, german-x-2009-06-19, ngerman-x-2009-06-19, ancientgreek, ibycus, ar
-abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc
-h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono
-greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, la
-tin, latvian, lithuanian, mongolian, mongolian2a, bokmal, nynorsk, polish, port
-uguese, romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedi
-sh, turkish, ukenglish, ukrainian, uppersorbian, welsh, loaded.
-(/usr/local/texlive/2009/texmf-dist/tex/latex/memoir/memoir.cls
-Document Class: memoir 2009/02/06 v1.6180339e configurable book, report, articl
-e document class
-\onelineskip=\skip41
-\lxvchars=\skip42
-\xlvchars=\skip43
-\@memcnta=\count79
-\c@@memmarkcntra=\count80
-(/usr/local/texlive/2009/texmf-dist/tex/generic/oberdiek/ifpdf.sty
-Package: ifpdf 2009/04/10 v2.0 Provides the ifpdf switch (HO)
-Package ifpdf Info: pdfTeX in pdf mode detected.
-)
-Class memoir Info: An `ifetex' package is being emulated on input line 247.
-
-(/usr/local/texlive/2009/../texmf-local/tex/generic/ifxetex/ifxetex.sty
-Package: ifxetex 2006/08/21 v0.3 Provides ifxetex conditional
-)
-(/usr/local/texlive/2009/texmf-dist/tex/generic/oberdiek/ifluatex.sty
-Package: ifluatex 2009/04/10 v1.1 Provides the ifluatex switch (HO)
-Package ifluatex Info: LuaTeX not detected.
-)
-\stockheight=\skip44
-\stockwidth=\skip45
-\trimtop=\skip46
-\trimedge=\skip47
-
-(/usr/local/texlive/2009/texmf-dist/tex/latex/memoir/mem12.clo
-File: mem12.clo 2008/01/30 v0.4 memoir class 12pt size option
-)
-\binding=\skip48
-\spinemargin=\skip49
-\foremargin=\skip50
-\uppermargin=\skip51
-\lowermargin=\skip52
-\headdrop=\skip53
-\normalrulethickness=\skip54
-\headwidth=\skip55
-\c@storedpagenumber=\count81
-\memPD=\dimen102
-\m@mabparskip=\skip56
-\thanksmarkwidth=\skip57
-\thanksmarksep=\skip58
-\droptitle=\skip59
-\c@book=\count82
-\c@part=\count83
-\c@chapter=\count84
-\c@section=\count85
-\c@subsection=\count86
-\c@subsubsection=\count87
-\c@paragraph=\count88
-\c@subparagraph=\count89
-\beforechapskip=\skip60
-\midchapskip=\skip61
-\afterchapskip=\skip62
-\chapindent=\skip63
-\bottomsectionskip=\skip64
-\secindent=\skip65
-\beforesecskip=\skip66
-\aftersecskip=\skip67
-\subsecindent=\skip68
-\beforesubsecskip=\skip69
-\aftersubsecskip=\skip70
-\subsubsecindent=\skip71
-\beforesubsubsecskip=\skip72
-\aftersubsubsecskip=\skip73
-\paraindent=\skip74
-\beforeparaskip=\skip75
-\afterparaskip=\skip76
-\subparaindent=\skip77
-\beforesubparaskip=\skip78
-\aftersubparaskip=\skip79
-\pfbreakskip=\skip80
-\c@@ppsavesec=\count90
-\c@@ppsaveapp=\count91
-\ragrparindent=\dimen103
-\everylistparindent=\dimen104
-\parsepi=\skip81
-\topsepi=\skip82
-\itemsepi=\skip83
-\parsepii=\skip84
-\topsepii=\skip85
-\topsepiii=\skip86
-\itemsepii=\skip87
-\itemsepiii=\skip88
-\partopsepii=\skip89
-\partopsepiii=\skip90
-\m@msavetopsep=\skip91
-\m@msavepartopsep=\skip92
-\@enLab=\toks14
-\abstitleskip=\skip93
-\absleftindent=\skip94
-\abs@leftindent=\dimen105
-\absrightindent=\skip95
-\absparindent=\skip96
-\absparsep=\skip97
-\c@vslineno=\count92
-\c@poemline=\count93
-\c@modulo@vs=\count94
-\c@memfvsline=\count95
-\vleftskip=\skip98
-\vrightskip=\skip99
-\stanzaskip=\skip100
-\versewidth=\skip101
-\vgap=\skip102
-\vindent=\skip103
-\vleftmargin=\dimen106
-\c@verse=\count96
-\c@chrsinstr=\count97
-\beforepoemtitleskip=\skip104
-\afterpoemtitleskip=\skip105
-\c@poem=\count98
-\beforePoemTitleskip=\skip106
-\midPoemTitleskip=\skip107
-\afterPoemTitleskip=\skip108
-\col@sep=\dimen107
-\extrarowheight=\dimen108
-\NC@list=\toks15
-\extratabsurround=\skip109
-\backup@length=\skip110
-\TX@col@width=\dimen109
-\TX@old@table=\dimen110
-\TX@old@col=\dimen111
-\TX@target=\dimen112
-\TX@delta=\dimen113
-\TX@cols=\count99
-\TX@ftn=\toks16
-\heavyrulewidth=\dimen114
-\lightrulewidth=\dimen115
-\cmidrulewidth=\dimen116
-\belowrulesep=\dimen117
-\belowbottomsep=\dimen118
-\aboverulesep=\dimen119
-\abovetopsep=\dimen120
-\cmidrulesep=\dimen121
-\cmidrulekern=\dimen122
-\defaultaddspace=\dimen123
-\@cmidla=\count100
-\@cmidlb=\count101
-\@aboverulesep=\dimen124
-\@belowrulesep=\dimen125
-\@thisruleclass=\count102
-\@lastruleclass=\count103
-\@thisrulewidth=\dimen126
-\ctableftskip=\skip111
-\ctabrightskip=\skip112
-\abovecolumnspenalty=\count104
-\@linestogo=\count105
-\@cellstogo=\count106
-\@cellsincolumn=\count107
-\crtok=\toks17
-\@mincolumnwidth=\dimen127
-\c@newflo@tctr=\count108
-\@contcwidth=\skip113
-\@contindw=\skip114
-\abovecaptionskip=\skip115
-\belowcaptionskip=\skip116
-\subfloattopskip=\skip117
-\subfloatcapskip=\skip118
-\subfloatcaptopadj=\skip119
-\subfloatbottomskip=\skip120
-\subfloatlabelskip=\skip121
-\subfloatcapmargin=\dimen128
-\c@@contsubnum=\count109
-\m@mscap@capbox=\box26
-\m@mscap@fbox=\box27
-\sidecapsep=\dimen129
-\sidecapwidth=\dimen130
-\m@m@tempdima=\dimen131
-\m@mscapraise=\dimen132
-\sidecapraise=\dimen133
-\m@mscapmainwidth=\dimen134
-\m@mscaplkern=\dimen135
-\beforeepigraphskip=\skip122
-\afterepigraphskip=\skip123
-\epigraphwidth=\skip124
-\epigraphrule=\skip125
-LaTeX Info: Redefining \em on input line 6881.
-LaTeX Info: Redefining \emph on input line 6889.
-\tocentryskip=\skip126
-\tocbaseline=\skip127
-\cftparskip=\skip128
-\cftbeforebookskip=\skip129
-\cftbookindent=\dimen136
-\cftbooknumwidth=\dimen137
-\cftbeforepartskip=\skip130
-\cftpartindent=\skip131
-\cftpartnumwidth=\skip132
-\cftbeforechapterskip=\skip133
-\cftchapterindent=\skip134
-\cftchapternumwidth=\skip135
-\cftbeforesectionskip=\skip136
-\cftsectionindent=\skip137
-\cftsectionnumwidth=\skip138
-\cftbeforesubsectionskip=\skip139
-\cftsubsectionindent=\skip140
-\cftsubsectionnumwidth=\skip141
-\cftbeforesubsubsectionskip=\skip142
-\cftsubsubsectionindent=\skip143
-\cftsubsubsectionnumwidth=\skip144
-\cftbeforeparagraphskip=\skip145
-\cftparagraphindent=\skip146
-\cftparagraphnumwidth=\skip147
-\cftbeforesubparagraphskip=\skip148
-\cftsubparagraphindent=\skip149
-\cftsubparagraphnumwidth=\skip150
-\prechapterprecisshift=\dimen138
-\c@maxsecnumdepth=\count110
-\bibindent=\dimen139
-\bibitemsep=\skip151
-\indexcolsep=\skip152
-\indexrule=\skip153
-\indexmarkstyle=\toks18
-\@indexbox=\insert233
-\glossarycolsep=\dimen140
-\glossaryrule=\dimen141
-\sideparvshift=\skip154
-\sideins=\insert232
-\sidebartopsep=\skip155
-\sidebarhsep=\skip156
-\sidebarvsep=\skip157
-\sidebarwidth=\skip158
-\footmarkwidth=\skip159
-\footmarksep=\skip160
-\footparindent=\skip161
-\footinsdim=\skip162
-\footinsv@r=\insert231
-\@mpfootinsv@r=\insert230
-\m@m@k=\count111
-\m@m@h=\dimen142
-\m@mipn@skip=\skip163
-\c@pagenote=\count112
-\every@verbatim=\toks19
-\afterevery@verbatim=\toks20
-\verbatim@line=\toks21
-\tab@position=\count113
-\verbatim@in@stream=\read1
-\verbatimindent=\skip164
-\verbatim@out=\write3
-\bvboxsep=\skip165
-\c@memfbvline=\count114
-\c@bvlinectr=\count115
-\bvnumlength=\skip166
-\fb@frw=\dimen143
-\fb@frh=\dimen144
-\FrameRule=\dimen145
-\FrameSep=\dimen146
-\c@cp@cntr=\count116
-LaTeX Info: Redefining \: on input line 10718.
-LaTeX Info: Redefining \! on input line 10720.
-\c@ism@mctr=\count117
-\c@xsm@mctr=\count118
-\c@csm@mctr=\count119
-\c@ksm@mctr=\count120
-\c@xksm@mctr=\count121
-\c@cksm@mctr=\count122
-\c@msm@mctr=\count123
-\c@xmsm@mctr=\count124
-\c@cmsm@mctr=\count125
-\c@bsm@mctr=\count126
-\c@workm@mctr=\count127
-\c@sheetsequence=\count128
-\c@lastsheet=\count129
-\c@lastpage=\count130
-\c@figure=\count131
-\c@lofdepth=\count132
-\cftbeforefigureskip=\skip167
-\cftfigureindent=\skip168
-\cftfigurenumwidth=\skip169
-\c@table=\count133
-\c@lotdepth=\count134
-\cftbeforetableskip=\skip170
-\cfttableindent=\skip171
-\cfttablenumwidth=\skip172
-Package abstract [2008/07/23] emulated by memoir.
-Package appendix [2008/07/23] emulated by memoir.
-Package array [2008/07/23] emulated by memoir.
-Package booktabs [2008/07/23] emulated by memoir.
-Package ccaption [2008/07/23] emulated by memoir.
-Package changepage [2008/07/23] emulated by memoir.
-Package chngcntr [2008/07/23] emulated by memoir.
-Package chngpage [2008/07/23] emulated by memoir.
-Package crop emulated by memoir.
-Package dcolumn [2008/07/23] emulated by memoir.
-Package delarray [2008/07/23] emulated by memoir.
-Package enumerate [2008/07/23] emulated by memoir.
-Package epigraph [2008/07/23] emulated by memoir.
-Package ifmtarg [2008/07/23] emulated by memoir.
-Package ifetex [2008/07/23] emulated by memoir.
-Package index [2008/07/23] emulated by memoir.
-Package makeidx [2008/07/23] emulated by memoir.
-Package moreverb [2008/07/23] emulated by memoir.
-Package mparhack [2008/07/23] emulated by memoir.
-Package needspace [2008/07/23] emulated by memoir.
-Package newfile [2008/07/23] emulated by memoir.
-Package nextpage [2008/07/23] emulated by memoir.
-Package pagenote [2008/07/23] emulated by memoir.
-Package parskip [2008/07/23] emulated by memoir.
-Package patchcmd [2008/07/23] emulated by memoir.
-Package setspace [2008/07/23] emulated by memoir.
-Package shortvrb [2008/07/23] emulated by memoir.
-Package showidx [2008/07/23] emulated by memoir.
-Package tabularx [2008/07/23] emulated by memoir.
-Package titleref [2008/07/23] emulated by memoir.
-Package titling [2008/07/23] emulated by memoir.
-Package tocbibind [2008/07/23] emulated by memoir.
-Package tocloft [2008/07/23] emulated by memoir.
-Package verbatim [2008/07/23] emulated by memoir.
-Package verse [2008/07/23] emulated by memoir.
-
-(/usr/local/texlive/2009/texmf-dist/tex/latex/memoir/mempatch.sty
-File: mempatch.sty 2008/07/23 v6.0 Patches for memoir class v1.6180339
-))
-(/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/color.sty
-Package: color 2005/11/14 v1.0j Standard LaTeX Color (DPC)
-
-(/usr/local/texlive/2009/texmf/tex/latex/config/color.cfg
-File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
-)
-Package color Info: Driver file: pdftex.def on input line 130.
-
-(/usr/local/texlive/2009/texmf-dist/tex/latex/pdftex-def/pdftex.def
-File: pdftex.def 2008/09/08 v0.04l Graphics/color for pdfTeX
-\Gread@gobject=\count135
-))
-(/Users/will/Library/texmf/tex/latex/will/pstool.sty
-Package: pstool 2009/07/17 v1.3 Wrapper for processing PostScript/psfrag figure
-s
-
-(/usr/local/texlive/2009/texmf-dist/tex/generic/oberdiek/catchfile.sty
-Package: catchfile 2007/11/11 v1.2 Catches the contents of a file (HO)
-
-(/usr/local/texlive/2009/texmf-dist/tex/generic/oberdiek/infwarerr.sty
-Package: infwarerr 2007/09/09 v1.2 Providing info/warning/message (HO)
-))
-(/usr/local/texlive/2009/texmf-dist/tex/latex/ifplatform/ifplatform.sty
-Package: ifplatform 2007/11/18 v0.2 Testing for the operating system
-runsystem(echo 'write18-test-2009721653'>"example.w18")...executed.
-
-\instream=\read2
-runsystem(uname -s > "example.w18")...executed.
-
-\instream=\read3
-runsystem(rm -- "example.w18")...executed.
-
-)
-(/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/graphicx.sty
-Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
-
-(/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/keyval.sty
-Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
-\KV@toks@=\toks22
-)
-(/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/graphics.sty
-Package: graphics 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR)
-
-(/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/trig.sty
-Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
-)
-(/usr/local/texlive/2009/texmf/tex/latex/config/graphics.cfg
-File: graphics.cfg 2009/07/06 v1.8 graphics configuration of TeX Live
-)
-Package graphics Info: Driver file: pdftex.def on input line 90.
-)
-(/usr/local/texlive/2009/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
-Package: pdftexcmds 2009/04/10 v0.4 LuaTeX support for pdfTeX utility functions
- (HO)
-Package pdftexcmds Info: LuaTeX not detected on input line 145.
-)
-(/usr/local/texlive/2009/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
-Package: epstopdf-base 2009/07/12 v2.0 Base part for package epstopdf
-
-(/usr/local/texlive/2009/texmf-dist/tex/latex/oberdiek/grfext.sty
-Package: grfext 2007/09/30 v1.0 Managing graphics extensions (HO)
-)
-(/usr/local/texlive/2009/texmf-dist/tex/latex/oberdiek/kvoptions.sty
-Package: kvoptions 2009/04/10 v3.1 Keyval support for LaTeX options (HO)
-)
-Package grfext Info: Graphics extension search list:
-(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
-G,.JBIG2,.JB2,.eps]
-(grfext) \AppendGraphicsExtensions on input line 429.
-)
-\Gin@req@height=\dimen147
-\Gin@req@width=\dimen148
-)
-(/usr/local/texlive/2009/texmf-dist/tex/latex/psfrag/psfrag.sty
-Package: psfrag 1998/04/11 v3.04 PSfrag (MCG)
-\pfg@pcount=\count136
-\pfg@scount=\count137
-\pfg@temp=\write4
-)
-(/usr/local/texlive/2009/texmf-dist/tex/latex/bigfoot/suffix.sty
-Package: suffix 2006/07/15 1.5 Variant command support
-)
-(/usr/local/texlive/2009/texmf-dist/tex/latex/xkeyval/xkeyval.sty
-Package: xkeyval 2008/08/13 v2.6a package option processing (HA)
-
-(/usr/local/texlive/2009/texmf-dist/tex/generic/xkeyval/xkeyval.tex
-\XKV@toks=\toks23
-\XKV@tempa@toks=\toks24
-\XKV@depth=\count138
-File: xkeyval.tex 2008/08/13 v2.6a key=value parser (HA)
-))
-\pstool@out=\write5
-)
-(./macros.tex) (./example.aux)
-\openout1 = `example.aux'.
-
-LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 7.
-LaTeX Font Info: ... okay on input line 7.
-LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 7.
-LaTeX Font Info: ... okay on input line 7.
-LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 7.
-LaTeX Font Info: ... okay on input line 7.
-LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 7.
-LaTeX Font Info: ... okay on input line 7.
-LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 7.
-LaTeX Font Info: ... okay on input line 7.
-LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 7.
-LaTeX Font Info: ... okay on input line 7.
-
-(/usr/local/texlive/2009/texmf-dist/tex/context/base/supp-pdf.tex
-[Loading MPS to PDF converter (version 2006.09.02).]
-\scratchcounter=\count139
-\scratchdimen=\dimen149
-\scratchbox=\box28
-\nofMPsegments=\count140
-\nofMParguments=\count141
-\everyMPshowfont=\toks25
-\MPscratchCnt=\count142
-\MPscratchDim=\dimen150
-\MPnumerator=\count143
-\everyMPtoPDFconversion=\toks26
-)
-runsystem(echo "
-
-=== pstool: begin processing ===")...executed.
-
-\openout5 = `./trial-pstool.tex'.
-
-runsystem(echo "
-=== pstool: auxiliary process: trial ===")...executed.
-
-runsystem(cd "./" ; latex -shell-escape -output-format=dvi -output-directory=".
-/" -interaction=nonstopmode "trial-pstool.tex" ; echo $? > pstool-statusfile.t
-xt)...executed.
-
-runsystem(touch ./pstool-statusfile.txt)...executed.
-
- (./pstool-statusfile.txt)
-runsystem(cd "./"; rm -- "pstool-statusfile.txt" )...executed.
-
-runsystem(echo "
-=== pstool: dvips ===")...executed.
-
-runsystem(cd "./" ; dvips -Ppdf "trial-pstool.dvi" ; echo $? > pstool-statusfi
-le.txt)...executed.
-
-runsystem(touch ./pstool-statusfile.txt)...executed.
-
- (./pstool-statusfile.txt)
-runsystem(cd "./"; rm -- "pstool-statusfile.txt" )...executed.
-
-runsystem(echo "
-=== pstool: ps2pdf ===")...executed.
-
-runsystem(cd "./" ; ps2pdf "-dAutoFilterColorImages=false" "-dAutoFilterGrayIma
-ges=false" "-dColorImageFilter=/FlateEncode" "-dGrayImageFilter=/FlateEncode" "
--dPDFSETTINGS=/prepress" "trial-pstool.ps" "trial.pdf" ; echo $? > pstool-statu
-sfile.txt)...executed.
-
-runsystem(touch ./pstool-statusfile.txt)...executed.
-
- (./pstool-statusfile.txt)
-runsystem(cd "./"; rm -- "pstool-statusfile.txt" )...executed.
-
-runsystem(cd "./"; rm -- "trial-pstool.tex" )...executed.
-
-runsystem(cd "./"; rm -- "trial-pstool.dvi" )...executed.
-
-runsystem(cd "./"; rm -- "trial-pstool.ps" )...executed.
-
-runsystem(cd "./"; rm -- "trial-pstool.log" )...executed.
-
-runsystem(cd "./"; rm -- "trial-pstool.aux" )...executed.
-
-<./trial.pdf, id=1, 196.735pt x 75.28125pt>
-File: ./trial.pdf Graphic file (type pdf)
- <use ./trial.pdf>
-runsystem(echo "
-=== pstool: end processing ===
-")...executed.
-
-
-<subdir/trial2-psfrag.pdf, id=2, 139.52126pt x 149.55875pt>
-File: subdir/trial2-psfrag.pdf Graphic file (type pdf)
-
-<use subdir/trial2-psfrag.pdf> [1
-Non-PDF special ignored!{/usr/local/texlive/2009/texmf-var/fonts/map/pdftex/upd
-map/pdftex.map}
-
- <./trial.pdf> <./subdir/trial2-psfrag.pdf>] (./example.aux) )
-Here is how much of TeX's memory you used:
- 4536 strings out of 493857
- 61323 string characters out of 1149727
- 152097 words of memory out of 3000000
- 7788 multiletter control sequences out of 15000+50000
- 4590 words of font info for 17 fonts, out of 3000000 for 9000
- 714 hyphenation exceptions out of 8191
- 48i,11n,36p,432b,220s stack positions out of 5000i,500n,10000p,200000b,50000s
-</usr/local/texli
-ve/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi6.pfb></usr/local/texlive
-/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi8.pfb></usr/local/texlive/2
-009/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr/local/texlive/200
-9/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb>
-Output written on example.pdf (1 page, 54480 bytes).
-PDF statistics:
- 64 PDF objects out of 1000 (max. 8388607)
- 0 named destinations out of 1000 (max. 131072)
- 11 words of extra memory for PDF output out of 10000 (max. 10000000)
-
diff --git a/Master/texmf-dist/doc/latex/pstool/example.pdf b/Master/texmf-dist/doc/latex/pstool/example.pdf
deleted file mode 100644
index 5a7f09e5508..00000000000
--- a/Master/texmf-dist/doc/latex/pstool/example.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pstool/example.synctex b/Master/texmf-dist/doc/latex/pstool/example.synctex
deleted file mode 100644
index 2f4742a6555..00000000000
--- a/Master/texmf-dist/doc/latex/pstool/example.synctex
+++ /dev/null
@@ -1,204 +0,0 @@
-SyncTeX Version:1
-Input:1:example.tex
-Input:2:/usr/local/texlive/2009/texmf-dist/tex/latex/memoir/memoir.cls
-Input:3:/usr/local/texlive/2009/texmf-dist/tex/generic/oberdiek/ifpdf.sty
-Input:4:/usr/local/texlive/2009/../texmf-local/tex/generic/ifxetex/ifxetex.sty
-Input:5:/usr/local/texlive/2009/texmf-dist/tex/generic/oberdiek/ifluatex.sty
-Input:6:/usr/local/texlive/2009/texmf-dist/tex/latex/memoir/mem12.clo
-Input:7:/usr/local/texlive/2009/texmf-dist/tex/latex/memoir/mempatch.sty
-Input:8:/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/color.sty
-Input:9:/usr/local/texlive/2009/texmf/tex/latex/config/color.cfg
-Input:10:/usr/local/texlive/2009/texmf-dist/tex/latex/pdftex-def/pdftex.def
-Input:11:/Users/will/Library/texmf/tex/latex/will/pstool.sty
-Input:12:/usr/local/texlive/2009/texmf-dist/tex/generic/oberdiek/catchfile.sty
-Input:13:/usr/local/texlive/2009/texmf-dist/tex/generic/oberdiek/infwarerr.sty
-Input:14:/usr/local/texlive/2009/texmf-dist/tex/latex/ifplatform/ifplatform.sty
-Input:15:/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/graphicx.sty
-Input:16:/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/keyval.sty
-Input:17:/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/graphics.sty
-Input:18:/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/trig.sty
-Input:19:/usr/local/texlive/2009/texmf/tex/latex/config/graphics.cfg
-Input:20:/usr/local/texlive/2009/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
-Input:21:/usr/local/texlive/2009/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
-Input:22:/usr/local/texlive/2009/texmf-dist/tex/latex/oberdiek/grfext.sty
-Input:23:/usr/local/texlive/2009/texmf-dist/tex/latex/oberdiek/kvoptions.sty
-Input:24:/usr/local/texlive/2009/texmf-dist/tex/latex/psfrag/psfrag.sty
-Input:25:/usr/local/texlive/2009/texmf-dist/tex/latex/bigfoot/suffix.sty
-Input:26:/usr/local/texlive/2009/texmf-dist/tex/latex/xkeyval/xkeyval.sty
-Input:27:/usr/local/texlive/2009/texmf-dist/tex/generic/xkeyval/xkeyval.tex
-Input:28:macros.tex
-Input:29:example.aux
-Input:30:/usr/local/texlive/2009/texmf-dist/tex/context/base/supp-pdf.tex
-Input:31:./pstool-statusfile.txt
-Input:32:./pstool-statusfile.txt
-Input:33:./pstool-statusfile.txt
-Output:pdf
-Magnification:1000
-Unit:1
-X Offset:0
-Y Offset:0
-Content:
-!2250
-{1
-[1,21:4736286,32941263:17170432,28204977,285084
-[1,21:3818782,32941263:18087936,26828721,285084
-[1,21:3818782,7030046:18087936,917504,0
-(1,21:3818782,7062813:18087936,950271,0
-(1,21:3818782,7062813:18087936,950271,0
-g1,21:3818782,7062813
-(1,21:3818782,7062813:18087936,950271,0
-[1,21:3818782,7062813:18087936,950271,0
-(1,21:3818782,6777729:18087936,665187,285084
-(1,21:3818782,6777729:0,665187,285084
-[1,21:3818782,6777729:18087936,665187,285084
-(1,21:3818782,6777729:18087936,665187,285084
-h1,21:3818782,6777729:0,0,0
-r1,21:3818782,6777729:0,950271,285084
-k1,21:12862750,6777729:9043968
-k1,21:21906718,6777729:9043968
-)
-]
-k1,21:3818782,6777729:-18087936
-)
-g1,21:3818782,6777729
-[1,21:3818782,6777729:18087936,665187,285084
-(1,21:3818782,6777729:18087936,665187,285084
-k1,21:12862750,6777729:9043968
-h1,21:12862750,6777729:0,0,0
-r1,21:12862750,6777729:0,950271,285084
-g1,21:12862750,6777729
-k1,21:21906718,6777729:9043968
-)
-]
-g1,21:21906718,6777729
-(1,21:21906718,6777729:0,665187,285084
-k1,21:3818782,6777729:-18087936
-[1,21:3818782,6777729:18087936,665187,285084
-(1,21:3818782,6777729:18087936,665187,285084
-k1,21:21521698,6777729:17702916
-h1,21:21521698,6777729:0,0,0
-x1,21:21906718,6777729
-r1,21:21906718,6777729:0,950271,285084
-g1,21:21906718,6777729
-g1,21:21906718,6777729
-)
-]
-)
-)
-]
-)
-g1,21:21906718,7062813
-)
-)
-]
-[1,21:3818782,30975183:18087936,22642688,0
-[1,21:3818782,8332495:0,0,0
-(1,21:3818782,8332495:0,0,0
-g1,21:21906718,8332495
-g1,21:22365470,8332495
-k1,21:3818782,8332495:-18546688
-)
-]
-(1,10:3818782,9118927:18087936,546132,152916
-h1,9:3818782,9118927:1155060,0,0
-x1,9:7872051,9118927
-g1,9:8128731,9118927
-x1,9:10699809,9118927
-g1,9:11042049,9118927
-x1,9:11833206,9118927
-g1,9:12089886,9118927
-x1,9:12849095,9118927
-g1,9:13105775,9118927
-x1,9:13661915,9118927
-k1,10:21906718,9118927:8244803
-g1,10:21906718,9118927
-)
-(1,16:3818782,14270998:18087936,4933619,0
-h1,15:3818782,14270998:1155060,0,0
-(1,15:4973842,14270998:12893192,4933619,0
-(1,15:4973842,14270998:12893225,4933632,0
-(1,15:4973842,14270998:12893225,4933632,0
-(1,15:4973842,14270998:0,4933632,0
-(1,15:4973842,14270998:12893225,4933632,0
-)
-k1,15:4973842,14270998:-12893225
-)
-)
-)
-)
-k1,16:21906718,14270998:4039684
-g1,16:21906718,14270998
-)
-(1,20:3818782,24137992:18087936,9801458,0
-h1,19:3818782,24137992:1155060,0,0
-(1,19:4973842,24137992:9143642,9801458,0
-(1,19:4973842,24137992:9143665,9801482,0
-(1,19:4973842,24137992:9143665,9801482,0
-(1,19:4973842,24137992:0,9801482,0
-(1,19:4973842,24137992:9143665,9801482,0
-)
-k1,19:4973842,24137992:-9143665
-)
-)
-)
-)
-k1,20:21906718,24137992:7789234
-g1,20:21906718,24137992
-)
-]
-(1,21:3818782,32941263:18087936,665187,285084
-(1,21:3818782,32941263:18087936,665187,285084
-g1,21:3818782,32941263
-(1,21:3818782,32941263:18087936,665187,285084
-[1,21:3818782,32941263:18087936,665187,285084
-(1,21:3818782,32941263:18087936,665187,285084
-(1,21:3818782,32941263:0,665187,285084
-[1,21:3818782,32941263:18087936,665187,285084
-(1,21:3818782,32941263:18087936,665187,285084
-h1,21:3818782,32941263:0,0,0
-r1,21:3818782,32941263:0,950271,285084
-k1,21:12862750,32941263:9043968
-k1,21:21906718,32941263:9043968
-)
-]
-k1,21:3818782,32941263:-18087936
-)
-g1,21:3818782,32941263
-[1,21:3818782,32941263:18087936,665187,285084
-(1,21:3818782,32941263:18087936,665187,285084
-k1,21:12862750,32941263:9043968
-h1,21:12862750,32941263:0,0,0
-r1,21:12862750,32941263:0,950271,285084
-g1,21:12862750,32941263
-k1,21:21906718,32941263:9043968
-)
-]
-g1,21:21906718,32941263
-(1,21:21906718,32941263:0,665187,285084
-k1,21:3818782,32941263:-18087936
-[1,21:3818782,32941263:18087936,665187,285084
-(1,21:3818782,32941263:18087936,665187,285084
-k1,21:21906718,32941263:18087936
-h1,21:21906718,32941263:0,0,0
-r1,21:21906718,32941263:0,950271,285084
-g1,21:21906718,32941263
-g1,21:21906718,32941263
-)
-]
-)
-)
-]
-)
-g1,21:21906718,32941263
-)
-)
-]
-]
-!3815
-}1
-Input:34:example.aux
-!30
-Postamble:
-Count:140
-!25
-Post scriptum:
diff --git a/Master/texmf-dist/doc/latex/pstool/example.tex b/Master/texmf-dist/doc/latex/pstool/example.tex
index 03ac5836acc..c0f23bbff4e 100644
--- a/Master/texmf-dist/doc/latex/pstool/example.tex
+++ b/Master/texmf-dist/doc/latex/pstool/example.tex
@@ -1,21 +1,86 @@
-\documentclass[a5paper,12pt]{memoir}
+\documentclass[12pt]{memoir}
\usepackage{color}
-\usepackage{pstool}
+\usepackage[cleanup={}]{pstool}
\input macros.tex
+
+\newif\ifNAT
+\NATtrue
+\ifNAT
+ \usepackage{natbib}
+\else
+ \usepackage{biblatex}
+ \bibliography{xampl}
+\fi
+
\EndPreamble
-\begin{document}
+\usepackage{expl3}\begin{document} % hello
+
+\title{\textsf{pstool} example document}
+\maketitle
+
+This is an example document for the \textsf{pstool} package. It's grown rather convoluted since I use it for testing some of the more arcane features of the package.
+
+There are some external macros defined in the file \texttt{macros.tex}: \verb|\a| $\to$ \a, \verb|\b| $\to$ \b, \verb|\c| $\to$ \c. These are defined in the preamble so when their definitions appear in the replacements below we know the preamble catching is working correctly.
+
+The same figure is used for all the examples; only one of its labels is being replaced by default by its associated \verb|.tex| file.
+
+\newpage
-External macros: \a, \b, \c
+First example: the style is defined as tiny+red, so all labels in the graphic will inherit this. The [Mp] label below first arrow should be replaced by tiny red $M_\a$; in rectangle, [hb] label replacement $H_\b$ comes from \texttt{trial.tex}; near right dot, [epsv] label replacement $\epsilon_v$ comes from \texttt{example-pstool.tex}.
-\psfragfig*[mode=nonstop]{trial}{%
+\begin{center}
+\fbox{\psfragfig{trial}{%
\color{red}
\tiny
- \psfrag{[Mp]}{$M_\a$!}%
-}
+ \psfrag{[Mp]}{$M_\a$}%
+ \psfrag{[epb]}{\cite{article-full}}%
+}}
+\end{center}
+
+Also, a citation is being used, and this should work for most \LaTeX\ bibliography packages.
+
+\clearpage
+In the second, the replacements should be plain and the whole image rotated 45 degrees.
+This image comes from a subdirectory so we know that works correctly.
+The subscript on $Z$ should be the current page number and a different citation is used here.
+
+\begin{center}
+\fbox{\psfragfig[angle=45]{subdir/trial2}{%
+ \psfrag{[Mp]}{$Z_{\thepage}$}%
+ \psfrag{[epb]}{\cite{incollection-full}}%
+}}
+\end{center}
+
+
+\frontmatter
+hello this is a filler page
+\begin{equation}
+a=b+c\label{eq1}
+\end{equation}
+\begin{equation}
+a=b+c\label{eq2}
+\end{equation}
+\begin{equation}
+a=b+c\label{eq3}
+\end{equation}
+
+\newpage
+In the third, hopefully the scale command works.
+Here we are referencing an equation from the previous page in the $Z$ subscript and the current page number should show up in there too.
+
+\begin{center}
+\fbox{\psfragfig[scale=0.5]{trial2}{%
+ \psfrag{[Mp]}{$Z_{(\ref{eq3})}$}%
+ \psfrag{[ev]}{\thepage}
+}}
+\end{center}
-\psfragfig[angle=45]{subdir/trial2}{%
- \psfrag{[Mp]}{$Z_\b$}%
-}
+\ifNAT
+ \bibliographystyle{abbrvnat}
+ \bibliography{xampl}
+\else
+ \printbibliography
+\fi
\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/pstool/pstool.pdf b/Master/texmf-dist/doc/latex/pstool/pstool.pdf
index 85c9fdf322e..3b026a6814b 100644
--- a/Master/texmf-dist/doc/latex/pstool/pstool.pdf
+++ b/Master/texmf-dist/doc/latex/pstool/pstool.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pstool/subdir/trial2-psfrag.pdf b/Master/texmf-dist/doc/latex/pstool/subdir/trial2-psfrag.pdf
deleted file mode 100644
index d79323bab3b..00000000000
--- a/Master/texmf-dist/doc/latex/pstool/subdir/trial2-psfrag.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pstool/trial.pdf b/Master/texmf-dist/doc/latex/pstool/trial.pdf
deleted file mode 100644
index 2ff0f952637..00000000000
--- a/Master/texmf-dist/doc/latex/pstool/trial.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pstool/trial2.eps b/Master/texmf-dist/doc/latex/pstool/trial2.eps
new file mode 100644
index 00000000000..67b4e045d4d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pstool/trial2.eps
@@ -0,0 +1,977 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%BoundingBox: 98 740 293 814
+%%LanguageLevel: 1
+%%Creator: CorelDRAW 10
+%%Title: LMS_VS.eps
+%%CreationDate: Wed Oct 25 12:32:49 2006
+%%For: School of Mechanical Engineering
+%%DocumentProcessColors: Black
+%%DocumentSuppliedResources: (atend)
+%%EndComments
+%%BeginProlog
+/AutoFlatness false def
+/AutoSteps 0 def
+/CMYKMarks true def
+/UseLevel 1 def
+%Build: CorelDRAW 10 Version 10.410
+%Color profile: Disabled
+/CorelIsEPS true def
+%%BeginResource: procset wCorel10Dict 10.0 0
+/wCorel10Dict 300 dict def wCorel10Dict begin
+% Copyright (c)1992-2000 Corel Corporation
+% All rights reserved. v10.0 r0.2
+/bd{bind def}bind def/ld{load def}bd/xd{exch def}bd/_ null def/rp{{pop}repeat}
+bd/@cp/closepath ld/@gs/gsave ld/@gr/grestore ld/@np/newpath ld/Tl/translate ld
+/$sv 0 def/@sv{/$sv save def}bd/@rs{$sv restore}bd/spg/showpage ld/showpage{}
+bd currentscreen/@dsp xd/$dsp/@dsp def/$dsa xd/$dsf xd/$sdf false def/$SDF
+false def/$Scra 0 def/SetScr/setscreen ld/@ss{2 index 0 eq{$dsf 3 1 roll 4 -1
+roll pop}if exch $Scra add exch load SetScr}bd/SepMode_5 where{pop}{/SepMode_5
+0 def}ifelse/CorelIsSeps where{pop}{/CorelIsSeps false def}ifelse
+/CorelIsInRIPSeps where{pop}{/CorelIsInRIPSeps false def}ifelse/CorelIsEPS
+where{pop}{/CorelIsEPS false def}ifelse/CurrentInkName_5 where{pop}
+{/CurrentInkName_5(Composite)def}ifelse/$ink_5 where{pop}{/$ink_5 -1 def}
+ifelse/$c 0 def/$m 0 def/$y 0 def/$k 0 def/$t 1 def/$n _ def/$o 0 def/$fil 0
+def/$C 0 def/$M 0 def/$Y 0 def/$K 0 def/$T 1 def/$N _ def/$O 0 def/$PF false
+def/s1c 0 def/s1m 0 def/s1y 0 def/s1k 0 def/s1t 0 def/s1n _ def/$bkg false def
+/SK 0 def/SM 0 def/SY 0 def/SC 0 def/$op false def matrix currentmatrix/$ctm xd
+/$ptm matrix def/$ttm matrix def/$stm matrix def/$ffpnt true def
+/CorelDrawReencodeVect[16#0/grave 16#5/breve 16#6/dotaccent 16#8/ring
+16#A/hungarumlaut 16#B/ogonek 16#C/caron 16#D/dotlessi 16#27/quotesingle
+16#60/grave 16#7C/bar
+16#82/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl
+16#88/circumflex/perthousand/Scaron/guilsinglleft/OE
+16#91/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash
+16#98/tilde/trademark/scaron/guilsinglright/oe 16#9F/Ydieresis
+16#A1/exclamdown/cent/sterling/currency/yen/brokenbar/section
+16#a8/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/minus/registered/macron
+16#b0/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered
+16#b8/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown
+16#c0/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
+16#c8/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
+16#d0/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
+16#d8/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
+16#e0/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+16#e8/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+16#f0/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide
+16#f8/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
+/L2?/languagelevel where{pop languagelevel 2 ge}{false}ifelse def/Comp?{
+/LumSepsDict where{pop false}{/AldusSepsDict where{pop false}{1 0 0 0 @gs
+setcmykcolor currentcmykcolor @gr add add add 0 ne 0 1 0 0 @gs setcmykcolor
+currentcmykcolor @gr add add add 0 ne 0 0 1 0 @gs setcmykcolor currentcmykcolor
+@gr add add add 0 ne 0 0 0 1 @gs setcmykcolor currentcmykcolor @gr add add add
+0 ne and and and}ifelse}ifelse}bd/@PL{/LV where{pop LV 2 ge L2? not and{@np
+/Courier findfont 12 scalefont setfont 72 144 m
+(The PostScript level set in the Corel application is higher than)show 72 132 m
+(the PostScript level of this device. Change the PS Level in the Corel)show 72
+120 m(application to Level 1 by selecting the PostScript tab in the print)show
+72 108 m(dialog, and selecting Level 1 from the Compatibility drop down list.)
+show flush spg quit}if}if}bd/@BeginSysCorelDict{systemdict/Corel30Dict known
+{systemdict/Corel30Dict get exec}if systemdict/CorelLexDict known{1 systemdict
+/CorelLexDict get exec}if}bd/@EndSysCorelDict{systemdict/Corel30Dict known
+{end}if/EndCorelLexDict where{pop EndCorelLexDict}if}bd AutoFlatness{/@ifl{dup
+currentflat exch sub 10 gt{
+([Error: PathTooComplex; OffendingCommand: AnyPaintingOperator]\n)print flush
+@np exit}{currentflat 2 add setflat}ifelse}bd/@fill/fill ld/fill{currentflat{
+{@fill}stopped{@ifl}{exit}ifelse}bind loop setflat}bd/@eofill/eofill ld/eofill
+{currentflat{{@eofill}stopped{@ifl}{exit}ifelse}bind loop setflat}bd/@clip
+/clip ld/clip{currentflat{{@clip}stopped{@ifl}{exit}ifelse}bind loop setflat}
+bd/@eoclip/eoclip ld/eoclip{currentflat{{@eoclip}stopped{@ifl}{exit}ifelse}
+bind loop setflat}bd/@stroke/stroke ld/stroke{currentflat{{@stroke}stopped
+{@ifl}{exit}ifelse}bind loop setflat}bd}if L2?{/@ssa{true setstrokeadjust}bd}{
+/@ssa{}bd}ifelse/d/setdash ld/j/setlinejoin ld/J/setlinecap ld/M/setmiterlimit
+ld/w/setlinewidth ld/O{/$o xd}bd/R{/$O xd}bd/W/eoclip ld/c/curveto ld/C/c ld/l
+/lineto ld/L/l ld/rl/rlineto ld/m/moveto ld/n/newpath ld/N/newpath ld/P{11 rp}
+bd/u{}bd/U{}bd/A{pop}bd/q/@gs ld/Q/@gr ld/&{}bd/@j{@sv @np}bd/@J{@rs}bd/g{1
+exch sub/$k xd/$c 0 def/$m 0 def/$y 0 def/$t 1 def/$n _ def/$fil 0 def}bd/G{1
+sub neg/$K xd _ 1 0 0 0/$C xd/$M xd/$Y xd/$T xd/$N xd}bd/k{1 index type
+/stringtype eq{/$t xd/$n xd}{/$t 0 def/$n _ def}ifelse/$k xd/$y xd/$m xd/$c xd
+/$fil 0 def}bd/K{1 index type/stringtype eq{/$T xd/$N xd}{/$T 0 def/$N _ def}
+ifelse/$K xd/$Y xd/$M xd/$C xd}bd/x/k ld/X/K ld/sf{1 index type/stringtype eq{
+/s1t xd/s1n xd}{/s1t 0 def/s1n _ def}ifelse/s1k xd/s1y xd/s1m xd/s1c xd}bd/i{
+dup 0 ne{setflat}{pop}ifelse}bd/v{4 -2 roll 2 copy 6 -2 roll c}bd/V/v ld/y{2
+copy c}bd/Y/y ld/@w{matrix rotate/$ptm xd matrix scale $ptm dup concatmatrix
+/$ptm xd 1 eq{$ptm exch dup concatmatrix/$ptm xd}if 1 w}bd/@g{1 eq dup/$sdf xd
+{/$scp xd/$sca xd/$scf xd}if}bd/@G{1 eq dup/$SDF xd{/$SCP xd/$SCA xd/$SCF xd}
+if}bd/@D{2 index 0 eq{$dsf 3 1 roll 4 -1 roll pop}if 3 copy exch $Scra add exch
+load SetScr/$dsp xd/$dsa xd/$dsf xd}bd/$ngx{$SDF{$SCF SepMode_5 0 eq{$SCA}
+{$dsa}ifelse $SCP @ss}if}bd/@MN{2 copy le{pop}{exch pop}ifelse}bd/@MX{2 copy ge
+{pop}{exch pop}ifelse}bd/InRange{3 -1 roll @MN @MX}bd/@sqr{dup 0 rl dup 0 exch
+rl neg 0 rl @cp}bd/currentscale{1 0 dtransform matrix defaultmatrix idtransform
+dup mul exch dup mul add sqrt 0 1 dtransform matrix defaultmatrix idtransform
+dup mul exch dup mul add sqrt}bd/@unscale{}bd/wDstChck{2 1 roll dup 3 -1 roll
+eq{1 add}if}bd/@dot{dup mul exch dup mul add 1 exch sub}bd/@lin{exch pop abs 1
+exch sub}bd/cmyk2rgb{3{dup 5 -1 roll add 1 exch sub dup 0 lt{pop 0}if exch}
+repeat pop}bd/rgb2cmyk{3{1 exch sub 3 1 roll}repeat 3 copy @MN @MN 3{dup 5 -1
+roll sub neg exch}repeat}bd/rgb2g{2 index .299 mul 2 index .587 mul add 1 index
+.114 mul add 4 1 roll pop pop pop}bd/WaldoColor_5 where{pop}{/SetRgb
+/setrgbcolor ld/GetRgb/currentrgbcolor ld/SetGry/setgray ld/GetGry/currentgray
+ld/SetRgb2 systemdict/setrgbcolor get def/GetRgb2 systemdict/currentrgbcolor
+get def/SetHsb systemdict/sethsbcolor get def/GetHsb systemdict
+/currenthsbcolor get def/rgb2hsb{SetRgb2 GetHsb}bd/hsb2rgb{3 -1 roll dup floor
+sub 3 1 roll SetHsb GetRgb2}bd/setcmykcolor where{pop/LumSepsDict where{pop
+/SetCmyk_5{LumSepsDict/setcmykcolor get exec}def}{/AldusSepsDict where{pop
+/SetCmyk_5{AldusSepsDict/setcmykcolor get exec}def}{/SetCmyk_5/setcmykcolor ld
+}ifelse}ifelse}{/SetCmyk_5{cmyk2rgb SetRgb}bd}ifelse/currentcmykcolor where{
+pop/GetCmyk/currentcmykcolor ld}{/GetCmyk{GetRgb rgb2cmyk}bd}ifelse
+/setoverprint where{pop}{/setoverprint{/$op xd}bd}ifelse/currentoverprint where
+{pop}{/currentoverprint{$op}bd}ifelse/@tc_5{5 -1 roll dup 1 ge{pop}{4{dup 6 -1
+roll mul exch}repeat pop}ifelse}bd/@trp{exch pop 5 1 roll @tc_5}bd
+/setprocesscolor_5{SepMode_5 0 eq{SetCmyk_5}{0 4 $ink_5 sub index exch pop 5 1
+roll pop pop pop pop SepsColor true eq{$ink_5 3 gt{1 sub neg SetGry}{0 0 0 4
+$ink_5 roll SetCmyk_5}ifelse}{1 sub neg SetGry}ifelse}ifelse}bd
+/findcmykcustomcolor where{pop}{/findcmykcustomcolor{5 array astore}bd}ifelse
+/Corelsetcustomcolor_exists false def/setcustomcolor where{pop
+/Corelsetcustomcolor_exists true def}if CorelIsSeps true eq CorelIsInRIPSeps
+false eq and{/Corelsetcustomcolor_exists false def}if
+Corelsetcustomcolor_exists false eq{/setcustomcolor{exch aload pop SepMode_5 0
+eq{pop @tc_5 setprocesscolor_5}{CurrentInkName_5 eq{4 index}{0}ifelse 6 1 roll
+5 rp 1 sub neg SetGry}ifelse}bd}if/@scc_5{dup type/booleantype eq{dup
+currentoverprint ne{setoverprint}{pop}ifelse}{1 eq setoverprint}ifelse dup _ eq
+{pop setprocesscolor_5 pop}{findcmykcustomcolor exch setcustomcolor}ifelse
+SepMode_5 0 eq{true}{GetGry 1 eq currentoverprint and not}ifelse}bd/colorimage
+where{pop/ColorImage{colorimage}def}{/ColorImage{/ncolors xd/$multi xd $multi
+true eq{ncolors 3 eq{/daqB xd/daqG xd/daqR xd pop pop exch pop abs{daqR pop
+daqG pop daqB pop}repeat}{/daqK xd/daqY xd/daqM xd/daqC xd pop pop exch pop abs
+{daqC pop daqM pop daqY pop daqK pop}repeat}ifelse}{/dataaq xd{dataaq ncolors
+dup 3 eq{/$dat xd 0 1 $dat length 3 div 1 sub{dup 3 mul $dat 1 index get 255
+div $dat 2 index 1 add get 255 div $dat 3 index 2 add get 255 div rgb2g 255 mul
+cvi exch pop $dat 3 1 roll put}for $dat 0 $dat length 3 idiv getinterval pop}{
+4 eq{/$dat xd 0 1 $dat length 4 div 1 sub{dup 4 mul $dat 1 index get 255 div
+$dat 2 index 1 add get 255 div $dat 3 index 2 add get 255 div $dat 4 index 3
+add get 255 div cmyk2rgb rgb2g 255 mul cvi exch pop $dat 3 1 roll put}for $dat
+0 $dat length ncolors idiv getinterval}if}ifelse}image}ifelse}bd}ifelse
+/setcmykcolor{1 5 1 roll _ currentoverprint @scc_5/$ffpnt xd}bd
+/currentcmykcolor{GetCmyk}bd/setrgbcolor{rgb2cmyk setcmykcolor}bd
+/currentrgbcolor{currentcmykcolor cmyk2rgb}bd/sethsbcolor{hsb2rgb setrgbcolor}
+bd/currenthsbcolor{currentrgbcolor rgb2hsb}bd/setgray{dup dup setrgbcolor}bd
+/currentgray{currentrgbcolor rgb2g}bd/InsideDCS false def/IMAGE/image ld/image
+{InsideDCS{IMAGE}{/EPSDict where{pop SepMode_5 0 eq{IMAGE}{dup type/dicttype eq
+{dup/ImageType get 1 ne{IMAGE}{dup dup/BitsPerComponent get 8 eq exch
+/BitsPerComponent get 1 eq or currentcolorspace 0 get/DeviceGray eq and{
+CurrentInkName_5(Black)eq{IMAGE}{dup/DataSource get/TCC xd/Height get abs{TCC
+pop}repeat}ifelse}{IMAGE}ifelse}ifelse}{2 index 1 ne{CurrentInkName_5(Black)eq
+{IMAGE}{/TCC xd pop pop exch pop abs{TCC pop}repeat}ifelse}{IMAGE}ifelse}
+ifelse}ifelse}{IMAGE}ifelse}ifelse}bd}ifelse/WaldoColor_5 true def/$fm 0 def
+/wfill{1 $fm eq{fill}{eofill}ifelse}bd/@Pf{@sv SepMode_5 0 eq $Psc 0 ne or
+$ink_5 3 eq or{0 J 0 j[]0 d $t $c $m $y $k $n $o @scc_5 pop $ctm setmatrix 72
+1000 div dup matrix scale dup concat dup Bburx exch Bbury exch itransform
+ceiling cvi/Bbury xd ceiling cvi/Bburx xd Bbllx exch Bblly exch itransform
+floor cvi/Bblly xd floor cvi/Bbllx xd $Prm aload pop $Psn load exec}{1 SetGry
+wfill}ifelse @rs @np}bd/F{matrix currentmatrix $sdf{$scf $sca $scp @ss}if $fil
+1 eq{CorelPtrnDoFill}{$fil 2 eq{@ff}{$fil 3 eq{@Pf}{$fil 4 eq
+{CorelShfillDoFill}{$t $c $m $y $k $n $o @scc_5{wfill}{@np}ifelse}ifelse}
+ifelse}ifelse}ifelse $sdf{$dsf $dsa $dsp @ss}if setmatrix}bd/f{@cp F}bd/S{
+matrix currentmatrix $ctm setmatrix $SDF{$SCF $SCA $SCP @ss}if $T $C $M $Y $K
+$N $O @scc_5{matrix currentmatrix $ptm concat stroke setmatrix}{@np}ifelse $SDF
+{$dsf $dsa $dsp @ss}if setmatrix}bd/s{@cp S}bd/B{@gs F @gr S}bd/b{@cp B}bd/_E{
+5 array astore exch cvlit xd}bd/@cc{currentfile $dat readhexstring pop}bd/@sm{
+/$ctm $ctm currentmatrix def}bd/@E{/Bbury xd/Bburx xd/Bblly xd/Bbllx xd}bd/@c{
+@cp}bd/@P{/$fil 3 def/$Psn xd/$Psc xd array astore/$Prm xd}bd/tcc{@cc}def/@B{
+@gs S @gr F}bd/@b{@cp @B}bd/@sep{CurrentInkName_5(Composite)eq{/$ink_5 -1 def}
+{CurrentInkName_5(Cyan)eq{/$ink_5 0 def}{CurrentInkName_5(Magenta)eq{/$ink_5 1
+def}{CurrentInkName_5(Yellow)eq{/$ink_5 2 def}{CurrentInkName_5(Black)eq
+{/$ink_5 3 def}{/$ink_5 4 def}ifelse}ifelse}ifelse}ifelse}ifelse}bd/@whi{@gs
+-72000 dup m -72000 72000 l 72000 dup l 72000 -72000 l @cp 1 SetGry fill @gr}
+bd/@neg{[{1 exch sub}/exec cvx currenttransfer/exec cvx]cvx settransfer @whi}
+bd/deflevel 0 def/@sax{/deflevel deflevel 1 add def}bd/@eax{/deflevel deflevel
+dup 0 gt{1 sub}if def deflevel 0 gt{/eax load}{eax}ifelse}bd/eax{{exec}forall}
+bd/@rax{deflevel 0 eq{@rs @sv}if}bd systemdict/pdfmark known not{/pdfmark
+/cleartomark ld}if/wclip{1 $fm eq{clip}{eoclip}ifelse}bd
+/z{exch findfont exch scalefont setfont}bd/ZB{9 dict dup begin 4 1 roll
+/FontType 3 def/FontMatrix xd/FontBBox xd/Encoding 256 array def 0 1 255{
+Encoding exch/.notdef put}for/CharStrings 256 dict def CharStrings/.notdef{}
+put/Metrics 256 dict def Metrics/.notdef 3 -1 roll put/BuildChar{exch dup
+/$char exch/Encoding get 3 index get def dup/Metrics get $char get aload pop
+setcachedevice begin Encoding exch get CharStrings exch get end exec}def end
+definefont pop}bd/ZBAddChar{findfont begin dup 4 1 roll dup 6 1 roll Encoding 3
+1 roll put CharStrings 3 1 roll put Metrics 3 1 roll put end}bd/Z{findfont dup
+maxlength 2 add dict exch dup{1 index/FID ne{3 index 3 1 roll put}{pop pop}
+ifelse}forall pop dup dup/Encoding get 256 array copy dup/$fe xd/Encoding exch
+put dup/Fontname 3 index put 3 -1 roll dup length 0 ne{0 exch{dup type 0 type
+eq{exch pop}{$fe exch 2 index exch put 1 add}ifelse}forall pop}if dup 256 dict
+dup/$met xd/Metrics exch put dup/FontMatrix get 0 get 1000 mul 1 exch div 3
+index length 256 eq{0 1 255{dup $fe exch get dup/.notdef eq{pop pop}{5 index 3
+-1 roll get 2 index mul $met 3 1 roll put}ifelse}for}if pop definefont pop pop
+}bd/CorelIsValidCharpath{pathbbox 3 -1 roll sub abs 0.5 ge 3 1 roll sub abs 0.5
+ge and}bd/@ftx{{currentpoint 3 -1 roll(0)dup 3 -1 roll 0 exch put dup @gs true
+charpath $ctm setmatrix CorelIsValidCharpath{@@txt}if @gr @np stringwidth pop 3
+-1 roll add exch m}forall}bd/@ft{matrix currentmatrix exch $sdf{$scf $sca $scp
+@ss}if $fil 1 eq{/@@txt/@pf ld @ftx}{$fil 2 eq{/@@txt/@ff ld @ftx}{$fil 3 eq
+{/@@txt/@Pf ld @ftx}{$fil 4 eq{/@@txt/CorelShfillDoFill ld @ftx}{$t $c $m $y $k
+$n $o @scc_5{show}{pop}ifelse}ifelse}ifelse}ifelse}ifelse $sdf{$dsf $dsa $dsp
+@ss}if setmatrix}bd/@st{matrix currentmatrix exch $SDF{$SCF $SCA $SCP @ss}if $T
+$C $M $Y $K $N $O @scc_5{{currentpoint 3 -1 roll(0)dup 3 -1 roll 0 exch put dup
+@gs true charpath $ctm setmatrix $ptm concat stroke @gr @np stringwidth pop 3
+-1 roll add exch m}forall}{pop}ifelse $SDF{$dsf $dsa $dsp @ss}if setmatrix}bd
+/@te{@ft}bd/@tr{@st}bd/@ta{dup @gs @ft @gr @st}bd/@t@a{dup @gs @st @gr @ft}bd
+/@tm{@sm concat}bd/e{/t{@te}def}bd/r{/t{@tr}def}bd/o{/t{pop}def}bd/a{/t{@ta}
+def}bd/@a{/t{@t@a}def}bd/t{@te}def/T{@np $ctm setmatrix/$ttm matrix def}bd/ddt
+{t}def/@t{/$stm $stm currentmatrix def 3 1 roll m $ttm concat ddt $stm
+setmatrix}bd/@n{/$ttm exch matrix rotate def}bd/@s{}bd/@l{}bd/_lineorientation
+0 def/_bitfont null def/_bitlobyte 0 def/_bitkey null def/_bithibyte 0 def
+/@ii{concat 3 index 3 index m 3 index 1 index l 2 copy l 1 index 3 index l 3
+index 3 index l clip pop pop pop pop}bd/@i{@sm @gs @ii 6 index 1 ne{/$frg true
+def pop pop}{1 eq{s1t s1c s1m s1y s1k s1n $O @scc_5/$frg xd}{/$frg false def}
+ifelse 1 eq{@gs $ctm setmatrix F @gr}if}ifelse @np/$ury xd/$urx xd/$lly xd
+/$llx xd/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul 8 div ceiling cvi string
+def $bkg $frg or{$SDF{$SCF $SCA $SCP @ss}if $llx $lly Tl $urx $llx sub $ury
+$lly sub scale $bkg{$t $c $m $y $k $n $o @scc_5 pop}if $wid $hei abs $bts 1 eq
+{$bkg}{$bts}ifelse[$wid 0 0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse]/tcc load $bts
+1 eq{imagemask}{image}ifelse $SDF{$dsf $dsa $dsp @ss}if}{$hei abs{tcc pop}
+repeat}ifelse @gr $ctm setmatrix}bd/@I{@sm @gs @ii @np/$ury xd/$urx xd/$lly xd
+/$llx xd/$ncl xd/$bts xd/$hei xd/$wid xd $ngx $llx $lly Tl $urx $llx sub $ury
+$lly sub scale $wid $hei abs $bts[$wid 0 0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse
+]$msimage false eq $ncl 1 eq or{/$dat $wid $bts mul $ncl mul 8 div ceiling cvi
+string def/@cc load false $ncl ColorImage}{$wid $bts mul 8 div ceiling cvi $ncl
+3 eq{dup dup/$dat1 exch string def/$dat2 exch string def/$dat3 exch string def
+/@cc1 load/@cc2 load/@cc3 load}{dup dup dup/$dat1 exch string def/$dat2 exch
+string def/$dat3 exch string def/$dat4 exch string def/@cc1 load/@cc2 load
+/@cc3 load/@cc4 load}ifelse true $ncl ColorImage}ifelse $SDF{$dsf $dsa $dsp
+@ss}if @gr $ctm setmatrix}bd/@cc1{currentfile $dat1 readhexstring pop}bd/@cc2{
+currentfile $dat2 readhexstring pop}bd/@cc3{currentfile $dat3 readhexstring pop
+}bd/@cc4{currentfile $dat4 readhexstring pop}bd/$msimage false def/COMP 0 def
+/MaskedImage false def L2?{/@I_2{@sm @gs @ii @np/$ury xd/$urx xd/$lly xd/$llx
+xd/$ncl xd/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul $ncl mul 8 div ceiling
+cvi string def $ngx $ncl 1 eq{/DeviceGray}{$ncl 3 eq{/DeviceRGB}{/DeviceCMYK}
+ifelse}ifelse setcolorspace $llx $lly Tl $urx $llx sub $ury $lly sub scale 8
+dict begin/ImageType 1 def/Width $wid def/Height $hei abs def/BitsPerComponent
+$bts def/Decode $ncl 1 eq{[0 1]}{$ncl 3 eq{[0 1 0 1 0 1]}{[0 1 0 1 0 1 0 1]}
+ifelse}ifelse def/ImageMatrix[$wid 0 0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse]def
+/DataSource currentfile/ASCII85Decode filter COMP 1 eq{/DCTDecode filter}{COMP
+2 eq{/RunLengthDecode filter}if}ifelse def currentdict end image $SDF{$dsf $dsa
+$dsp @ss}if @gr $ctm setmatrix}bd}{/@I_2{}bd}ifelse/@I_3{@sm @gs @ii @np/$ury
+xd/$urx xd/$lly xd/$llx xd/$ncl xd/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul
+$ncl mul 8 div ceiling cvi string def $ngx $ncl 1 eq{/DeviceGray}{$ncl 3 eq
+{/DeviceRGB}{/DeviceCMYK}ifelse}ifelse setcolorspace $llx $lly Tl $urx $llx sub
+$ury $lly sub scale/ImageDataDict 8 dict def ImageDataDict begin/ImageType 1
+def/Width $wid def/Height $hei abs def/BitsPerComponent $bts def/Decode $ncl 1
+eq{[0 1]}{$ncl 3 eq{[0 1 0 1 0 1]}{[0 1 0 1 0 1 0 1]}ifelse}ifelse def
+/ImageMatrix[$wid 0 0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse]def/DataSource
+currentfile/ASCII85Decode filter COMP 1 eq{/DCTDecode filter}{COMP 2 eq{
+/RunLengthDecode filter}if}ifelse def end/MaskedImageDict 7 dict def
+MaskedImageDict begin/ImageType 3 def/InterleaveType 3 def/MaskDict
+ImageMaskDict def/DataDict ImageDataDict def end MaskedImageDict image $SDF
+{$dsf $dsa $dsp @ss}if @gr $ctm setmatrix}bd/@SetMask{/$mbts xd/$mhei xd/$mwid
+xd/ImageMaskDict 8 dict def ImageMaskDict begin/ImageType 1 def/Width $mwid def
+/Height $mhei abs def/BitsPerComponent $mbts def/DataSource maskstream def
+/ImageMatrix[$mwid 0 0 $mhei neg 0 $mhei 0 gt{$mhei}{0}ifelse]def/Decode[1 0]
+def end}bd/@daq{dup type/arraytype eq{{}forall}if}bd/@BMP{/@cc xd UseLevel 3 eq
+MaskedImage true eq and{7 -2 roll pop pop @I_3}{12 index 1 gt UseLevel 2 eq
+UseLevel 3 eq or and{7 -2 roll pop pop @I_2}{11 index 1 eq{12 -1 roll pop @i}{
+7 -2 roll pop pop @I}ifelse}ifelse}ifelse}bd
+end
+%%EndResource
+%%EndProlog
+%%BeginSetup
+wCorel10Dict begin
+@BeginSysCorelDict
+2.6131 setmiterlimit
+1.00 setflat
+/$fst 128 def
+%%EndSetup
+
+%%Page: 1 1
+%LogicalPage: 1
+%%BeginPageSetup
+@sv
+@sm
+%%BeginResource: font TimesNewRoman
+%!FontType1-1.0: TimesNewRoman 001.003
+%%Creator: Corel PostScript Engine
+10 dict begin
+/FontName /TimesNewRoman def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array 0 1 255 {1 index exch /.notdef put} for
+dup 43 /plus put
+dup 95 /underscore put
+dup 91 /bracketleft put
+dup 101 /e put
+dup 112 /p put
+dup 98 /b put
+dup 93 /bracketright put
+dup 118 /v put
+dup 104 /h put
+dup 115 /s put
+dup 77 /M put
+readonly def
+/FontBBox {0 0 0 0} readonly def
+currentdict end
+currentfile eexec
+
+A22DD33CB9A1B84FC323D538B9AE6C6014672C02872FAD31037218C4EC2B7124C58AFC4A0E2584B50A778936CFE1053450FEC35486F87A4DA48EF5124EE42DE6
+9DDB8A5C33C2868DDADC1C9B4725483A678DFD1BEF77D7BDC50D39DB17FF02031F39030455C675716EB1B292EA6078E9937BB936698E457C365396CC5708EAAB
+921AD0271E16D4A5F1689C7D8DEDA69051F9EA8B689EDEA8949F2C93CE777268FD3CE5D1713388D0E33A640C77DFB1D300C88E302BEFDF0083AF060D407FD007
+23D3F76465C679461FC0471E7F6EFFFCB5A8E513C1661D98B93E8667005CB8B30093BCB089336AFAB7D61973B6F27AC993F52C52238826E221A63575C2C867DB
+E9C0264C99B65994DB79F83B4627E129923C7C8B2B1AA151D4BCABD1D45DDAEF20FC93DC3E74EA7E80159C16E0BB8F3CB46B99949EDFC075E6BBED3F3C2DAD60
+541A0E397F9CBEA3BF7EEECDBCCB8CF8A11CBCE55E00BD221BB1599EFDF9DD6DD9AEA493EC72A3F81C6A29338A1E92375A7FC0E882448530F420BDD411153925
+0290C929A065ABBF1D0A1A2D683F8F113822976DE21E570480178C363560CC3FF8A2E2A6A54F03E4E8DD535776CA14C576DC4C4CD1931F113CE4E57CAE02695C
+73AEA67F1C8624AE39934B00A8A8C0438EA6CDE17F2B55DC642EC774E58D79CBE0FB62DD13B984A78CC5C8331CAAC8689969D631437DBDEFC1C5F308BD9B8AF1
+AC5BB84A3F75FEC63DAB4DFFDE3ABD2FDE11194680A7F34F64DA94E3371450985FE12BB787F9BEE2C7535148C327BFC304E196E917A2C24F2BD46F7B08D41A89
+03365BA4ED47327250F31A1CD411E646B38BD867961EAFA0CDFCA2C8F90D3D776B8CBAB39366C212F2A32FAB71CD778CAE97170149B1B7869BA18B82E242F3F2
+8CDC47407C7C6B33E1DEC16798608905EFECFF66C930F7C7546301362427A56B86C36A97B8C2F1839200B7E034FFED10A017B048B571F1DED3F11E04E43CDEE5
+81FAE978367396A3DEB8C1B3968E12D7224F963D6F60D8C8DD8D0725FF8FCB5349F9FEC3ABB268C59EF65A6E7FBD35446ED000DAC3D8A47FAA0F3ED01DCBB62E
+FAF873E34D7A88EDF957FCAC97D937F918BBAAA61AF822A5079582EAB26DE3AF4AEDB369CC777321C148952A47C5DB77A4F63E05BC5CF88640A612224B758230
+A0D98FC37B683333F26B5EAF87A97D1143673F1F7897AB326FDCDC82C83C8B8E03509E66377C15015E763C2E65CAB36BC69E5497BDB2E123492460C95B1DB19D
+DBFCAA94E6A1B50F77175B3DD32EEDAC5BE852D6A1D84C70938A1FF3C1AD2B3AAC50EA7019B7E3359E1EA1CC052084547C4F16D0DFE0AB31279ACA06FBD6F43D
+1B49C6C49275826C7EC1AC58AC0E740396E835FB8F5DD241A50FEA596776DD5F05E3247E8D79DC9A16A1968AF159324C05876A7A2CDA6504BDD4B404FFDBF282
+90BECA041BCA87EDB5711F7470A99FD87E08D10E03515F52AEDD1A71E3F01E0434CDD66BF85BCD858134DBB154AF5BD3C26B0C30DA3A1FF9BEC42891F72D74EB
+2DF6B1120EFDB130E15A341C5EAE898B0F4FB00EA7792DF1BDF3C5EC7FAC80FA058DEE50C483229F2F4F4376ADFE918AC5AD8BC80DC92DA0808A69194389DDE9
+D923AF983F929B0522F6C8F3B114A9BAAAC89AD009E73EA889A6413B401FD8080BB9876D6D70A20F852B2C36A49A052D5AE5E0E94654EBE479D454CF314D6CF5
+EE51B2E21812B53E9ABF65971F4C4AD7C51FAC66B023A74AD73C872B3B2D3946F6ECE2C686F67F4AE250563135CEE01789CDE88B1FDD337B81D2512236DED648
+434D825C3F9B26834D9EA981622BD9D3078BBCE8EAC78BE56D0FFB469BAE72645649676676B286D101CBC081770062F134F7DE12AC6BCBCDCDE3F43005270ED7
+559A900BEA621DD447231449A9B93D3765FACC5A2100EE65922C968865B4E87EACBC1BFC619C57CCE4E196507CC020337873351B3B67FD565C7340E8B70F0DD1
+AE759086A6E27FAB5AFE28554DB6C32224459D4E99F8007F7805EDCAC6287B19767A14DFFCA7CFCA0156D41748958AAF6567165F5288AE0B3636E624BC6E4CFF
+204A01117BC2AE53FFCB64EEC996D8CB2F85D52854BBDA3AA6FEFA57125183B54A2E8DE5EF551026CF86C5A49CBE5D0FCDCC27EF7DED0B4911CCD48E0318EA33
+AF42F06B48496B6EB41E077500FE6EA74B49C745BE6B1098C52B1F32E14FB940A7725B32E16CCD50111606EF97F9495ADCB9BBABCD246F0209D1280528FA1717
+BEF21670A83A8094AFB67573CA520E35BBAFF0CA3CFACFCCBBD9757FBDA4351CA7F0835A5CFDC3354B610864C761A8384F618D5D65F69A8B4B7B1B671738728B
+F486181AAF33607C77D1E68D02C8480A383D2207CE5CFA7F72F56CF0E802C634708126F43873DCC7C7D0600D822F4CF9A33D241BB5F574A8D7A7519E1C81E27D
+605BC387CE066F3864D83BADBE96541E401A9986B96DBDAE03C2575AA412E381BEAC2CFBA67E9EA2687A5CBA1450612B0B7A8EDAC485C50CE048EAA929360AA3
+E99BF35887BB018D0128A88F3C5648AF0C5D692DD4C85F2B35D0C753EB49C33C1C92AB048411BA6B44114212CEAF8A8F61D68626F1CD03AE359901ACA2698D55
+3801DA70316BF648D78CD6B8A62DB32122E95E4E38AA0465276FAFB68C929F8DC7681D850A9F455E3512F4FE66FF1D506AA36DBFE778B924A6992346AAE6D49E
+1AF215A21F15A4D934846FB2AEBDABB1B68603AFD65FE82FFAE395DF6A2C3049DA7F54310572DE125282B6F5CDA569CCF53ABA97200B85D386593134E20A3203
+9F1557FB921F4640919371FF05DECFC1EFCE62B851BC86A58D5EB52154A8CEF1394A2C6D9ABEA8368B8107A7C210D65160DDFC592DDD392A48752D2FA59C39F7
+8CEF33E59BFAE4BB5162A93388DF176F75881769FFF8AAEC651863CAC90641CFDD7C770565C540180C76E23020A55D3AFBF0F03DEE3EC43CE4523A0B93D84365
+FEE4DABDA18BCF5661368DFB5F5114644015AA254A70E6B5F8CC67CC6AD2E8B78D3ECB62C36A0997F114A543D308
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+
+%%EndResource
+[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+0 0 0 0 0 0 0 0 0 0 0 0 0 778 778 250
+333 408 500 500 833 778 180 333 333 500 564 250 333 250 278 500
+500 500 500 500 500 500 500 500 500 278 278 564 564 564 444 921
+722 667 667 722 611 556 722 722 333 389 722 611 889 722 722 556
+722 667 556 611 722 722 944 722 722 611 333 278 333 469 500 333
+444 500 444 500 444 333 500 500 278 278 500 278 778 500 500 500
+500 333 389 278 500 500 722 500 500 444 480 200 480 541 778 500
+778 333 500 444 1000 500 500 333 1000 556 333 889 778 611 778 778
+333 333 444 444 350 500 1000 333 980 389 333 722 778 444 722 250
+333 500 500 500 500 200 500 333 760 276 500 564 333 760 500 400
+549 300 300 333 576 453 250 333 300 310 500 750 750 750 444 722
+722 722 722 722 722 889 667 611 611 611 611 333 333 333 333 722
+722 722 722 722 722 722 564 722 722 722 722 722 722 556 500 444
+444 444 444 444 444 667 444 444 444 444 444 278 278 278 278 500
+500 500 500 500 500 500 549 500 500 500 500 500 500 500 500 ]
+CorelDrawReencodeVect /_R6-TimesNewRoman /TimesNewRoman Z
+%%BeginResource: font PalatinoLinotype
+%!FontType1-1.0: PalatinoLinotype 001.003
+%%Creator: Corel PostScript Engine
+10 dict begin
+/FontName /PalatinoLinotype def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array 0 1 255 {1 index exch /.notdef put} for
+readonly def
+/FontBBox {0 0 0 0} readonly def
+currentdict end
+currentfile eexec
+A22DD33CB9A1B84FC323D538B9AE6C6014672C02872FAD31037218C4EC2B7124C58AFC4A0E2584B50A778936CFE1053450FEC35486F87A4DA48EF5124EE42DE6
+9DDB8A5C33C2868DDADC1C9B4725483A678DFD1BEF77D7BDC50D39DB17FF02031F39030455C675716EB1B292EA6078E9937BB936698E457C365396CC5708EAAB
+921AD0271E16D4A5F1689C7D8DEDA69051F9EA8B689EDEA8949F2C93CE777268FD3CE5D1713388D0E33A640C77DFB1D300C88E302BEFDF0083AF060D407FD007
+23D3F76465C679461FC0471E7F6EFFFCB5A8E513C1661D98B93E8667005CB8B30093BCB089336AFAB7D61973B6F27AC993F52C52238826E221A63575C2C867DB
+E9C0264C99B65994DB79F83B4627E129923C7C8B2B123FFCF8A870241E2A35E4877BF66DE00728B6A7250F981CA1F5F137525858405A1E22963F7A9AA87543D6
+249AC9918CFCC8DF307E539DB46C032AE36DDEF426AA7037BE33004A32FA9C0BE6C4BBF866461EED71DDA0425FFC6D90E7F691426A377E275176FD5245DE1EB3
+BCA3D8D48AF42014782FB0527DAFC2BCC73415B3BCEDE4D2852D1A94B17EFB7161BB78FD7615142FE2FFB22060B353B8109129CB0DD3FD40562CF968E39A3D2B
+049821F0214A998DF4AA387EB03CE5C3AAD65B2ABB59CB896DE8F7449BE3A63948FE9763ECAAB0F15B792A6B3C3B911B2259F74B3ED34084DD5A3237BF33D2D5
+B4B844FEDAA9762323175C9AE3138C5436402B4EFB2BB8633D7CBD592B741ED8F7F01EAB7B6EA788DF45ED982CB334AB4CD1640A6ABFDE7BD24BFC828E7EA3EF
+E5FF652DC16B37E8B6133FDCAF8CA8560B4923DAA0877E9FDE9D90580A6679051015420EE748D1184F8E074BF91A5202C6B2C65E149AEBD90C24F0BC346F3A39
+189E0B0A01077847B02300B5A67DF7631BAD45BA9747A9FA03440F5F42E54E0CE5D328728D3B4047F4684FB2F020B28ECA30FB87B2B1859C99A016440E581D80
+302DBC0EE1FB962261B8C397DE7EF3E3193765FD600D56B4BE21A98F7B860E29E8E3EAB16E05B53F6F6799E64B1AD40168C37F61629D74ACF577135ED15AC14F
+B7969FD7150061A7D77D20140587B2CD592803860C30BB2D6A3075572BC7D4B2E6CE89E67060487B5E6CF31A57D87D5CA32FA2A12FA5733EA293656C928C462F
+D60142F7351F51687678FBEFE37AE86EF867C22F16AAFBDF04D11B89AE7ABF3E8B3C138DEF562A85EC1F485D217BFC3D0255F2933ACD292CE5A4F953FF2FAFDD
+FB8747721CC9AF0435CCF4F000438E2349FB9B3DBDAFECD495C13B348553DD2CB0E07134F069FF05BEF16912B3143F794DC06E1802DAF259EA88018263084961
+6DA4148F9B802558A56CA6064BE90E1AA32ABBBB4FF9BCFA8BAB3224CF63C2B13913360A4F4B976F4B3C1C7112393C2D5161A3307AFAE4746103A22DC505683D
+4719339824F2302D6F35DF4FB9A276013BED9420804AF5CC126F8CD27A42283A22B2039D8CDCEECB18D53BE30858BF17A88265EF23ABB388200BF1D5C78D28CC
+0CFE054EA308C5FD87F28B21587BEA6DD29EAFF360BC6EBB4BCD75F842AB4309FF0BE1BEFD01BB2929577538F0B176BA4C90F99ACAB867CF39292399DF0BE73D
+435CF0D2F0DD3F80C337DC10D7FBF4F820710D8FCD7523B17708552B89278C081C9EC087DC4D355E278E4E082A850688781841EB3A0AA10E9D30AFE5FF5400FB
+FD15C66B4ABE69199FE9F661CA1BA7FCC93F593C67AD17297A452B805B52071DA9F41D0F241564A3189F786E97854BC6E162DE6DF967303875E9AD80D3B5CB3A
+B9EE7EB87863920143111D118894A7A4869C92CE23A793FD605CC4E2B328683E38E0C63E3F2CD413EC32B015311B2FEFDA9F232CE48B98EB677B3195DD7911DB
+94D87D41F9CDB761B3D4559D9DB868FBDAD8921ADF046A1913DB083866409CAA832F01C497969F0BA4EE1097E5EACDFDA244C35D13389048971E8FDA74E0B7C1
+D36A92FAE974B0C970037C5A9083B4B4A26F463244529F58EB549EEFCD843E7B046554C8ABE0CA5CDE2548CB00352427C094AC5C4FFEC73B9689652022E2B745
+A77375650DC98831940FAB4C7BE307BB796EA91BE7FF292037DBBFCB7533250FB23ECE026C6C4D1EAAAFB6E4A29F8866B36A9F769DCE78835BCBFF4B372674A8
+0E2E2246F6E634558500172BE89A9A555E174F13F2AF7F8728F1E2F122CD11B85694DC577C4267AA9A57EDA2217FFC9B5F7E2FA03C207458658B9AE8F3FEEFB4
+30143E6CEF08F9DD99AA980EC30959E3784DE4ACD484AC94E44A97BC9402D7218D50E7440050AC8419AFD7E3ADA5A6B1BF333A95143481679CCA6F1430943AEB
+1705EE48B87E2F39E62B35530AEE86CDE36EBD6EA1109E93CA3EEE87DF96930CC91574C7736A9F5785298C2BBB1DD0D0B973FD5B2253B37AD6E7C83FFBD39925
+77428EF4623D311DF70115B3DC31E5B1E3159837A4A9C66E0AACF4941CD16A2124D9FFBA243DEE16975E6FAEFA91ED36CA469324D485A65D0C098C84FAB8D493
+04002C1428E346D75DB0B99C8E3F0803F309814240E13D591EA8684B0ACDC3BA2E601C3848EBA9B0F685519D8CF0700DFBE5CA568A5053FD818B456CA48697A0
+B48442AE4DA618575DD5E4DB3B9C6728D775D0ED4DB6F8D58BCB2222F706CA755A078AD7481C7D4C69512E21F9C055D7A794C75FF09E7D2B84B92D8333BE2E09
+3CF3E8153CFB87CDEAC1354DC4E9382CE03D87544A9AFD77DCE15711A8D802139222A29A2E5658AE3CF5826685267FABF183E193935B045023040A33C17FB3F8
+04D93BE974CE5DBC76F2E9E012241ADF44C19561E8F75FA49C67BD763C3A69F9CD4BE804CD6982983C2493AB42EDF4653F7A6CD59D9CA664EC64D794D25E0555
+3A595FF91D950C29145D983C5D157175489588341D56EC84BE3387DE7341C0A749EEC3777BE947926C6A838F045E3A102E7C932C0A9A3927058682110C6AB1D1
+4599FC42E9AA8100857200BEEB72ECFA239CCF50A3BF911857B45616EBB2553B8FDA4D3730B5146699670E806AA29C876BE46B3AAC8DCB9BFB0545E510EF4847
+8DE6FF39EE6E849C4287CED69B541FD2E9BE70D8CBA3AE26F510C11397306DC61AF507BE00F9BB7729900EDD969BC35B36C5CF58F48764342FC7B61B5174C4DD
+AA63B02DBC19BDC339551A06100AC4CCE2AFCC66167A01D1248860510919E9107A73C100C61F222B8820ECCE20440677A65D7D87B08F38C54783C846D2D6B020
+5395939F1EAB52CD3F38ED39C959B88F21232237009B5CB1BCFDD8B0065626420EA9EA73AC14A8CF3E9F5B009EBEDA7906D8404FEF961557E4020CD9AA62E0F2
+4CE358CADC1AB2C8D7B21670AD1F49C516D1A4CA856871D969EDED6B898752077F1C9956A9002F45F3C16EB4198E9DE945E2648F23A1E3AAC7ABC4399394FD3C
+0050FEF18DD3C209879CB65B7BF2C731509B9566EB5B4A9F73D0203463FE94EBFF5B62363258BE297838DFC8BD63D85A0031B22E514FE2C121D0E25234B48B40
+4153738F41A48D629E6AE023D4531422465504ED207DE5A578314E51588B443F815DC954D5A29F9C9B4CC77F
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+
+%%EndResource
+[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+0 0 0 0 0 0 0 0 0 0 0 0 0 536 536 250
+278 371 479 500 840 778 208 333 333 389 500 250 333 250 320 500
+500 500 500 500 500 500 500 500 500 250 250 500 500 500 444 683
+778 611 709 774 611 556 763 832 337 333 726 611 946 831 786 604
+786 668 525 613 778 722 1000 667 667 667 333 606 333 500 500 333
+500 553 444 611 479 333 556 582 291 234 556 291 883 582 546 601
+560 395 424 326 603 565 834 516 556 500 333 500 333 500 536 500
+536 278 500 500 1000 500 500 333 1144 525 331 998 536 667 536 536
+278 278 500 500 606 500 1000 333 979 424 331 827 536 500 667 250
+278 500 500 500 500 500 500 333 747 333 500 500 333 747 333 400
+500 320 320 333 647 628 250 333 320 333 500 807 807 807 444 778
+778 778 778 778 778 944 709 611 611 611 611 337 337 337 337 774
+831 786 786 786 786 786 500 833 778 778 778 778 667 604 556 500
+500 500 500 500 500 758 444 479 479 479 479 291 291 291 291 546
+582 546 546 546 546 546 500 546 603 603 603 603 556 601 556 ]
+CorelDrawReencodeVect /_R15-PalatinoLinotype /PalatinoLinotype Z
+%%BeginResource: font Symbol
+%!FontType1-1.0: Symbol 001.003
+%%Creator: Corel PostScript Engine
+10 dict begin
+/FontName /Symbol def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array 0 1 255 {1 index exch /.notdef put} for
+dup 32 /c32 put
+dup 33 /c33 put
+dup 34 /c34 put
+dup 35 /c35 put
+dup 36 /c36 put
+dup 37 /c37 put
+dup 38 /c38 put
+dup 39 /c39 put
+dup 40 /c40 put
+dup 41 /c41 put
+dup 42 /c42 put
+dup 43 /c43 put
+dup 44 /c44 put
+dup 45 /c45 put
+dup 46 /c46 put
+dup 47 /c47 put
+dup 48 /c48 put
+dup 49 /c49 put
+dup 50 /c50 put
+dup 51 /c51 put
+dup 52 /c52 put
+dup 53 /c53 put
+dup 54 /c54 put
+dup 55 /c55 put
+dup 56 /c56 put
+dup 57 /c57 put
+dup 58 /c58 put
+dup 59 /c59 put
+dup 60 /c60 put
+dup 61 /c61 put
+dup 62 /c62 put
+dup 63 /c63 put
+dup 64 /c64 put
+dup 65 /c65 put
+dup 66 /c66 put
+dup 67 /c67 put
+dup 68 /c68 put
+dup 69 /c69 put
+dup 70 /c70 put
+dup 71 /c71 put
+dup 72 /c72 put
+dup 73 /c73 put
+dup 74 /c74 put
+dup 75 /c75 put
+dup 76 /c76 put
+dup 77 /c77 put
+dup 78 /c78 put
+dup 79 /c79 put
+dup 80 /c80 put
+dup 81 /c81 put
+dup 82 /c82 put
+dup 83 /c83 put
+dup 84 /c84 put
+dup 85 /c85 put
+dup 86 /c86 put
+dup 87 /c87 put
+dup 88 /c88 put
+dup 89 /c89 put
+dup 90 /c90 put
+dup 91 /c91 put
+dup 92 /c92 put
+dup 93 /c93 put
+dup 94 /c94 put
+dup 95 /c95 put
+dup 96 /c96 put
+dup 97 /c97 put
+dup 98 /c98 put
+dup 99 /c99 put
+dup 100 /c100 put
+dup 101 /c101 put
+dup 102 /c102 put
+dup 103 /c103 put
+dup 104 /c104 put
+dup 105 /c105 put
+dup 106 /c106 put
+dup 107 /c107 put
+dup 108 /c108 put
+dup 109 /c109 put
+dup 110 /c110 put
+dup 111 /c111 put
+dup 112 /c112 put
+dup 113 /c113 put
+dup 114 /c114 put
+dup 115 /c115 put
+dup 116 /c116 put
+dup 117 /c117 put
+dup 118 /c118 put
+dup 119 /c119 put
+dup 120 /c120 put
+dup 121 /c121 put
+dup 122 /c122 put
+dup 123 /c123 put
+dup 124 /c124 put
+dup 125 /c125 put
+dup 126 /c126 put
+dup 127 /c127 put
+dup 128 /c128 put
+dup 129 /c129 put
+dup 130 /c130 put
+dup 131 /c131 put
+dup 132 /c132 put
+dup 133 /c133 put
+dup 134 /c134 put
+dup 135 /c135 put
+dup 136 /c136 put
+dup 137 /c137 put
+dup 138 /c138 put
+dup 139 /c139 put
+dup 140 /c140 put
+dup 141 /c141 put
+dup 142 /c142 put
+dup 143 /c143 put
+dup 144 /c144 put
+dup 145 /c145 put
+dup 146 /c146 put
+dup 147 /c147 put
+dup 148 /c148 put
+dup 149 /c149 put
+dup 150 /c150 put
+dup 151 /c151 put
+dup 152 /c152 put
+dup 153 /c153 put
+dup 154 /c154 put
+dup 155 /c155 put
+dup 156 /c156 put
+dup 157 /c157 put
+dup 158 /c158 put
+dup 159 /c159 put
+dup 160 /c160 put
+dup 161 /c161 put
+dup 162 /c162 put
+dup 163 /c163 put
+dup 164 /c164 put
+dup 165 /c165 put
+dup 166 /c166 put
+dup 167 /c167 put
+dup 168 /c168 put
+dup 169 /c169 put
+dup 170 /c170 put
+dup 171 /c171 put
+dup 172 /c172 put
+dup 173 /c173 put
+dup 174 /c174 put
+dup 175 /c175 put
+dup 176 /c176 put
+dup 177 /c177 put
+dup 178 /c178 put
+dup 179 /c179 put
+dup 180 /c180 put
+dup 181 /c181 put
+dup 182 /c182 put
+dup 183 /c183 put
+dup 184 /c184 put
+dup 185 /c185 put
+dup 186 /c186 put
+dup 187 /c187 put
+dup 188 /c188 put
+dup 189 /c189 put
+dup 190 /c190 put
+dup 191 /c191 put
+dup 192 /c192 put
+dup 193 /c193 put
+dup 194 /c194 put
+dup 195 /c195 put
+dup 196 /c196 put
+dup 197 /c197 put
+dup 198 /c198 put
+dup 199 /c199 put
+dup 200 /c200 put
+dup 201 /c201 put
+dup 202 /c202 put
+dup 203 /c203 put
+dup 204 /c204 put
+dup 205 /c205 put
+dup 206 /c206 put
+dup 207 /c207 put
+dup 208 /c208 put
+dup 209 /c209 put
+dup 210 /c210 put
+dup 211 /c211 put
+dup 212 /c212 put
+dup 213 /c213 put
+dup 214 /c214 put
+dup 215 /c215 put
+dup 216 /c216 put
+dup 217 /c217 put
+dup 218 /c218 put
+dup 219 /c219 put
+dup 220 /c220 put
+dup 221 /c221 put
+dup 222 /c222 put
+dup 223 /c223 put
+dup 224 /c224 put
+dup 225 /c225 put
+dup 226 /c226 put
+dup 227 /c227 put
+dup 228 /c228 put
+dup 229 /c229 put
+dup 230 /c230 put
+dup 231 /c231 put
+dup 232 /c232 put
+dup 233 /c233 put
+dup 234 /c234 put
+dup 235 /c235 put
+dup 236 /c236 put
+dup 237 /c237 put
+dup 238 /c238 put
+dup 239 /c239 put
+dup 240 /c240 put
+dup 241 /c241 put
+dup 242 /c242 put
+dup 243 /c243 put
+dup 244 /c244 put
+dup 245 /c245 put
+dup 246 /c246 put
+dup 247 /c247 put
+dup 248 /c248 put
+dup 249 /c249 put
+dup 250 /c250 put
+dup 251 /c251 put
+dup 252 /c252 put
+dup 253 /c253 put
+dup 254 /c254 put
+dup 255 /c255 put
+readonly def
+/FontBBox {0 0 0 0} readonly def
+currentdict end
+currentfile eexec
+
+A22DD33CB9A1B84FC323D538B9AE6C6014672C02872FAD31037218C4EC2B7124C58AFC4A0E2584B50A778936CFE1053450FEC35486F87A4DA48EF5124EE42DE6
+9DDB8A5C33C2868DDADC1C9B4725483A678DFD1BEF77D7BDC50D39DB17FF02031F39030455C675716EB1B292EA6078E9937BB936698E457C365396CC5708EAAB
+921AD0271E16D4A5F1689C7D8DEDA69051F9EA8B689EDEA8949F2C93CE777268FD3CE5D1713388D0E33A640C77DFB1D300C88E302BEFDF0083AF060D407FD007
+23D3F76465C679461FC0471E7F6EFFFCB5A8E513C1661D98B93E8667005CB8B30093BCB089336AFAB7D61973B6F27AC993F52C52238826E221A63575C2C867DB
+E9C0264C99B65994DB79F83B4627E129923C7C8B2B18D54F9E0F0F9280A6425EED2E2B7BB29DA8D3D977AE0F4D887F72309ABE6CB09B8D1F5600779F7C13696C
+8F3E4BF69127EC72FD447C37CF4AB75A587241DBD67A93BC2D95C3E730B03ABD098B4875980FDAF138A689459A018531616478E696F4045125DBEE06D2C7FED9
+09F8CA2637B4E370F0A55DAE7CBA60CCF3808B2EB20FB25A3D4CD370443183E3DF4B48B424BE0327D27E7A1567BE7F2193FA79A5EAFF2E1AD5723BA958E0D588
+396F1B7EDC503FC63A9C6B41764F3A67DA9F2B071264C7151A002557252BC817A6F1B1E4F70AF963CBD653C58F0D7C520D2832D0F62A5B88A182DB874D24A338
+1C8A311CE30018EA97ED9B5152E73AF3092E1F1950F2E48E01FDB94F21BE43700D3D5F6FF722D87385AD97
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+
+%%EndResource
+@sv
+%%EndPageSetup
+@rax %Note: Object
+147.40157 756.85039 192.75591 779.52756 @E
+0 J 0 j [] 0 d 0 R 0 @G
+0.00 0.00 0.00 1.00 K
+0 0.50003 0.50003 0.00000 @w
+/$fm 0 def
+147.40157 779.52756 m
+192.75591 779.52756 L
+192.75591 756.85039 L
+147.40157 756.85039 L
+147.40157 779.52756 L
+@c
+S
+
+@rax %Note: Object
+192.75591 768.18841 232.44094 768.18898 @E
+0 J 0 j [] 0 d 0 R 0 @G
+0.00 0.00 0.00 1.00 K
+0 0.50003 0.50003 0.00000 @w
+/$fm 0 def
+228.89480 768.18898 m
+192.75591 768.18841 L
+S
+@j
+0.00 0.00 0.00 1.00 K
+0.00 0.00 0.00 1.00 k
+0 @g
+0 @G
+[] 0 d 0 J 0 j
+0 R 0 O
+0 1.00800 1.00800 0 @w
+232.44094 768.18898 m
+225.38494 765.16498 L
+226.39294 767.18098 226.39294 769.19698 225.38494 771.21298 C
+232.44094 768.18898 L
+f
+@J
+
+@rax %Note: Object
+104.88189 768.18784 147.40157 768.18898 @E
+0 J 0 j [] 0 d 0 R 0 @G
+0.00 0.00 0.00 1.00 K
+0 0.50003 0.50003 0.00000 @w
+/$fm 0 def
+143.85543 768.18841 m
+104.88189 768.18841 L
+S
+@j
+0.00 0.00 0.00 1.00 K
+0.00 0.00 0.00 1.00 k
+0 @g
+0 @G
+[] 0 d 0 J 0 j
+0 R 0 O
+0 1.00800 1.00800 0 @w
+147.40157 768.18841 m
+140.34557 765.16441 L
+141.35357 767.18041 141.35357 769.19641 140.34557 771.21241 C
+147.40157 768.18841 L
+f
+@J
+
+@rax %Note: Object
+232.44094 759.68504 249.44882 776.69291 @E
+0 J 0 j [] 0 d 0 R 0 @G
+0.00 0.00 0.00 1.00 K
+0 0.50003 0.50003 0.00000 @w
+/$fm 0 def
+240.94488 759.68504 m
+236.26091 759.68504 232.44094 763.50501 232.44094 768.18898 c
+232.44094 772.87294 236.26091 776.69291 240.94488 776.69291 c
+245.62885 776.69291 249.44882 772.87294 249.44882 768.18898 c
+249.44882 763.50501 245.62885 759.68504 240.94488 759.68504 c
+@c
+S
+
+@rax %Note: Object
+240.94431 776.69291 240.94545 807.87402 @E
+0 J 0 j [] 0 d 0 R 0 @G
+0.00 0.00 0.00 1.00 K
+0 0.50003 0.50003 0.00000 @w
+/$fm 0 def
+240.94488 780.23906 m
+240.94488 807.87402 L
+S
+@j
+0.00 0.00 0.00 1.00 K
+0.00 0.00 0.00 1.00 k
+0 @g
+0 @G
+[] 0 d 0 J 0 j
+0 R 0 O
+0 1.00800 1.00800 0 @w
+240.94488 776.69291 m
+237.92088 783.74891 L
+239.93688 782.74091 241.95288 782.74091 243.96888 783.74891 C
+240.94488 776.69291 L
+f
+@J
+
+@rax %Note: Object
+249.44882 768.18898 286.53307 768.18954 @E
+0 J 0 j [] 0 d 0 R 0 @G
+0.00 0.00 0.00 1.00 K
+0 0.50003 0.50003 0.00000 @w
+/$fm 0 def
+286.53307 768.18954 m
+249.44882 768.18898 L
+S
+
+@rax 116.22047 774.34072 138.53225 784.33058 @E
+[0.00028346 0.00000000 0.00000000 0.00028346 116.22046819 776.69288497] @tm
+ 0 O 0 @g
+0.00 0.00 0.00 1.00 k
+e
+/_R6-TimesNewRoman 38806.00000 z
+0 0 (\133epb\135) @t
+T
+@rax 202.06772 774.50769 224.37950 784.33058 @E
+[0.00028346 0.00000000 0.00000000 0.00028346 202.06770914 776.69288497] @tm
+ 0 O 0 @g
+0.00 0.00 0.00 1.00 k
+e
+/_R6-TimesNewRoman 38806.00000 z
+0 0 (\133evh\135) @t
+T
+@rax 249.44882 797.18485 266.26054 806.81896 @E
+[0.00028346 0.00000000 0.00000000 0.00028346 249.44880977 799.37004950] @tm
+ 0 O 0 @g
+0.00 0.00 0.00 1.00 k
+e
+/_R6-TimesNewRoman 38806.00000 z
+0 0 (\133ev\135) @t
+T
+@rax 164.40945 763.16910 181.83912 772.99200 @E
+[0.00028346 0.00000000 0.00000000 0.00028346 164.40944280 765.35430271] @tm
+ 0 O 0 @g
+0.00 0.00 0.00 1.00 k
+e
+/_R6-TimesNewRoman 38806.00000 z
+0 0 (\133hb\135) @t
+T
+@rax 264.00813 774.42406 290.60079 784.22513 @E
+[0.00028346 0.00000000 0.00000000 0.00028346 264.00811633 776.77622355] @tm
+ 0 O 0 @g
+0.00 0.00 0.00 1.00 k
+e
+/_R6-TimesNewRoman 38806.00000 z
+0 0 (\133epsv\135) @t
+T
+@rax 150.41764 740.96787 188.28935 752.00655 @E
+[0.00028346 0.00000000 0.00000000 0.00028346 168.03041905 744.05165782] @tm
+ 0 O 0 @g
+0.00 0.00 0.00 1.00 k
+e
+T
+@rax 150.41764 740.96787 188.28935 752.00655 @E
+[0.00028346 0.00000000 0.00000000 0.00028346 168.03041905 744.05165782] @tm
+ 0 O 0 @g
+0.00 0.00 0.00 1.00 k
+e
+/_R15-PalatinoLinotype 38806.00000 z
+-62134 0 (w) @t
+-30436 0 (eights) @t
+T
+@rax 237.69553 763.95742 244.36318 771.90321 @E
+[0.00028346 0.00000000 0.00000000 0.00028346 237.69551886 763.95738938] @tm
+ 0 O 0 @g
+0.00 0.00 0.00 1.00 k
+e
+/Symbol 42332.00000 z
+0 0 (S) @t
+T
+@rax 248.34557 775.69795 253.24611 781.05458 @E
+[0.00028346 0.00000000 0.00000000 0.00028346 248.34556572 775.69792438] @tm
+ 0 O 0 @g
+0.00 0.00 0.00 1.00 k
+e
+/_R6-TimesNewRoman 31750.00000 z
+0 0 (+) @t
+T
+@rax 228.17820 774.90992 232.83269 776.85250 @E
+[0.00028346 0.00000000 0.00000000 0.00028346 228.25331449 776.85247552] @tm
+ 0 O 0 @g
+0.00 0.00 0.00 1.00 k
+e
+/_R6-TimesNewRoman 31750.00000 z
+0 0 (_) @t
+T
+@rax %Note: Object
+286.29921 765.78321 291.96850 771.02362 @E
+0 J 0 j [] 0 d 0 R 0 @G
+0.00 0.00 0.00 1.00 K
+0 0.50003 0.50003 0.00000 @w
+/$fm 0 def
+289.13386 771.02362 m
+290.69518 771.02362 291.96850 769.84668 291.96850 768.40328 c
+291.96850 766.96016 290.69518 765.78321 289.13386 765.78321 c
+287.57254 765.78321 286.29921 766.96016 286.29921 768.40328 c
+286.29921 769.84668 287.57254 771.02362 289.13386 771.02362 c
+@c
+S
+
+@rax %Note: Object
+238.11024 807.87402 243.77953 813.54331 @E
+0 J 0 j [] 0 d 0 R 0 @G
+0.00 0.00 0.00 1.00 K
+0 0.50003 0.50003 0.00000 @w
+/$fm 0 def
+240.94488 813.54331 m
+242.50620 813.54331 243.77953 812.26998 243.77953 810.70838 c
+243.77953 809.14734 242.50620 807.87402 240.94488 807.87402 c
+239.38356 807.87402 238.11024 809.14734 238.11024 810.70838 c
+238.11024 812.26998 239.38356 813.54331 240.94488 813.54331 c
+@c
+S
+
+@rax %Note: Object
+99.21260 765.35433 104.72882 771.02362 @E
+0 J 0 j [] 0 d 0 R 0 @G
+0.00 0.00 0.00 1.00 K
+0 0.50003 0.50003 0.00000 @w
+/$fm 0 def
+101.97071 771.02362 m
+103.48980 771.02362 104.72882 769.75030 104.72882 768.18869 c
+104.72882 766.62765 103.48980 765.35433 101.97071 765.35433 c
+100.45162 765.35433 99.21260 766.62765 99.21260 768.18869 c
+99.21260 769.75030 100.45162 771.02362 101.97071 771.02362 c
+@c
+S
+
+@rax %Note: Object
+121.88976 765.35433 127.55906 771.02362 @E
+0 J 0 j [] 0 d 0 R 0 @G
+0.00 0.00 0.00 1.00 K
+0 0.50003 0.50003 0.00000 @w
+/$fm 0 def
+121.88976 765.35433 m
+127.55906 771.02362 L
+S
+
+@rax 119.05512 748.82891 140.76567 758.62998 @E
+[0.00028346 0.00000000 0.00000000 0.00028346 119.05511376 751.18107488] @tm
+ 0 O 0 @g
+0.00 0.00 0.00 1.00 k
+e
+/_R6-TimesNewRoman 38806.00000 z
+0 0 (\133Mp\135) @t
+T
+ @gs spg @gr
+%%PageTrailer
+@rs
+@rs
+
+%%Page: 2 2
+%LogicalPage: 2
+%%BeginPageSetup
+@sv
+@sm
+@sv
+%%EndPageSetup
+%%PageTrailer
+@rs
+@rs
+%%Trailer
+@EndSysCorelDict
+end
+%%DocumentSuppliedResources: procset wCorel10Dict 10.0 0
+%%+ font TimesNewRoman
+%%+ font PalatinoLinotype
+%%+ font Symbol
+%%EOF \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/pstool/trial2.tex b/Master/texmf-dist/doc/latex/pstool/trial2.tex
new file mode 100644
index 00000000000..e1f0a782eda
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pstool/trial2.tex
@@ -0,0 +1,2 @@
+
+\psfrag{[hb]}{$H_\b$}%
diff --git a/Master/texmf-dist/source/latex/pstool/pstool.tex b/Master/texmf-dist/source/latex/pstool/pstool.tex
index cf7901521ef..29ed84614f4 100644
--- a/Master/texmf-dist/source/latex/pstool/pstool.tex
+++ b/Master/texmf-dist/source/latex/pstool/pstool.tex
@@ -2,10 +2,10 @@
\begin{filecontents*}{README.txt}
__________________
The pstool package
-v1.3
+v1.5
A package like "pst-pdf" for processing PostScript graphics
-with psfrag labels within pdfLaTeX documets. The difference
+with psfrag labels within pdfLaTeX documents. The difference
with this package is that every graphic is compiled individually,
drastically speeding up compilation time when only a single
figure needs re-processing.
@@ -20,11 +20,24 @@ except pstool.ins (and the PDF file, obviously).
Please see the PDF documentation for further information.
Will Robertson & Zebb Prime
-Copyright 2008-2009
+Copyright 2008-2013
____________________
Brief change history
+v1.5, February 2013:
+ - Fix =/# mixup in Windows ps2pdf options.
+ - Check the .tex file for newness when regenerating figures.
+ - Add [macro-file=...] for a global file to retrieve psfrag macros
+ (default is "\jobname-pstool.tex").
+ Thanks to Heinrich Kruger for suggestions for the above.
+ - Cross-references and citations within external graphics are now supported.
+
+v1.4, November 2010:
+ - More robust parsing of the main input file to read in the preamble.
+ Therefore, \EndPreamble is now required much less often.
+ - Apparently unreleased to CTAN, oops :)
+
v1.3, July 2009:
- [bitmap] option to control compression of bitmap graphics,
- Package options may now be set anywhere with \pstoolsetup{},
@@ -32,23 +45,42 @@ v1.3, July 2009:
\end{filecontents*}
-\begin{filecontents}{pstool.sty}
-\ProvidesPackage{pstool}[2009/07/17 v1.3
+
+
+
+\begin{filecontents*}{pstool.sty}
+% TODO: convert this package into expl3 syntax (will save many lines of code).
+
+\ProvidesPackage{pstool}[2013/02/11 v1.5
Wrapper for processing PostScript/psfrag figures]
-% External packages
-\RequirePackage{%
- catchfile,color,ifpdf,ifplatform,
- graphicx,pdftexcmds,psfrag,suffix,xkeyval}
+% External packages:
+\RequirePackage{
+ catchfile,color,ifpdf,ifplatform,filemod,
+ graphicx,psfrag,suffix,trimspaces,xkeyval,expl3
+}
+
+% Add an additional command before trimspaces.sty is updated formally:
+\providecommand*{\trim@multiple@spaces@in}[1]{%
+ \let\trim@temp#1%
+ \trim@spaces@in#1%
+ \ifx\trim@temp#1%
+ \else
+ \expandafter\trim@multiple@spaces@in\expandafter#1%
+ \fi
+}
+
+% \subsection{Allocations}
+\expandafter\newif\csname if@pstool@pdfcrop@\endcsname
+\expandafter\newif\csname if@pstool@verbose@\endcsname
+\expandafter\newif\csname if@pstool@write@aux\endcsname
-% Allocations
-\newif\if@pstool@pdfcrop@
-\newif\if@pstool@verbose@
\newwrite\pstool@out
+\newread\pstool@mainfile@ior
+\newread\pstool@auxfile@ior
-% These are cute
-\providecommand\OnlyIfFileExists[2]{\IfFileExists{#1}{#2}{}}
-\providecommand\NotIfFileExists[2]{\IfFileExists{#1}{}{#2}}
+% Macro used to store the name of the graphic's macro file:
+\let\pstool@tex\@empty
% \subsection{Package options}
@@ -78,51 +110,63 @@ v1.3, July 2009:
\ExecuteOptionsX{mode=batch}
\DeclareOptionX{cleanup}{\def\pstool@rm@files{#1}}
-\ExecuteOptionsX{cleanup={.tex,.dvi,.ps,.pdf,.log,.aux}}
+\ExecuteOptionsX{cleanup={.tex,.dvi,.ps,.pdf,.log}}
\DeclareOptionX{suffix}{\def\pstool@suffix{#1}}
\ExecuteOptionsX{suffix={-pstool}}
-% There is an implicit |\space| after the bitmap options.
+% There is an implicit \cs{space} after the bitmap options.
\define@choicekey*{pstool.sty}{bitmap}
[\@tempa\@tempb]{auto,lossless,lossy}{%
\ifcase\@tempb
\let\pstool@bitmap@opts\@empty
\or
\def\pstool@bitmap@opts{%
- "-dAutoFilterColorImages=false"
- "-dAutoFilterGrayImages=false"
- "-dColorImageFilter=/FlateEncode"
- "-dGrayImageFilter=/FlateEncode" % space
+ -dAutoFilterColorImages=false
+ -dAutoFilterGrayImages=false
+ -dColorImageFilter=/FlateEncode
+ -dGrayImageFilter=/FlateEncode % space
}
\or
\def\pstool@bitmap@opts{%
- "-dAutoFilterColorImages=false"
- "-dAutoFilterGrayImages=false"
- "-dColorImageFilter=/DCTEncode"
- "-dGrayImageFilter=/DCTEncode" % space
+ -dAutoFilterColorImages=false
+ -dAutoFilterGrayImages=false
+ -dColorImageFilter=/DCTEncode
+ -dGrayImageFilter=/DCTEncode % space
}
\fi
}
\ExecuteOptionsX{bitmap=lossless}
-% \HideAllDefining
-% \Define*{latex-options}
-% \Define*{dvips-options}
-% \Define*{ps2pdf-options}
-% \Define*{pdfcrop-options}
\DeclareOptionX{latex-options}{\def\pstool@latex@opts{#1}}
\DeclareOptionX{dvips-options}{\def\pstool@dvips@opts{#1}}
\DeclareOptionX{ps2pdf-options}{\def\pstool@pspdf@opts{#1}}
\DeclareOptionX{pdfcrop-options}{\def\pstool@pdfcrop@opts{#1}}
-% \ResumeAllDefining
+
\ExecuteOptionsX{
latex-options={},
dvips-options={},
- ps2pdf-options={"-dPDFSETTINGS=/prepress"},
+ ps2pdf-options={-dPDFSETTINGS=/prepress},
pdfcrop-options={}
}
+\DeclareOptionX{macro-file}{%
+ \IfFileExists{#1}
+ {\def\pstool@macrofile{#1}}
+ {%
+ \let\pstool@macrofile\@empty
+ \PackageError{pstool}{^^J\space\space%
+ No file `#1' found for "macro-file" package option.^^J
+ This warning occurred}
+ }
+}
+
+% Default:
+\IfFileExists{\jobname-pstool.tex}
+ {\edef\pstool@macrofile{\jobname-pstool.tex}}
+ {\let\pstool@macrofile\@empty}
+
+
\ifpdf
\ifshellescape\else
\ExecuteOptionsX{process=none}
@@ -141,10 +185,9 @@ v1.3, July 2009:
}
% \section{Macros}
-
% Used to echo information to the console output.
-% Can't use |\typeout| because it's asynchronous with
-% any |\immediate\write18| processes (for some reason).
+% Can't use \cs{typeout} because it's asynchronous with
+% any \cs{immediate}\cs{write18} processes (for some reason).
\def\pstool@echo#1{%
\if@pstool@verbose@
\pstool@echo@verbose{#1}%
@@ -160,29 +203,32 @@ v1.3, July 2009:
% Command line abstractions between platforms:
\edef\pstool@cmdsep{\ifwindows\string&\else\string;\fi\space}
\edef\pstool@rm@cmd{\ifwindows del \else rm -- \fi}
+\edef\pstool@cp@cmd{\ifwindows copy \else cp -- \fi}
-% Delete a file if it exists:\\
-% |#1|: path\\
-% |#2|: filename
+% Delete a file if it exists:
+% #1: path
+% #2: filename
\newcommand\pstool@rm[2]{%
- \OnlyIfFileExists{#1#2}{%
+ \IfFileExists{#1#2}{%
\immediate\write18{%
cd "#1"\pstool@cmdsep\pstool@rm@cmd "#2"
}%
- }%
+ }{}%
}
% Generic function to execute a command on the shell and pass its exit status back into \LaTeX. Any number of \cmd\pstool@exe\ statements can be made consecutively followed by \cmd\pstool@endprocess, which also takes an argument. If \emph{any} of the shell calls failed, then the execution immediately skips to the end and expands \cmd\pstool@error\ instead of the argument to \cmd\pstool@endprocess.
-%
-% |#1|: `name' of process\\
-% |#2|: relative path where to execute the command\\
-% |#3|: the command itself
+% #1: `name' of process
+% #2: relative path where to execute the command
+% #3: the command itself
\newcommand\pstool@exe[3]{%
\pstool@echo{^^J=== pstool: #1 ===}%
\pstool@shellexecute{#2}{#3}%
\pstool@retrievestatus{#2}%
\ifnum\pstool@status > \z@
- \PackageWarning{pstool}{Execution failed during process:^^J\space\space#3^^JThis warning occurred}%
+ \PackageWarning{pstool}{%
+ Execution failed during process:^^J\space\space
+ #3^^JThis warning occurred%
+ }%
\expandafter\pstool@abort
\fi
}
@@ -191,9 +237,18 @@ v1.3, July 2009:
\def\pstool@error{%
\fbox{%
\parbox{0.8\linewidth}{%
- \color{red}\raggedright\ttfamily\scshape\small
- An error occured processing graphic
- \upshape`\pstool@path\pstool@filestub'%
+ \color{red}\centering\ttfamily\scshape\small
+ An error occured processing graphic:\\
+ \upshape`%
+ \detokenize\expandafter{\pstool@path}%
+ \detokenize\expandafter{\pstool@filestub}.eps%
+ '\\\bigskip
+ \tiny
+ Check the log file for compilation errors:\\
+ `%
+ \detokenize\expandafter{\pstool@path}%
+ \detokenize\expandafter{\pstool@filestub}-pstool.log%
+ '\\
}%
}%
}
@@ -201,7 +256,7 @@ v1.3, July 2009:
\def\pstool@abort#1\pstool@endprocess{\pstool@error\@gobble}
\let\pstool@endprocess\@firstofone
-% It is necessary while executing commands on the shell to write the exit status to a temporary file to test for failures in processing. (If all versions of |pdflatex| supported input pipes, things might be different.)
+% It is necessary while executing commands on the shell to write the exit status to a temporary file to test for failures in processing. (If all versions of \texttt{pdflatex} supported input pipes, things might be different.)
\def\pstool@shellexecute#1#2{%
\immediate\write18{%
cd "#1" \pstool@cmdsep
@@ -221,8 +276,8 @@ v1.3, July 2009:
}
\def\pstool@statusfile{pstool-statusfile.txt}
-% Read the exit status from the temporary file and delete it.\\
-% |#1| is the path\\
+% Read the exit status from the temporary file and delete it.
+% #1 is the path
% Status is recorded in \cmd\pstool@status.
\def\pstool@retrievestatus#1{%
\CatchFileEdef{\pstool@status}{#1\pstool@statusfile}{}%
@@ -236,17 +291,6 @@ v1.3, July 2009:
}
\def\pstool@statusfail{\par }% what results when \TeX\ reads an empty file
-% \subsection{File age detection}
-\def\pstool@IfnewerEPS{%
- \ifnum\pdf@strcmp{\pdf@filemoddate{\pstool@path\pstool@filestub.pdf}}
- {\pdf@filemoddate{\pstool@path\pstool@filestub.eps}}
- < \z@
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
-}
-
% Grab filename and filepath. Always need a relative path to a filename even if it's in the same directory.
\def\pstool@getpaths#1{%
\filename@parse{#1}%
@@ -258,8 +302,13 @@ v1.3, July 2009:
\let\pstool@filestub\filename@base
}
+% The filename of the figure stripped of its path, if any:
+% (analogous to standard \cs{jobname})
+\def\pstool@jobname{\pstool@filestub\pstool@suffix}
+
+
% \section{Command parsing}
-% User input is \cmd\pstool\ (with optional |*| or |!| suffix) which turns into one of the following three macros depending on the mode.
+% User input is \cmd\pstool\ (with optional \texttt{*} or \texttt{!} suffix) which turns into one of the following three macros depending on the mode.
\newcommand\pstool@alwaysprocess[3][]{%
\pstool@getpaths{#2}%
@@ -280,23 +329,50 @@ v1.3, July 2009:
}
\fi
-% For regular operation, which processes the figure only if
-% the command is starred, or the PDF doesn't exist.
-\newcommand\pstool@maybeprocess[3][]{%
- \pstool@getpaths{#2}%
- \IfFileExists{#2.pdf}{%
- \pstool@IfnewerEPS{% needs info from |\pstool@getpaths|
- \pstool@process{#1}{#3}%
- }{%
- \pstool@includegraphics{#2}%
- }%
- }{%
- \pstool@process{#1}{#3}%
- }%
-}
+% Process the figure when:
+% -- the PDF file doesn't exist, or
+% -- the EPS is newer than the PDF, or
+% -- the TeX file is new than the PDF.
+\ExplSyntaxOn
+\newcommand\pstool@maybeprocess[3][]
+ {
+ \pstool_if_should_process:nTF {#2}
+ { \pstool@process{#1}{#3} }
+ { \pstool@includegraphics{#2} }
+ }
+
+\prg_set_conditional:Nnn \pstool_if_should_process:n {TF}
+ {
+ \pstool@getpaths{#1}
+
+ \file_if_exist:nF { #1.pdf }
+ { \use_i_delimit_by_q_stop:nw \prg_return_true: }
+
+ \filemodCmp {\pstool@path\pstool@filestub.eps}
+ {\pstool@path\pstool@filestub.pdf}
+ { \use_i_delimit_by_q_stop:nw \prg_return_true: } {}
+
+ \exp_args:Nx \clist_map_inline:nn { \pstool@macrofile , \pstool@tex }
+ % empty entries are ignored in clist mappings, so no need to filter here
+ {
+ \filemodCmp {##1} {\pstool@path\pstool@filestub.pdf}
+ {
+ \clist_map_break:n { \use_i_delimit_by_q_stop:nw \prg_return_true: }
+ }
+ {}
+ }
+
+ \filemodCmp {\pstool@path\pstool@filestub.tex}
+ {\pstool@path\pstool@filestub.pdf}
+ { \use_i_delimit_by_q_stop:nw \prg_return_true: } {}
+
+ \use_i_delimit_by_q_stop:nw \prg_return_false:
+ \q_stop
+ }
+\ExplSyntaxOff
% \section{User commands}
-% Finally, define \cmd\pstool\ as appropriate for the mode: (|all|, |none|, |auto|, respectively)
+% Finally, define \cmd\pstool\ as appropriate for the mode: (\texttt{all}, \texttt{none}, \texttt{auto}, respectively)
\ifpdf
\newcommand\pstool{%
\ifcase\pstool@process@choice\relax
@@ -327,9 +403,6 @@ v1.3, July 2009:
% \section{The figure processing}
-% \cmd\pstool@filestub\ is the filename of the figure stripped of its path (if any)
-\def\pstool@jobname{\pstool@filestub\pstool@suffix}
-
% And this is the main macro.
\newcommand\pstool@process[2]{%
\begingroup
@@ -346,10 +419,14 @@ v1.3, July 2009:
-interaction=\pstool@mode\space
\pstool@latex@opts\space
"\pstool@jobname.tex"}%
-% Execute |dvips| in quiet mode if |latex| is not run in (non/error)stop mode:
+% Execute \texttt{dvips} in quiet mode if \texttt{latex} is not run in (non/error)stop mode:
\pstool@exe{dvips}{\pstool@path}{%
dvips \if@pstool@verbose@\else -q \fi -Ppdf
\pstool@dvips@opts\space "\pstool@jobname.dvi"}%
+% Pre-process \texttt{ps2pdf} options for Windows (sigh):
+ \pstool@pspdf@opts@preprocess \pstool@bitmap@opts
+ \pstool@pspdf@opts@preprocess \pstool@pspdf@opts
+% Generate the PDF:
\if@pstool@pdfcrop@
\pstool@exe{ps2pdf}{\pstool@path}{%
ps2pdf \pstool@bitmap@opts \pstool@pspdf@opts \space
@@ -362,53 +439,149 @@ v1.3, July 2009:
ps2pdf \pstool@bitmap@opts \pstool@pspdf@opts \space
"\pstool@jobname.ps" "\pstool@filestub.pdf"}%
\fi
+% Finish up: (implies success!)
\pstool@endprocess{%
\pstool@cleanup
- \pstool@includegraphics{%
- \pstool@path\pstool@filestub}%
+ \pstool@includegraphics{\pstool@path\pstool@filestub}%
+% Emulate \cs{include} (sort of) and have the main document load the auxiliary aux file, in a manner of speaking:
+ \pstool@write@aux
}%
\pstool@echo@verbose{^^J=== pstool: end processing ===^^J}%
\endgroup
}
+\newcommand\pstool@write@aux{%
+ \endlinechar=-1
+ \@tempswatrue
+ \@pstool@write@auxfalse
+ \in@false
+ \openin \pstool@auxfile@ior "\pstool@path\pstool@jobname.aux"\relax
+ \@whilesw \if@tempswa \fi {%
+ \readline \pstool@auxfile@ior to \@tempa
+ \ifeof \pstool@auxfile@ior
+ \@tempswafalse
+ \else
+ \edef\@tempb{\detokenize\expandafter{\pstool@auxmarker@text/}}%
+ \ifx\@tempa\@tempb
+ \@tempswafalse
+ \else
+ \if@pstool@write@aux
+ \immediate\write\@mainaux{\unexpanded\expandafter{\@tempa}}%
+ \fi
+ \edef\@tempb{\detokenize\expandafter{\pstool@auxmarker@text*}}%
+ \ifx\@tempa\@tempb
+ \@pstool@write@auxtrue
+ \fi
+ \fi
+ \fi
+ }
+ \closein \pstool@auxfile@ior
+}
+
+\ExplSyntaxOn
+\cs_new:Npn \pstool@pspdf@opts@preprocess #1
+ {
+ \ifwindows
+ \exp_args:NNnx \tl_replace_all:Nnn #1 {=} { \cs_to_str:N \# }
+ \fi
+ }
+\ExplSyntaxOff
+
+% For what's coming next.
+\edef\@begindocument@str{\detokenize\expandafter{\string\begin{document}}}
+\edef\@endpreamble@str{\string\EndPreamble}
+\def\in@first#1#2{\in@{NEVEROCCUR!#1}{NEVEROCCUR!#2}}
+
+% We need to cache the aux file, so here goes.
+% This is because the aux file is cleared for writing after \cs{begin{document}}.
+\IfFileExists{\jobname.oldaux}{\immediate\write18{\pstool@rm@cmd \jobname.oldaux}}{}
+\immediate\write18{\pstool@cp@cmd \jobname.aux \jobname.oldaux}
+\AtEndDocument{\immediate\write18{\pstool@rm@cmd \jobname.oldaux}}
+
+\edef\pstool@auxmarker#1{\string\@percentchar\space <#1PSTOOLLABELS>}
+\edef\pstool@auxmarker@text#1{\@percentchar <#1PSTOOLLABELS>}
+
% The file that is written for processing is set up to read the preamble of the original document and set the graphic on an empty page (cropping to size is done either here with \pkg{preview} or later with \pkg{pdfcrop}).
\def\pstool@write@processfile#1#2#3{%
+% Put down a label so we can pass through the current page number:
+ \edef\pstool@label{pstool-\pstool@path\pstool@filestub}%
+ \protected@write\@auxout{}%
+ {\string\newlabel{\pstool@label}{{\@currentlabel}{\the\c@page}}}%
\immediate\openout\pstool@out #2\pstool@suffix.tex\relax
- \immediate\write\pstool@out{%
-% Input the main document; redefine the document environment so only the preamble is read:
- \unexpanded{%
- \pdfoutput=0^^J% force DVI mode if not already
- \let\origdocument\document^^J%
- \let\EndPreamble\endinput^^J%
- \def\document{\endgroup\endinput}^^J%
- }%
- \noexpand\input{\jobname}^^J%
+% And copy the main file's bbl file too:
+% (necessary for biblatex)
+ \IfFileExists{\jobname.bbl}{%
+ \IfFileExists{\pstool@path\pstool@jobname.bbl}{%
+ \immediate\write18{\pstool@rm@cmd \pstool@path\pstool@jobname.bbl}%
+ }{}%
+ }{}%
+\immediate\write18{\pstool@cp@cmd \jobname.bbl \pstool@path\pstool@jobname.bbl}%
%
-% Now the preamble of the process file: (restoring document's original meaning; empty \cmd\pagestyle\ removes the page number)
+% Scan the main document line by line; print preamble into auxiliary file until the document begins or \cs{EndPreamble} is found:
+ \endlinechar=-1
+ \def\@tempa{\pdfoutput=0\relax}%
+ \in@false
+ \openin\pstool@mainfile@ior "\jobname"\relax
+ \@whilesw \unless\ifin@ \fi {%
+ \immediate\write\pstool@out{\unexpanded\expandafter{\@tempa}}%
+ \readline\pstool@mainfile@ior to\@tempa
+ \let\@tempc\@tempa
+ \trim@multiple@spaces@in\@tempa
+ \expandafter\expandafter\expandafter\in@first
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@begindocument@str
+ \expandafter}%
+ \expandafter{\@tempa}%
+ \unless\ifin@
+ \expandafter\expandafter\expandafter\in@first
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@endpreamble@str
+ \expandafter}%
+ \expandafter{\@tempa}%
+ \fi
+ }
+ \closein\pstool@mainfile@ior
+%
+% Now the preamble of the process file:
+ \immediate\write\pstool@out{%
\if@pstool@pdfcrop@\else
\noexpand\usepackage[active,tightpage]{preview}^^J%
\fi
\unexpanded{%
- \let\document\origdocument^^J%
- \pagestyle{empty}^^J%
+ \pagestyle{empty}^^J^^J% remove the page number
}%
+ \noexpand\makeatletter^^J%
+% Sort out the page numbering:
+ \expandafter\ifx\csname r@\pstool@label\endcsname\relax\else
+ \def\noexpand\thepage{\unexpanded\expandafter{\thepage}}^^J%
+ \noexpand\setcounter{page}{%
+ \expandafter\expandafter\expandafter
+ \@secondoftwo\csname r@\pstool@label\endcsname
+ }^^J%
+ \fi
%
% And the document body to place the graphic on a page of its own:
+ \noexpand\@input{\jobname.oldaux}^^J^^J%
+ \noexpand\begin{document}^^J%
+ \unexpanded{\immediate\write\@mainaux}{\pstool@auxmarker*}^^J%
+ \noexpand\makeatother^^J%
\unexpanded{%
- \begin{document}^^J%
\centering\null\vfill^^J%
}%
+ ^^J%
\if@pstool@pdfcrop@\else
\noexpand\begin{preview}^^J%
\fi
- \unexpanded{#3^^J}% this is the "psfrag" material
+ \unexpanded{#3^^J}
\noexpand\includegraphics
[\unexpanded\expandafter{\XKV@rm}]
{\pstool@filestub}^^J%
\if@pstool@pdfcrop@\else
\noexpand\end{preview}^^J%
\fi
- \unexpanded{\vfill\end{document}}^^J%
+ ^^J%
+ \unexpanded{\vfill^^J^^J\makeatletter^^J\immediate\write\@mainaux}{\pstool@auxmarker/}^^J%
+ \unexpanded{\makeatother^^J\end{document}}^^J%
}%
\immediate\closeout\pstool@out
}
@@ -422,10 +595,9 @@ v1.3, July 2009:
\providecommand\EndPreamble{}
% \section{User commands}
-%
-% These all support the suffixes |*| and |!|, so each user command is defined as a wrapper to \cmd\pstool.
+% These all support the suffixes \texttt{*} and \texttt{!}, so each user command is defined as a wrapper to \cmd\pstool.
-% for EPS figures with psfrag:
+% For EPS figures with psfrag:
\newcommand\psfragfig[2][]{\pstool@psfragfig{#1}{#2}{}}
\WithSuffix\newcommand\psfragfig*[2][]{%
\pstool@psfragfig{#1}{#2}{*}%
@@ -434,7 +606,7 @@ v1.3, July 2009:
\pstool@psfragfig{#1}{#2}{!}%
}
-% Parse optional \<input definitions>
+% Parse optional input definitions:
\newcommand\pstool@psfragfig[3]{%
\@ifnextchar\bgroup{%
\pstool@@psfragfig{#1}{#2}{#3}%
@@ -443,19 +615,21 @@ v1.3, July 2009:
}%
}
-% Search for both \<filename> and \<filename>|-psfrag| inputs.
+% Search for both `filename' and `filename'-psfrag inputs.
%
-% |#1|: possible graphicx options\\
-% |#2|: graphic name (possibly with path)\\
-% |#3|: |\pstool| suffix (i.e., |!| or |*| or \<empty>)\\
-% |#4|: possible \pkg{psfrag} (or other) macros
+% #1: possible graphicx options
+% #2: graphic name (possibly with path)
+% #3: \cs{pstool} suffix (i.e., \texttt{!} or \texttt{*} or `empty')
+% #4: possible \pkg{psfrag} (or other) macros
\newcommand\pstool@@psfragfig[4]{%
% Find the .eps file to use.
\IfFileExists{#2-psfrag.eps}{%
\edef\pstool@eps{#2-psfrag}%
- \OnlyIfFileExists{#2.eps}{%
- \PackageWarning{pstool}{Graphic "#2.eps" exists but "#2-psfrag.eps" is being used}%
- }%
+ \IfFileExists{#2.eps}{%
+ \PackageWarning{pstool}{%
+ Graphic "#2.eps" exists but "#2-psfrag.eps" is being used%
+ }%
+ }{}%
}{%
\IfFileExists{#2.eps}{%
\edef\pstool@eps{#2}%
@@ -470,42 +644,43 @@ v1.3, July 2009:
% Find the .tex file to use.
\IfFileExists{#2-psfrag.tex}{%
\edef\pstool@tex{#2-psfrag.tex}%
- \OnlyIfFileExists{#2.tex}{%
+ \IfFileExists{#2.tex}{%
\PackageWarning{pstool}{%
File "#2.tex" exists that may contain macros
for "\pstool@eps.eps"^^J%
But file "#2-psfrag.tex" is being used instead.%
}%
- }%
+ }{}%
}{%
\IfFileExists{#2.tex}{%
\edef\pstool@tex{#2.tex}%
}{%
- \let\pstool@tex\@empty
\PackageWarning{pstool}{%
No file "#2.tex" or "#2-psfrag.tex" can be found
that may contain macros for "\pstool@eps.eps"%
}%
}%
}%
- \ifx\pstool@tex\@empty
- \pstool#3[#1]{\pstool@eps}{#4}%
- \else
- \expandafter\pstool@@@psfragfig
- \expandafter{\pstool@tex}{#3[#1]}{#4}%
+ % Perform the actual processing step, skipping it entirely if an EPS file hasn't been found.
+ % (In which case an error would have been called above; this is to clean up nicely in scrollmode, for example.)
+ \ifx\pstool@eps\@undefined\else
+ \edef\@tempa{%
+ \unexpanded{\pstool#3[#1]}{\pstool@eps}{%
+ \ifx\pstool@macrofile\@empty\else
+ \@percentchar Input main macro file:^^J
+ \unexpanded{\csname @input\endcsname}{\pstool@macrofile}%
+ \fi
+ \ifx\pstool@tex\@empty\else
+ \@percentchar Input macro file for this graphic:^^J
+ \unexpanded{\csname @input\endcsname}{\pstool@tex}%
+ \fi
+ \unexpanded{#4}%
+ }%
+ }\@tempa
\fi
}
-
-% Break out the separate function in order to expand |\pstool@tex| before writing it.
-\newcommand\pstool@@@psfragfig[3]{%
- \pstool#2{\pstool@eps}{%
- \csname @input\endcsname{#1}%
- #3%
- }%
-}
-
-% That's it.
-\end{filecontents}
+% \centerline{\itshape ---The End---}
+\end{filecontents*}
%%%%%%%%%1%%%%%%%%%2%%%%%%%%%3%%%%%%%%%4%%%%%%%%%5
@@ -529,17 +704,16 @@ v1.3, July 2009:
\makeatletter
-\documentclass{article}
-
+\documentclass{ltxdoc}
\usepackage[rm,medium]{titlesec}
\usepackage{xcolor}
\usepackage[colorlinks,linktocpage]{hyperref}
-\usepackage{gmdoc}
-\usepackage{gmverb}
-\dekclubs
-\stanzaskip=\bigskipamount
-\CodeSpacesGrey
+%\usepackage{gmdoc}
+%\usepackage{gmverb}
+%\dekclubs
+%\stanzaskip=\bigskipamount
+%\CodeSpacesGrey
\usepackage{enumitem}
\setlist{noitemsep}
@@ -572,6 +746,8 @@ v1.3, July 2009:
\linespread{1.1}
\frenchspacing
+\def\partname{Part}
+
\GetFileInfo{pstool.sty}
\begin{document}
{\addtocontents{toc}{\protect\begin{varwidth}[t]{\tocwidthA\linewidth}}}
@@ -616,33 +792,40 @@ Load the package as usual; no package options are required by default, but there
Note that you do not need to load \pkg{psfrag} separately.
You also do not need to load \pkg{graphicx} separately, but if you do so, ensure that you do \emph{not} include driver information (such as |[pdftex]|); this will play havoc with \pkg{pstool}'s automatic processing stage.
-The generic command provided by this package is\par
-{\centering
- \cmd\pstool\ \arg[options] \arg{filename} \arg{input definitions}
-\par}
-It converts the graphic \<filename>|.eps| to \<filename>|.pdf| through a unique \DVI$\to$\PS$\to$\PDF\ process for each graphic, using the preamble of the main document.
-The resulting graphic is then inserted into the document, with \<options> consisting of options for \pkg{graphicx} (e.g., \texttt{angle}, \texttt{scale}) or for \pkg{pstool} (as described later in Section~\ref{pkgopt}).
-Note that these optional arguments take effect in the \emph{processing stage}; if you change the \<options>, you must manually re-process the figure.
-The third argument to \cmd\pstool\ allows arbitrary \<input definitions> (such as \cmd\psfrag\ directives) to be inserted before the figure as it is processed.
+\section{User commands}
-The command \cmd\pstool\ can take an optional |*| or |!| suffix to change the behaviour of the command:
+The low-level generic command provided by this package is
\begin{description}
-\item[\cs{pstool}] Process the graphic \<filename>|.eps| if \<filename>|.pdf| does not already exist, or if the \EPS\ file is \emph{newer} than the \PDF;
-\item[\cs{pstool*}] Always process this figure; and,
-\item[\cs{pstool!}] Never process this figure.
+ \item[\cmd\pstool\ \meta{suffix} \oarg{options} \marg{filename} \marg{input definitions}]
\end{description}
-The behaviour in these three cases can be overridden globally by the package option \pkgopt{process} as described in section~\ref{process}.
+It converts the graphic \meta{filename}|.eps| to \meta{filename}|.pdf| with \pkg{psfrag} macros in \meta{filename}|.tex| through a unique \DVI$\to$\PS$\to$\PDF\ process for each graphic, using the preamble of the main document.
+The resulting graphic is then inserted into the document, with \meta{options} consisting of options for \pkg{graphicx} (e.g., \texttt{angle}, \texttt{scale}) or for \pkg{pstool} (as described later in Section~\ref{pkgopt}).
+Note that these optional arguments take effect in the \emph{processing stage}; if you change the \meta{options}, you must manually re-process the figure.
+The third argument to \cmd\pstool\ allows arbitrary \meta{input definitions} (such as \cmd\psfrag\ directives) to be inserted before the figure as it is processed.
+
+By default, \cs{pstool} processes the graphic \meta{filename}|.eps| if \meta{filename}|.pdf| does not already exist, or if the \EPS\ file is \emph{newer} than the \PDF.
+Additionally, if one or more macro files are associated with the graphic, they are also checked whether they have changed since the \PDF\ was generated.
+The macro file(s) can be defined per-graphic as for the \cs{psfragfig} command (see below), and/or globally as for the \pkgopt{macro-file=...} package option described in Section~\ref{macrofile}.
+
+The \cmd\pstool\ command can take an optional |*| or |!| suffix to change its behaviour:
+\begin{description}
+\item[\cs{pstool*}] Always process the figure;
+\item[\cs{pstool!}] Never process the figure.
+\end{description}
+The behaviour in all three cases can be overridden globally by the package option \pkgopt{process} as described in section~\ref{process}.
+
+\subsection{The main \cs{psfragfig} command}
-It is useful to define higher-level commands based on \cmd\pstool\ for including specific types of \EPS\ graphics that take advantage of \pkg{psfrag}. As an example, this package defines the following command, which also supports the |*| or |!| suffixes described above.
+It is useful to define higher-level commands based on \cmd\pstool\ for including specific types of \EPS\ graphics that take advantage of \pkg{psfrag}. The \pkg{pstool} package defines the following wrapper command \cmd\psfragfig, which also supports the |*| or |!| suffixes described above.
\begin{description}
-\item[{\cmd\psfragfig\arg[opts]\arg{filename}}]
-This is the catch-all macro to support a wide range of graphics naming schemes. It inserts an \EPS\ file named either \<filename>|-psfrag.eps| or \<filename>|.eps| (in that order of preference), and uses \pkg{psfrag} definitions contained within either \<filename>|-psfrag.tex| or \<filename>|.tex|.
+\item[{\cmd\psfragfig\ \meta{suffix} \oarg{opts} \marg{filename}}]
\end{description}
-This command can be used to insert figures produced by the \textsc{Mathematica} package \pkg{MathPSfrag} or the \textsc{Matlab} package \pkg{matlabfrag}. \cmd\psfragfig\ also accepts an optional braced argument:
+This catch-all macro is designed to support a wide range of graphics naming schemes. It inserts an \EPS\ file named either \meta{filename}|-psfrag.eps| or \meta{filename}|.eps| (in that order of preference), and uses \pkg{psfrag} definitions contained within either \meta{filename}|-psfrag.tex| or \meta{filename}|.tex|.
+The \cs{psfragfig} command can be used to insert figures produced by the \textsc{Mathematica} package \pkg{MathPSfrag} or the \textsc{Matlab} package \pkg{matlabfrag}. \cmd\psfragfig\ also accepts an optional braced argument:
\begin{description}
-\item[{\cmd\psfragfig\arg[opts]\arg{filename}\arg{input definitions}}]
-As above, but inserts the arbitrary code \<input definitions>, which will usually be used to define new or override existing \pkg{psfrag} commands.
+\item[{\cmd\psfragfig \meta{suffix} \oarg{opts} \marg{filename} \marg{input definitions}}]
\end{description}
+The command behaves as above, but also inserts the arbitrary code \meta{input definitions} into the processing stage; this additional code will usually be used to define new or override existing \pkg{psfrag} commands.
\section{Package options}
\label{pkgopt}
@@ -650,6 +833,27 @@ As above, but inserts the arbitrary code \<input definitions>, which will usuall
Package options can be set or overridden at any time with \cmd\pstoolsetup\marg{pstool settings}.
As mentioned in the previous section, these options also may be set in the optional argument to \cmd\pstool\ and \cmd\psfragfig, in which case they apply to that figure alone.
+\subsection{Macro file(s)}
+\label{macrofile}
+
+\textbf{New in v1.5}.
+As mentioned above, macro files can be used to store commands for processing \pkg{psfrag} graphics.
+If they change, these macro files can trigger a pre-compilation of the graphics.
+While usually the macro files will be defined per-graphic (such as \texttt{foo.eps} having a \texttt{foo-psfrag.tex} file), \pkg{pstool} will also load a `master' macro file for each graphic if it exists.
+
+\begin{description}
+ \item[\pkgopt{macro-file=...}]
+\end{description}
+The default is \pkgopt{macro-file=\meta{jobname}\texttt{-pstool.tex}}; if this file does not exist then no macro file is loaded.
+That is, if your document is called \texttt{thesis.tex}, the master macro file will be loaded in each graphic as \texttt{thesis-pstool.tex}, if it exists.
+
+This option is useful if you have macro definitions in a single file that are used by multiple graphics.
+By updating the definitions file, the graphics in the document will be automatically updated.
+(Note that this file can contain plain \LaTeX\ defintions; the \cs{psfrag} commands can still be located in the per-graphic \texttt{.tex} files.)
+
+To suppress the loading of a master macro file in all cases, use an empty argument for the package option, as in \pkgopt{macro-file=\char`\{\char`\}}.
+
+
\subsection{Forcing/disabling graphics processing}
\label{process}
@@ -667,11 +871,12 @@ However, when an inserted label protrudes from the natural bounding box of the f
\footnote{\pkg{pdfcrop} requires a Perl installation under Windows, freely available from \url{http://www.activestate.com/Products/activeperl/index.plex}} This can be activated in \pkg{pstool} with the \pkgopt{crop=pdfcrop} package option.
\subsection{Temporary files \& cleanup}
-Each figure that is processed spawns an auxiliary \LaTeX\ compilation through \DVI$\to$\PS$\to$\PDF. This process is named after the name of the figure with an appended string suffix; the default is \pkgopt{suffix=\{-pstool\}}. All of these suffixed files are ``temporary'' in that they may be deleted once they are no longer needed.
+Each figure that is processed spawns an auxiliary \LaTeX\ compilation through \DVI$\to$\PS$\to$\PDF. This process is named after the name of the figure with an appended string suffix; the default is \pkgopt{suffix=\{-pstool\}}. Most of these suffixed files are ``temporary'' in that they may be deleted once they are no longer needed.
As an example, if the figure is called |ex.eps|, the files that are created are |ex-pstool.tex|, |ex-pstool.dvi|, \dots. The \pkgopt{cleanup} package option declares via a list of filename suffixes which temporary files are to be deleted after processing.
-The default is \pkgopt{cleanup=\{.tex,\,.dvi,\,.ps,\,.pdf,\,.log,\,.aux\}}. To delete none of the temporary files, choose \pkgopt{cleanup=\{\}} (useful for debugging).
+The default is \pkgopt{cleanup=\{.tex,\,.dvi,\,.ps,\,.pdf,\,.log\}}. To delete none of the temporary files, choose \pkgopt{cleanup=\{\}} (useful for debugging).
+Note that if you want cross-referencing to work correctly for labels in figures, etc., then you must not delete the |.aux| file (see Section~\ref{xref}).
\subsection{Interaction mode of the auxiliary processes}
Each graphic echoes the output of its auxiliary process to the console window; unless you are trying to debug errors there is little interest in seeing this information. The behaviour of these auxiliary processes are governed globally by the \pkgopt{mode} package option, which takes the following parameters:
@@ -691,17 +896,22 @@ The command line options passed to each program of the auxiliary processing can
\item[\pkgopt{pdfcrop-options=...}] (if applicable).
\end{description}
For the most part these will be unnecessary, although passing the correct options to |ps2pdf| can sometimes be a little obscure.\footnote{The manual is here: \url{http://pages.cs.wisc.edu/~ghost/doc/cvs/Ps2pdf.htm}} For example, I use the following for generating figures in my thesis:%
-\footnote{Note that each \texttt{ps2pdf} option must be quoted in Windows, which is unnecessary but does no harm in Linux and Mac~OS~X.}%
-\par{\centering|ps2pdf-options={"-dPDFSETTINGS=/prepress"}|\par}
+\par{\centering|ps2pdf-options={-dPDFSETTINGS=/prepress}|\par}
This forces the `base fourteen' fonts to be embedded within the individual figure files, without which some printers and \textsc{pdf} viewers have trouble with the textual labels. In fact, from v1.3 of \pkg{pstool}, this option is now the default.
-Note that subsequent calls to \pkgopt{ps2pdf-options=...} will override the \pkg{pstool} default; use |ps2pdf-options={}| to chose |ps2pdf|'s defaults if necessary.
+Note that subsequent calls to \pkgopt{ps2pdf-options=...} will override the \pkg{pstool} default; use |ps2pdf-options={}| to erase |ps2pdf|'s defaults if necessary.
+
+\textbf{New in 1.5}: recently, the behaviour of |ps2pdf| has changed under Windows.
+In the past, options to |ps2pdf| needed to be quoted and use |=| to assign its options.
+Something about this has now changed, and it appears the best way to set |ps2pdf| options to use the |#| character instead; therefore, \pkg{pstool} attempts to be clever and replaces all instances of |=| within a |ps2pdf| option into |#| (under Windows only).
+No quotes are added.
+Windows uses can therefore continue to use |=| to set |ps2pdf| options and allow \pkg{pstool} to make the substitution; their documents will still compile correctly on Mac OS X or Linux platforms.
\subsection{Compression of bitmap data}
-In the conversion using |ps2pdf|, bitmap images are stored using either lossy or lossless compression. The default behaviour for \pkg{pstool} is to force lossless compression, because we believe that to be the most commonly desired use case (you don't want scientific graphics rendered with possible compression artifacts). This behaviour can be adjusted using one of these options:
+In the conversion using |ps2pdf|, bitmap images are stored using either lossy or lossless compression. The default behaviour for \pkg{pstool} is to force lossless compression, because we believe that to be the most commonly desired use case (you don't want scientific graphics rendered with possible compression artifacts). This behaviour can be adjusted using one of these options:\footnote{Technical details are given in section~\ref{sec:bitmapdetails}.}
\begin{description}
-\item[\pkgopt{bitmap=auto}] do whatever |ps2pdf| does by default, which seems to be to use lossy compression most, if not all, of the time;
-\item[\pkgopt{bitmap=lossy}] bitmap images are compressed like \textsc{jpg}; this is only really suitable for photographs;
-\item[\pkgopt{bitmap=lossless}] bitmap images are compressed like \textsc{png}; this is suitable for screenshots and generated data such as a surface plot within Matlab (\emph{default}).
+\item[\pkgopt{bitmap=auto}] :~ Do whatever |ps2pdf| does by default, which seems to be to use lossy compression most, if not all, of the time;
+\item[\pkgopt{bitmap=lossy}]:~ Bitmap images are compressed like \textsc{jpg}; this is only really suitable for photographs;
+\item[\pkgopt{bitmap=lossless}] (\emph{default}) : Bitmap images are compressed like \textsc{png}; this is suitable for screenshots and generated data such as a surface plot within Matlab.
\end{description}
These are just special cases of the \pkgopt{ps2pdf-options=...} option, but using \pkgopt{bitmap=...} is much more convenient since the |ps2pdf| options to effect this behaviour are quite verbose.
Note that the |auto| and |lossy| outputs differ in quality; |lossy| is lower quality than |auto| even when the latter uses a lossy compression scheme. Adjusting the quality for these options is only possible with relatively complex Ghostscript options.
@@ -710,23 +920,63 @@ Note that the |auto| and |lossy| outputs differ in quality; |lossy| is lower qua
\subsection{The \cmd\EndPreamble\ command}
-At present, \pkg{pstool} scans the preamble of the main document by redefining |\begin{document}|, but this is rather fragile because many classes and packages do their own redefining which overwrites \pkg{pstool}'s attempt. In this case, place the command \cmd\EndPreamble\ where-ever you'd like the preamble in the auxiliary processing to end (although is must be placed before |\begin{document}| for obvious reasons). This is also handy to bypass anything in the preamble that will never be required for the figures but which will slow down or otherwise conflict with the auxiliary processing.
+The \pkg{pstool} package scans the beginning of the main document to insert its preamble into each graphic that is converted.
+This feature hasn't been well-tested and there are certain cases in which it is known to fail.
+(For example, if \verb|\begin{document}| doesn't appear on a line by itself.)
+If you need to indicate the end of the preamble manually because this scanning has failed, place the command \cmd\EndPreamble\ where-ever you'd like the preamble in the auxiliary processing to end.
+This is also handy to bypass anything in the preamble that will never be required for the figures but which will slow down or otherwise conflict with the auxiliary processing.
+
+\subsection{Cross-referencing}
+\label{xref}
-\subsection{Cross-reference limitations}
+\textbf{New in v1.5}: \pkg{pstool} now supports cross-referencing within graphics.
+That is, you can use |\ref| and |\cite|, etc., within \pkg{psfrag} commands.
+In fact, references to page numbers within an external figure should now resolve correctly; e.g., you can use |\thepage| within a \pkg{psfrag} command.
+(I haven't really tested, but this should allow any package that writes information to the |.aux| file and refers to the page number to work correctly.)
-The initial release of this package does not support cross-references within the \pkg{psfrag} labels of the included graphics. (If, say, you wish to refer to an equation number or a citation within a figure.)
+The implementation to achieve this is somewhat convoluted and difficult to extend, but the user interface should work just as you would expect, mostly.
+The main gotcha to keep in mind is that when cross-referencing is used, the graphics will need multiple compilations to resolve all the cross-references properly.
+Therefore, I recommend when setting such figures up in your document to use the |\psfragfig*| command, which forces graphics compilation every time, and remove the star only when you're sure the graphic is now correct.
+Alternatively, don't worry about the resolving of the cross-references until the very end, and then load the package with the \pkgopt{process=all} option.
\subsection{A note on file paths}
-\pkg{pstool} tries to ensure that you can put image files in subdirectories of the main document and the auxiliary processing will still function correctly. In order to ensure this, the external |pdflatex| compilation uses the |-output-directory| feature of \pdfTeX. This command line option is definitely supported on all platforms from TeX~Live~2008 and MiKTeX~2.7 onwards, but earlier distributions may not be supported.
+\pkg{pstool} tries to ensure that you can put image files in subdirectories of the main document and the auxiliary processing will still function correctly. In order to ensure this, the external |pdflatex| compilation uses the |-output-directory| feature of pdf\/\TeX. This command line option is definitely supported on all platforms from TeX~Live~2008 and MiKTeX~2.7 onwards, but earlier distributions may not be supported.
-One problem that \pkg{pstool} does not solve on its own is the inclusion of images that do not exist in subdirectories of the main document. For example, |\pstool{../Figures/myfig}| can not process by default because \pdfTeX\ usually does not have permission to write into folders that are higher in the heirarchy than the main document. This can be worked around presently in two different ways: (although maybe only for Mac~OS~X and Linux)
+One problem that \pkg{pstool} does not solve on its own is the inclusion of images that do not exist in subdirectories of the main document. For example, |\pstool{../Figures/myfig}| can not process by default because pdf\/\TeX\ usually does not have permission to write into folders that are higher in the heirarchy than the main document. This can be worked around presently in two different ways: (although maybe only for Mac~OS~X and Linux)
\begin{enumerate}
\item Give |pdflatex| permission to write anywhere with the command:\\
|openout_any=a pdflatex ...|
\item Create a symbolic link in the working directory to a point higher in the path: |ln -s ../../PhD ./PhD|, for example, and then refer to the graphics through this symbolic link.
\end{enumerate}
+\subsection{Technical details on \texttt{ps2pdf}'s bitmap options}
+\label{sec:bitmapdetails}
+
+The \pkgopt{bitmap=auto} \pkg{pstool} option does not set any |ps2pdf| options; use this if you wish to set the following |ps2pdf| options manually.
+
+For both \pkgopt{bitmap=lossless} (default) and \pkgopt{bitmap=lossy}, the following |ps2pdf| options are set:
+\begin{verbatim}
+ -dAutoFilterColorImages=false
+ -dAutoFilterGrayImages=false
+\end{verbatim}
+Then for lossless image encoding, the following options are set:
+\begin{verbatim}
+ -dColorImageFilter=/FlateEncode
+ -dGrayImageFilter=/FlateEncode
+\end{verbatim}
+Instead for lossly encoding, these are the options used:
+\begin{verbatim}
+ -dColorImageFilter=/DCTEncode
+ -dGrayImageFilter=/DCTEncode
+\end{verbatim}
+If there are more |ps2pdf| options that you frequently use, please let me know and it may be a good idea to add \pkg{pstool} wrappers to make them more convenient.
+
+{\addtocontents{toc}{\protect\end{varwidth}\protect\hfill}}
+{\addtocontents{toc}{\protect\begin{varwidth}[t]{\protect\tocwidthB\protect\linewidth}}}
+\clearpage
+\part{Implementation}
+
\section{Package information}
The most recent publicly released version of \pkg{pstool} is available at \textsc{ctan}: \url{http://tug.ctan.org/pkg/pstool/}. Historical and developmental versions are available at GitHub: \url{http://github.com/wspr/pstool/}. While general feedback via email is welcomed, specific bugs or feature requests should be reported through the issue tracker: \url{http://github.com/wspr/pstool/issues}.
@@ -734,12 +984,146 @@ The most recent publicly released version of \pkg{pstool} is available at \texts
This package is freely modifiable and distributable under the terms and conditions of the \LaTeX\ Project Public Licence, version 1.3c or greater (your choice).\footnote{\url{http://www.latex-project.org/lppl.txt}} This work consists of the files |pstool.tex| and the derived files |pstool.sty|, |pstool.ins|, and |pstool.pdf|. This work is maintained by \textsc{Will Robertson}.
-{\addtocontents{toc}{\protect\end{varwidth}\protect\hfill}}
-{\addtocontents{toc}{\protect\begin{varwidth}[t]{\protect\tocwidthB\protect\linewidth}}}
-\clearpage
-\part{Implementation}
+\section{Code}
+
+Note that the following code is typeset in a non-verbatim manner; indentation is controlled automatically by some hastily written macros (and will sometimes not indent as might be done manually). Furthermore, spaces before comment signs are lost---when in doubt, consult the source directly!
+
\parindent=0pt
-\DocInput{pstool.sty}
+
+\ExplSyntaxOn
+
+\ior_new:N \pstool_doc_ior
+\seq_new:N \l_pstool_line_seq
+\tl_new:N \l_pstool_tl
+
+\tl_const:Nx \c_pstool_percent_str { \cs_to_str:N \% }
+\tl_const:Nx \c_pstool_lbrace_str { \cs_to_str:N \{ }
+\tl_const:Nx \c_pstool_rbrace_str { \cs_to_str:N \} }
+
+\cs_new:Nn \pstool_typeset_percent:
+ {
+ \group_begin:
+ \color{blue}
+ \scriptsize\bfseries
+ \c_pstool_percent_str
+ \group_end:
+ }
+
+\cs_new:Nn \pstool_doc_rescan_line:
+ {
+ \exp_args:Nno \tl_rescan:nn
+ {
+ \char_set_catcode_space:N \ % space
+ \char_set_catcode_letter:N \#
+ }
+ { \l_pstool_tl }
+ }
+
+\cs_new:Nn \pstool_doc_line_comment:
+ {
+ \seq_pop_left:NNTF \l_pstool_line_seq \l_pstool_tl
+ % Comment on a line of its own:
+ {
+ \group_begin:
+ \int_compare:nT { \g_pstool_indent_int > 0 } { \color{blue}\small }
+ \pstool_doc_rescan_line:
+ \group_end:
+ \par
+ }
+ % A completely empty line:
+ {
+ \vspace{\baselineskip}
+ }
+ }
+
+\int_new:N \g_pstool_indent_int
+\int_new:N \l_pstool_line_indent_int
+\dim_new:N \l_pstool_dim
+
+\cs_new:Nn \pstool_doc_line_code:
+ {
+ \makebox[0pt][r]{\scriptsize\color{blue}\int_use:N \g_pstool_docline_int\quad}
+
+ \int_zero:N \l_pstool_line_indent_int
+ \tl_map_inline:Nn \l_pstool_tl
+ {
+ \str_if_eq_x:nnT {##1} {\c_pstool_lbrace_str} { \int_gincr:N \l_pstool_line_indent_int }
+ \str_if_eq_x:nnT {##1} {\c_pstool_rbrace_str} { \int_gdecr:N \l_pstool_line_indent_int }
+ }
+ \exp_args:NNx \tl_if_in:NnT \l_pstool_tl { \token_to_str:N \if } { \int_gincr:N \l_pstool_line_indent_int }
+ \exp_args:NNx \tl_if_in:NnT \l_pstool_tl { \token_to_str:N \fi } { \int_gdecr:N \l_pstool_line_indent_int }
+
+ \int_compare:nT { \l_pstool_line_indent_int < 0 }
+ { \int_set:Nn \g_pstool_indent_int { \g_pstool_indent_int + \l_pstool_line_indent_int } }
+ \int_compare:nT { \g_pstool_indent_int > 0 }
+ { \prg_replicate:nn {\g_pstool_indent_int} {\quad} }
+ \int_compare:nT { \l_pstool_line_indent_int > 0 }
+ { \int_set:Nn \g_pstool_indent_int { \g_pstool_indent_int + \l_pstool_line_indent_int } }
+ \int_compare:nT { \g_pstool_indent_int < 0 }
+ { \int_zero:N \g_pstool_indent_int }
+
+ \texttt{\l_pstool_tl}
+
+ \seq_pop_left:NNT \l_pstool_line_seq \l_pstool_tl
+ {
+ \makebox
+ {%
+ \pstool_typeset_percent:
+ \space
+ \small
+ \color{blue}%
+ \pstool_doc_rescan_line:
+ }
+ }
+ \par
+ }
+
+\errorcontextlines=999
+
+\int_new:N \g_pstool_docline_int
+\ior_open:Nn \pstool_doc_ior {pstool.sty}
+\ior_str_map_inline:Nn \pstool_doc_ior
+ {
+ \int_gincr:N \g_pstool_docline_int
+ \exp_args:NNo \seq_set_split:Nnn \l_pstool_line_seq {\c_pstool_percent_str} {#1}
+ %\seq_show:N \l_pstool_line_seq
+ \seq_pop_left:NNT \l_pstool_line_seq \l_pstool_tl
+ {
+ \tl_if_empty:NTF \l_pstool_tl
+ {
+ \pstool_doc_line_comment:
+ }
+ {
+ \pstool_doc_line_code:
+ }
+ }
+ }
+
+\ExplSyntaxOff
+
+%\DocInput{pstool.sty}
{\addtocontents{toc}{\protect\end{varwidth}}}
\end{document}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Master/texmf-dist/tex/latex/pstool/pstool.sty b/Master/texmf-dist/tex/latex/pstool/pstool.sty
index 9de88ff656b..37f31108ec6 100644
--- a/Master/texmf-dist/tex/latex/pstool/pstool.sty
+++ b/Master/texmf-dist/tex/latex/pstool/pstool.sty
@@ -1,23 +1,35 @@
-%% LaTeX2e file `pstool.sty'
-%% generated by the `filecontents' environment
-%% from source `pstool' on 2009/07/21.
-%%
-\ProvidesPackage{pstool}[2009/07/17 v1.3
+% TODO: convert this package into expl3 syntax (will save many lines of code).
+
+\ProvidesPackage{pstool}[2013/02/11 v1.5
Wrapper for processing PostScript/psfrag figures]
-% External packages
-\RequirePackage{%
- catchfile,color,ifpdf,ifplatform,
- graphicx,pdftexcmds,psfrag,suffix,xkeyval}
+% External packages:
+\RequirePackage{
+ catchfile,color,ifpdf,ifplatform,filemod,
+ graphicx,psfrag,suffix,trimspaces,xkeyval,expl3
+}
+
+% Add an additional command before trimspaces.sty is updated formally:
+\providecommand*{\trim@multiple@spaces@in}[1]{%
+ \let\trim@temp#1%
+ \trim@spaces@in#1%
+ \ifx\trim@temp#1%
+ \else
+ \expandafter\trim@multiple@spaces@in\expandafter#1%
+ \fi
+}
+
+% \subsection{Allocations}
+\expandafter\newif\csname if@pstool@pdfcrop@\endcsname
+\expandafter\newif\csname if@pstool@verbose@\endcsname
+\expandafter\newif\csname if@pstool@write@aux\endcsname
-% Allocations
-\newif\if@pstool@pdfcrop@
-\newif\if@pstool@verbose@
\newwrite\pstool@out
+\newread\pstool@mainfile@ior
+\newread\pstool@auxfile@ior
-% These are cute
-\providecommand\OnlyIfFileExists[2]{\IfFileExists{#1}{#2}{}}
-\providecommand\NotIfFileExists[2]{\IfFileExists{#1}{}{#2}}
+% Macro used to store the name of the graphic's macro file:
+\let\pstool@tex\@empty
% \subsection{Package options}
@@ -47,51 +59,63 @@
\ExecuteOptionsX{mode=batch}
\DeclareOptionX{cleanup}{\def\pstool@rm@files{#1}}
-\ExecuteOptionsX{cleanup={.tex,.dvi,.ps,.pdf,.log,.aux}}
+\ExecuteOptionsX{cleanup={.tex,.dvi,.ps,.pdf,.log}}
\DeclareOptionX{suffix}{\def\pstool@suffix{#1}}
\ExecuteOptionsX{suffix={-pstool}}
-% There is an implicit |\space| after the bitmap options.
+% There is an implicit \cs{space} after the bitmap options.
\define@choicekey*{pstool.sty}{bitmap}
[\@tempa\@tempb]{auto,lossless,lossy}{%
\ifcase\@tempb
\let\pstool@bitmap@opts\@empty
\or
\def\pstool@bitmap@opts{%
- "-dAutoFilterColorImages=false"
- "-dAutoFilterGrayImages=false"
- "-dColorImageFilter=/FlateEncode"
- "-dGrayImageFilter=/FlateEncode" % space
+ -dAutoFilterColorImages=false
+ -dAutoFilterGrayImages=false
+ -dColorImageFilter=/FlateEncode
+ -dGrayImageFilter=/FlateEncode % space
}
\or
\def\pstool@bitmap@opts{%
- "-dAutoFilterColorImages=false"
- "-dAutoFilterGrayImages=false"
- "-dColorImageFilter=/DCTEncode"
- "-dGrayImageFilter=/DCTEncode" % space
+ -dAutoFilterColorImages=false
+ -dAutoFilterGrayImages=false
+ -dColorImageFilter=/DCTEncode
+ -dGrayImageFilter=/DCTEncode % space
}
\fi
}
\ExecuteOptionsX{bitmap=lossless}
-% \HideAllDefining
-% \Define*{latex-options}
-% \Define*{dvips-options}
-% \Define*{ps2pdf-options}
-% \Define*{pdfcrop-options}
\DeclareOptionX{latex-options}{\def\pstool@latex@opts{#1}}
\DeclareOptionX{dvips-options}{\def\pstool@dvips@opts{#1}}
\DeclareOptionX{ps2pdf-options}{\def\pstool@pspdf@opts{#1}}
\DeclareOptionX{pdfcrop-options}{\def\pstool@pdfcrop@opts{#1}}
-% \ResumeAllDefining
+
\ExecuteOptionsX{
latex-options={},
dvips-options={},
- ps2pdf-options={"-dPDFSETTINGS=/prepress"},
+ ps2pdf-options={-dPDFSETTINGS=/prepress},
pdfcrop-options={}
}
+\DeclareOptionX{macro-file}{%
+ \IfFileExists{#1}
+ {\def\pstool@macrofile{#1}}
+ {%
+ \let\pstool@macrofile\@empty
+ \PackageError{pstool}{^^J\space\space%
+ No file `#1' found for "macro-file" package option.^^J
+ This warning occurred}
+ }
+}
+
+% Default:
+\IfFileExists{\jobname-pstool.tex}
+ {\edef\pstool@macrofile{\jobname-pstool.tex}}
+ {\let\pstool@macrofile\@empty}
+
+
\ifpdf
\ifshellescape\else
\ExecuteOptionsX{process=none}
@@ -110,10 +134,9 @@
}
% \section{Macros}
-
% Used to echo information to the console output.
-% Can't use |\typeout| because it's asynchronous with
-% any |\immediate\write18| processes (for some reason).
+% Can't use \cs{typeout} because it's asynchronous with
+% any \cs{immediate}\cs{write18} processes (for some reason).
\def\pstool@echo#1{%
\if@pstool@verbose@
\pstool@echo@verbose{#1}%
@@ -129,29 +152,32 @@
% Command line abstractions between platforms:
\edef\pstool@cmdsep{\ifwindows\string&\else\string;\fi\space}
\edef\pstool@rm@cmd{\ifwindows del \else rm -- \fi}
+\edef\pstool@cp@cmd{\ifwindows copy \else cp -- \fi}
-% Delete a file if it exists:\\
-% |#1|: path\\
-% |#2|: filename
+% Delete a file if it exists:
+% #1: path
+% #2: filename
\newcommand\pstool@rm[2]{%
- \OnlyIfFileExists{#1#2}{%
+ \IfFileExists{#1#2}{%
\immediate\write18{%
cd "#1"\pstool@cmdsep\pstool@rm@cmd "#2"
}%
- }%
+ }{}%
}
% Generic function to execute a command on the shell and pass its exit status back into \LaTeX. Any number of \cmd\pstool@exe\ statements can be made consecutively followed by \cmd\pstool@endprocess, which also takes an argument. If \emph{any} of the shell calls failed, then the execution immediately skips to the end and expands \cmd\pstool@error\ instead of the argument to \cmd\pstool@endprocess.
-%
-% |#1|: `name' of process\\
-% |#2|: relative path where to execute the command\\
-% |#3|: the command itself
+% #1: `name' of process
+% #2: relative path where to execute the command
+% #3: the command itself
\newcommand\pstool@exe[3]{%
\pstool@echo{^^J=== pstool: #1 ===}%
\pstool@shellexecute{#2}{#3}%
\pstool@retrievestatus{#2}%
\ifnum\pstool@status > \z@
- \PackageWarning{pstool}{Execution failed during process:^^J\space\space#3^^JThis warning occurred}%
+ \PackageWarning{pstool}{%
+ Execution failed during process:^^J\space\space
+ #3^^JThis warning occurred%
+ }%
\expandafter\pstool@abort
\fi
}
@@ -160,9 +186,18 @@
\def\pstool@error{%
\fbox{%
\parbox{0.8\linewidth}{%
- \color{red}\raggedright\ttfamily\scshape\small
- An error occured processing graphic
- \upshape`\pstool@path\pstool@filestub'%
+ \color{red}\centering\ttfamily\scshape\small
+ An error occured processing graphic:\\
+ \upshape`%
+ \detokenize\expandafter{\pstool@path}%
+ \detokenize\expandafter{\pstool@filestub}.eps%
+ '\\\bigskip
+ \tiny
+ Check the log file for compilation errors:\\
+ `%
+ \detokenize\expandafter{\pstool@path}%
+ \detokenize\expandafter{\pstool@filestub}-pstool.log%
+ '\\
}%
}%
}
@@ -170,7 +205,7 @@
\def\pstool@abort#1\pstool@endprocess{\pstool@error\@gobble}
\let\pstool@endprocess\@firstofone
-% It is necessary while executing commands on the shell to write the exit status to a temporary file to test for failures in processing. (If all versions of |pdflatex| supported input pipes, things might be different.)
+% It is necessary while executing commands on the shell to write the exit status to a temporary file to test for failures in processing. (If all versions of \texttt{pdflatex} supported input pipes, things might be different.)
\def\pstool@shellexecute#1#2{%
\immediate\write18{%
cd "#1" \pstool@cmdsep
@@ -190,8 +225,8 @@
}
\def\pstool@statusfile{pstool-statusfile.txt}
-% Read the exit status from the temporary file and delete it.\\
-% |#1| is the path\\
+% Read the exit status from the temporary file and delete it.
+% #1 is the path
% Status is recorded in \cmd\pstool@status.
\def\pstool@retrievestatus#1{%
\CatchFileEdef{\pstool@status}{#1\pstool@statusfile}{}%
@@ -205,17 +240,6 @@
}
\def\pstool@statusfail{\par }% what results when \TeX\ reads an empty file
-% \subsection{File age detection}
-\def\pstool@IfnewerEPS{%
- \ifnum\pdf@strcmp{\pdf@filemoddate{\pstool@path\pstool@filestub.pdf}}
- {\pdf@filemoddate{\pstool@path\pstool@filestub.eps}}
- < \z@
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
-}
-
% Grab filename and filepath. Always need a relative path to a filename even if it's in the same directory.
\def\pstool@getpaths#1{%
\filename@parse{#1}%
@@ -227,8 +251,13 @@
\let\pstool@filestub\filename@base
}
+% The filename of the figure stripped of its path, if any:
+% (analogous to standard \cs{jobname})
+\def\pstool@jobname{\pstool@filestub\pstool@suffix}
+
+
% \section{Command parsing}
-% User input is \cmd\pstool\ (with optional |*| or |!| suffix) which turns into one of the following three macros depending on the mode.
+% User input is \cmd\pstool\ (with optional \texttt{*} or \texttt{!} suffix) which turns into one of the following three macros depending on the mode.
\newcommand\pstool@alwaysprocess[3][]{%
\pstool@getpaths{#2}%
@@ -249,23 +278,50 @@
}
\fi
-% For regular operation, which processes the figure only if
-% the command is starred, or the PDF doesn't exist.
-\newcommand\pstool@maybeprocess[3][]{%
- \pstool@getpaths{#2}%
- \IfFileExists{#2.pdf}{%
- \pstool@IfnewerEPS{% needs info from |\pstool@getpaths|
- \pstool@process{#1}{#3}%
- }{%
- \pstool@includegraphics{#2}%
- }%
- }{%
- \pstool@process{#1}{#3}%
- }%
-}
+% Process the figure when:
+% -- the PDF file doesn't exist, or
+% -- the EPS is newer than the PDF, or
+% -- the TeX file is new than the PDF.
+\ExplSyntaxOn
+\newcommand\pstool@maybeprocess[3][]
+ {
+ \pstool_if_should_process:nTF {#2}
+ { \pstool@process{#1}{#3} }
+ { \pstool@includegraphics{#2} }
+ }
+
+\prg_set_conditional:Nnn \pstool_if_should_process:n {TF}
+ {
+ \pstool@getpaths{#1}
+
+ \file_if_exist:nF { #1.pdf }
+ { \use_i_delimit_by_q_stop:nw \prg_return_true: }
+
+ \filemodCmp {\pstool@path\pstool@filestub.eps}
+ {\pstool@path\pstool@filestub.pdf}
+ { \use_i_delimit_by_q_stop:nw \prg_return_true: } {}
+
+ \exp_args:Nx \clist_map_inline:nn { \pstool@macrofile , \pstool@tex }
+ % empty entries are ignored in clist mappings, so no need to filter here
+ {
+ \filemodCmp {##1} {\pstool@path\pstool@filestub.pdf}
+ {
+ \clist_map_break:n { \use_i_delimit_by_q_stop:nw \prg_return_true: }
+ }
+ {}
+ }
+
+ \filemodCmp {\pstool@path\pstool@filestub.tex}
+ {\pstool@path\pstool@filestub.pdf}
+ { \use_i_delimit_by_q_stop:nw \prg_return_true: } {}
+
+ \use_i_delimit_by_q_stop:nw \prg_return_false:
+ \q_stop
+ }
+\ExplSyntaxOff
% \section{User commands}
-% Finally, define \cmd\pstool\ as appropriate for the mode: (|all|, |none|, |auto|, respectively)
+% Finally, define \cmd\pstool\ as appropriate for the mode: (\texttt{all}, \texttt{none}, \texttt{auto}, respectively)
\ifpdf
\newcommand\pstool{%
\ifcase\pstool@process@choice\relax
@@ -296,9 +352,6 @@
% \section{The figure processing}
-% \cmd\pstool@filestub\ is the filename of the figure stripped of its path (if any)
-\def\pstool@jobname{\pstool@filestub\pstool@suffix}
-
% And this is the main macro.
\newcommand\pstool@process[2]{%
\begingroup
@@ -315,10 +368,14 @@
-interaction=\pstool@mode\space
\pstool@latex@opts\space
"\pstool@jobname.tex"}%
-% Execute |dvips| in quiet mode if |latex| is not run in (non/error)stop mode:
+% Execute \texttt{dvips} in quiet mode if \texttt{latex} is not run in (non/error)stop mode:
\pstool@exe{dvips}{\pstool@path}{%
dvips \if@pstool@verbose@\else -q \fi -Ppdf
\pstool@dvips@opts\space "\pstool@jobname.dvi"}%
+% Pre-process \texttt{ps2pdf} options for Windows (sigh):
+ \pstool@pspdf@opts@preprocess \pstool@bitmap@opts
+ \pstool@pspdf@opts@preprocess \pstool@pspdf@opts
+% Generate the PDF:
\if@pstool@pdfcrop@
\pstool@exe{ps2pdf}{\pstool@path}{%
ps2pdf \pstool@bitmap@opts \pstool@pspdf@opts \space
@@ -331,53 +388,149 @@
ps2pdf \pstool@bitmap@opts \pstool@pspdf@opts \space
"\pstool@jobname.ps" "\pstool@filestub.pdf"}%
\fi
+% Finish up: (implies success!)
\pstool@endprocess{%
\pstool@cleanup
- \pstool@includegraphics{%
- \pstool@path\pstool@filestub}%
+ \pstool@includegraphics{\pstool@path\pstool@filestub}%
+% Emulate \cs{include} (sort of) and have the main document load the auxiliary aux file, in a manner of speaking:
+ \pstool@write@aux
}%
\pstool@echo@verbose{^^J=== pstool: end processing ===^^J}%
\endgroup
}
+\newcommand\pstool@write@aux{%
+ \endlinechar=-1
+ \@tempswatrue
+ \@pstool@write@auxfalse
+ \in@false
+ \openin \pstool@auxfile@ior "\pstool@path\pstool@jobname.aux"\relax
+ \@whilesw \if@tempswa \fi {%
+ \readline \pstool@auxfile@ior to \@tempa
+ \ifeof \pstool@auxfile@ior
+ \@tempswafalse
+ \else
+ \edef\@tempb{\detokenize\expandafter{\pstool@auxmarker@text/}}%
+ \ifx\@tempa\@tempb
+ \@tempswafalse
+ \else
+ \if@pstool@write@aux
+ \immediate\write\@mainaux{\unexpanded\expandafter{\@tempa}}%
+ \fi
+ \edef\@tempb{\detokenize\expandafter{\pstool@auxmarker@text*}}%
+ \ifx\@tempa\@tempb
+ \@pstool@write@auxtrue
+ \fi
+ \fi
+ \fi
+ }
+ \closein \pstool@auxfile@ior
+}
+
+\ExplSyntaxOn
+\cs_new:Npn \pstool@pspdf@opts@preprocess #1
+ {
+ \ifwindows
+ \exp_args:NNnx \tl_replace_all:Nnn #1 {=} { \cs_to_str:N \# }
+ \fi
+ }
+\ExplSyntaxOff
+
+% For what's coming next.
+\edef\@begindocument@str{\detokenize\expandafter{\string\begin{document}}}
+\edef\@endpreamble@str{\string\EndPreamble}
+\def\in@first#1#2{\in@{NEVEROCCUR!#1}{NEVEROCCUR!#2}}
+
+% We need to cache the aux file, so here goes.
+% This is because the aux file is cleared for writing after \cs{begin{document}}.
+\IfFileExists{\jobname.oldaux}{\immediate\write18{\pstool@rm@cmd \jobname.oldaux}}{}
+\immediate\write18{\pstool@cp@cmd \jobname.aux \jobname.oldaux}
+\AtEndDocument{\immediate\write18{\pstool@rm@cmd \jobname.oldaux}}
+
+\edef\pstool@auxmarker#1{\string\@percentchar\space <#1PSTOOLLABELS>}
+\edef\pstool@auxmarker@text#1{\@percentchar <#1PSTOOLLABELS>}
+
% The file that is written for processing is set up to read the preamble of the original document and set the graphic on an empty page (cropping to size is done either here with \pkg{preview} or later with \pkg{pdfcrop}).
\def\pstool@write@processfile#1#2#3{%
+% Put down a label so we can pass through the current page number:
+ \edef\pstool@label{pstool-\pstool@path\pstool@filestub}%
+ \protected@write\@auxout{}%
+ {\string\newlabel{\pstool@label}{{\@currentlabel}{\the\c@page}}}%
\immediate\openout\pstool@out #2\pstool@suffix.tex\relax
- \immediate\write\pstool@out{%
-% Input the main document; redefine the document environment so only the preamble is read:
- \unexpanded{%
- \pdfoutput=0^^J% force DVI mode if not already
- \let\origdocument\document^^J%
- \let\EndPreamble\endinput^^J%
- \def\document{\endgroup\endinput}^^J%
- }%
- \noexpand\input{\jobname}^^J%
+% And copy the main file's bbl file too:
+% (necessary for biblatex)
+ \IfFileExists{\jobname.bbl}{%
+ \IfFileExists{\pstool@path\pstool@jobname.bbl}{%
+ \immediate\write18{\pstool@rm@cmd \pstool@path\pstool@jobname.bbl}%
+ }{}%
+ }{}%
+\immediate\write18{\pstool@cp@cmd \jobname.bbl \pstool@path\pstool@jobname.bbl}%
+%
+% Scan the main document line by line; print preamble into auxiliary file until the document begins or \cs{EndPreamble} is found:
+ \endlinechar=-1
+ \def\@tempa{\pdfoutput=0\relax}%
+ \in@false
+ \openin\pstool@mainfile@ior "\jobname"\relax
+ \@whilesw \unless\ifin@ \fi {%
+ \immediate\write\pstool@out{\unexpanded\expandafter{\@tempa}}%
+ \readline\pstool@mainfile@ior to\@tempa
+ \let\@tempc\@tempa
+ \trim@multiple@spaces@in\@tempa
+ \expandafter\expandafter\expandafter\in@first
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@begindocument@str
+ \expandafter}%
+ \expandafter{\@tempa}%
+ \unless\ifin@
+ \expandafter\expandafter\expandafter\in@first
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@endpreamble@str
+ \expandafter}%
+ \expandafter{\@tempa}%
+ \fi
+ }
+ \closein\pstool@mainfile@ior
%
-% Now the preamble of the process file: (restoring document's original meaning; empty \cmd\pagestyle\ removes the page number)
+% Now the preamble of the process file:
+ \immediate\write\pstool@out{%
\if@pstool@pdfcrop@\else
\noexpand\usepackage[active,tightpage]{preview}^^J%
\fi
\unexpanded{%
- \let\document\origdocument^^J%
- \pagestyle{empty}^^J%
+ \pagestyle{empty}^^J^^J% remove the page number
}%
+ \noexpand\makeatletter^^J%
+% Sort out the page numbering:
+ \expandafter\ifx\csname r@\pstool@label\endcsname\relax\else
+ \def\noexpand\thepage{\unexpanded\expandafter{\thepage}}^^J%
+ \noexpand\setcounter{page}{%
+ \expandafter\expandafter\expandafter
+ \@secondoftwo\csname r@\pstool@label\endcsname
+ }^^J%
+ \fi
%
% And the document body to place the graphic on a page of its own:
+ \noexpand\@input{\jobname.oldaux}^^J^^J%
+ \noexpand\begin{document}^^J%
+ \unexpanded{\immediate\write\@mainaux}{\pstool@auxmarker*}^^J%
+ \noexpand\makeatother^^J%
\unexpanded{%
- \begin{document}^^J%
\centering\null\vfill^^J%
}%
+ ^^J%
\if@pstool@pdfcrop@\else
\noexpand\begin{preview}^^J%
\fi
- \unexpanded{#3^^J}% this is the "psfrag" material
+ \unexpanded{#3^^J}
\noexpand\includegraphics
[\unexpanded\expandafter{\XKV@rm}]
{\pstool@filestub}^^J%
\if@pstool@pdfcrop@\else
\noexpand\end{preview}^^J%
\fi
- \unexpanded{\vfill\end{document}}^^J%
+ ^^J%
+ \unexpanded{\vfill^^J^^J\makeatletter^^J\immediate\write\@mainaux}{\pstool@auxmarker/}^^J%
+ \unexpanded{\makeatother^^J\end{document}}^^J%
}%
\immediate\closeout\pstool@out
}
@@ -391,10 +544,9 @@
\providecommand\EndPreamble{}
% \section{User commands}
-%
-% These all support the suffixes |*| and |!|, so each user command is defined as a wrapper to \cmd\pstool.
+% These all support the suffixes \texttt{*} and \texttt{!}, so each user command is defined as a wrapper to \cmd\pstool.
-% for EPS figures with psfrag:
+% For EPS figures with psfrag:
\newcommand\psfragfig[2][]{\pstool@psfragfig{#1}{#2}{}}
\WithSuffix\newcommand\psfragfig*[2][]{%
\pstool@psfragfig{#1}{#2}{*}%
@@ -403,7 +555,7 @@
\pstool@psfragfig{#1}{#2}{!}%
}
-% Parse optional \<input definitions>
+% Parse optional input definitions:
\newcommand\pstool@psfragfig[3]{%
\@ifnextchar\bgroup{%
\pstool@@psfragfig{#1}{#2}{#3}%
@@ -412,19 +564,21 @@
}%
}
-% Search for both \<filename> and \<filename>|-psfrag| inputs.
+% Search for both `filename' and `filename'-psfrag inputs.
%
-% |#1|: possible graphicx options\\
-% |#2|: graphic name (possibly with path)\\
-% |#3|: |\pstool| suffix (i.e., |!| or |*| or \<empty>)\\
-% |#4|: possible \pkg{psfrag} (or other) macros
+% #1: possible graphicx options
+% #2: graphic name (possibly with path)
+% #3: \cs{pstool} suffix (i.e., \texttt{!} or \texttt{*} or `empty')
+% #4: possible \pkg{psfrag} (or other) macros
\newcommand\pstool@@psfragfig[4]{%
% Find the .eps file to use.
\IfFileExists{#2-psfrag.eps}{%
\edef\pstool@eps{#2-psfrag}%
- \OnlyIfFileExists{#2.eps}{%
- \PackageWarning{pstool}{Graphic "#2.eps" exists but "#2-psfrag.eps" is being used}%
- }%
+ \IfFileExists{#2.eps}{%
+ \PackageWarning{pstool}{%
+ Graphic "#2.eps" exists but "#2-psfrag.eps" is being used%
+ }%
+ }{}%
}{%
\IfFileExists{#2.eps}{%
\edef\pstool@eps{#2}%
@@ -439,38 +593,39 @@
% Find the .tex file to use.
\IfFileExists{#2-psfrag.tex}{%
\edef\pstool@tex{#2-psfrag.tex}%
- \OnlyIfFileExists{#2.tex}{%
+ \IfFileExists{#2.tex}{%
\PackageWarning{pstool}{%
File "#2.tex" exists that may contain macros
for "\pstool@eps.eps"^^J%
But file "#2-psfrag.tex" is being used instead.%
}%
- }%
+ }{}%
}{%
\IfFileExists{#2.tex}{%
\edef\pstool@tex{#2.tex}%
}{%
- \let\pstool@tex\@empty
\PackageWarning{pstool}{%
No file "#2.tex" or "#2-psfrag.tex" can be found
that may contain macros for "\pstool@eps.eps"%
}%
}%
}%
- \ifx\pstool@tex\@empty
- \pstool#3[#1]{\pstool@eps}{#4}%
- \else
- \expandafter\pstool@@@psfragfig
- \expandafter{\pstool@tex}{#3[#1]}{#4}%
+ % Perform the actual processing step, skipping it entirely if an EPS file hasn't been found.
+ % (In which case an error would have been called above; this is to clean up nicely in scrollmode, for example.)
+ \ifx\pstool@eps\@undefined\else
+ \edef\@tempa{%
+ \unexpanded{\pstool#3[#1]}{\pstool@eps}{%
+ \ifx\pstool@macrofile\@empty\else
+ \@percentchar Input main macro file:^^J
+ \unexpanded{\csname @input\endcsname}{\pstool@macrofile}%
+ \fi
+ \ifx\pstool@tex\@empty\else
+ \@percentchar Input macro file for this graphic:^^J
+ \unexpanded{\csname @input\endcsname}{\pstool@tex}%
+ \fi
+ \unexpanded{#4}%
+ }%
+ }\@tempa
\fi
}
-
-% Break out the separate function in order to expand |\pstool@tex| before writing it.
-\newcommand\pstool@@@psfragfig[3]{%
- \pstool#2{\pstool@eps}{%
- \csname @input\endcsname{#1}%
- #3%
- }%
-}
-
-% That's it.
+% \centerline{\itshape ---The End---}