summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/psfrag
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/psfrag
Initial commit
Diffstat (limited to 'macros/latex/contrib/psfrag')
-rw-r--r--macros/latex/contrib/psfrag/00readme.txt82
l---------macros/latex/contrib/psfrag/README1
-rw-r--r--macros/latex/contrib/psfrag/announce.txt63
-rw-r--r--macros/latex/contrib/psfrag/example.eps389
-rw-r--r--macros/latex/contrib/psfrag/pfgguide.pdfbin0 -> 69428 bytes
-rw-r--r--macros/latex/contrib/psfrag/pfgguide.ps2536
-rw-r--r--macros/latex/contrib/psfrag/pfgguide.tex695
-rw-r--r--macros/latex/contrib/psfrag/psfrag.dtx1102
-rw-r--r--macros/latex/contrib/psfrag/psfrag.ins25
-rw-r--r--macros/latex/contrib/psfrag/testfig.eps6
10 files changed, 4899 insertions, 0 deletions
diff --git a/macros/latex/contrib/psfrag/00readme.txt b/macros/latex/contrib/psfrag/00readme.txt
new file mode 100644
index 0000000000..948a8c46fc
--- /dev/null
+++ b/macros/latex/contrib/psfrag/00readme.txt
@@ -0,0 +1,82 @@
+This is the 00readme.txt file to accompany PSfrag, a system for LaTeX to
+integrate LaTeX equations with Encapsulated PostScript figures.
+
+These files compose the April 11, 1998 release of PSfrag 3.04. This is a
+maintenance release, and fixes some bugs and shortcomings in version 3.03. If
+you decide to install this release, you should not need to re-compile any of
+your files, unless you happened to encounter one of the bugs in an earlier
+version.
+
++-------------------------------+
+|QUICK INSTALLATION INSTRUCTIONS|
++-------------------------------+
+
+1. Run LaTeX on psfrag.ins, generating the package file psfrag.sty and
+ the PostScript header file psfrag.pro.
+2. Place psfrag.sty anywhere in your TeX search path; for kpathsea-based
+ systems such as teTeX, this is determined by the TEXINPUTS variable.
+3. Place psfrag.pro where your DVI-to-PostScript driver (e.g., dvips)
+ can find it. For kpathsea-based systems such as teTeX, this is
+ determined by the DVIPSHEADERS variable. For dvips in particular,
+ this includes the directory containing tex.pro and special.pro.
+
+More complete instructions are found in pfgguide.{tex,ps}. The files
+example.eps and testfig.eps are needed to typeset the documentation, so
+do not delete them if you want to re-generate pfgguide.ps. In fact, a
+good test to see if your TeX/LaTeX/PSfrag installation is working
+properly is to rename pfgguide.ps, generate a new pfgguide.ps from the
+.tex file, and compare the two files.
+
++------------------------------------+
+|IMPORTANT NOTES FOR PSFRAG 2.X USERS|
++------------------------------------+
+
+Note that PSfrag 3.x is quite a bit different from previous versions.
+The interface has been preserved, but the most notable difference is
+the absence of the preprocessing script ps2frag. That's right: _you
+will no longer need to run the ps2frag script_. This is a relief, of
+course, to users who could never get Perl working on their OS.
+
+However, PLEASE HEED the following differences between PSfrag 2.x and
+PSfrag 3.x! You will be soundly flogged with wet noodles if you ask
+about these and you haven't read this warning or the ones in pfgguide:
+1) PSfrag replacements no longer show up in their proper positions when
+ viewing the file with Xdvi. Instead, they show up in a vertical list
+ along the left side of the figure. So, you can check if they are
+ typeset properly in Xdvi, but you can't make sure they are properly
+ placed. To do that, you should use a PostScript previewer like
+ GhostView and GhostScript. This is an unforunate but necessary
+ consequence of the elimination of the preprocessing step.
+2) If you use the \tex command, note that it has been _deprecated_.
+ Now, you have to explicitly turn it on, either for the entire
+ LaTeX document or for each file individually. pfgguide.{tex,ps}
+ describe how to do this in detail. The reasons for this once
+ again turn to the elimination of the preprocessing step.
+I think that the elimination of the ps2frag script far outweighs
+either of these two (possible) disadvantages.
+
++---------------+
+| RELEASE NOTES |
++---------------+
+
+This is a bug-fix release, which fixes the following bugs encountered
+in PSfrag 3.03:
+
+1. Attempting to use EPS figures as PSfrag replacements would cause
+ an infinite loop. This should work properly now.
+2. Since the last release, the DVI-to-PS driver DVIPSone changed in
+ a way that made PSfrag replacements appear upside down.
+3. Small improvements to the psfrag.pro file have been made, which
+ will hopefully allow you to make EPS files out of PSfrag-ged
+ figures. I can't make any guarantees about this yet.
+4. The manual has been improved slightly; the known issues for
+ XFig and Seminar are now discussed. In addition, a more complete
+ discussion about ``valid'' tags is included.
+
+Bug reports and suggestions should go to psfrag@rascals.stanford.edu,
+the PSfrag maintainer's email-list. However, before submitting a bug
+report, please make sure that it is not already covered in the "Known
+issues" section of pfgguide.tex!
+
+Michael C. Grant
+
diff --git a/macros/latex/contrib/psfrag/README b/macros/latex/contrib/psfrag/README
new file mode 120000
index 0000000000..5d84037450
--- /dev/null
+++ b/macros/latex/contrib/psfrag/README
@@ -0,0 +1 @@
+00readme.txt \ No newline at end of file
diff --git a/macros/latex/contrib/psfrag/announce.txt b/macros/latex/contrib/psfrag/announce.txt
new file mode 100644
index 0000000000..6263b05fc1
--- /dev/null
+++ b/macros/latex/contrib/psfrag/announce.txt
@@ -0,0 +1,63 @@
+A brand-spankin' new version of PSfrag, version 3.04, for LaTeX2e can be
+found at CTAN sites in the directory
+
+macros/latex/contrib/supported/psfrag.
+
+PSfrag 3.04 fixes some bugs discovered in PSfrag 3.03.
+
+What is PSfrag?
+---------------
+
+Many drawing and graphing packages produce output in the Encapsulated
+PostScript (EPS) format, but few can easily produce the equations and
+other scientific text of which LaTeX is capable. On the other hand, many
+LaTeX-based drawing packages are not as expressive or easy-to-use as the
+many advanced drawing packages that produce EPS output.
+
+PSfrag provides the best of both worlds by allowing the user to
+precisely overlay Encapsulated PostScript (EPS) files with arbitrary
+LaTeX constructions. In order to accomplish this, the user places a
+simple text ``tag'' in the graphics file, as a ``position marker'' of
+sorts. Then, using simple LaTeX commands, the user instructs PSfrag to
+remove that tag from the figure, and replace it with a properly sized,
+aligned, and rotated LaTeX equation.
+
+The full documentation for PSfrag found in the release contains examples
+and usage instructions.
+
+To use PSfrag...
+----------------
+
+...you will need:
+
+* LaTeX2e and the "graphics" package. (You can use the old epsf.sty
+ macros with PSfrag, but you still need the graphics package.) Please
+ make sure to get the newest versions of these packages from CTAN
+ before submitting bug reports.
+
+* If you plan to use PSfrag with the Seminar package, make sure you
+ get the 10/97 release of this package.
+
+* Any DVI-to-PostScript program that is well-supported by the "graphics"
+ package. This author uses Tom Rokicki's "dvips"; I recommend it.
+ PSfrag has also been verified for DVIPSone from Y&Y (using Level 2
+ PostScript printers).
+
+Bugs? What Bugs?
+----------------
+
+PSfrag 3.04 is bug-free. Of course, we're kidding. That's what we said
+about PSfrag 3.0, in fact, and look where it got us.
+
+If you have problems, bug reports, or improvement suggestions, please
+send them to the PSfrag maintainer's mailing list,
+
+psfrag@rascals.stanford.edu
+
+Please supply an example .tex file and .eps figure to demonstrate the
+behavior you wish to have corrected or improved.
+
+This is a majordomo mailing list; feel free to join if you would like to
+actively participate in PSfrag development.
+
+Thanks for using PSfrag!
diff --git a/macros/latex/contrib/psfrag/example.eps b/macros/latex/contrib/psfrag/example.eps
new file mode 100644
index 0000000000..4074a32b45
--- /dev/null
+++ b/macros/latex/contrib/psfrag/example.eps
@@ -0,0 +1,389 @@
+%!PS-Adobe-2.0 EPSF-1.2
+%%Creator: MATLAB, The Mathworks, Inc.
+%%Title: example.eps
+%%CreationDate: 11/05/96 21:16:44
+%%DocumentNeededFonts: Helvetica
+%%DocumentProcessColors: Cyan Magenta Yellow Black
+%%Pages: 1
+%%BoundingBox: 97 197 502 604
+%%EndComments
+
+%%BeginProlog
+
+% MathWorks dictionary
+/MathWorks 150 dict begin
+
+% definition operators
+/bdef {bind def} bind def
+/ldef {load def} bind def
+/xdef {exch def} bdef
+/xstore {exch store} bdef
+
+% operator abbreviations
+/c /clip ldef
+/cc /concat ldef
+/cp /closepath ldef
+/gr /grestore ldef
+/gs /gsave ldef
+/mt /moveto ldef
+/np /newpath ldef
+/cm /currentmatrix ldef
+/sm /setmatrix ldef
+/rc {rectclip} bdef
+/rf {rectfill} bdef
+/rm /rmoveto ldef
+/rl /rlineto ldef
+/s /show ldef
+/sc {setcmykcolor} bdef
+/sr /setrgbcolor ldef
+/w /setlinewidth ldef
+/j /setlinejoin ldef
+/cap /setlinecap ldef
+
+% page state control
+/pgsv () def
+/bpage {/pgsv save def} bdef
+/epage {pgsv restore} bdef
+/bplot /gsave ldef
+/eplot {stroke grestore} bdef
+
+% orientation switch
+/portraitMode 0 def
+/landscapeMode 1 def
+
+% coordinate system mappings
+/dpi2point 0 def
+
+% font control
+/FontSize 0 def
+/FMS {
+ /FontSize xstore %save size off stack
+ findfont
+ [FontSize 0 0 FontSize neg 0 0]
+ makefont
+ setfont
+ }bdef
+
+/reencode {
+exch dup where
+{pop load} {pop StandardEncoding} ifelse
+exch
+dup 3 1 roll
+findfont dup length dict begin
+ { 1 index /FID ne {def}{pop pop} ifelse } forall
+ /Encoding exch def
+ currentdict
+end
+definefont pop
+} bdef
+
+/isroman {
+findfont /CharStrings get
+/Agrave known
+} bdef
+
+/FMSR {
+3 1 roll 1 index
+dup isroman
+{reencode} {pop pop} ifelse
+exch FMS
+} bdef
+
+/csm {
+ 1 dpi2point div -1 dpi2point div scale
+ neg translate
+ landscapeMode eq {90 rotate} if
+ } bdef
+
+% line types: solid, dotted, dashed, dotdash
+/SO { [] 0 setdash } bdef
+/DO { [.5 dpi2point mul 4 dpi2point mul] 0 setdash } bdef
+/DA { [6 dpi2point mul] 0 setdash } bdef
+/DD { [.5 dpi2point mul 4 dpi2point mul 6 dpi2point mul 4 dpi2point mul] 0 setdash } bdef
+
+% macros for lines and objects
+/L {
+ lineto
+ stroke
+ } bdef
+/MP {
+ 3 1 roll moveto
+ 1 sub {rlineto} repeat
+ } bdef
+/AP {
+ {rlineto} repeat
+ } bdef
+/PP {
+ closepath fill
+ } bdef
+/DP {
+ closepath stroke
+ } bdef
+/MR {
+ 4 -2 roll moveto
+ dup 0 exch rlineto
+ exch 0 rlineto
+ neg 0 exch rlineto
+ closepath
+ } bdef
+/FR {
+ MR stroke
+ } bdef
+/PR {
+ MR fill
+ } bdef
+/L1i {
+ { currentfile picstr readhexstring pop } image
+ } bdef
+
+/tMatrix matrix def
+/MakeOval {
+ newpath
+ tMatrix currentmatrix pop
+ translate scale
+ 0 0 1 0 360 arc
+ tMatrix setmatrix
+ } bdef
+/FO {
+ MakeOval
+ stroke
+ } bdef
+/PO {
+ MakeOval
+ fill
+ } bdef
+
+/PD {
+ 2 copy moveto lineto stroke
+ } bdef
+
+
+currentdict end def
+%%EndProlog
+
+%%BeginSetup
+MathWorks begin
+
+0 cap
+
+end
+%%EndSetup
+
+%%Page: 1 1
+%%BeginPageSetup
+%%PageBoundingBox: 97 197 502 604
+MathWorks begin
+bpage
+%%EndPageSetup
+
+%%BeginObject: graph1 1
+bplot
+
+/dpi2point 12 def
+portraitMode 0216 7344 csm
+
+ 956 91 4862 4883 MR c np
+76 dict begin %Colortable dictionary
+/c0 { 0 0 0 sr} bdef
+/c1 { 1 1 1 sr} bdef
+/c2 { 1 0 0 sr} bdef
+/c3 { 0 1 0 sr} bdef
+/c4 { 0 0 1 sr} bdef
+/c5 { 1 1 0 sr} bdef
+/c6 { 1 0 1 sr} bdef
+/c7 { 0 1 1 sr} bdef
+%%IncludeResource: font Helvetica
+/Helvetica /ISOLatin1Encoding 144 FMSR
+
+1 j
+c1
+ 0 0 6912 5185 PR
+6 w
+DO
+4 w
+c0
+1463 4613 mt 1463 388 L
+1463 388 mt 1463 388 L
+2308 4613 mt 2308 388 L
+2308 388 mt 2308 388 L
+3153 4613 mt 3153 388 L
+3153 388 mt 3153 388 L
+3999 4613 mt 3999 388 L
+3999 388 mt 3999 388 L
+4844 4613 mt 4844 388 L
+4844 388 mt 4844 388 L
+5689 4613 mt 5689 388 L
+5689 388 mt 5689 388 L
+1463 4613 mt 5689 4613 L
+5689 4613 mt 5689 4613 L
+1463 4191 mt 5689 4191 L
+5689 4191 mt 5689 4191 L
+1463 3768 mt 5689 3768 L
+5689 3768 mt 5689 3768 L
+1463 3346 mt 5689 3346 L
+5689 3346 mt 5689 3346 L
+1463 2923 mt 5689 2923 L
+5689 2923 mt 5689 2923 L
+1463 2501 mt 5689 2501 L
+5689 2501 mt 5689 2501 L
+1463 2078 mt 5689 2078 L
+5689 2078 mt 5689 2078 L
+1463 1655 mt 5689 1655 L
+5689 1655 mt 5689 1655 L
+1463 1233 mt 5689 1233 L
+5689 1233 mt 5689 1233 L
+1463 811 mt 5689 811 L
+5689 811 mt 5689 811 L
+1463 388 mt 5689 388 L
+5689 388 mt 5689 388 L
+1463 4613 mt 1463 388 L
+1463 388 mt 5689 388 L
+1463 4613 mt 1463 388 L
+1463 388 mt 5689 388 L
+1463 4613 mt 1463 388 L
+1463 388 mt 5689 388 L
+SO
+6 w
+1463 4613 mt 5689 4613 L
+1463 388 mt 5689 388 L
+5689 4613 mt 5689 388 L
+1463 4613 mt 1463 388 L
+5689 4613 mt 5689 4613 L
+1463 4613 mt 1463 4613 L
+1463 4613 mt 5689 4613 L
+1463 4613 mt 1463 388 L
+1463 4613 mt 1463 4613 L
+1463 4613 mt 1463 4571 L
+1463 388 mt 1463 430 L
+1423 4782 mt
+(0) s
+2308 4613 mt 2308 4571 L
+2308 388 mt 2308 430 L
+2268 4782 mt
+(2) s
+3153 4613 mt 3153 4571 L
+3153 388 mt 3153 430 L
+3113 4782 mt
+(4) s
+3999 4613 mt 3999 4571 L
+3999 388 mt 3999 430 L
+3959 4782 mt
+(6) s
+4844 4613 mt 4844 4571 L
+4844 388 mt 4844 430 L
+4804 4782 mt
+(8) s
+5689 4613 mt 5689 4571 L
+5689 388 mt 5689 430 L
+5609 4782 mt
+(10) s
+1463 4613 mt 1505 4613 L
+5689 4613 mt 5647 4613 L
+1264 4666 mt
+(-1) s
+1463 4191 mt 1505 4191 L
+5689 4191 mt 5647 4191 L
+1144 4244 mt
+(-0.8) s
+1463 3768 mt 1505 3768 L
+5689 3768 mt 5647 3768 L
+1144 3821 mt
+(-0.6) s
+1463 3346 mt 1505 3346 L
+5689 3346 mt 5647 3346 L
+1144 3399 mt
+(-0.4) s
+1463 2923 mt 1505 2923 L
+5689 2923 mt 5647 2923 L
+1144 2976 mt
+(-0.2) s
+1463 2501 mt 1505 2501 L
+5689 2501 mt 5647 2501 L
+1348 2554 mt
+(0) s
+1463 2078 mt 1505 2078 L
+5689 2078 mt 5647 2078 L
+1228 2131 mt
+(0.2) s
+1463 1655 mt 1505 1655 L
+5689 1655 mt 5647 1655 L
+1228 1708 mt
+(0.4) s
+1463 1233 mt 1505 1233 L
+5689 1233 mt 5647 1233 L
+1228 1286 mt
+(0.6) s
+1463 811 mt 1505 811 L
+5689 811 mt 5647 811 L
+1228 864 mt
+(0.8) s
+1463 388 mt 1505 388 L
+5689 388 mt 5647 388 L
+1348 441 mt
+(1) s
+1463 388 mt 5689 388 L
+1463 4613 mt 5689 4613 L
+1463 4613 mt 1463 388 L
+5689 4613 mt 5689 388 L
+1463 388 mt 1463 388 L
+5689 388 mt 5689 388 L
+gs 1463 388 4227 4226 MR c np
+42 183 43 192 42 200 42 206 42 210 43 211 42 210 42 208
+42 204 43 196 42 188 42 177 42 165 43 151 42 135 42 119
+42 100 43 82 42 61 42 42 42 20 43 -1 42 -22 42 -43
+42 -63 43 -83 42 -102 42 -120 43 -137 42 -152 42 -166 42 -178
+43 -188 42 -197 42 -204 42 -208 43 -211 42 -211 42 -209 42 -206
+43 -199 42 -192 42 -182 42 -170 43 -157 42 -142 42 -126 42 -108
+43 -89 42 -70 42 -50 43 -29 42 -8 42 13 42 34 43 55
+42 75 42 94 42 113 43 130 42 146 42 160 42 173 43 185
+42 193 42 202 42 206 43 210 42 211 42 211 42 207 43 202
+42 195 42 186 42 176 43 162 42 149 42 132 43 116 42 97
+42 79 42 58 43 37 42 17 42 -4 42 -26 43 -46 42 -67
+42 -86 42 -105 43 -123 42 -139 42 -155 42 -168 43 -180 42 -190
+42 -198 42 -205 43 -209 1505 2290 100 MP stroke
+42 -211 1463 2501 2 MP stroke
+42 -106 43 -87 42 -67 42 -48 42 -26 43 -5 42 15 42 37
+42 57 43 78 42 96 42 115 42 132 43 148 42 162 42 175
+42 185 43 195 42 202 42 207 42 210 43 211 42 211 42 206
+42 202 43 194 42 185 42 174 43 161 42 146 42 131 42 113
+43 95 42 76 42 56 42 35 43 14 42 -7 42 -28 42 -49
+43 -69 42 -89 42 -107 42 -125 43 -141 42 -157 42 -169 42 -182
+43 -191 42 -199 42 -205 43 -210 42 -211 42 -210 42 -209 43 -204
+42 -197 42 -189 42 -179 43 -166 42 -153 42 -137 42 -121 43 -103
+42 -84 42 -64 42 -44 43 -22 42 -2 42 19 42 40 43 61
+42 81 42 99 42 118 43 135 42 150 42 164 43 177 42 187
+42 197 42 203 43 207 42 211 42 211 42 210 43 206 42 200
+42 193 42 183 43 172 42 158 42 144 42 128 43 110 42 92
+42 73 42 52 43 31 1505 399 100 MP stroke
+42 11 1463 388 2 MP stroke
+
+gr
+3194 4942 mt
+(\\tex[t][t]{$t$}) s
+1090 3419 mt -90 rotate
+(\\tex[B][B]{$\\sin\(t\)$, $\\cos\(t\)$}) s
+90 rotate
+2314 273 mt
+(\\tex[B][B]{Plot of $\\sin\(t\)$ and $\\cos\(t\)$}) s
+2689 2048 mt
+(p1) s
+3956 3343 mt
+(p2) s
+5224 1495 mt
+(p2) s
+3486 2178 mt -78 rotate
+(p3) s
+78 rotate
+
+end
+
+eplot
+%%EndObject graph 1
+
+epage
+end
+
+showpage
+
+%%Trailer
+%%EOF
diff --git a/macros/latex/contrib/psfrag/pfgguide.pdf b/macros/latex/contrib/psfrag/pfgguide.pdf
new file mode 100644
index 0000000000..3e7a895a9f
--- /dev/null
+++ b/macros/latex/contrib/psfrag/pfgguide.pdf
Binary files differ
diff --git a/macros/latex/contrib/psfrag/pfgguide.ps b/macros/latex/contrib/psfrag/pfgguide.ps
new file mode 100644
index 0000000000..143a8ae266
--- /dev/null
+++ b/macros/latex/contrib/psfrag/pfgguide.ps
@@ -0,0 +1,2536 @@
+%!PS-Adobe-2.0
+%%Creator: dvips(k) 5.95a Copyright 2005 Radical Eye Software
+%%Title: pfgguide.dvi
+%%Pages: 12
+%%PageOrder: Ascend
+%%BoundingBox: 0 0 595 842
+%%DocumentFonts: Times-Roman Helvetica Symbol Courier Times-Bold
+%%+ Helvetica-Bold CMSY10 Times-Italic CMR10 LINE10 Helvetica-Oblique
+%%EndComments
+%DVIPSWebPage: (www.radicaleye.com)
+%DVIPSCommandLine: dvips pfgguide
+%DVIPSParameters: dpi=600
+%DVIPSSource: TeX output 2005.06.15:1731
+%%BeginProcSet: tex.pro 0 0
+%!
+/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
+N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72
+mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0
+0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{
+landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize
+mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[
+matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round
+exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{
+statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]
+N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin
+/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array
+/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2
+array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N
+df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A
+definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get
+}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}
+B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr
+1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S
+/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy
+setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask
+restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn
+/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put
+}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{
+bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A
+mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{
+SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{
+userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X
+1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4
+index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N
+/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{
+/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)
+(LaserWriter 16/600)]{A length product length le{A length product exch 0
+exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse
+end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask
+grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}
+imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round
+exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto
+fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p
+delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}
+B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{
+p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S
+rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end
+
+%%EndProcSet
+%%BeginProcSet: psfrag.pro 0 0
+%%
+%% This is file `psfrag.pro',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% psfrag.dtx (with options: `filepro')
+%%
+%% Copyright (c) 1996 Craig Barratt, Michael C. Grant, and David Carlisle.
+%% All rights reserved.
+%%
+%% This file is part of the PSfrag package.
+%%
+userdict begin
+/PSfragLib 90 dict def
+/PSfragDict 6 dict def
+/PSfrag { PSfragLib begin load exec end } bind def
+end
+PSfragLib begin
+/RO /readonly load def
+/CP /currentpoint load def
+/CM /currentmatrix load def
+/B { bind RO def } bind def
+/X { exch def } B
+/MD { { X } forall } B
+/OE { end exec PSfragLib begin } B
+/S false def
+/tstr 8 string def
+/islev2 { languagelevel } stopped { false } { 2 ge } ifelse def
+[ /sM /tM /srcM /dstM /dM /idM /srcFM /dstFM ] { matrix def } forall
+sM currentmatrix RO pop
+dM defaultmatrix RO idM invertmatrix RO pop
+srcFM identmatrix pop
+/Hide { gsave { CP } stopped not newpath clip { moveto } if } B
+/Unhide { { CP } stopped not grestore { moveto } if } B
+/setrepl islev2 {{ /glob currentglobal def true setglobal array astore
+ globaldict exch /PSfrags exch put glob setglobal }}
+ {{ array astore /PSfrags X }} ifelse B
+/getrepl islev2 {{ globaldict /PSfrags get aload length }}
+ {{ PSfrags aload length }} ifelse B
+/convert {
+ /src X src length string
+ /c 0 def src length {
+ dup c src c get dup 32 lt { pop 32 } if put /c c 1 add def
+ } repeat
+} B
+/Begin {
+ /saver save def
+ srcFM exch 3 exch put
+ 0 ne /debugMode X 0 setrepl
+ dup /S exch dict def { S 3 1 roll exch convert exch put } repeat
+ srcM CM dup invertmatrix pop
+ mark { currentdict { end } stopped { pop exit } if } loop
+ PSfragDict counttomark { begin } repeat pop
+} B
+/End {
+ mark { currentdict end dup PSfragDict eq { pop exit } if } loop
+ counttomark { begin } repeat pop
+ getrepl saver restore
+ 7 idiv dup /S exch dict def {
+ 6 array astore /mtrx X tstr cvs /K X
+ S K [ S K known { S K get aload pop } if mtrx ] put
+ } repeat
+} B
+/Place {
+ tstr cvs /K X
+ S K known {
+ bind /proc X tM CM pop
+ CP /cY X /cX X
+ 0 0 transform idtransform neg /aY X neg /aX X
+ S K get dup length /maxiter X
+ /iter 1 def {
+ iter maxiter ne { /saver save def } if
+ tM setmatrix aX aY translate
+ [ exch aload pop idtransform ] concat
+ cX neg cY neg translate cX cY moveto
+ /proc load OE
+ iter maxiter ne { saver restore /iter iter 1 add def } if
+ } forall
+ /noXY { CP /cY X /cX X } stopped def
+ tM setmatrix noXY { newpath } { cX cY moveto } ifelse
+ } {
+ Hide OE Unhide
+ } ifelse
+} B
+/normalize {
+ 2 index dup mul 2 index dup mul add sqrt div
+ dup 4 -1 roll exch mul 3 1 roll mul
+} B
+/replace {
+ aload pop MD
+ CP /bY X /lX X gsave sM setmatrix
+ str stringwidth abs exch abs add dup 0 eq
+ { pop } { 360 exch div dup scale } ifelse
+ lX neg bY neg translate newpath lX bY moveto
+ str { /ch X ( ) dup 0 ch put false charpath ch Kproc } forall
+ flattenpath pathbbox [ /uY /uX /lY /lX ] MD
+ CP grestore moveto
+ currentfont /FontMatrix get dstFM copy dup
+ 0 get 0 lt { uX lX /uX X /lX X } if
+ 3 get 0 lt { uY lY /uY X /lY X } if
+ /cX uX lX add 0.5 mul def
+ /cY uY lY add 0.5 mul def
+ debugMode { gsave 0 setgray 1 setlinewidth
+ lX lY moveto lX uY lineto uX uY lineto uX lY lineto closepath
+ lX bY moveto uX bY lineto lX cY moveto uX cY lineto
+ cX lY moveto cX uY lineto stroke
+ grestore } if
+ dstFM dup invertmatrix dstM CM srcM
+ 2 { dstM concatmatrix } repeat pop
+ getrepl /temp X
+ S str convert get {
+ aload pop [ /rot /scl /loc /K ] MD
+ /aX cX def /aY cY def
+ loc {
+ dup 66 eq { /aY bY def } { % B
+ dup 98 eq { /aY lY def } { % b
+ dup 108 eq { /aX lX def } { % l
+ dup 114 eq { /aX uX def } { % r
+ dup 116 eq { /aY uY def } % t
+ if } ifelse } ifelse } ifelse } ifelse pop
+ } forall
+ K srcFM rot tM rotate dstM
+ 2 { tM concatmatrix } repeat aload pop pop pop
+ 2 { scl normalize 4 2 roll } repeat
+ aX aY transform
+ /temp temp 7 add def
+ } forall
+ temp setrepl
+} B
+/Rif {
+ S 3 index convert known { pop replace } { exch pop OE } ifelse
+} B
+/XA { bind [ /Kproc /str } B /XC { ] 2 array astore def } B
+/xs { pop } XA XC
+/xks { /kern load OE } XA /kern XC
+/xas { pop ax ay rmoveto } XA /ay /ax XC
+/xws { c eq { cx cy rmoveto } if } XA /c /cy /cx XC
+/xaws { ax ay rmoveto c eq { cx cy rmoveto } if }
+ XA /ay /ax /c /cy /cx XC
+/raws { xaws { awidthshow } Rif } B
+/rws { xws { widthshow } Rif } B
+/rks { xks { kshow } Rif } B
+/ras { xas { ashow } Rif } B
+/rs { xs { show } Rif } B
+/rrs { getrepl dup 2 add -1 roll //restore exec setrepl } B
+PSfragDict begin
+islev2 not { /restore { /rrs PSfrag } B } if
+/show { /rs PSfrag } B
+/kshow { /rks PSfrag } B
+/ashow { /ras PSfrag } B
+/widthshow { /rws PSfrag } B
+/awidthshow { /raws PSfrag } B
+end PSfragDict RO pop
+end
+
+%%EndProcSet
+%%BeginProcSet: 8r.enc 0 0
+% File 8r.enc TeX Base 1 Encoding Revision 2.0 2002-10-30
+%
+% @@psencodingfile@{
+% author = "S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry,
+% W. Schmidt, P. Lehman",
+% version = "2.0",
+% date = "30 October 2002",
+% filename = "8r.enc",
+% email = "tex-fonts@@tug.org",
+% docstring = "This is the encoding vector for Type1 and TrueType
+% fonts to be used with TeX. This file is part of the
+% PSNFSS bundle, version 9"
+% @}
+%
+% The idea is to have all the characters normally included in Type 1 fonts
+% available for typesetting. This is effectively the characters in Adobe
+% Standard encoding, ISO Latin 1, Windows ANSI including the euro symbol,
+% MacRoman, and some extra characters from Lucida.
+%
+% Character code assignments were made as follows:
+%
+% (1) the Windows ANSI characters are almost all in their Windows ANSI
+% positions, because some Windows users cannot easily reencode the
+% fonts, and it makes no difference on other systems. The only Windows
+% ANSI characters not available are those that make no sense for
+% typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen
+% (173). quotesingle and grave are moved just because it's such an
+% irritation not having them in TeX positions.
+%
+% (2) Remaining characters are assigned arbitrarily to the lower part
+% of the range, avoiding 0, 10 and 13 in case we meet dumb software.
+%
+% (3) Y&Y Lucida Bright includes some extra text characters; in the
+% hopes that other PostScript fonts, perhaps created for public
+% consumption, will include them, they are included starting at 0x12.
+% These are /dotlessj /ff /ffi /ffl.
+%
+% (4) hyphen appears twice for compatibility with both ASCII and Windows.
+%
+% (5) /Euro was assigned to 128, as in Windows ANSI
+%
+% (6) Missing characters from MacRoman encoding incorporated as follows:
+%
+% PostScript MacRoman TeXBase1
+% -------------- -------------- --------------
+% /notequal 173 0x16
+% /infinity 176 0x17
+% /lessequal 178 0x18
+% /greaterequal 179 0x19
+% /partialdiff 182 0x1A
+% /summation 183 0x1B
+% /product 184 0x1C
+% /pi 185 0x1D
+% /integral 186 0x81
+% /Omega 189 0x8D
+% /radical 195 0x8E
+% /approxequal 197 0x8F
+% /Delta 198 0x9D
+% /lozenge 215 0x9E
+%
+/TeXBase1Encoding [
+% 0x00
+ /.notdef /dotaccent /fi /fl
+ /fraction /hungarumlaut /Lslash /lslash
+ /ogonek /ring /.notdef /breve
+ /minus /.notdef /Zcaron /zcaron
+% 0x10
+ /caron /dotlessi /dotlessj /ff
+ /ffi /ffl /notequal /infinity
+ /lessequal /greaterequal /partialdiff /summation
+ /product /pi /grave /quotesingle
+% 0x20
+ /space /exclam /quotedbl /numbersign
+ /dollar /percent /ampersand /quoteright
+ /parenleft /parenright /asterisk /plus
+ /comma /hyphen /period /slash
+% 0x30
+ /zero /one /two /three
+ /four /five /six /seven
+ /eight /nine /colon /semicolon
+ /less /equal /greater /question
+% 0x40
+ /at /A /B /C
+ /D /E /F /G
+ /H /I /J /K
+ /L /M /N /O
+% 0x50
+ /P /Q /R /S
+ /T /U /V /W
+ /X /Y /Z /bracketleft
+ /backslash /bracketright /asciicircum /underscore
+% 0x60
+ /quoteleft /a /b /c
+ /d /e /f /g
+ /h /i /j /k
+ /l /m /n /o
+% 0x70
+ /p /q /r /s
+ /t /u /v /w
+ /x /y /z /braceleft
+ /bar /braceright /asciitilde /.notdef
+% 0x80
+ /Euro /integral /quotesinglbase /florin
+ /quotedblbase /ellipsis /dagger /daggerdbl
+ /circumflex /perthousand /Scaron /guilsinglleft
+ /OE /Omega /radical /approxequal
+% 0x90
+ /.notdef /.notdef /.notdef /quotedblleft
+ /quotedblright /bullet /endash /emdash
+ /tilde /trademark /scaron /guilsinglright
+ /oe /Delta /lozenge /Ydieresis
+% 0xA0
+ /.notdef /exclamdown /cent /sterling
+ /currency /yen /brokenbar /section
+ /dieresis /copyright /ordfeminine /guillemotleft
+ /logicalnot /hyphen /registered /macron
+% 0xD0
+ /degree /plusminus /twosuperior /threesuperior
+ /acute /mu /paragraph /periodcentered
+ /cedilla /onesuperior /ordmasculine /guillemotright
+ /onequarter /onehalf /threequarters /questiondown
+% 0xC0
+ /Agrave /Aacute /Acircumflex /Atilde
+ /Adieresis /Aring /AE /Ccedilla
+ /Egrave /Eacute /Ecircumflex /Edieresis
+ /Igrave /Iacute /Icircumflex /Idieresis
+% 0xD0
+ /Eth /Ntilde /Ograve /Oacute
+ /Ocircumflex /Otilde /Odieresis /multiply
+ /Oslash /Ugrave /Uacute /Ucircumflex
+ /Udieresis /Yacute /Thorn /germandbls
+% 0xE0
+ /agrave /aacute /acircumflex /atilde
+ /adieresis /aring /ae /ccedilla
+ /egrave /eacute /ecircumflex /edieresis
+ /igrave /iacute /icircumflex /idieresis
+% 0xF0
+ /eth /ntilde /ograve /oacute
+ /ocircumflex /otilde /odieresis /divide
+ /oslash /ugrave /uacute /ucircumflex
+ /udieresis /yacute /thorn /ydieresis
+] def
+
+
+%%EndProcSet
+%%BeginProcSet: texps.pro 0 0
+%!
+TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2
+index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll
+exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]FontType 0
+ne{/Metrics exch def dict begin Encoding{exch dup type/integertype ne{
+pop pop 1 sub dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get
+div def}ifelse}forall Metrics/Metrics currentdict end def}{{1 index type
+/nametype eq{exit}if exch pop}loop}ifelse[2 index currentdict end
+definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{dup
+sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 roll
+mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def dup[
+exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}if}
+forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}def
+end
+
+%%EndProcSet
+%%BeginProcSet: special.pro 0 0
+%!
+TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N
+/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N
+/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N
+/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{
+/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho
+X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B
+/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{
+/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known
+{userdict/md get type/dicttype eq{userdict begin md length 10 add md
+maxlength ge{/md md dup length 20 add dict copy def}if end md begin
+/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S
+atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{
+itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll
+transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll
+curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf
+pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}
+if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1
+-1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3
+get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip
+yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub
+neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{
+noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop
+90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get
+neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr
+1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr
+2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4
+-1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S
+TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{
+Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale
+}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState
+save N userdict maxlength dict begin/magscale true def normalscale
+currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts
+/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x
+psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx
+psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub
+TR/showpage{}N/erasepage{}N/setpagedevice{pop}N/copypage{}N/p 3 def
+@MacSetUp}N/doclip{psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll
+newpath 4 copy 4 2 roll moveto 6 -1 roll S lineto S lineto S lineto
+closepath clip newpath moveto}N/endTexFig{end psf$SavedState restore}N
+/@beginspecial{SDict begin/SpecialSave save N gsave normalscale
+currentpoint TR @SpecialDefaults count/ocount X/dcount countdictstack N}
+N/@setspecial{CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs
+neg 0 rlineto closepath clip}if ho vo TR hsc vsc scale ang rotate
+rwiSeen{rwi urx llx sub div rhiSeen{rhi ury lly sub div}{dup}ifelse
+scale llx neg lly neg TR}{rhiSeen{rhi ury lly sub div dup scale llx neg
+lly neg TR}if}ifelse CLIP 2 eq{newpath llx lly moveto urx lly lineto urx
+ury lineto llx ury lineto closepath clip}if/showpage{}N/erasepage{}N
+/setpagedevice{pop}N/copypage{}N newpath}N/@endspecial{count ocount sub{
+pop}repeat countdictstack dcount sub{end}repeat grestore SpecialSave
+restore end}N/@defspecial{SDict begin}N/@fedspecial{end}B/li{lineto}B
+/rl{rlineto}B/rc{rcurveto}B/np{/SaveX currentpoint/SaveY X N 1
+setlinecap newpath}N/st{stroke SaveX SaveY moveto}N/fil{fill SaveX SaveY
+moveto}N/ellipse{/endangle X/startangle X/yrad X/xrad X/savematrix
+matrix currentmatrix N TR xrad yrad scale 0 0 1 startangle endangle arc
+savematrix setmatrix}N end
+
+%%EndProcSet
+%%BeginFont: LINE10
+%!PS-AdobeFont-1.1: LINE10 1.001
+%%CreationDate: 1992 Oct 23 20:22:05
+%%RevisionDate: 2001 Jun 05 20:22:05
+% Copyright (C) 1997, 2001 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.001) readonly def
+/Notice (Copyright (C) 1997, 2001 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (LINE10) readonly def
+/FamilyName (LaTeX) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle 0 def
+/isFixedPitch false def
+end readonly def
+/FontName /LINE10 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 1 /a1 put
+dup 11 /a11 put
+readonly def
+/FontBBox{-150 -150 1020 1020}readonly def
+currentdict end
+currentfile eexec
+D9D66F637A9E5292A4933615152D29EEC26E1BED2E48CAB7AC058698EA30B07E
+F8BDB66981B14445E1107420FDAF32EDBD5C26E35B334E3AF24373B2A13984D9
+1D56801ACCF98612DE2C19685E0F4D52369AD642D169AB57DAB10665C6C01538
+497544391FABD08A483766E9B5C7ABA9A537C053A8ADC16DEBD8B5C9E1EDEB21
+E4E89B0945C0737B96F0194585BE0D9B958F1030EA84710C31971BA7E93777C2
+0658995DC8702442780303E948079822B9EE0C531A5CC49578EB9E683CB77495
+DF613FBDC4536BD7A90F044B7EEE6EACA2042539F62789EA39AA16433AC4BD0F
+98AAA04894F5487C279D2766B50B23E16D7F1023E387FA4165DF522DB290D390
+B669550A43638C3C9CC38C7667A22D27F9DB1542620110A8671B2713C8DB93D3
+4C500474AC190831F9C7441DC4A7C27EE88DAEF10D7AEE6FDB22E7625E802B4C
+FCEE0DC79988734BDA39B9896B1833D4BEC4F91DB321F343F57B3FC5ECA13AEA
+AB108165934BDE65D2EB5A62BD395ABA20F0389A1B71270649CE1A93B29040EB
+B3166F9EBC3791671B6EDCEB171F3CCDAA90BBD5EE5042AAC2AD6D838F79E008
+43845E5FCF0B3D71E21543F491832420B45492BFE5D3E278268908D3CA704A48
+AF6C6954A03244409C49A178680D62BC6277BE6A8CF4DFFA69775BB8FCFE579F
+0DFD00493CC18A38F7AA197A43E96F5986EB21F77B0C955332C87B18A5F72982
+E3D0B0554AE03D86FF10237036E2CBE514A9BFC5A4F5B2C9E5667EE2B64AB536
+766C45D847C52B75FCF57652200536319F09D0FCEA025A5F5CA61CD63812083D
+CE11E82271251C41D0550CF754C13A32F847CC7ED53C14742D3C5AF8E412E542
+DAC233E8C9FA03A4ED4BB95A9B831AF45E02D31003517156A429F54B6E1B1727
+520DE349B22A26C73A2D3CCE0733F2E594DD8E091E2464A31B86C81CF3616399
+F042260B75E2F3010CC15E843A7F7388C01BA40AC4E4F1D50059A55BB5111089
+F167B796709EE54D544E1AF445A3E791EDC71A6D6F2F298A20014956D52138CE
+FB138CE99299A8B41905FF9C0D5ABAA5F7CF041C903E0682BC980DD485E44E9B
+43C76B1A9EB6ECFA7294A28A48CD87A1321563D1A628B9D3D33F0D53B4B3A27A
+BA2BADE155BE56C7B3E3CEC2B2B45F1B42E8F95F73EA7C2E9C07327E3D3CA304
+C10607B58711BA3852A8A6CDC8E69A71233D245D8FFC1BAFA2CFAC4395AF7588
+7682F2F0B02E52531893742D9EB287A4F0D98E4065F5BB2761A7CDACEF134731
+4281D99809A4C95EFA7D8798F36EA68E599886E46E86ABBDD4840CD009AACCEC
+9BEB7333C48DBF87DE5B452A2DA8731E6D226EC60CA9CFBB41E92F171A1AD16D
+3265F79BF5E0DEFEF96A13C0CCB25B401BE6E44C39169B5F8EB9A617C4BB9891
+599D2B83D187262F067766FE031215B4A728EA1B1966B4FDEE2326AC9E9ACC1A
+F315E562D3BB89C78B8DD5
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMSY10
+%!PS-AdobeFont-1.1: CMSY10 1.0
+%%CreationDate: 1991 Aug 15 07:20:57
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.0) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMSY10) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle -14.035 def
+/isFixedPitch false def
+end readonly def
+/FontName /CMSY10 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 3 /asteriskmath put
+dup 15 /bullet put
+dup 102 /braceleft put
+dup 103 /braceright put
+dup 104 /angbracketleft put
+dup 105 /angbracketright put
+readonly def
+/FontBBox{-29 -960 1116 775}readonly def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA052F09F9C8ADE9D907C058B87E9B6964
+7D53359E51216774A4EAA1E2B58EC3176BD1184A633B951372B4198D4E8C5EF4
+A213ACB58AA0A658908035BF2ED8531779838A960DFE2B27EA49C37156989C85
+E21B3ABF72E39A89232CD9F4237FC80C9E64E8425AA3BEF7DED60B122A52922A
+221A37D9A807DD01161779DDE7D31FF2B87F97C73D63EECDDA4C49501773468A
+27D1663E0B62F461F6E40A5D6676D1D12B51E641C1D4E8E2771864FC104F8CBF
+5B78EC1D88228725F1C453A678F58A7E1B7BD7CA700717D288EB8DA1F57C4F09
+0ABF1D42C5DDD0C384C7E22F8F8047BE1D4C1CC8E33368FB1AC82B4E96146730
+DE3302B2E6B819CB6AE455B1AF3187FFE8071AA57EF8A6616B9CB7941D44EC7A
+71A7BB3DF755178D7D2E4BB69859EFA4BBC30BD6BB1531133FD4D9438FF99F09
+4ECC068A324D75B5F696B8688EEB2F17E5ED34CCD6D047A4E3806D000C199D7C
+515DB70A8D4F6146FE068DC1E5DE8BC57032092296D5371C275E56FB4903A60E
+73A228140E5EF2E0D71747F3A8B306E22090E83708AEFF0B8676D01255BC5454
+06F619700FCFDC0FADA203089A15D02A816730E3C4DEF638AB890BB1FB2B5581
+3825B6C54CEB43B4B74569729292977C1F9E5B42E8B4EBBBB1BEBF12151A91C2
+A54B5C388351A1257CF4FC6AF3095E933A0230755BB24A0A1BEF4C9E17664CD6
+BF8A4892CA6C12BDE9B244E846A4703A4F3F091048A39591EC11773373693207
+270421D17BF7A1EFD7BEC1FEF36ADF30D039985858F120C0B43B3379CEB8DA5F
+B8D986A2323CAE1ABB4A8DB3B48350FAF525D5EA2F0C35807930E35FB61FBA06
+38062E5811546C86FF0065769776C0133FAC9BDCED6481597D251876845A0569
+ABAA4842375B2DEF19E1DBE929F2C242BE60CD578F7D2CD06FF406953456C4C5
+1C890D0E92E684EB83187ED2F2DAAAC06C49EAAF8A44A756969CDA18FEFDD806
+23A2D011B7203F539284F1267739C25766C0A3FBFF0AC5EEF2BE750AB20D98F7
+891068E41DB735E92CA8DD32A3F5F53783EC5230356E2BA500FC0E33FBF03804
+F272F688436CB13E04C6D3E19A8191EAF421F01D6C18231DE9AB6DF3EC92C65E
+90947D2FC5AFE307A25B21E14791A99437596363E0705F306DEF3693F437728E
+33DCE859B85F07B7C58C87D907F7038B375043113B80DEB6B8E4828D07310331
+DB990EDB09C9B5EC83EDE1057D67826A03B9135763C18A54571044C758FB4275
+B983D162EE77512AFC7846AB3FA6E2843E5DAD071F7E772D032EC0512C06A1CF
+BAE6199DC16E2F69C3ED170867DAA8FEF96AE4A99CE3AD61FB14529E6182A19E
+D6A7F11CC40DBC5628DBC63307E60F8A7A8003C9804799A0717264193F394FBE
+0DB3AE96491D49F3B761E7FFDD7AE3E8F6FFBC1D32A9DD507015D3E866D1553A
+F6DDBB27328C27AE77DC1D6ADF9D99AB50DC11F8C7EA09575EF47BDFB8FF9C0B
+2F3C0DE2F1E16DEF5DA772F23473AC5E30F7A251E44C6F0F225A70F13E69EF72
+6A8C8771E711B6172AC110DE4CA7994BB97234ED8CA9866DDF43E5624123BA48
+F763944749562FD5AC7D80B4C0B8181A5E1DFFA86D7B7DDA92D1B9580F960116
+795001BA2F405F1964D459BEB7BCD3DF394F1DF4DB17A7AD2869E3DB7F396F5D
+5B8293240AD78AF284161EC60F84DC781442298D8B2EE41B618378159AA6237A
+714371438EC524FC31C5F885DC1CFA08A9FFFC567D11C5DD46B34769B4B649CC
+B5BC8B6256795F6C09BE9159F329E6390A5C9BEC80EC8087E0F475DC165A584F
+24D82B5EEB71B389D8F6917450273C84E99AB3D3E09C4D7893B4D699117F7F44
+A747A2CB3DB6352FD9437D0532E127054CE9BD130CD7F6F79120C8DA0D9D73D6
+2A1654C846F4F2CAA6BB4E79BE36822B2C2AE54F14ECCAF20C396EE0A2734A37
+DAA0928B05D14C8285693F5B87C75BD19017FBA0C3F73F169140074737EC1195
+A7322EE266EB253D800044
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMR10
+%!PS-AdobeFont-1.1: CMR10 1.00B
+%%CreationDate: 1992 Feb 19 19:54:52
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.00B) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMR10) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle 0 def
+/isFixedPitch false def
+end readonly def
+/FontName /CMR10 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 40 /parenleft put
+dup 41 /parenright put
+dup 43 /plus put
+readonly def
+/FontBBox{-251 -250 1009 969}readonly def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891
+016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171
+9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F
+D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758
+469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8
+2BDBF16FBC7512FAA308A093FE5CF7158F1163BC1F3352E22A1452E73FECA8A4
+87100FB1FFC4C8AF409B2067537220E605DA0852CA49839E1386AF9D7A1A455F
+D1F017CE45884D76EF2CB9BC5821FD25365DDEA6E45F332B5F68A44AD8A530F0
+92A36FAC8D27F9087AFEEA2096F839A2BC4B937F24E080EF7C0F9374A18D565C
+295A05210DB96A23175AC59A9BD0147A310EF49C551A417E0A22703F94FF7B75
+409A5D417DA6730A69E310FA6A4229FC7E4F620B0FC4C63C50E99E179EB51E4C
+4BC45217722F1E8E40F1E1428E792EAFE05C5A50D38C52114DFCD24D54027CBF
+2512DD116F0463DE4052A7AD53B641A27E81E481947884CE35661B49153FA19E
+0A2A860C7B61558671303DE6AE06A80E4E450E17067676E6BBB42A9A24ACBC3E
+B0CA7B7A3BFEA84FED39CCFB6D545BB2BCC49E5E16976407AB9D94556CD4F008
+24EF579B6800B6DC3AAF840B3FC6822872368E3B4274DD06CA36AF8F6346C11B
+43C772CC242F3B212C4BD7018D71A1A74C9A94ED0093A5FB6557F4E0751047AF
+D72098ECA301B8AE68110F983796E581F106144951DF5B750432A230FDA3B575
+5A38B5E7972AABC12306A01A99FCF8189D71B8DBF49550BAEA9CF1B97CBFC7CC
+96498ECC938B1A1710B670657DE923A659DB8757147B140A48067328E7E3F9C3
+7D1888B284904301450CE0BC15EEEA00E48CCD6388F3FC3C8578EF9A20A0E06E
+4F7ADDAF0E7D1E182D115BF1AD931977325AD391E72E2B13CC108E3726C11099
+E2000623188AAAC9F3E233EB253BDD8B0A4759A66A113E066238B0086AC1B634
+5ABFF90E4B5ED3FA69C22541981B2BFC9710AEF6B50A8BB53431C7B4D380D721
+639E005D6B4688EE16BFF48443E7C9E5FB5BC5883E271CB03428955D5B6A6C01
+F9D9F44C93F0C94D9D0728D2B98C558E20C6DF38DA980247CC7320494E0ADE56
+B2F1936E624CA50F8DD14C4674BD8164D73715D01E4845C4D0F9B44DFF396A3C
+73954C42DB561C79655F0ACFB39BDEF99E91B69C462AE7D188A88871FC02E84F
+B64D11F20453799F19073DAFCDA6BE29A327CA3A1B7B475033E246866AD6A5C9
+CE63E677E66AE9EE18E12C91BF75ED357C599C9A3444E1595FBF981120D00727
+B85DCAD9DE4BA1211A167D9AD853DC4CE60691A761FEEC7306D80D36CCA55E80
+26D1B1AC2FB42CFA5B30DA798C0A830C69BB2C71F7428375D75CD6C9AA1D742B
+8A2BBB915E4CCDB69681C7726D78EF2C675DFCE211C6ED0F44B35EFBA9DAE2DC
+765D21E1164E195825B688B71A9296EA8873B321A64BD8B7A6237EFCC7AAA1E4
+FEB313CBFCC919AF407F46EFE0F979C764B729B2C1813D912AD427C136FDDD94
+249ECFD113A132E85F5F67A29DCA100D055A7843C3BBF7BC51F4C9F3AA947906
+D08BC99CFDD2FB875971BC168F9D14A41E775DF5F653D2630374341487DB831F
+AF0A98BF0EFE0CBA545F9F567973AED72201BE47574C1DD602AC4ABD5AC1F000
+6DF7E34F70BFE92CB436856848E893C1799D74BA203FE33189289C2EFB52834A
+9F6E91114F6AAA8B0F4D6E3B637C1D2324A07C1F54B2B2657622922401DB73C3
+72BBA66F9B32CCB80A403D540D942EC556005640740D09828B793749C446C882
+2474AB7309F8042C6E
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+TeXDict begin 39139632 55387786 1000 600 600 (pfgguide.dvi)
+@start /Fa 141[27 10[45 23 4[45 13[55 2[55 80[{
+TeXBase1Encoding ReEncodeFont}6 81.8175 /Helvetica-Oblique
+rf /Fb 244[42 9[42 1[{}2 83.022 /LINE10 rf /Fc 190[38
+65[{TeXBase1Encoding ReEncodeFont}1 61.4362 /Times-Italic
+rf /Fd 135[50 4[50 35 3[55 80 3[25 1[55 30 50 3[50 13[60
+2[60 77[55 2[{TeXBase1Encoding ReEncodeFont}13 89.6632
+/Helvetica-Bold rf /Fe 150[32 32 104[{}2 83.022 /CMSY10
+rf /Ff 135[37 3[23 32 32 1[42 42 42 60 23 4[42 1[37 1[37
+1[42 8[51 3[46 7[46 6[51 69[{TeXBase1Encoding ReEncodeFont}17
+83.022 /Times-Italic rf /Fg 130[42 1[42 42 42 42 42 42
+42 42 42 42 42 42 42 42 42 42 42 1[42 42 42 42 42 42
+42 42 42 3[42 42 42 4[42 3[42 1[42 7[42 5[42 42 3[42
+1[42 42 42 42 1[42 42 1[42 42 42 42 42 42 42 42 1[42
+42 42 42 2[42 2[42 33[{.85 ExtendFont TeXBase1Encoding ReEncodeFont}57
+83.022 /Courier rf /Fi 212[71 1[35 35 40[{}3 90.9091
+/CMR10 rf /Fj 190[41 65[{TeXBase1Encoding ReEncodeFont}1
+66.4176 /Times-Italic rf /Fk 133[44 50 2[50 55 33 39
+44 1[55 50 55 83 28 55 1[28 55 50 33 44 55 44 55 50 11[72
+1[55 2[61 9[61 66 1[72 10[50 50 1[50 1[50 50 50 2[25
+43[55 2[{TeXBase1Encoding ReEncodeFont}36 99.6264 /Times-Bold
+rf /Fl 130[46 1[46 46 46 46 46 1[46 46 46 46 1[46 46
+46 46 46 46 46 46 46 46 46 46 46 46 46 46 3[46 46 46
+2[46 1[46 46 46 46 46 1[46 1[46 4[46 46 2[46 46 46 46
+46 46 2[46 2[46 46 46 46 1[46 46 46 46 46 46 46 46 1[46
+46 46 46 46 3[46 36[{.85 ExtendFont TeXBase1Encoding ReEncodeFont}64
+90.9091 /Courier rf /Fm 134[40 40 61 40 45 25 35 35 45
+45 45 45 66 25 2[25 45 45 25 40 45 40 45 45 8[56 3[51
+45 2[56 3[51 2[30 3[56 3[56 18[23 30 5[30 5[30 30[45
+2[{TeXBase1Encoding ReEncodeFont}36 90.9091 /Times-Italic
+rf /Fn 154[40 3[57 97[{}2 90.9091 /Symbol rf /Fo 150[35
+35 45 45 86[45 11[45 3[{}6 90.9091 /CMSY10 rf /Fp 190[48
+65[{TeXBase1Encoding ReEncodeFont}1 66.4176 /Times-Roman
+rf /Fq 141[42 10[66 36 4[60 13[72 2[72 80[{
+TeXBase1Encoding ReEncodeFont}6 107.596 /Helvetica-Bold
+rf /Fr 135[41 59 41 1[23 41 27 1[45 1[45 68 1[41 1[18
+45 45 23 45 45 41 1[45 8[55 1[55 1[50 55 2[55 64 59 4[23
+3[55 59 17[45 47[41 2[{TeXBase1Encoding ReEncodeFont}30
+81.8175 /Helvetica rf /Fs 104[91 2[40 40 24[40 45 45
+66 45 45 25 35 30 45 45 45 45 71 25 45 25 25 45 45 30
+40 45 40 45 40 7[66 66 86 66 66 56 51 61 1[51 66 66 81
+56 2[30 66 66 51 56 66 61 61 66 5[25 25 45 45 45 45 45
+45 45 45 45 45 25 23 30 23 2[30 30 30 71 4[30 29[51 51
+2[{TeXBase1Encoding ReEncodeFont}74 90.9091 /Times-Roman
+rf /Ft 141[32 10[50 27 4[45 13[55 2[55 80[{
+TeXBase1Encoding ReEncodeFont}6 81.8175 /Helvetica-Bold
+rf /Fu 135[45 66 45 51 30 35 40 1[51 45 51 76 25 51 1[25
+51 45 1[40 51 40 51 45 9[91 1[66 61 3[56 71 5[35 3[61
+1[66 1[66 1[45 5[45 45 45 45 45 45 45 45 45 45 3[23 44[{
+TeXBase1Encoding ReEncodeFont}42 90.9091 /Times-Bold
+rf /Fv 135[60 86 60 66 40 47 53 1[66 60 66 100 33 66
+1[33 66 60 1[53 66 53 66 60 9[120 1[86 80 3[73 93 5[47
+3[80 1[86 1[86 1[60 5[60 60 60 60 60 60 60 60 60 4[30
+44[{TeXBase1Encoding ReEncodeFont}41 119.552 /Times-Bold
+rf /Fw 138[51 51 51 51 1[51 51 51 1[51 4[51 51 51 51
+51 1[51 32[51 17[51 46[{.85 ExtendFont TeXBase1Encoding ReEncodeFont}16
+99.6264 /Courier rf /Fy 137[50 1[28 39 33 1[50 1[50 1[28
+2[28 50 2[44 50 44 1[44 19[89 5[72 2[72 66 1[72 7[50
+50 6[50 2[25 46[{TeXBase1Encoding ReEncodeFont}22 99.6264
+/Times-Roman rf /Fz 141[43 10[72 36 4[72 13[86 2[86 80[{
+TeXBase1Encoding ReEncodeFont}6 129.115 /Helvetica rf
+/FA 134[72 2[72 1[40 56 48 2[72 72 112 3[40 72 2[64 16[88
+32[72 6[36 44[{TeXBase1Encoding ReEncodeFont}14 143.462
+/Times-Roman rf end
+%%EndProlog
+%%BeginSetup
+%%Feature: *Resolution 600dpi
+TeXDict begin
+%%PaperSize: A4
+ end
+%%EndSetup
+%%Page: 1 1
+TeXDict begin 1 0 bop 1107 456 a FA(The)35 b Fz(PSfr)o(ag)g
+FA(system,)f(v)n(ersion)g(3)1218 758 y Fy(Michael)24
+b(C.)h(Grant)g(and)g(Da)n(vid)f(Carlisle)1264 874 y Fw
+(psfrag@rascals.stanford.edu)1670 1126 y Fy(11)h(April)f(1998)0
+1568 y Fv(Contents)0 1775 y Fu(1)91 b(What)23 b(is)h
+Ft(PSfra)o(g)p Fu(?)3087 b(1)0 1979 y(2)91 b Ft(PSfra)o(g)23
+b Fu(necessities)3037 b(2)136 2092 y Fs(2.1)96 b(Choosing)26
+b(a)d(PostScript)h(dri)n(v)o(er)67 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 b(2)0 2296 y Fu(3)91
+b(Installing)25 b Ft(PSfra)o(g)3064 b Fu(3)0 2500 y(4)91
+b(Usage)3488 b(3)0 2704 y(5)91 b(Commands)23 b(and)f(En)l(vir)n
+(onments)2538 b(4)136 2816 y Fs(5.1)96 b(Embedding)25
+b Fr(PSfr)o(ag)e Fs(operations)k(into)d(EPS)d(\002les)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 b(6)0 3020 y Fu(6)91
+b(P)o(ackage)24 b(Options)3066 b(7)0 3224 y(7)91 b(An)22
+b(Example)3237 b(7)136 3337 y Fs(7.1)96 b(Figure)25 b(scaling)g(and)f
+(resizing)61 b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)128 b(9)0 3541 y Fu(8)91 b(Common)23
+b(mistak)o(es,)h(kno)o(wn)d(pr)n(oblems,)j(and)e(b)n(ugs)1867
+b(10)136 3654 y Fs(8.1)96 b(Using)24 b Fr(PSfr)o(ag)f
+Fs(tags)i(properly)54 b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)82 b(10)136 3767 y(8.2)96 b(Problems)25
+b(using)f(some)g Fr(x\002g)f Fs(\002gures)49 b(.)c(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(11)136 3880 y(8.3)96
+b(Problems)25 b(using)f(old)g(v)o(ersions)i(of)d(the)h
+Fr(seminar)h Fs(package)37 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(11)0
+4083 y Fu(9)91 b(The)23 b Ft(PSfra)o(g)f Fu(mailing)i(list)2782
+b(12)0 4426 y Fv(1)119 b(What)30 b(is)f Fq(PSfra)o(g)p
+Fv(?)0 4683 y Fs(Man)o(y)23 b(dra)o(wing)g(and)h(graphing)h(packages)g
+(produce)g(output)f(in)f(the)g(Encapsulated)j(PostScript)e(\(EPS\))d
+(format,)j(b)n(ut)f(fe)n(w)0 4795 y(can)30 b(easily)g(produce)i(the)d
+(equations)j(and)e(other)g(scienti\002c)h(te)o(xt)e(of)h(which)f(T)2524
+4816 y(E)2568 4795 y(X)f(is)h(so)g(capable.)48 b(On)29
+b(the)g(other)i(hand,)0 4908 y(man)o(y)23 b(L)246 4892
+y Fp(A)281 4908 y Fs(T)322 4929 y(E)365 4908 y(Xbased)h(dra)o(wing)h
+(packages)h(are)d(not)h(as)g(e)o(xpressi)n(v)o(e)h(or)f(easy-to-use)i
+(as)e(these)g(stand-alone)j(tools.)0 5071 y Fr(PSfr)o(ag)g
+Fs(pro)o(vides)i(the)f(best)g(of)g(both)g(w)o(orlds)h(by)e(allo)n(wing)
+i(the)f(user)g(to)f(precisely)j(o)o(v)o(erlay)f(Encapsulated)h
+(PostScript)0 5184 y(\(EPS\))18 b(\002les)i(with)g(arbitrary)i(L)943
+5168 y Fp(A)978 5184 y Fs(T)1019 5204 y(E)1062 5184 y(X)d
+(constructions.)32 b(In)20 b(order)h(to)f(accomplish)i(this,)f(the)f
+(user)h(places)h(a)d(simple)i(te)o(xt)f(\223tag\224)0
+5297 y(in)k(the)h(graphics)i(\002le,)d(as)g(a)g(\223position)j(mark)o
+(er\224)f(of)e(sorts.)33 b(Then,)24 b(using)i(simple)f(L)2633
+5281 y Fp(A)2668 5297 y Fs(T)2709 5317 y(E)2752 5297
+y(X)e(commands,)j(the)f(user)g(instructs)1927 5649 y(1)p
+eop end
+%%Page: 2 2
+TeXDict begin 2 1 bop 0 91 a Fr(PSfr)o(ag)28 b Fs(to)g(remo)o(v)o(e)g
+(that)g(tag)h(from)f(the)g(\002gure,)i(and)e(replace)i(it)e(with)g(a)f
+(properly)k(sized,)f(aligned,)g(and)f(rotated)h(L)3716
+75 y Fp(A)3751 91 y Fs(T)3792 112 y(E)3834 91 y(X)0 204
+y(equation.)h Fr(PSfr)o(ag)23 b Fs(also)h(allo)n(ws)g(the)g(user)g(to)f
+(place)i(L)1702 188 y Fp(A)1737 204 y Fs(T)1778 225 y(E)1821
+204 y(X)d(constructs)k(directly)g(into)e(the)g(EPS)d(\002le)i(itself.)0
+367 y(Dr)-5 b(.)31 b(Craig)i(Barratt)g(wrote)g(the)g(original)h(v)o
+(ersion)g(of)f Fr(PSfr)o(ag)f Fs(as)g(a)g(graduate)j(student)f(at)f
+(Stanford)g(Uni)n(v)o(ersity)-6 b(.)58 b(The)0 480 y(interf)o(ace)29
+b(has)e(changed)i(v)o(ery)e(little)h(since)g(then,)g(b)n(ut)g(the)f
+(internals)i(ha)n(v)o(e)e(been)h(completely)h(re-written.)40
+b(The)27 b(current)0 593 y(v)o(ersion)i(of)e(PSfrag)g(is)g(maintained)i
+(by)f(Michael)g(Grant)g(and)f(Da)n(vid)h(Carlisle.)41
+b(Man)o(y)28 b(thanks)g(go)g(to)f(the)h(members)f(of)0
+706 y(the)d Fr(PSfr)o(ag)f Fs(mailing)h(list,)g(and)g(to)f(e)n(v)o
+(eryone)j(who)d(has)h(submitted)h(a)e(b)n(ug)i(report)f(or)g
+(suggestion.)0 1048 y Fv(2)119 b Fq(PSfra)o(g)29 b Fv(necessities)0
+1305 y Fs(In)23 b(order)i(to)e(use)h Fr(PSfr)o(ag)p Fs(,)f(you)h(will)f
+(need)i(the)f(follo)n(wing)h(tools:)136 1542 y Fo(\017)46
+b Fs(A)34 b(recent)i(v)o(ersion)g(of)e(L)1015 1526 y
+Fp(A)1050 1542 y Fs(T)1091 1563 y(E)1134 1542 y(X)14
+b(2)1259 1556 y Fn(e)1336 1542 y Fs(and)35 b(the)g Fr(g)o(r)o(aphics)i
+Fs(package.)63 b Fr(PSfr)o(ag)34 b Fs(currently)j(requires)g(the)e
+(1995/12/01)227 1655 y(v)o(ersion)25 b(or)f(later)g(of)f(these)i
+(packages,)h(b)n(ut)e(it)f(is)g(al)o(w)o(ays)i(best)f(to)f(ha)n(v)o(e)i
+(the)e(most)h(recent)h(release.)136 1843 y Fo(\017)46
+b Fs(If)26 b(you)g(wish)f(to)h(use)g(the)g Fr(seminar)h
+Fs(package)g(with)f Fr(PSfr)o(ag)p Fs(,)f(you)h(should)h(mak)o(e)f
+(sure)g(you)h(ha)n(v)o(e)f(the)g(1997/10/13)227 1956
+y(v)o(ersion)f(or)f(later)g(\(see)g(section)h(8.3\).)136
+2143 y Fo(\017)46 b Fs(A)25 b(compatible)j(D)l(VI-to-PostScript)g(dri)n
+(v)o(er)e(\(see)h(belo)n(w\).)36 b Fr(dvips)26 b Fs(is)f(the)h(primary)
+h(choice)g(of)f(the)g Fr(PSfr)o(ag)f Fs(de)n(v)o(el-)227
+2256 y(opers,)g(and)f(is)f(certainly)j(the)e(most)f(widely-used.)0
+2494 y(The)32 b(latest)h(v)o(ersions)i(of)d(L)860 2477
+y Fp(A)895 2494 y Fs(T)936 2514 y(E)979 2494 y(X)14 b(2)1104
+2508 y Fn(e)1148 2494 y Fs(,)33 b(the)g Fr(g)o(r)o(aphics)h
+Fs(package,)i Fr(PSfr)o(ag)p Fs(,)e(and)f Fr(dvips)g
+Fs(can)f(all)h(be)f(found)i(on)f(CT)-8 b(AN,)29 b(the)0
+2607 y(Comprehensi)n(v)o(e)d(T)631 2627 y(E)674 2607
+y(X)d(Archi)n(v)o(e)h(Netw)o(ork.)29 b(The)23 b(CT)-8
+b(AN)20 b(cites,)25 b(and)f(their)g(mirrors,)g(include:)1074
+2839 y(Name)485 b(IP)23 b(address)339 b(Location)p 1024
+2876 1853 4 v 1074 2955 a Fl(ftp.dante.de)150 b Fs(129.206.100.192)104
+b(German)o(y)1074 3068 y Fl(ftp.tex.ac.uk)g Fs(128.232.1.87)239
+b(England)1074 3181 y Fl(ftp.cdrom.com)104 b Fs(165.113.58.253)149
+b(USA)0 3475 y Fk(2.1)99 b(Choosing)25 b(a)f(P)n(ostScript)i(dri)o(v)o
+(er)0 3699 y Fr(PSfr)o(ag)c Fs(relies)i(on)f(some)g(sensiti)n(v)o(e)h
+(PostScript)g(tricks)g(to)e(accomplish)j(its)e(goals.)30
+b(Due)22 b(to)h(limited)g(time)g(and)g(resources,)0 3812
+y(the)33 b(authors)h(could)g(not)f(con\002rm)f(that)i
+Fr(PSfr)o(ag)e Fs(w)o(orks)h(properly)h(on)f(e)n(v)o(ery)g(a)n(v)n
+(ailable)i(PostScript)e(dri)n(v)o(er)-5 b(.)57 b(W)-7
+b(e)32 b(ha)n(v)o(e)0 3925 y(attempted)g(to)f(insure)h(that)f(it)f
+(will)h Fm(e)o(ventually)i Fs(w)o(ork)d(on)h(e)n(v)o(ery)g(dri)n(v)o
+(er)g(that)g(is)g(fully)g(comaptible)i(with)e(the)f Fr(g)o(r)o(aphics)0
+4037 y Fs(package)c(\()p Fm(i.e)o(.)p Fs(,)c(one)i(for)g(which)g(a)f
+Fl(.def)h Fs(\002le)f(is)g(pro)o(vided.\))0 4200 y(The)g(dri)n(v)o(ers)
+i(which)f(ha)n(v)o(e)g(been)g(con\002rmed)g(to)g(w)o(ork)g(with)f
+Fr(PSfr)o(ag)g Fs(are:)911 4430 y(Dri)n(v)o(er)745 b(T)-6
+b(ested)24 b(by)152 b(Compatibility)p 862 4467 2177 4
+v 911 4547 a(Thomas)24 b(Rokicki')-5 b(s)25 b Fr(dvips)101
+b Fs(the)24 b(authors)102 b(fully)25 b(compatible)911
+4659 y(Y&Y')-5 b(s)23 b Fr(D)-6 b(VIPSONE)273 b Fs(the)24
+b(authors)102 b(fully)25 b(compatible)0 4888 y(Please)i(help)h(us)f
+(add)g(entries)i(to)d(this)i(list!)40 b(If)26 b Fr(PSfr)o(ag)h
+Fs(w)o(orks)g(with)g(your)g(dri)n(v)o(er)l(,)i(please)f(let)f(us)g(kno)
+n(w)-6 b(,)27 b(so)g(we)f(can)i(add)0 5001 y(it)k(to)g(the)h(list.)55
+b(If)32 b(possible,)k(test)d(your)g Fr(PSfr)o(ag)f Fs(output)h(on)g
+(both)g(Le)n(v)o(el)e(1)h(and)h(Le)n(v)o(el)f(2)g(printers,)k(so)c(we)f
+(can)i(mak)o(e)0 5114 y(a)e(distinction)k(here)d(if)f(necessary)-6
+b(.If)34 b Fr(PSfr)o(ag)d Fs(does)h Fm(not)i Fs(w)o(ork,)f(please)g
+(submit)f(a)f(b)n(ug)h(report;)37 b(consult)d(section)f(9)e(for)0
+5227 y(contact)e(information.)41 b(unfortunately)-6 b(,)32
+b(we)26 b(cannot)i(promise)g(a)f(\002x)f(for)h(e)n(v)o(eryone,)i(b)n
+(ut)e(we)g(w)o(ould)g(lik)o(e)h(to)e(insure)j(that)0
+5340 y(the)24 b(most)f(popular)j(dri)n(v)o(ers)e(remain)h(compatible.)
+1927 5649 y(2)p eop end
+%%Page: 3 3
+TeXDict begin 3 2 bop 0 91 a Fv(3)119 b(Installing)30
+b Fq(PSfra)o(g)0 348 y Fs(Installing)c(the)e(v)n(arious)h
+Fr(PSfr)o(ag)e Fs(\002les)g(is)h(quite)g(simple:)114
+586 y(1.)45 b(Run)24 b(L)425 569 y Fp(A)460 586 y Fs(T)501
+606 y(E)543 586 y(X)f(on)g Fl(psfrag.ins)k Fs(to)c(e)o(xtract)i
+Fl(psfrag.sty)h Fs(and)e Fl(psfrag.pro)p Fs(.)114 773
+y(2.)45 b(Install)38 b Fl(psfrag.sty)g Fs(in)e(a)f(standard)j(location)
+g(for)e(L)2004 757 y Fp(A)2039 773 y Fs(T)2080 794 y(E)2123
+773 y(X)14 b(2)2248 787 y Fn(e)2327 773 y Fs(macros.)66
+b(F)o(or)35 b Fr(kpathsea)p Fs(-based)40 b(systems)d(lik)o(e)227
+886 y Fr(teT)331 908 y(E)376 886 y(X)p Fs(,)22 b(this)i(path)h(is)e
+(determined)j(by)d(the)h Fl(TEXINPUTS)i Fs(v)n(ariable.)114
+1074 y(3.)45 b(Install)29 b Fl(psfrag.pro)h Fs(where)n(v)o(er)f(your)f
+(PostScript)g(dri)n(v)o(er)h(looks)f(for)g(header)h(\002les.)40
+b(F)o(or)27 b Fr(kpathsea)p Fs(-based)k(sys-)227 1187
+y(tems)d(lik)o(e)h Fr(teT)693 1208 y(E)738 1187 y(X)p
+Fs(,)e(this)i(is)f(determined)i(by)e(the)g Fl(DVIPSHEADERS)k
+Fs(v)n(araible.)44 b(F)o(or)27 b Fr(dvips)h Fs(in)g(particular)l(,)k
+(the)c(most)227 1300 y(logical)d(choice)g(w)o(ould)g(be)e(the)h(same)f
+(directory)j(in)e(which)g Fl(tex.pro)h Fs(and)f Fl(special.pro)j
+Fs(are)c(located.)114 1487 y(4.)45 b(If)23 b(you)g(ha)n(v)o(e)h(an)f
+(older)h(v)o(ersion)g(of)f Fr(PSfr)o(ag)p Fs(,)f(you)h(may)g(delete)h
+(the)f(follo)n(wing)i(\002les,)d(if)h(the)o(y)g(e)o(xist:)30
+b Fl(ps2frag.ps)p Fs(,)227 1600 y Fl(ps2frag)d Fs(or)f
+Fl(ps2psfrag)i Fs(\(the)e(processing)i(scripts\),)g(and)e
+Fl(epsf.sty)h Fs(\(the)f(one)g(pro)o(vided)i(by)d Fr(PSfr)o(ag)p
+Fs(,)g Fm(not)j Fs(the)227 1713 y Fr(dvips)e Fs(v)o(ersion!\).)35
+b(System)25 b(managers)i(may)e(wish)g(to)g(replace)i
+Fl(ps2frag)g Fs(with)e(a)f(script)j(which)e(noti\002es)h(users)g(of)227
+1826 y(the)e(upgrade.)0 2168 y Fv(4)119 b(Usage)0 2425
+y Fs(Here)23 b(is)h(a)f(quick)i(summary)f(of)f(the)h(usage)h(of)e
+Fr(PSfr)o(ag)p Fs(:)136 2663 y Fo(\017)46 b Fs(Use)32
+b(the)h Fl(\\includegraphics)38 b Fs(command)33 b(de\002ned)g(by)g(the)
+g Fr(g)o(r)o(aphics)h Fs(and)f Fr(g)o(r)o(aphicx)h Fs(packages)h(to)d
+(add)h(EPS)227 2776 y(\002gures)24 b(to)e(your)i(ne)n(w)e(documents.)30
+b(If)22 b(you)i(must)e(use)h(the)g Fl(\\epsfbox)i Fs(command)e(from)g
+Fl(epsf.sty)i Fs(for)d(old)h(doc-)227 2888 y(uments,)d(then)g
+Fl(epsf.sty)g Fs(must)f(be)f(loaded)i Fm(befor)m(e)g
+Fl(psfrag.sty)p Fs(.)30 b(Other)19 b(packages)i(based)e(on)g
+Fl(graphics.sty)p Fs(,)227 3001 y(such)25 b(as)e Fr(g)o(r)o(aphicx)i
+Fs(or)f Fr(eps\002g)p Fs(,)g(do)f(not)h(suf)n(fer)h(this)f
+(restriction.)136 3189 y Fo(\017)46 b Fs(Load)24 b Fl(psfrag.sty)i
+Fs(with)e(a)f Fl(\\usepackage)j Fs(command.)136 3377
+y Fo(\017)46 b Fs(Mak)o(e)28 b(sure)g(that)f(your)h(EPS)d(\002gures)j
+(contain)h(a)e(simple)h(\223tag\224)g(w)o(ord)f(in)g(each)h(position)i
+(that)d(you)h(w)o(ould)g(lik)o(e)g(a)227 3490 y(L)250
+3473 y Fp(A)285 3490 y Fs(T)326 3510 y(E)369 3490 y(X)g(replacements.)
+49 b(Use)29 b(a)g Fm(single)h Fs(w)o(ord,)h(composed)g(of)e(unaccented)
+k(letters)e(and)e(numbers.)48 b(Some)28 b(ef)n(fort)227
+3602 y(has)i(been)h(made)f(to)f(allo)n(w)h(for)g(more)f(arbitrary)j
+(tag)e(te)o(xt,)h(b)n(ut)f(the)g(mechanism)h(is)f(not)g(inf)o(allible;)
+36 b(see)29 b(section)227 3715 y(8.1.)136 3903 y Fo(\017)46
+b Fs(F)o(or)23 b(each)h(tag)g(w)o(ord)g(in)f(your)i(EPS)c(\002le,)i
+(add)h(a)f(command)h(to)g(your)g(your)g(L)2624 3887 y
+Fp(A)2659 3903 y Fs(T)2700 3923 y(E)2743 3903 y(X)f(document)i(to)e
+(specify)j(ho)n(w)d(this)227 4016 y(tag)h(is)f(to)h(replaced,)h(as)f
+(follo)n(ws:)427 4204 y Fl(\\psfrag{)p Fm(ta)o(g)p Fl(}[)p
+Fo(h)p Fm(pos)q(n)p Fo(i)6 b Fl(][)p Fo(h)p Fm(psposn)p
+Fo(i)t Fl(][)p Fo(h)p Fm(scale)p Fo(i)s Fl(][)p Fo(h)p
+Fm(r)l(ot)r Fo(i)r Fl(]{)p Fm(L)2391 4188 y Fj(A)2418
+4204 y Fm(T)2454 4224 y(E)2498 4204 y(X)23 b(te)n(xt)r
+Fl(})227 4391 y Fs(The)29 b(tag)f(will)h(be)f(replaced)j(by)e(the)g(L)
+1435 4375 y Fp(A)1470 4391 y Fs(T)1511 4412 y(E)1554
+4391 y(X)e(te)o(xt.)44 b(Example:)c(in)29 b(a)f(dra)o(wing)i(program)f
+(lik)o(e)h Fr(x\002g)p Fs(,)f(you)g(place)h(the)227 4504
+y(te)o(xt)427 4692 y Fl(xy)227 4879 y Fs(at)24 b(a)f(particular)j
+(point.)k(T)-7 b(o)22 b(replace)j(this)f(with)g Fm(x)13
+b Fi(+)g Fm(y)p Fs(,)22 b(one)i(possible)i(macro)e(w)o(ould)g(be)427
+5067 y Fl(\\psfrag{xy}{$x+y$})1927 5649 y Fs(3)p eop
+end
+%%Page: 4 4
+TeXDict begin 4 3 bop 0 91 a Fs(All)23 b Fl(\\psfrag)j
+Fs(calls)e(that)h(precede)g(the)g Fl(\\includegraphics)j
+Fs(\(or)c(equi)n(v)n(alent\))j(in)d(the)g(same)g(or)f(surrounding)28
+b(en)l(viron-)0 204 y(ments)f(will)f(be)g(utilized)j(for)d(a)g(gi)n(v)o
+(en)h(PostScript)h(\002le.)36 b(So,)26 b(you)h(can)g(de\002ne)g(global)
+h Fl(\\psfrag)p Fs(s)g(as)f(well)f(as)g(those)i(that)0
+317 y(are)c(local)g(to)g(a)f(\002gure.)0 480 y(An)o(y)29
+b(te)o(xt)h(that)g(is)g(not)g(mentioned)h(in)f(a)f Fl(\\psfrag)i
+Fs(command)g(will)e(not)h(be)g(replaced;)35 b(hence,)d(PostScript)f
+(and)f(L)3716 464 y Fp(A)3751 480 y Fs(T)3792 500 y(E)3834
+480 y(X)0 593 y(te)o(xt)24 b(can)g(be)f(freely)i(mix)o(ed.)0
+756 y(When)c(vie)n(wing)h(the)g(output)g(with)f(a)g(D)l(VI)f(pre)n(vie)
+n(wer)i(such)g(as)f Fr(dviwin)h Fs(or)f Fr(xdvi)p Fs(,)g(a)f(v)o
+(ertical)j(list)e(of)g(the)h(replacements)i(will)0 868
+y(be)g(placed)h(on)f(the)h(left)f(side)h(of)e(each)i(\002gure.)30
+b(This)24 b(list)g(allo)n(ws)h(you)f(to)g(check)h(the)f(typesetting)j
+(of)d(your)h(replacements;)0 981 y(it)f(disappears)j(in)d(the)h
+(\002nal)f(PostScript)h(v)o(ersion.)32 b(Unfortunately)-6
+b(,)27 b(D)l(VI)d(dri)n(v)o(ers)h(are)f(incapable)j(of)d
+Fm(placing)i Fs(the)f Fr(PSfr)o(ag)0 1094 y Fs(replacements)j(on)d(top)
+g(of)f(the)i(\002gure,)f(so)g(for)g(that)g(you)g(will)g(need)g(to)g
+(print)h(it)e(out)i(or)e(use)h(a)g(PostScript)h(pre)n(vie)n(wer)g(lik)o
+(e)0 1207 y(GhostV)-5 b(ie)n(w)f(.)0 1370 y(This)23 b(v)o(ersion)h(of)f
+Fr(PSfr)o(ag)f Fm(should)28 b Fs(run)23 b(properly)i(in)e(the)g
+(compatibility)j(mode)d(of)g(L)2660 1354 y Fp(A)2695
+1370 y Fs(T)2736 1390 y(E)2779 1370 y(X2.09.)28 b(Let)23
+b(us)g(kno)n(w)f(if)h(you)h(\002nd)0 1483 y(otherwise)h(\(see)f
+(section)i(9\).)0 1825 y Fv(5)119 b(Commands)30 b(and)g(En)-5
+b(vir)n(onments)p -227 2101 2371 4 v -229 2201 4 100
+v -177 2171 a Fg(\\psfrag{)p Ff(ta)o(g)p Fg(}[)p Fe(h)p
+Ff(posn)p Fe(i)q Fg(][)p Fe(h)p Ff(psposn)p Fe(i)p Fg(][)p
+Fe(h)p Ff(scale)p Fe(i)q Fg(][)p Fe(h)p Ff(r)l(ot)q Fe(i)r
+Fg(]{)p Ff(r)m(eplacement)q Fg(})p 2142 2201 V -229 2301
+V -177 2271 a(\\psfrag*{)p Ff(ta)o(g)p Fg(}[)p Fe(h)p
+Ff(posn)p Fe(i)r Fg(][)p Fe(h)p Ff(psposn)p Fe(i)p Fg(][)p
+Fe(h)p Ff(scale)p Fe(i)p Fg(][)p Fe(h)p Ff(r)l(ot)q Fe(i)r
+Fg(]{)p Ff(r)m(eplacement)q Fg(})p 2142 2301 V -227 2304
+2371 4 v 0 2460 a Fs(The)21 b Fl(\\psfrag)j Fs(macro)e(de\002nes)g(a)f
+(L)1118 2444 y Fp(A)1153 2460 y Fs(T)1194 2481 y(E)1237
+2460 y(X-typeset)i Fl({)p Fm(r)m(eplacement)r Fl(})h
+Fs(to)e(be)f(placed)j(at)d(the)h(same)g(position)h(as)f(a)f(PostScript)
+0 2573 y Fl({)p Fm(ta)o(g)p Fl(})p Fs(.)33 b(The)24 b(command)h(should)
+i(be)d(placed)i(before)g(the)f(call)g(to)g Fl(\\includegraphics)p
+Fs(,)k(or)c(equi)n(v)n(alent.)34 b(It)24 b(matches)i
+Fm(all)0 2686 y Fs(occurrences)h(of)c Fl({)p Fm(ta)o(g)p
+Fl(})i Fs(in)e(the)h(\002gure.)0 2849 y(A)h Fl(\\psfrag)i
+Fs(command)g(will)e(remain)i(in)f(ef)n(fect)g(until)h(its)f
+(surrounding)j(en)l(vironment)g(is)d(e)o(xited.)37 b(Therefore,)27
+b(you)g(can)0 2962 y(de\002ne)22 b(global)h Fl(\\psfrag)p
+Fs(s)g(which)f(will)f(apply)i(to)f(e)n(v)o(ery)f(\002gure,)h(or)g
+(de\002ne)g Fl(\\psfrag)p Fs(s)h(inside)g(a)e(a)g Fl(figure)i
+Fs(en)l(vironment)0 3075 y(\(for)h(e)o(xample\))h(which)f(apply)g(to)g
+(a)f(single)i(EPS)c(\002le.)0 3237 y(The)28 b(optional)j(positioning)h
+(ar)n(guments)f Fl([)p Fo(h)p Fm(posn)p Fo(i)s Fl(])d
+Fs(and)h Fl([)p Fo(h)p Fm(psposn)p Fo(i)t Fl(])f Fs(specify)i(ho)n(w)e
+(the)h(bounding)j(box)d(of)g(the)g(L)3716 3221 y Fp(A)3751
+3237 y Fs(T)3792 3258 y(E)3834 3237 y(X)0 3350 y(te)o(xt)d(and)g(the)g
+(bounding)j(box)d(of)g(the)g(PostScript)h(te)o(xt)f(line)g(up,)g
+(respecti)n(v)o(ely)-6 b(.)38 b(Some)25 b(dra)o(wing)i(packages)h(w)o
+(ould)e(refer)0 3463 y(to)d(these)i(as)e(\223control)j(points\224)f(or)
+f(\223alignment)i(points.)-6 b(\224)45 3726 y Fl([)p
+Fo(h)p Fm(posn)p Fo(i)s Fl(])26 b Fs(the)h(L)566 3709
+y Fp(A)601 3726 y Fs(T)642 3746 y(E)685 3726 y(X)f(te)o(xt)h(reference)
+i(point.)39 b(The)26 b(syntax)i(of)f(this)g(ar)n(gument)i(is)e
+(identical)i(to)d(that)h(of)g(the)g Fl(\\makebox)227
+3838 y Fs(command.)h(Up)19 b(to)h(tw)o(o)f(letters)j(may)d(be)h
+(chosen,)i(one)e(from)f(the)h(list)g Fo(f)p Fl(t)p Fs(,)p
+Fl(b)p Fs(,)p Fl(B)p Fs(,)p Fl(c)p Fo(g)p Fs(,)h(\(top,)g(bottom,)g
+(baseline,)i(center\))227 3951 y(and)30 b(another)h(from)e
+Fo(f)p Fl(l)p Fs(,)p Fl(r)p Fs(,)p Fl(c)p Fo(g)h Fs(\(left,)h(right,)g
+(center\).)47 b(If)29 b(either)i(letter)f(is)f(omitted,)i(then)f
+Fl(c)f Fs(\(center\))i(is)e(assumed.)227 4064 y(T)-7
+b(ogether)l(,)28 b(these)f(specify)h(one)f(of)f(12)g(anchor)i(points.)
+38 b(If)26 b(the)g(ar)n(gument)i(is)e(omitted)i(altogether)l(,)h(then)e
+Fl([Bl])p Fs(,)g(or)227 4177 y(left)d(baseline)i(positioning,)g(is)e
+(assumed\227b)n(ut)i(note)e(that)g(supplying)j Fl([])c
+Fs(speci\002es)i(centered)h(positioning.)227 4327 y(When)k(running)g
+(in)f(L)905 4311 y Fp(A)940 4327 y Fs(T)981 4348 y(E)1024
+4327 y(X)f(2.09)h(compatibility)j(mode,)e(the)g(def)o(ault)g(alignment)
+h(is)e Fl([bl])p Fs(,)i(in)d(order)i(to)f(support)227
+4440 y(le)o(gac)o(y)24 b(documents.)31 b(Usually)24 b(this)h(should)g
+(not)f(mak)o(e)f(a)g(signi\002cant)j(dif)n(ference.)45
+4628 y Fl([)p Fo(h)p Fm(psposn)p Fo(i)t Fl(])h Fs(the)h(PostScript)h
+(te)o(xt)f(reference)i(point.)42 b(The)27 b(possible)j(ar)n(guments)g
+(are)e(identical)i(to)d(that)i(of)e Fl([)p Fo(h)p Fm(posn)p
+Fo(i)s Fl(])p Fs(,)227 4741 y(as)d(is)f(the)h(def)o(ault)h(v)n(alue,)f
+Fl([Bl])g Fs(\()p Fl([bl])h Fs(in)e(L)1620 4725 y Fp(A)1655
+4741 y Fs(T)1696 4761 y(E)1739 4741 y(X)f(2.09)i(compatibility)j
+(mode.\))0 5003 y(The)c(L)187 4987 y Fp(A)222 5003 y
+Fs(T)263 5024 y(E)306 5003 y(X)f(replacement)k(may)d(be)h(optionally)i
+(scaled)f(and)f(rotated)i(about)e(its)g(reference)i(point:)45
+5241 y Fl([)p Fo(h)p Fm(scale)p Fo(i)s Fl(])21 b Fs(Scaling)g(f)o
+(actor)h(\(def)o(ault)h(1\).)28 b(It')-5 b(s)21 b(best)g(if)g(you)g
+(use)g(font)h(size)f(changes)i(in)e(the)g(L)2928 5224
+y Fp(A)2963 5241 y Fs(T)3004 5261 y(E)3046 5241 y(X)f(te)o(xt)h(rather)
+h(than)g(scale,)227 5354 y(b)n(ut)i(you)g(can)g(use)g(the)g(scale)h(to)
+e(tweak)h(its)f(size.)30 b(Def)o(ault)24 b(is)g Fl([1])p
+Fs(.)1927 5649 y(4)p eop end
+%%Page: 5 5
+TeXDict begin 5 4 bop 45 91 a Fl([)p Fo(h)p Fm(r)l(otn)p
+Fo(i)s Fl(])34 b Fs(Extra)h(rotation)i(of)e(the)g(te)o(xt)h(around)g
+(its)f(reference)i(point,)i(in)c(de)o(grees.)64 b(The)35
+b(nominal)h(rotation)h(of)e(the)227 204 y(L)250 188 y
+Fp(A)285 204 y Fs(T)326 225 y(E)369 204 y(X)23 b(te)o(xt)i(matches)g
+(that)g(of)f(the)h(PostScript)g(te)o(xt)g(it)f(replaces.)33
+b(The)24 b(total)h(rotation)i(is)d(this)h(nominal)g(v)n(alue)g(plus)227
+317 y Fl([)p Fo(h)p Fm(r)l(otn)p Fo(i)s Fl(])p Fs(.)j(The)23
+b(def)o(ault)i(is)f Fl([0])p Fs(.)750 2669 y
+ currentpoint currentpoint translate 0.98076 0.98076 scale neg exch
+neg exch translate
+ 750 2669
+a 1429 2669 a
+ gsave currentpoint currentpoint translate 30 neg rotate neg exch neg
+exch translate
+ 1429 2669 a 1429 2669 a
+ /PSfrag where{pop(gA)[[0(br)1 0][1(b )2 0][2(bl)1 0][3(Bl)1 0][4(B )1
+0][5(Br)1 0][6( r)1 0][7( )0.75 45][8( l)1.5 30][9(tl)1 0][10(Bl)1
+0][11(l)1 0][12(t)1 -90][13(t )1 0][14(tr)1 180]]1 1 -1/Begin PSfrag}{userdict
+/PSfrag{pop}put}ifelse
+ 1429 2669 a @beginspecial
+0 @llx 0 @lly 245 @urx 163 @ury 2450 @rwi @setspecial
+%%BeginDocument: testfig.eps
+%!PS-Adobe-3.0 EPSF-3.0
+%%BoundingBox: 0 0 245 163
+(Courier) findfont 216 scalefont setfont
+-13 41 moveto (gA) show
+showpage
+%%EOF
+
+%%EndDocument
+ @endspecial 1429 2669 a
+ /End PSfrag
+ 1429 2669 a 1429 876 a
+ /Hide PSfrag
+ 1429
+876 a 679 938 a Fs(PSfrag)f(replacements)p 679 972 750
+4 v 1429 975 a
+ /Unhide PSfrag
+ 1429 975 a 1429 1088 a
+ {
+ 1429 1088 a 1058
+1078 a Fl([br][br])1429 1088 y
+ } 0/Place PSfrag
+ 1429 1088 a 1429 1191
+a
+ {
+ 1429 1191 a -464 w Fl([Br][b][2])1429 1191 y
+ } 1/Place PSfrag
+ 1429 1191
+a 1429 1281 a
+ {
+ 1429 1281 a 1105 1304 a Fl([r][bl])1429
+1281 y
+ } 2/Place PSfrag
+ 1429 1281 a 1429 1361 a
+ {
+ 1429 1361 a 1058 1417
+a Fl([tr][Bl])1429 1361 y
+ } 3/Place PSfrag
+ 1429 1361 a 1290 1540 a
+ {
+ 1290
+1540 a 1151 1530 a Fl([b][B])1290 1540 y
+ } 4/Place PSfrag
+ 1290 1540 a
+1267 1643 a
+ {
+ 1267 1643 a -162 w Fl([B][Br])1267 1643 y
+ } 5/Place PSfrag
+
+1267 1643 a 1313 1733 a
+ {
+ 1313 1733 a 1197 1756 a Fl([][r])1313
+1733 y
+ } 6/Place PSfrag
+ 1313 1733 a 1081 1813 a
+ {
+ 1081 1813 a 734 1869 a
+Fl([t][][0.75][45])1081 1813 y
+ } 7/Place PSfrag
+ 1081 1813 a 687 1992 a
+ {
+
+687 1992 a -10 x Fl([bl][l][1.5][30])687 1992 y
+ } 8/Place PSfrag
+ 687 1992
+a 1058 2095 a
+ {
+ 1058 2095 a Fl([Bl][tl])1058 2095 y
+ } 9/Place PSfrag
+ 1058
+2095 a 957 2217 a
+ {
+ 957 2217 a 1071 2201 a Fs(\(baseline\))957
+2217 y
+ } 10/Place PSfrag
+ 957 2217 a 874 2330 a
+ {
+ 874 2330 a 987 2314 a Fs(\(center)i
+(line\))874 2330 y
+ } 11/Place PSfrag
+ 874 2330 a 874 2443 a
+ {
+ 874 2443 a 987
+2427 a Fs(\(center)g(line\))874 2443 y
+ } 12/Place PSfrag
+ 874 2443 a 1151
+2523 a
+ {
+ 1151 2523 a 23 x Fl([l][t])1151 2523 y
+ } 13/Place PSfrag
+ 1151 2523
+a 687 2603 a
+ {
+ 687 2603 a 56 x Fl([tl][tr][1][180])687
+2603 y
+ } 14/Place PSfrag
+ 687 2603 a 3471 2669 a
+ currentpoint grestore moveto
+ 3471 2669 a 750 2669 a
+ currentpoint currentpoint translate 1 0.98076 div 1 0.98076 div scale
+neg exch neg exch translate
+
+750 2669 a 661 2965 a Fs(Figure)f(1:)29 b(An)23 b(illustration)k(of)c
+(v)n(arious)i(options)h(for)d(the)h Fl(\\psfrag)i Fs(command.)0
+3174 y(Figure)32 b(1)g(illustrates)i(v)n(arious)g(combinations)h(of)d
+(the)g(ar)n(guments.)56 b(If)31 b(you')-5 b(re)34 b(vie)n(wing)f(this)f
+(with)g(a)f(D)l(VI)g(pre)n(vie)n(wer)0 3287 y(such)25
+b(as)e Fr(xdvi)p Fs(,)h(the)g Fr(PSfr)o(ag)f Fs(replacements)k(should)e
+(be)f(lined)h(up)e(to)h(the)g(left)g(of)g(the)g(\002gure;)h(and,)f(if)f
+(your)i(pre)n(vie)n(wer)g(can)0 3400 y(display)g(EPS)d(\002les,)h(a)g
+(lar)n(ge,)h(rotated)h Fl(gA)p Fs(.)e(If)h(you)g(ha)n(v)o(e)g(printed)h
+(this)f(out,)g(or)f(are)h(vie)n(wing)g(it)f(with)g(a)g(PostScript)i
+(vie)n(wer)0 3513 y(lik)o(e)i(GhostV)-5 b(ie)n(w)f(,)26
+b(then)h(the)g(replacements)i(should)f(superimposed)h(on)e(a)f
+(graphical)i(representation)j(of)26 b(the)h(bounding)0
+3626 y(box,)d(center)h(lines,)f(and)g(baseline)h(of)f(the)g(tag)g
+Fl(gA)p Fs(.)f(\(This)g(graphical)j(box)e(is)g(pro)o(vided)h(only)g(in)
+e(deb)n(ug)i(mode.\))0 3788 y(If)g(a)f(replacement)j(for)e
+Fl({)p Fm(ta)o(g)p Fl(})h Fs(already)h(e)o(xists,)f(the)f(unstarred)i
+(command)e Fl(\\psfrag)i Fs(will)d(replace)j(it)d(without)i(w)o
+(arning.)0 3901 y(The)21 b(starred)i(v)o(ersion)g Fl(\\psfrag*)p
+Fs(,)h(ho)n(we)n(v)o(er)l(,)e(will)f Fm(add)k Fs(the)c(ne)n(w)g
+(replacement)j(to)e(a)f(list.)28 b(Using)22 b(the)g(starred)h(command,)
+0 4014 y(a)f(single)i(piece)f(of)g(PostScript)g(te)o(xt)g(could)g
+(trigger)h(se)n(v)o(eral)g(replacements.)31 b(I)22 b(can')n(t)h(think)h
+(of)e(a)g(reason)i(why)e(most)g(users)0 4127 y(w)o(ould)i(use)g(the)g
+(starred)h(v)o(ersion,)g(b)n(ut)f(it)f(w)o(as)g(used)i(in)e(Figure)h(1)
+f(abo)o(v)o(e.)p -227 4324 1306 4 v -229 4424 4 100 v
+-177 4394 a Fg(\\begin{psfrags})i(\\end{psfrags})p 1077
+4424 V -227 4427 1306 4 v 0 4594 a Fs(The)32 b Fl(psfrags)i
+Fs(en)l(vironment)i(may)c(be)h(used,)i(if)d(necessary)-6
+b(,)37 b(to)c(delimit)g(the)g(scope)g(of)g(the)g Fl(\\psfrag)h
+Fs(calls.)56 b(As)32 b(we)0 4707 y(said)h(before,)i Fl(\\psfrag)f
+Fs(commands)f(retain)g(their)g(ef)n(fect)g(until)f(the)h(most)f
+(immediate)h(surrounding)i(en)l(vironment)g(is)0 4820
+y(e)o(xited.)46 b Fm(Any)29 b Fs(en)l(vironment)j(will)d(do:)40
+b Fl(center)p Fs(,)31 b Fl(figure)p Fs(,)h Fm(etc.)p
+Fs(.)45 b(Therefore,)32 b(it)c(may)h(ne)n(v)o(er)h(be)f(necessary)i(to)
+e(use)h(this)0 4933 y(en)l(vironment,)c(and)e(the)g(en)l(vironment)j
+(has)d(no)f(other)i(ef)n(fect)f(on)g(the)g(document.)1927
+5649 y(5)p eop end
+%%Page: 6 6
+TeXDict begin 6 5 bop 0 91 a Fk(5.1)99 b(Embedding)27
+b Fd(PSfra)o(g)d Fk(operations)h(into)g(EPS)h(\002les)p
+-227 353 1909 4 v -229 452 4 100 v -177 422 a Fg(\\tex[)p
+Fe(h)p Ff(posn)p Fe(i)p Fg(][)p Fe(h)p Ff(psposn)p Fe(i)p
+Fg(][)p Fe(h)p Ff(scale)p Fe(i)q Fg(][)p Fe(h)p Ff(r)l(ot)q
+Fe(i)r Fg(]{)p Ff(L)1299 409 y Fc(A)1324 422 y Ff(T)1356
+441 y(E)1397 422 y(X)21 b(te)n(xt)q Fg(})p 1679 452 V
+-229 552 V -177 522 a(\\psfragscanon)66 b(\\psfragscanoff)p
+1679 552 V -227 555 1909 4 v 0 712 a Fr(PSfr)o(ag)32
+b Fs(3.0)f(supports)k(the)d(embedded)i Fl(\\tex)f Fs(commands)g(found)g
+(in)f(pre)n(vious)i(release)g(of)d Fr(PSfr)o(ag)p Fs(.)54
+b(Used)32 b(properly)-6 b(,)0 824 y(this)34 b(is)f(a)g(po)n(werful)i
+(tool,)h(b)n(ut)e(it)f(has)h(been)g(deprecated)i(some)n(what)e(because)
+h(of)f(its)f(reliance)i(on)f(a)f(pre-processing)0 937
+y(step.)47 b(Unlik)o(e)30 b(pre)n(vious)h(v)o(ersions)g(of)f
+Fr(PSfr)o(ag)p Fs(,)f(support)j(for)d(the)h Fl(\\tex)g
+Fs(command)g(must)f(be)h Fm(e)n(xplicitly)h(r)m(equested)p
+Fs(,)i(as)0 1050 y(described)26 b(belo)n(w)-6 b(.)0 1213
+y(As)19 b(you)i(can)f(see,)h(the)f(syntax)h(of)f(the)g
+Fl(\\tex)h Fs(command)g(is)e(v)o(ery)i(similar)f(to)g(the)g
+Fl(\\psfrag)i Fs(command.)28 b(Ho)n(we)n(v)o(er)l(,)20
+b(instead)0 1326 y(of)28 b(adding)h(the)f Fl(\\tex)h
+Fs(command)g(to)e(your)i(L)1428 1310 y Fp(A)1463 1326
+y Fs(T)1504 1346 y(E)1547 1326 y(X)d(\002le,)i(the)h
+Fl(\\tex)f Fs(command)h(is)e Fm(embedded)j(in)e(the)g(EPS)e(\002le)j
+(itself)p Fs(.)42 b(In)0 1439 y(other)25 b(w)o(ords,)e(the)h(command)g
+(becomes)h(its)f(o)n(wn)f(replacement)j(tag.)0 1602 y(F)o(or)d(e)o
+(xample,)h(you)g(might)g(place)g(the)g(te)o(xt)227 1839
+y Fl(\\tex[bl][bl]{$\\alp)q(ha)q($})0 2076 y Fs(at)32
+b(a)f(particular)j(point)f(in)f(your)g(PostScript)h(\002le)e(to)h(ha)n
+(v)o(e)h(L)1941 2060 y Fp(A)1976 2076 y Fs(T)2017 2097
+y(E)2059 2076 y(X)e(replace)i(it)f(with)f Fn(a)p Fs(.)53
+b(Man)o(y)32 b Fr(PSfr)o(ag)f Fs(users)i(\002nd)f(this)0
+2189 y(feature)25 b(useful)g(for)f(the)g(axis)g(labels,)g(titles,)h
+(and)f(le)o(gends)h(of)e(MA)-10 b(TLAB)21 b(graphs.)0
+2352 y(The)36 b(adv)n(antage)k(to)c(this)h(approach)j(is)c(that)h
+(changes)i(can)e(be)g(made)g(to)g(the)g(EPS)d(\002le)i(without)i(ha)n
+(ving)h(to)d(modify)0 2465 y(an)o(y)30 b Fl(\\psfrag)h
+Fs(commands)g(in)f(the)g(L)1198 2449 y Fp(A)1233 2465
+y Fs(T)1274 2485 y(E)1317 2465 y(X)e(\002le.)47 b(\(It)30
+b(is)g(still)g(necessary)i(to)e Fm(r)m(e-compile)i Fs(the)e(L)3032
+2449 y Fp(A)3067 2465 y Fs(T)3108 2485 y(E)3150 2465
+y(X)f(\002le)g(in)h(such)g(cases,)0 2578 y(ho)n(we)n(v)o(er)-5
+b(.\))0 2741 y(There)24 b(are)f(cautions)j(and)e(disadv)n(antages)k(to)
+23 b(this)h(approach,)i(including:)136 2978 y Fo(\017)46
+b Fs(Changing)31 b(the)f(labels)h(created)g(by)e Fl(\\tex)h
+Fs(commands)g(requires)i(editing)f(the)e(\002gure;)k(if)c(you)h(use)g
+Fl(\\psfrag)h Fs(in-)227 3091 y(stead,)g(you)f(need)f(only)h(to)f(edit)
+g(the)h(document,)h(which)e(might)h(be)f(less)g(cumbersome.)47
+b(\(Y)-10 b(ou)28 b(must)h(run)h(L)3716 3075 y Fp(A)3751
+3091 y Fs(T)3792 3111 y(E)3834 3091 y(X)227 3204 y(again)24
+b(in)g(both)g(cases.\))136 3391 y Fo(\017)46 b Fs(Because)22
+b Fl(\\tex)f Fs(commands)h(are)f(long)g(strings,)i(the)o(y)d(can)h(e)o
+(xtend)h(past)f(the)g(other)h(graphics)h(in)d(your)i(EPS)c(\002le.)27
+b(As)227 3504 y(a)18 b(result,)j(the)o(y)e(can)f(modify)i(the)f(EPS)d
+(bounding)21 b(box)e(in)g(an)f(undesired)j(w)o(ay)-6
+b(.)27 b(This)18 b(problem)i(can)f(be)f(mitigated)i(by)227
+3617 y(reducing)26 b(the)e(font)g(size)g(of)g(the)f Fl(\\tex)i
+Fs(string,)f(since)h(this)f(does)g(not)g(af)n(fect)g(the)g(size)g(of)g
+(its)f Fr(PSfr)o(ag)g Fs(replacement.)136 3805 y Fo(\017)46
+b Fs(The)23 b Fl(\\tex)i Fs(command)f(is)f(not)h(supported)i(in)e
+(compressed)i(PostScript)e(\002les.)136 3993 y Fo(\017)46
+b Fs(The)26 b(T)435 4013 y(E)478 3993 y(X)f(engine)j(must)e(scan)h(the)
+f(PostScript)h(\002le)e(for)i(these)g(strings,)h(which)e(can)h(add)f
+(to)g(the)g(processing)j(time)227 4105 y(of)23 b(your)g(document.)30
+b(\(T)-7 b(o)21 b(be)i(honest,)g(we)f(ha)n(v)o(e)h(yet)f(to)h
+(encounter)i(a)d(case)g(where)h(this)g(is)f(a)g(signi\002cant)i
+(concern.\))136 4293 y Fo(\017)46 b Fm(Important!)h Fs(Whene)n(v)o(er)
+30 b(a)e(\002le)g(is)h(scanned)i(by)e Fr(PSfr)o(ag)p
+Fs(,)g(it)g(generates)i(a)d(\002le)g(with)h(the)g(name)g
+Fl(\\jobname.pfg)p Fs(,)227 4406 y(where)22 b Fl(\\jobname)i
+Fs(is)e(the)g(base)h(name)f(of)g(the)g(master)g(L)1992
+4390 y Fp(A)2027 4406 y Fs(T)2068 4426 y(E)2111 4406
+y(X)e(\002le.)28 b(It)22 b(will)f(o)o(v)o(erwrite,)i(without)g(w)o
+(arning,)g(an)o(y)f(\002le)227 4519 y(with)i(that)g(name.)0
+4756 y(This)i(feature)h(is)f(no)g(longer)i(enabled)g(automatically)-6
+b(,)29 b(e)o(xcept)e(in)f(L)2149 4740 y Fp(A)2184 4756
+y Fs(T)2225 4777 y(E)2268 4756 y(X)f(2.09)h(compatibility)j(mode.)37
+b(So,)25 b(for)i(L)3613 4740 y Fp(A)3648 4756 y Fs(T)3689
+4777 y(E)3731 4756 y(X)14 b(2)3856 4770 y Fn(e)0 4869
+y Fs(documents,)25 b(you)f(must)g(acti)n(v)n(ate)h(it)e(in)h(one)g(of)f
+(tw)o(o)g(w)o(ays:)136 5107 y Fo(\017)46 b Fs(T)-7 b(o)23
+b(turn)h(on)f(scanning)j(for)e(a)f(single)i(\002gure,)e(precede)j(the)e
+Fl(\\epsfbox)h Fs(or)f Fl(\\includegraphics)k Fs(command)c(with)227
+5220 y(a)34 b(call)g(to)g(the)g(command)h Fl(\\psfragscanon)p
+Fs(.)64 b(Scanning)35 b(will)f(be)g(turned)h(of)n(f)f(again)g(when)g
+(the)h(surrounding)227 5333 y(en)l(vironment)27 b(is)c(e)o(xited;)i(or)
+l(,)f(you)g(can)g(turn)g(it)f(of)n(f)h(e)o(xplicity)h(with)e(a)h(call)g
+(to)f Fl(\\psfragscanoff)p Fs(.)1927 5649 y(6)p eop end
+%%Page: 7 7
+TeXDict begin 7 6 bop 136 91 a Fo(\017)46 b Fs(T)-7 b(o)44
+b(turn)i(on)g(scanning)h(for)f(the)f(entire)i(document,)52
+b(pass)46 b(the)g(option)g Fl(scanall)h Fs(to)f Fl(psfrag.sty)i
+Fs(in)d(the)227 204 y Fl(\\usepackage)27 b Fs(command.)0
+442 y(The)k Fl(\\tex)i Fs(scanner)h(will)d(continue)j(to)e(be)g
+(supported)j(in)c(this)i(form.)54 b(So,)32 b(if)g(you)h(do)f(\002nd)f
+(applications)k(where)e(you)0 555 y(prefer)25 b(the)f
+Fl(\\tex)g Fs(command,)g(do)f(not)h(hesitate)i(to)d(use)h(it!)0
+897 y Fv(6)119 b(P)o(ackage)30 b(Options)0 1154 y Fs(There)e(are)f
+(only)h(four)g(package)i(options)f(for)f Fr(PSfr)o(ag)p
+Fs(.)40 b(An)o(y)26 b(other)j(options)g(that)f(are)g(not)f(handled)j
+(by)d Fr(PSfr)o(ag)g Fs(will)g(be)0 1267 y(forw)o(arded)e(to)f
+Fl(graphics.sty)p Fs(.)0 1504 y Fl(209mode)48 b Fs(\(L)423
+1488 y Fp(A)458 1504 y Fs(T)499 1525 y(E)542 1504 y(X)14
+b(2)667 1518 y Fn(e)734 1504 y Fs(nati)n(v)o(e)24 b(mode)g(only\))h
+(forces)g Fr(PSfr)o(ag)e Fs(to)h(operate)h(e)o(xactly)h(as)d(if)h(L)
+2801 1488 y Fp(A)2836 1504 y Fs(T)2877 1525 y(E)2920
+1504 y(X)e(2.09)i(compatibility)j(mode)227 1617 y(w)o(as)e(enabled.)35
+b(As)25 b(a)f(result,)j Fl(bl)e Fs(alignment)i(is)e(the)g(def)o(ault,)i
+(and)f Fl(\\tex)g Fs(scanning)h(is)e(enabled)i(for)f(all)f(EPS)e
+(\002les.)227 1730 y(This)h(option)h(is)e(useful)i(if)e(you)h(are)g
+(trying)h(to)e(con)l(v)o(ert)j(old)e(L)2152 1714 y Fp(A)2187
+1730 y Fs(T)2228 1750 y(E)2270 1730 y(X)f(2.09)h(documents)h(to)f(L)
+3074 1714 y Fp(A)3109 1730 y Fs(T)3150 1750 y(E)3192
+1730 y(X)14 b(2)3317 1744 y Fn(e)3361 1730 y Fs(.)227
+1880 y(The)23 b(L)414 1864 y Fp(A)449 1880 y Fs(T)490
+1901 y(E)533 1880 y(X2.09)g(v)o(ersion)i(of)e Fr(PSfr)o(ag)g
+Fs(generated)j(an)e(auxiliary)i(\002le)c(for)i(each)g(EPS)d(\002gure)j
+(containing)i(important)227 1993 y(replacement)g(information.)31
+b(These)24 b(\002les)g(are)f(no)h(longer)h(used)f(and)g(can)g(be)g
+(deleted.)0 2181 y Fl(2emode)48 b Fs(\(L)377 2164 y Fp(A)412
+2181 y Fs(T)453 2201 y(E)496 2181 y(X)24 b(2.09)h(compatibility)k(mode)
+c(only\))i(forces)g Fr(PSfr)o(ag)d Fs(to)i(remain)g(in)f(L)2733
+2164 y Fp(A)2768 2181 y Fs(T)2809 2201 y(E)2852 2181
+y(X)14 b(2)2977 2195 y Fn(e)3045 2181 y Fs(mode,)26 b(e)n(v)o(en)f(in)h
+(the)f(pres-)227 2294 y(ence)32 b(of)f(a)g(L)624 2277
+y Fp(A)659 2294 y Fs(T)700 2314 y(E)743 2294 y(X)f(2.09)h(document;)38
+b(this)31 b(is)g(the)h(direct)g(opposite)i(of)d Fl(209mode)p
+Fs(.)54 b(When)31 b(enabled,)k(the)c(def)o(ault)227 2407
+y(alignment)26 b(is)d Fl(Bl)p Fs(,)g(and)h Fl(\\tex)g
+Fs(scanning)i(is)e(turned)h(of)n(f)e(by)h(def)o(ault.)0
+2594 y Fl(scanall)48 b Fs(turns)37 b(on)e Fl(\\tex)i
+Fs(scanning)h(by)d(def)o(ault.)67 b(Use)35 b(this)h(option)h(if)f(most)
+f(your)i(\002gures)f(use)g(embedded)i Fl(\\tex)227 2707
+y Fs(commands.)0 2895 y Fl(debug)47 b Fs(turns)27 b(on)f(some)f(of)h
+(the)g(deb)n(ugging)j(features)e(of)f(PSfrag.)35 b(It)25
+b(inserts)i(e)o(xtra)f(code)h(into)f(the)g(PostScript)h(\002le)e(that)
+227 3008 y(dra)o(w)e(the)g(bounding)j(box)o(es)e(of)f(each)h(piece)h
+(of)e(te)o(xt)g(that)h(is)f(replaced.)30 b(It)23 b(is)g(probably)j(not)
+d(useful)i(to)e(an)o(yone)i(b)n(ut)227 3121 y(the)f(de)n(v)o(elopers)i
+(of)d Fr(PSfr)o(ag)p Fs(.)0 3463 y Fv(7)119 b(An)31 b(Example)0
+3720 y Fs(In)d(the)h(follo)n(wing)g(e)o(xample,)h(we)e(demonstrate)i
+(ho)n(w)e(to)g(use)h Fr(PSfr)o(ag)f Fs(with)g(the)g(MA)-10
+b(TLAB)25 b(package.)45 b(The)28 b(follo)n(wing)0 3833
+y(MA)-10 b(TLAB)26 b(commands)k(generate)h(a)d(plot)i(of)f(both)h(a)e
+(sine)i(w)o(a)n(v)o(e)e(and)i(a)e(cosine)j(w)o(a)n(v)o(e,)f(places)g
+(both)g(simple)f(tags)h(and)0 3946 y Fl(\\tex)24 b Fs(replacements)j
+(into)d(the)g(\002gure,)f(and)h(sa)n(v)o(es)h(the)e(result)i(as)f(an)f
+(EPS)e(\002le)i Fl(example.eps)p Fs(.)169 4195 y Fg(t)43
+b(=)g(0:.1:10;)169 4294 y(plot\(t,sin\(t\),t,co)q(s\(t)q(\)\);)169
+4394 y(axis\('square'\);)48 b(grid;)169 4494 y(title\('\\tex[B][B]{)q
+(Plo)q(t)g(of)43 b($\\sin\(t\)$)j(and)d($\\cos\(t\)$}'\);)169
+4593 y(xlabel\('\\tex[t][t])q({$t)q($}')q(\);)169 4693
+y(ylabel\('\\tex[B][B])q({$\\)q(sin)q(\(t\))q($,)49 b
+($\\cos\(t\)$}'\);)169 4793 y(text\(t\(30\),sin\(t\(3)q(0\)\))q(,'p)q
+(1'\))q(;)169 4892 y(text\(t\(60\),sin\(t\(6)q(0\)\))q(,'p)q(2'\))q(;)
+169 4992 y(text\(t\(90\),sin\(t\(9)q(0\)\))q(,'p)q(2'\))q(;)169
+5091 y(tt=text\(t\(50\),cos\()q(t\(5)q(0\)\))q(,'p)q(3'\))q(;)169
+5191 y(set\(tt,'Horizontal)q(Ali)q(gnm)q(ent)q(',')q(cen)q(ter)q(',')q
+(Ver)q(tic)q(alA)q(lig)q(nme)q(nt')q(,..)q(.)339 5291
+y('bottom','Rotation',)q(ata)q(n2\()q(-si)q(n\(t)q(\(50)q(\)\)*)q(10,)q
+(2\)*)q(180)q(/pi)q(\);)169 5390 y(print)44 b(-deps)g(example)1927
+5649 y Fs(7)p eop end
+%%Page: 8 8
+TeXDict begin 8 7 bop 0 91 a Fs(\(In)25 b(MA)-10 b(TLAB,)22
+b(the)j(')n(te)o(xt')h(command)g(def)o(aults)h(to)e(a)f(left-center)k
+(alignment,)f(corresponding)i(to)c(a)g Fl([)p Fo(h)p
+Fm(psposn)p Fo(i)s Fl(])g Fs(ar)n(gu-)0 204 y(ment)f(of)f
+Fl([l])p Fs(.\))0 367 y(The)35 b(code)i(belo)n(w)f(includes)i
+Fl(example.eps)h Fs(into)d(the)g(current)h(document,)k(resizing)c(it)f
+(to)f(a)h(width)g(of)f(3.5)h(inches.)0 480 y(Se)n(v)o(eral)c
+Fl(\\psfrag)i Fs(commands)g(are)e(used)h(to)f(replace)i(the)f(tags)f
+Fl(p1)p Fs(,)i Fl(p2)p Fs(,)g(and)f Fl(p3)f Fs(in)g(the)h(\002gure,)h
+(and)f(the)f(command)0 593 y Fl(\\psfragscanon)27 b Fs(command)e(is)e
+(used)h(to)g(notify)h Fr(PSfr)o(ag)e Fs(that)h(it)f(must)h(scan)g
+Fl(example.eps)j Fs(for)c(the)h Fl(\\tex)g Fs(tags.)169
+842 y Fg(\\begin{figure}[tbh)q(])339 941 y(\\unitlength=1in)339
+1041 y(\\begin{center})508 1141 y(\\psfragscanon)508
+1240 y(\\psfrag{p1}[l]{\\beg)q(in{)q(pic)q(tur)q(e}\()q(0,0)q(\))677
+1340 y(\\put\(0.15,)46 b(0.2\){\\makebox\(0,0\)[)q(l]{)q($\\s)q(in\()q
+(t\)$)q(}})677 1440 y(\\put\(0.1,0.2\){\\vec)q(tor)q(\(-1)q(,-2)q(\){0)
+q(.1})q(})677 1539 y(\\end{picture}})508 1639 y(\\psfrag*{p1}[][l]{$)q
+(\\as)q(t$})508 1738 y(\\psfrag{p2}[][l]{$\\)q(ast)q($})508
+1838 y(\\psfrag{p3}{$\\cos\(t)q(\)$})508 1938 y(\\includegraphics[wi)q
+(dth)q(=3.)q(5in)q(]{e)q(xam)q(ple)q(.ep)q(s})381 2037
+y(\\end{center})381 2137 y(\\caption{A)g(\\textsf{psfrag})h(example.})
+169 2237 y(\\end{figure})0 2499 y Fs(Note)23 b(the)h(use)g(of)g(a)f
+Fl(picture)i Fs(en)l(vironment)i(within)d(the)g(replacement)i(for)d
+Fl(p1)p Fs(.)900 4729 y
+ /PSfrag where{pop(p1)[[0(Bl)1 0][1(l)1 0]](p2)[[2(l)1 0]](p3)[[3(Bl)1
+0]](\\tex[t][t]{$t$})[[4(t)1 0]](\\tex[B][B]{$\\sin\(t\)$, $\\cos\(t\)$})[[5(B)1
+0]](\\tex[B][B]{Plot of $\\sin\(t\)$ and $\\cos\(t\)$})[[6(B)1 0]]6
+0 -1/Begin PSfrag}{userdict /PSfrag{pop}put}ifelse
+ 900 4729 a @beginspecial 97 @llx
+197 @lly 502 @urx 604 @ury 2520 @rwi @setspecial
+%%BeginDocument: example.eps
+%!PS-Adobe-2.0 EPSF-1.2
+%%Creator: MATLAB, The Mathworks, Inc.
+%%Title: example.eps
+%%CreationDate: 11/05/96 21:16:44
+%%DocumentNeededFonts: Helvetica
+%%DocumentProcessColors: Cyan Magenta Yellow Black
+%%Pages: 1
+%%BoundingBox: 97 197 502 604
+%%EndComments
+
+%%BeginProlog
+
+% MathWorks dictionary
+/MathWorks 150 dict begin
+
+% definition operators
+/bdef {bind def} bind def
+/ldef {load def} bind def
+/xdef {exch def} bdef
+/xstore {exch store} bdef
+
+% operator abbreviations
+/c /clip ldef
+/cc /concat ldef
+/cp /closepath ldef
+/gr /grestore ldef
+/gs /gsave ldef
+/mt /moveto ldef
+/np /newpath ldef
+/cm /currentmatrix ldef
+/sm /setmatrix ldef
+/rc {rectclip} bdef
+/rf {rectfill} bdef
+/rm /rmoveto ldef
+/rl /rlineto ldef
+/s /show ldef
+/sc {setcmykcolor} bdef
+/sr /setrgbcolor ldef
+/w /setlinewidth ldef
+/j /setlinejoin ldef
+/cap /setlinecap ldef
+
+% page state control
+/pgsv () def
+/bpage {/pgsv save def} bdef
+/epage {pgsv restore} bdef
+/bplot /gsave ldef
+/eplot {stroke grestore} bdef
+
+% orientation switch
+/portraitMode 0 def
+/landscapeMode 1 def
+
+% coordinate system mappings
+/dpi2point 0 def
+
+% font control
+/FontSize 0 def
+/FMS {
+ /FontSize xstore %save size off stack
+ findfont
+ [FontSize 0 0 FontSize neg 0 0]
+ makefont
+ setfont
+ }bdef
+
+/reencode {
+exch dup where
+{pop load} {pop StandardEncoding} ifelse
+exch
+dup 3 1 roll
+findfont dup length dict begin
+ { 1 index /FID ne {def}{pop pop} ifelse } forall
+ /Encoding exch def
+ currentdict
+end
+definefont pop
+} bdef
+
+/isroman {
+findfont /CharStrings get
+/Agrave known
+} bdef
+
+/FMSR {
+3 1 roll 1 index
+dup isroman
+{reencode} {pop pop} ifelse
+exch FMS
+} bdef
+
+/csm {
+ 1 dpi2point div -1 dpi2point div scale
+ neg translate
+ landscapeMode eq {90 rotate} if
+ } bdef
+
+% line types: solid, dotted, dashed, dotdash
+/SO { [] 0 setdash } bdef
+/DO { [.5 dpi2point mul 4 dpi2point mul] 0 setdash } bdef
+/DA { [6 dpi2point mul] 0 setdash } bdef
+/DD { [.5 dpi2point mul 4 dpi2point mul 6 dpi2point mul 4 dpi2point mul] 0 setdash } bdef
+
+% macros for lines and objects
+/L {
+ lineto
+ stroke
+ } bdef
+/MP {
+ 3 1 roll moveto
+ 1 sub {rlineto} repeat
+ } bdef
+/AP {
+ {rlineto} repeat
+ } bdef
+/PP {
+ closepath fill
+ } bdef
+/DP {
+ closepath stroke
+ } bdef
+/MR {
+ 4 -2 roll moveto
+ dup 0 exch rlineto
+ exch 0 rlineto
+ neg 0 exch rlineto
+ closepath
+ } bdef
+/FR {
+ MR stroke
+ } bdef
+/PR {
+ MR fill
+ } bdef
+/L1i {
+ { currentfile picstr readhexstring pop } image
+ } bdef
+
+/tMatrix matrix def
+/MakeOval {
+ newpath
+ tMatrix currentmatrix pop
+ translate scale
+ 0 0 1 0 360 arc
+ tMatrix setmatrix
+ } bdef
+/FO {
+ MakeOval
+ stroke
+ } bdef
+/PO {
+ MakeOval
+ fill
+ } bdef
+
+/PD {
+ 2 copy moveto lineto stroke
+ } bdef
+
+
+currentdict end def
+%%EndProlog
+
+%%BeginSetup
+MathWorks begin
+
+0 cap
+
+end
+%%EndSetup
+
+%%Page: 1 1
+%%BeginPageSetup
+%%PageBoundingBox: 97 197 502 604
+MathWorks begin
+bpage
+%%EndPageSetup
+
+%%BeginObject: graph1 1
+bplot
+
+/dpi2point 12 def
+portraitMode 0216 7344 csm
+
+ 956 91 4862 4883 MR c np
+76 dict begin %Colortable dictionary
+/c0 { 0 0 0 sr} bdef
+/c1 { 1 1 1 sr} bdef
+/c2 { 1 0 0 sr} bdef
+/c3 { 0 1 0 sr} bdef
+/c4 { 0 0 1 sr} bdef
+/c5 { 1 1 0 sr} bdef
+/c6 { 1 0 1 sr} bdef
+/c7 { 0 1 1 sr} bdef
+%%IncludeResource: font Helvetica
+/Helvetica /ISOLatin1Encoding 144 FMSR
+
+1 j
+c1
+ 0 0 6912 5185 PR
+6 w
+DO
+4 w
+c0
+1463 4613 mt 1463 388 L
+1463 388 mt 1463 388 L
+2308 4613 mt 2308 388 L
+2308 388 mt 2308 388 L
+3153 4613 mt 3153 388 L
+3153 388 mt 3153 388 L
+3999 4613 mt 3999 388 L
+3999 388 mt 3999 388 L
+4844 4613 mt 4844 388 L
+4844 388 mt 4844 388 L
+5689 4613 mt 5689 388 L
+5689 388 mt 5689 388 L
+1463 4613 mt 5689 4613 L
+5689 4613 mt 5689 4613 L
+1463 4191 mt 5689 4191 L
+5689 4191 mt 5689 4191 L
+1463 3768 mt 5689 3768 L
+5689 3768 mt 5689 3768 L
+1463 3346 mt 5689 3346 L
+5689 3346 mt 5689 3346 L
+1463 2923 mt 5689 2923 L
+5689 2923 mt 5689 2923 L
+1463 2501 mt 5689 2501 L
+5689 2501 mt 5689 2501 L
+1463 2078 mt 5689 2078 L
+5689 2078 mt 5689 2078 L
+1463 1655 mt 5689 1655 L
+5689 1655 mt 5689 1655 L
+1463 1233 mt 5689 1233 L
+5689 1233 mt 5689 1233 L
+1463 811 mt 5689 811 L
+5689 811 mt 5689 811 L
+1463 388 mt 5689 388 L
+5689 388 mt 5689 388 L
+1463 4613 mt 1463 388 L
+1463 388 mt 5689 388 L
+1463 4613 mt 1463 388 L
+1463 388 mt 5689 388 L
+1463 4613 mt 1463 388 L
+1463 388 mt 5689 388 L
+SO
+6 w
+1463 4613 mt 5689 4613 L
+1463 388 mt 5689 388 L
+5689 4613 mt 5689 388 L
+1463 4613 mt 1463 388 L
+5689 4613 mt 5689 4613 L
+1463 4613 mt 1463 4613 L
+1463 4613 mt 5689 4613 L
+1463 4613 mt 1463 388 L
+1463 4613 mt 1463 4613 L
+1463 4613 mt 1463 4571 L
+1463 388 mt 1463 430 L
+1423 4782 mt
+(0) s
+2308 4613 mt 2308 4571 L
+2308 388 mt 2308 430 L
+2268 4782 mt
+(2) s
+3153 4613 mt 3153 4571 L
+3153 388 mt 3153 430 L
+3113 4782 mt
+(4) s
+3999 4613 mt 3999 4571 L
+3999 388 mt 3999 430 L
+3959 4782 mt
+(6) s
+4844 4613 mt 4844 4571 L
+4844 388 mt 4844 430 L
+4804 4782 mt
+(8) s
+5689 4613 mt 5689 4571 L
+5689 388 mt 5689 430 L
+5609 4782 mt
+(10) s
+1463 4613 mt 1505 4613 L
+5689 4613 mt 5647 4613 L
+1264 4666 mt
+(-1) s
+1463 4191 mt 1505 4191 L
+5689 4191 mt 5647 4191 L
+1144 4244 mt
+(-0.8) s
+1463 3768 mt 1505 3768 L
+5689 3768 mt 5647 3768 L
+1144 3821 mt
+(-0.6) s
+1463 3346 mt 1505 3346 L
+5689 3346 mt 5647 3346 L
+1144 3399 mt
+(-0.4) s
+1463 2923 mt 1505 2923 L
+5689 2923 mt 5647 2923 L
+1144 2976 mt
+(-0.2) s
+1463 2501 mt 1505 2501 L
+5689 2501 mt 5647 2501 L
+1348 2554 mt
+(0) s
+1463 2078 mt 1505 2078 L
+5689 2078 mt 5647 2078 L
+1228 2131 mt
+(0.2) s
+1463 1655 mt 1505 1655 L
+5689 1655 mt 5647 1655 L
+1228 1708 mt
+(0.4) s
+1463 1233 mt 1505 1233 L
+5689 1233 mt 5647 1233 L
+1228 1286 mt
+(0.6) s
+1463 811 mt 1505 811 L
+5689 811 mt 5647 811 L
+1228 864 mt
+(0.8) s
+1463 388 mt 1505 388 L
+5689 388 mt 5647 388 L
+1348 441 mt
+(1) s
+1463 388 mt 5689 388 L
+1463 4613 mt 5689 4613 L
+1463 4613 mt 1463 388 L
+5689 4613 mt 5689 388 L
+1463 388 mt 1463 388 L
+5689 388 mt 5689 388 L
+gs 1463 388 4227 4226 MR c np
+42 183 43 192 42 200 42 206 42 210 43 211 42 210 42 208
+42 204 43 196 42 188 42 177 42 165 43 151 42 135 42 119
+42 100 43 82 42 61 42 42 42 20 43 -1 42 -22 42 -43
+42 -63 43 -83 42 -102 42 -120 43 -137 42 -152 42 -166 42 -178
+43 -188 42 -197 42 -204 42 -208 43 -211 42 -211 42 -209 42 -206
+43 -199 42 -192 42 -182 42 -170 43 -157 42 -142 42 -126 42 -108
+43 -89 42 -70 42 -50 43 -29 42 -8 42 13 42 34 43 55
+42 75 42 94 42 113 43 130 42 146 42 160 42 173 43 185
+42 193 42 202 42 206 43 210 42 211 42 211 42 207 43 202
+42 195 42 186 42 176 43 162 42 149 42 132 43 116 42 97
+42 79 42 58 43 37 42 17 42 -4 42 -26 43 -46 42 -67
+42 -86 42 -105 43 -123 42 -139 42 -155 42 -168 43 -180 42 -190
+42 -198 42 -205 43 -209 1505 2290 100 MP stroke
+42 -211 1463 2501 2 MP stroke
+42 -106 43 -87 42 -67 42 -48 42 -26 43 -5 42 15 42 37
+42 57 43 78 42 96 42 115 42 132 43 148 42 162 42 175
+42 185 43 195 42 202 42 207 42 210 43 211 42 211 42 206
+42 202 43 194 42 185 42 174 43 161 42 146 42 131 42 113
+43 95 42 76 42 56 42 35 43 14 42 -7 42 -28 42 -49
+43 -69 42 -89 42 -107 42 -125 43 -141 42 -157 42 -169 42 -182
+43 -191 42 -199 42 -205 43 -210 42 -211 42 -210 42 -209 43 -204
+42 -197 42 -189 42 -179 43 -166 42 -153 42 -137 42 -121 43 -103
+42 -84 42 -64 42 -44 43 -22 42 -2 42 19 42 40 43 61
+42 81 42 99 42 118 43 135 42 150 42 164 43 177 42 187
+42 197 42 203 43 207 42 211 42 211 42 210 43 206 42 200
+42 193 42 183 43 172 42 158 42 144 42 128 43 110 42 92
+42 73 42 52 43 31 1505 399 100 MP stroke
+42 11 1463 388 2 MP stroke
+
+gr
+3194 4942 mt
+(\\tex[t][t]{$t$}) s
+1090 3419 mt -90 rotate
+(\\tex[B][B]{$\\sin\(t\)$, $\\cos\(t\)$}) s
+90 rotate
+2314 273 mt
+(\\tex[B][B]{Plot of $\\sin\(t\)$ and $\\cos\(t\)$}) s
+2689 2048 mt
+(p1) s
+3956 3343 mt
+(p2) s
+5224 1495 mt
+(p2) s
+3486 2178 mt -78 rotate
+(p3) s
+78 rotate
+
+end
+
+eplot
+%%EndObject graph 1
+
+epage
+end
+
+showpage
+
+%%Trailer
+%%EOF
+
+%%EndDocument
+ @endspecial 900 4729 a
+ /End PSfrag
+ 900 4729 a 900 3838 a
+ /Hide PSfrag
+ 900 3838
+a 150 3900 a Fs(PSfrag)g(replacements)p 150 3935 750
+4 v 900 3938 a
+ /Unhide PSfrag
+ 900 3938 a 900 4051 a
+ {
+ 900 4051 a 990 3954
+a Fs(sin)q Fi(\()n Fm(t)6 b Fi(\))918 4014 y Fb(\001)900
+4051 y(\001)-42 b(\013)900 4051 y
+ } 0/Place PSfrag
+ 900 4051 a 877 4143
+a
+ {
+ 877 4143 a 854 4164 a Fo(\003)877 4143 y
+ } 1/Place PSfrag
+ 877 4143 a
+877 4256 a
+ {
+ 877 4256 a 854 4277 a Fo(\003)877 4256 y
+ } 2/Place PSfrag
+ 877
+4256 a 679 4367 a
+ {
+ 679 4367 a Fs(cos)q Fi(\()n Fm(t)6
+b Fi(\))679 4367 y
+ } 3/Place PSfrag
+ 679 4367 a 885 4453 a
+ {
+ 885 4453 a 868
+4502 a Fm(t)885 4453 y
+ } 4/Place PSfrag
+ 885 4453 a 664 4593 a
+ {
+ 664 4593
+a -236 w Fs(sin)q Fi(\()n Fm(t)g Fi(\))p Fs(,)23 b(cos)q
+Fi(\()n Fm(t)6 b Fi(\))664 4593 y
+ } 5/Place PSfrag
+ 664 4593 a 464 4706
+a
+ {
+ 464 4706 a -435 w Fs(Plot)23 b(of)h(sin)q Fi(\()n Fm(t)6
+b Fi(\))23 b Fs(and)h(cos)q Fi(\()n Fm(t)6 b Fi(\))464
+4706 y
+ } 6/Place PSfrag
+ 464 4706 a 1426 5024 a Fs(Figure)24 b(2:)29 b(A)22
+b Fr(PSfr)o(ag)h Fs(e)o(xample.)0 5237 y(The)g(result)i(of)e(these)i
+(tw)o(o)e(steps)i(is)e(sho)n(wn)h(in)f(Figure)h(2.)1927
+5649 y(8)p eop end
+%%Page: 9 9
+TeXDict begin 9 8 bop 0 91 a Fk(7.1)99 b(Figur)n(e)26
+b(scaling)e(and)h(r)n(esizing)0 300 y Fs(There)32 b(are)h(tw)o(o)f(w)o
+(ays)g(to)g(resize)h(EPS)d(\002gures)j(with)f(the)h Fr(g)o(r)o(aphics)h
+Fs(package,)i(and)c(each)h(has)g(as)f(dif)n(ferent)i(ef)n(fect)f(on)0
+413 y Fr(PSfr)o(ag)21 b Fs(replacements.)31 b(If)21 b(you)g(are)h(used)
+g(to)f(using)i Fl(epsf.sty)p Fs(,)g(you)f(will)f(be)g(accustomed)j(to)d
+(only)h(one)g(such)g(beha)n(vior)-5 b(.)0 561 y(If)22
+b(you)h(use)g(the)f Fl(\\scalebox)j Fs(or)d Fl(\\resizebox)j
+Fs(macros)e(of)f Fl(graphics.sty)p Fs(,)k(then)d(the)g
+Fr(PSfr)o(ag)f Fs(replacments)i Fm(will)e Fs(scale)0
+674 y(with)g(the)g(\002gure.)28 b(This)22 b(ef)n(fect)h(is)e
+(illustrated)k(in)d(3)f(belo)n(w)-6 b(.)29 b(Figure)22
+b(3)g(uses)g(the)g(follo)n(wing)i(command)e(to)g(scale)h(the)f
+(\002gure)900 2889 y
+ currentpoint currentpoint translate 0.62222 0.62222 scale neg exch
+neg exch translate
+ 900 2889 a 900 2889 a
+ /PSfrag where{pop(p1)[[0(Bl)1 0][1(l)1 0]](p2)[[2(l)1 0]](p3)[[3(Bl)1
+0]](\\tex[t][t]{$t$})[[4(t)1 0]](\\tex[B][B]{$\\sin\(t\)$, $\\cos\(t\)$})[[5(B)1
+0]](\\tex[B][B]{Plot of $\\sin\(t\)$ and $\\cos\(t\)$})[[6(B)1 0]]6
+0 -1/Begin PSfrag}{userdict /PSfrag{pop}put}ifelse
+ 900 2889 a
+@beginspecial 97 @llx 197 @lly 502 @urx 604 @ury 4050
+@rwi @setspecial
+%%BeginDocument: example.eps
+%!PS-Adobe-2.0 EPSF-1.2
+%%Creator: MATLAB, The Mathworks, Inc.
+%%Title: example.eps
+%%CreationDate: 11/05/96 21:16:44
+%%DocumentNeededFonts: Helvetica
+%%DocumentProcessColors: Cyan Magenta Yellow Black
+%%Pages: 1
+%%BoundingBox: 97 197 502 604
+%%EndComments
+
+%%BeginProlog
+
+% MathWorks dictionary
+/MathWorks 150 dict begin
+
+% definition operators
+/bdef {bind def} bind def
+/ldef {load def} bind def
+/xdef {exch def} bdef
+/xstore {exch store} bdef
+
+% operator abbreviations
+/c /clip ldef
+/cc /concat ldef
+/cp /closepath ldef
+/gr /grestore ldef
+/gs /gsave ldef
+/mt /moveto ldef
+/np /newpath ldef
+/cm /currentmatrix ldef
+/sm /setmatrix ldef
+/rc {rectclip} bdef
+/rf {rectfill} bdef
+/rm /rmoveto ldef
+/rl /rlineto ldef
+/s /show ldef
+/sc {setcmykcolor} bdef
+/sr /setrgbcolor ldef
+/w /setlinewidth ldef
+/j /setlinejoin ldef
+/cap /setlinecap ldef
+
+% page state control
+/pgsv () def
+/bpage {/pgsv save def} bdef
+/epage {pgsv restore} bdef
+/bplot /gsave ldef
+/eplot {stroke grestore} bdef
+
+% orientation switch
+/portraitMode 0 def
+/landscapeMode 1 def
+
+% coordinate system mappings
+/dpi2point 0 def
+
+% font control
+/FontSize 0 def
+/FMS {
+ /FontSize xstore %save size off stack
+ findfont
+ [FontSize 0 0 FontSize neg 0 0]
+ makefont
+ setfont
+ }bdef
+
+/reencode {
+exch dup where
+{pop load} {pop StandardEncoding} ifelse
+exch
+dup 3 1 roll
+findfont dup length dict begin
+ { 1 index /FID ne {def}{pop pop} ifelse } forall
+ /Encoding exch def
+ currentdict
+end
+definefont pop
+} bdef
+
+/isroman {
+findfont /CharStrings get
+/Agrave known
+} bdef
+
+/FMSR {
+3 1 roll 1 index
+dup isroman
+{reencode} {pop pop} ifelse
+exch FMS
+} bdef
+
+/csm {
+ 1 dpi2point div -1 dpi2point div scale
+ neg translate
+ landscapeMode eq {90 rotate} if
+ } bdef
+
+% line types: solid, dotted, dashed, dotdash
+/SO { [] 0 setdash } bdef
+/DO { [.5 dpi2point mul 4 dpi2point mul] 0 setdash } bdef
+/DA { [6 dpi2point mul] 0 setdash } bdef
+/DD { [.5 dpi2point mul 4 dpi2point mul 6 dpi2point mul 4 dpi2point mul] 0 setdash } bdef
+
+% macros for lines and objects
+/L {
+ lineto
+ stroke
+ } bdef
+/MP {
+ 3 1 roll moveto
+ 1 sub {rlineto} repeat
+ } bdef
+/AP {
+ {rlineto} repeat
+ } bdef
+/PP {
+ closepath fill
+ } bdef
+/DP {
+ closepath stroke
+ } bdef
+/MR {
+ 4 -2 roll moveto
+ dup 0 exch rlineto
+ exch 0 rlineto
+ neg 0 exch rlineto
+ closepath
+ } bdef
+/FR {
+ MR stroke
+ } bdef
+/PR {
+ MR fill
+ } bdef
+/L1i {
+ { currentfile picstr readhexstring pop } image
+ } bdef
+
+/tMatrix matrix def
+/MakeOval {
+ newpath
+ tMatrix currentmatrix pop
+ translate scale
+ 0 0 1 0 360 arc
+ tMatrix setmatrix
+ } bdef
+/FO {
+ MakeOval
+ stroke
+ } bdef
+/PO {
+ MakeOval
+ fill
+ } bdef
+
+/PD {
+ 2 copy moveto lineto stroke
+ } bdef
+
+
+currentdict end def
+%%EndProlog
+
+%%BeginSetup
+MathWorks begin
+
+0 cap
+
+end
+%%EndSetup
+
+%%Page: 1 1
+%%BeginPageSetup
+%%PageBoundingBox: 97 197 502 604
+MathWorks begin
+bpage
+%%EndPageSetup
+
+%%BeginObject: graph1 1
+bplot
+
+/dpi2point 12 def
+portraitMode 0216 7344 csm
+
+ 956 91 4862 4883 MR c np
+76 dict begin %Colortable dictionary
+/c0 { 0 0 0 sr} bdef
+/c1 { 1 1 1 sr} bdef
+/c2 { 1 0 0 sr} bdef
+/c3 { 0 1 0 sr} bdef
+/c4 { 0 0 1 sr} bdef
+/c5 { 1 1 0 sr} bdef
+/c6 { 1 0 1 sr} bdef
+/c7 { 0 1 1 sr} bdef
+%%IncludeResource: font Helvetica
+/Helvetica /ISOLatin1Encoding 144 FMSR
+
+1 j
+c1
+ 0 0 6912 5185 PR
+6 w
+DO
+4 w
+c0
+1463 4613 mt 1463 388 L
+1463 388 mt 1463 388 L
+2308 4613 mt 2308 388 L
+2308 388 mt 2308 388 L
+3153 4613 mt 3153 388 L
+3153 388 mt 3153 388 L
+3999 4613 mt 3999 388 L
+3999 388 mt 3999 388 L
+4844 4613 mt 4844 388 L
+4844 388 mt 4844 388 L
+5689 4613 mt 5689 388 L
+5689 388 mt 5689 388 L
+1463 4613 mt 5689 4613 L
+5689 4613 mt 5689 4613 L
+1463 4191 mt 5689 4191 L
+5689 4191 mt 5689 4191 L
+1463 3768 mt 5689 3768 L
+5689 3768 mt 5689 3768 L
+1463 3346 mt 5689 3346 L
+5689 3346 mt 5689 3346 L
+1463 2923 mt 5689 2923 L
+5689 2923 mt 5689 2923 L
+1463 2501 mt 5689 2501 L
+5689 2501 mt 5689 2501 L
+1463 2078 mt 5689 2078 L
+5689 2078 mt 5689 2078 L
+1463 1655 mt 5689 1655 L
+5689 1655 mt 5689 1655 L
+1463 1233 mt 5689 1233 L
+5689 1233 mt 5689 1233 L
+1463 811 mt 5689 811 L
+5689 811 mt 5689 811 L
+1463 388 mt 5689 388 L
+5689 388 mt 5689 388 L
+1463 4613 mt 1463 388 L
+1463 388 mt 5689 388 L
+1463 4613 mt 1463 388 L
+1463 388 mt 5689 388 L
+1463 4613 mt 1463 388 L
+1463 388 mt 5689 388 L
+SO
+6 w
+1463 4613 mt 5689 4613 L
+1463 388 mt 5689 388 L
+5689 4613 mt 5689 388 L
+1463 4613 mt 1463 388 L
+5689 4613 mt 5689 4613 L
+1463 4613 mt 1463 4613 L
+1463 4613 mt 5689 4613 L
+1463 4613 mt 1463 388 L
+1463 4613 mt 1463 4613 L
+1463 4613 mt 1463 4571 L
+1463 388 mt 1463 430 L
+1423 4782 mt
+(0) s
+2308 4613 mt 2308 4571 L
+2308 388 mt 2308 430 L
+2268 4782 mt
+(2) s
+3153 4613 mt 3153 4571 L
+3153 388 mt 3153 430 L
+3113 4782 mt
+(4) s
+3999 4613 mt 3999 4571 L
+3999 388 mt 3999 430 L
+3959 4782 mt
+(6) s
+4844 4613 mt 4844 4571 L
+4844 388 mt 4844 430 L
+4804 4782 mt
+(8) s
+5689 4613 mt 5689 4571 L
+5689 388 mt 5689 430 L
+5609 4782 mt
+(10) s
+1463 4613 mt 1505 4613 L
+5689 4613 mt 5647 4613 L
+1264 4666 mt
+(-1) s
+1463 4191 mt 1505 4191 L
+5689 4191 mt 5647 4191 L
+1144 4244 mt
+(-0.8) s
+1463 3768 mt 1505 3768 L
+5689 3768 mt 5647 3768 L
+1144 3821 mt
+(-0.6) s
+1463 3346 mt 1505 3346 L
+5689 3346 mt 5647 3346 L
+1144 3399 mt
+(-0.4) s
+1463 2923 mt 1505 2923 L
+5689 2923 mt 5647 2923 L
+1144 2976 mt
+(-0.2) s
+1463 2501 mt 1505 2501 L
+5689 2501 mt 5647 2501 L
+1348 2554 mt
+(0) s
+1463 2078 mt 1505 2078 L
+5689 2078 mt 5647 2078 L
+1228 2131 mt
+(0.2) s
+1463 1655 mt 1505 1655 L
+5689 1655 mt 5647 1655 L
+1228 1708 mt
+(0.4) s
+1463 1233 mt 1505 1233 L
+5689 1233 mt 5647 1233 L
+1228 1286 mt
+(0.6) s
+1463 811 mt 1505 811 L
+5689 811 mt 5647 811 L
+1228 864 mt
+(0.8) s
+1463 388 mt 1505 388 L
+5689 388 mt 5647 388 L
+1348 441 mt
+(1) s
+1463 388 mt 5689 388 L
+1463 4613 mt 5689 4613 L
+1463 4613 mt 1463 388 L
+5689 4613 mt 5689 388 L
+1463 388 mt 1463 388 L
+5689 388 mt 5689 388 L
+gs 1463 388 4227 4226 MR c np
+42 183 43 192 42 200 42 206 42 210 43 211 42 210 42 208
+42 204 43 196 42 188 42 177 42 165 43 151 42 135 42 119
+42 100 43 82 42 61 42 42 42 20 43 -1 42 -22 42 -43
+42 -63 43 -83 42 -102 42 -120 43 -137 42 -152 42 -166 42 -178
+43 -188 42 -197 42 -204 42 -208 43 -211 42 -211 42 -209 42 -206
+43 -199 42 -192 42 -182 42 -170 43 -157 42 -142 42 -126 42 -108
+43 -89 42 -70 42 -50 43 -29 42 -8 42 13 42 34 43 55
+42 75 42 94 42 113 43 130 42 146 42 160 42 173 43 185
+42 193 42 202 42 206 43 210 42 211 42 211 42 207 43 202
+42 195 42 186 42 176 43 162 42 149 42 132 43 116 42 97
+42 79 42 58 43 37 42 17 42 -4 42 -26 43 -46 42 -67
+42 -86 42 -105 43 -123 42 -139 42 -155 42 -168 43 -180 42 -190
+42 -198 42 -205 43 -209 1505 2290 100 MP stroke
+42 -211 1463 2501 2 MP stroke
+42 -106 43 -87 42 -67 42 -48 42 -26 43 -5 42 15 42 37
+42 57 43 78 42 96 42 115 42 132 43 148 42 162 42 175
+42 185 43 195 42 202 42 207 42 210 43 211 42 211 42 206
+42 202 43 194 42 185 42 174 43 161 42 146 42 131 42 113
+43 95 42 76 42 56 42 35 43 14 42 -7 42 -28 42 -49
+43 -69 42 -89 42 -107 42 -125 43 -141 42 -157 42 -169 42 -182
+43 -191 42 -199 42 -205 43 -210 42 -211 42 -210 42 -209 43 -204
+42 -197 42 -189 42 -179 43 -166 42 -153 42 -137 42 -121 43 -103
+42 -84 42 -64 42 -44 43 -22 42 -2 42 19 42 40 43 61
+42 81 42 99 42 118 43 135 42 150 42 164 43 177 42 187
+42 197 42 203 43 207 42 211 42 211 42 210 43 206 42 200
+42 193 42 183 43 172 42 158 42 144 42 128 43 110 42 92
+42 73 42 52 43 31 1505 399 100 MP stroke
+42 11 1463 388 2 MP stroke
+
+gr
+3194 4942 mt
+(\\tex[t][t]{$t$}) s
+1090 3419 mt -90 rotate
+(\\tex[B][B]{$\\sin\(t\)$, $\\cos\(t\)$}) s
+90 rotate
+2314 273 mt
+(\\tex[B][B]{Plot of $\\sin\(t\)$ and $\\cos\(t\)$}) s
+2689 2048 mt
+(p1) s
+3956 3343 mt
+(p2) s
+5224 1495 mt
+(p2) s
+3486 2178 mt -78 rotate
+(p3) s
+78 rotate
+
+end
+
+eplot
+%%EndObject graph 1
+
+epage
+end
+
+showpage
+
+%%Trailer
+%%EOF
+
+%%EndDocument
+ @endspecial 900 2889 a
+ /End PSfrag
+ 900 2889 a 900 1999 a
+ /Hide PSfrag
+ 900 1999
+a 150 2061 a Fs(PSfrag)h(replacements)p 150 2095 750
+4 v 900 2099 a
+ /Unhide PSfrag
+ 900 2099 a 900 2211 a
+ {
+ 900 2211 a 990 2114
+a Fs(sin)q Fi(\()n Fm(t)6 b Fi(\))918 2174 y Fb(\001)900
+2211 y(\001)-42 b(\013)900 2211 y
+ } 0/Place PSfrag
+ 900 2211 a 877 2303
+a
+ {
+ 877 2303 a 854 2324 a Fo(\003)877 2303 y
+ } 1/Place PSfrag
+ 877 2303 a
+877 2416 a
+ {
+ 877 2416 a 854 2437 a Fo(\003)877 2416 y
+ } 2/Place PSfrag
+ 877
+2416 a 679 2527 a
+ {
+ 679 2527 a Fs(cos)q Fi(\()n Fm(t)6
+b Fi(\))679 2527 y
+ } 3/Place PSfrag
+ 679 2527 a 885 2613 a
+ {
+ 885 2613 a 868
+2662 a Fm(t)885 2613 y
+ } 4/Place PSfrag
+ 885 2613 a 664 2753 a
+ {
+ 664 2753
+a -236 w Fs(sin)q Fi(\()n Fm(t)g Fi(\))p Fs(,)23 b(cos)q
+Fi(\()n Fm(t)6 b Fi(\))664 2753 y
+ } 5/Place PSfrag
+ 664 2753 a 464 2866
+a
+ {
+ 464 2866 a -435 w Fs(Plot)23 b(of)h(sin)q Fi(\()n Fm(t)6
+b Fi(\))23 b Fs(and)h(cos)q Fi(\()n Fm(t)6 b Fi(\))464
+2866 y
+ } 6/Place PSfrag
+ 464 2866 a 900 2889 a
+ currentpoint currentpoint translate 1 0.62222 div 1 0.62222 div scale
+neg exch neg exch translate
+ 900 2889 a 415 3184 a Fs(Figure)24
+b(3:)29 b(The)23 b(same)g Fr(PSfr)o(ag)g Fs(e)o(xample)i(as)e(Figure)h
+(2,)f(using)i Fl(\\resizebox)h Fs(to)e(set)g(the)f(width.)0
+3382 y(to)g(3.5)h(inches)h(in)e(width:)0 3571 y Fg
+(\\resizebox{3.5in}{!})q({\\)q(inc)q(lud)q(egr)q(aph)q(ics)q({ex)q(amp)
+q(le.)q(eps)q(}})0 3774 y Fs(This)g(is)h(in)f(direct)i(contrast)g(to)f
+(Figure)g(2,)f(which)h(uses)g(the)g Fl(width=)h Fs(k)o(e)o(yw)o(ord)f
+(from)g(the)g Fl(graphicx.sty)p Fs(,)j(as)c(follo)n(ws:)0
+3964 y Fg(\\includegraphics[wid)q(th)q(=3.)q(5in)q(]{\\)q(inc)q(lud)q
+(egr)q(aph)q(ics)q({ex)q(amp)q(le.)q(eps)q(}})0 4166
+y Fs(Figure)41 b(2)e(also)i(re\003ects)f(the)h(beha)n(vior)h(that)f
+(you)f(w)o(ould)h(see)f(when)g(using)h(the)f Fl(epsf.sty)i
+Fs(macros)f Fl(\\epfxsize)p Fs(,)0 4279 y Fl(\\epsfysize)p
+Fs(,)26 b Fm(etc)p Fs(.)j(In)23 b(these)i(cases,)f(the)g
+Fr(PSfr)o(ag)f Fs(te)o(xt)h(does)g(not)g(scale)h(with)e(it.)28
+b(to)c(resize)h(the)e(\002gure.)0 4427 y(As)f(you)h(can)g(see,)f(the)h
+(te)o(xt)g(in)f(the)h(second)h(\002gure)f(is)f(decidedly)j(smaller)e
+(than)h(the)e(\002rst.)28 b(This)23 b(is)f(because)i
+Fl(\\resizebox)0 4540 y Fs(uses)32 b(PostScript)h(tricks)g(to)e(scale)i
+Fm(all)e Fs(of)h(the)g(contents)i(of)d(its)h(ar)n(gument.)54
+b(Since)32 b(the)g Fl(\\psfrag)h Fs(commands)g(are)f(not)0
+4653 y(actually)26 b(typeset)f(until)f Fm(within)g Fs(the)g
+Fl(\\includegraphics)29 b Fs(command,)24 b(the)o(y)g(are)f(resized)j
+(as)d(well.)0 4801 y(The)35 b Fl(graphicx.sty)40 b Fs(k)o(e)o(y-v)n
+(alue)e(pairs)f Fl(width=)p Fs(,)j Fl(height=)p Fs(,)g(and)d
+Fl(scale=)g Fs(scale)g(the)f(\002gure)g(without)h(scaling)h(the)0
+4913 y(replacement)31 b(te)o(xt,)e(as)g(long)g(as)f(the)o(y)h(are)f
+(supplied)j Fm(befor)m(e)e Fs(an)g Fl(angle=)h Fs(rotation)g(k)o(e)o(y)
+-6 b(.)43 b(Of)28 b(course,)j(the)d Fl(\\resizebox)0
+5026 y Fs(and)h Fl(\\scalebox)h Fs(macros)f(are)g(still)g(a)n(v)n
+(ailable)h(in)e Fl(graphicx.sty)p Fs(,)33 b(so)28 b(you)h(can)g(mix)f
+(and)g(match)h(both)g(beha)n(viors)i(as)0 5139 y(you)24
+b(see)g(\002t.)k(See)23 b(the)g Fr(g)o(r)o(aphics)j Fs(documentation)h
+(for)d(more)f(details.)0 5287 y(If)i(you)g(are)g(still)h(unsure)g
+(about)g(these)g(distinctions,)i(then)e(try)f(both)g(methods)i(for)e
+(scaling)h(your)g(\002gures)f(until)h(you)g(\002nd)0
+5400 y(a)d(con)l(v)o(ention)k(that)d(w)o(orks)g(best)g(for)g(you.)1927
+5649 y(9)p eop end
+%%Page: 10 10
+TeXDict begin 10 9 bop 0 91 a Fv(8)119 b(Common)30 b(mistak)o(es,)e
+(kno)o(wn)j(pr)n(oblems,)f(and)h(b)n(ugs)0 345 y Fr(PSfr)o(ag)23
+b Fs(is)g(b)n(ug-free.)0 504 y(W)-7 b(ell,)29 b(of)g(course)h(we')-5
+b(re)29 b(kidding.)46 b Fr(PSfr)o(ag)28 b Fs(uses)h(some)f(trick)o(y)i
+(PostScript)g(hacks)f(to)g(achie)n(v)o(e)g(its)g(goals.)45
+b(So)28 b(it)g(really)0 617 y(w)o(ould)k(not)g(surprise)i(us)d(if)g
+(you)i(\002nd)e(b)n(ugs,)j(If)d(you)h(\002nd)g(an)o(y)f(problems,)k
+(please)e(con\002rm)f(the)o(y)g(are)f(not)h(mentioned)0
+730 y(belo)n(w;)24 b(and,)g(if)f(not,)h(report)g(them)g(to)f(te)h
+Fr(PSfr)o(ag)f Fs(mailing)h(list)g(\(see)g(belo)n(w\).)0
+1024 y Fk(8.1)99 b(Using)25 b Fd(PSfra)o(g)f Fk(tags)g(pr)n(operly)0
+1245 y Fs(One)i(of)h(the)g(more)f(frequent)j(problems)f(that)f(people)i
+(encounter)g(with)d Fr(PSfr)o(ag)g Fs(is)h(that)g(it)f(replaces)j
+Fm(some)e Fs(of)f(their)i(tags)0 1357 y(properly)-6 b(,)31
+b(b)n(ut)e(not)f(all)g(of)g(them.)42 b(Whene)n(v)o(er)30
+b(possible,)h(you)d(should)i(design)f(your)g(\002gures)g
+Fm(with)f Fa(PSfr)o(ag)f Fm(in)h(mind)p Fs(,)h(by)0 1470
+y(follo)n(wing)c(this)f(rule:)227 1696 y(When)f(adding)g(a)f(piece)h
+(of)f(te)o(xt)g(\(a)g Fm(ta)o(g)p Fs(\))h(in)f(a)g(\002gure)g(for)g
+Fr(PSfr)o(ag)g Fs(to)g(replace,)h(use)g(a)f Fm(single)h(wor)m(d)p
+Fs(,)f(contain-)227 1809 y(ing)i(only)h(unaccented)h(letters)f(and)f
+(numbers.)0 2034 y(This)32 b(is)g(the)g(w)o(ay)g(that)h
+Fr(PSfr)o(ag)f Fs(is)g(intended)i(to)e(be)h(used;)k(doing)d(so)e(will)g
+(almost)g(guarantee)j(that)e Fr(PSfr)o(ag)f Fs(w)o(orks)g(as)0
+2147 y(adv)o(ertised.)h(Of)24 b(course,)h(one)g(cannot)h(al)o(w)o(ays)f
+(follo)n(w)f(this)h(rule;)h(and)e(a)g(small)h(handful)h(of)e(dra)o
+(wing)h(packages)h(consis-)0 2260 y(tently)j(cause)f(problems.)43
+b(In)l(v)n(ariably)-6 b(,)31 b(these)e(problems)g(can)f(be)f(resolv)o
+(ed)j(by)d(understanding)32 b(ho)n(w)27 b Fr(PSfr)o(ag)g
+Fs(looks)i(for)0 2373 y(these)c(tags.)0 2532 y(PostScript)43
+b(has)g(\002)n(v)o(e)e(commands)j(to)e(display)i(te)o(xt\227)p
+Fl(show)p Fs(,)49 b Fl(ashow)p Fs(,)f Fl(kshow)p Fs(,)f
+Fl(widthshow)p Fs(,)j(and)42 b Fl(awidthshow)p Fs(\227)0
+2645 y(although,)23 b(in)c(man)o(y)h(cases,)h(an)e(EPS)f(\002le)h(will)
+g(de\002ne)h(abbre)n(viations)j(of)d(these)h(commands.)28
+b Fr(PSfr)o(ag)19 b Fs(actually)j Fm(inter)m(cepts)0
+2758 y Fs(these)i(commands)h(and)f(checks)h(them)e(for)g(the)h(tags)g
+(to)f(replace.)31 b(When)23 b(the)h(string)g(matches)h(a)e(kno)n(wn)h
+(tag,)f Fr(PSfr)o(ag)g Fs(\002g-)0 2871 y(ures)e(out)g(where)g(the)g
+(tag)f Fm(would)k Fs(ha)n(v)o(e)d(been)g(displayed,)j(and)d(inserts)h
+(its)e(replacement)j(there.)29 b(When)20 b(it)h(doesn')n(t,)i
+Fr(PSfr)o(ag)0 2984 y Fs(lets)h(the)g Fl(*show)g Fs(command)h(proceed)g
+(normally)-6 b(.)0 3143 y(The)26 b(strings)i(that)f(these)g
+Fl(*show)g Fs(display)h(are)f(delimited)h(with)e(parentheses,)k(much)c
+(lik)o(e)h(the)g Fl(C)f Fs(language)j(uses)e(double)0
+3256 y(quotes.)j(F)o(or)23 b(e)o(xample:)227 3482 y Fl(\(This)48
+b(is)g(a)e(test.\))j(show)297 b Fs(displays)275 b Fl(This)48
+b(is)f(a)g(test.)0 3708 y Fs(Unmatched)23 b(parentheses)i(and)c
+(certain)j(other)e(special)h(characters)h(must)e(be)f(preceded)j(by)e
+(a)f(backslash)j(in)d(a)g(PostScript)0 3820 y(string.)30
+b(F)o(or)23 b(e)o(xample:)227 4046 y Fl(\(x)47 b(=)g(\\\(0,1]\))i(show)
+297 b Fs(displays)276 b Fl(x)46 b(=)h(\(0,1])0 4272 y
+Fs(W)l(ith)24 b(this)g(in)f(mind,)h(here)g(is)f(the)h(rule)g(about)h
+Fr(PSfr)o(ag)e Fs(tags:)227 4497 y(The)f(tag)h(supplied)h(to)e(the)h
+Fl(\\psfrag)h Fs(command)f(must)f(be)h(typed)g Fm(e)n(xactly)h(as)e(it)
+g(appear)o(s)j(in)d(the)h(EPS)e(\002le')l(s)227 4610
+y Fl(*show)k Fm(command)p Fs(,)f(without)g(the)g(surrounding)j
+(parentheses.)0 4836 y(In)33 b(other)h(w)o(ords,)h Fr(PSfr)o(ag)e
+Fs(will)g(w)o(ork)g(only)g(if)g(the)g(string)i(in)e(the)g
+Fl(\\psfrag)i Fs(command)e(e)o(xactly)i(duplicates)g(what)e(is)0
+4949 y(found)26 b(in)f(the)g(EPS)e(\002le.)33 b(If)24
+b(your)i(strings)h(ha)n(v)o(e)e(backslashes)k(added)d(to)f(them,)g(as)g
+(in)g(the)g Fl(x)47 b(=)f(\\\(0,1])27 b Fs(e)o(xample,)e(then)0
+5062 y(you)i(will)g(ha)n(v)o(e)g(to)f(add)i(that)f(backslash)i(to)e
+(the)g Fl(\\psfrag)h Fs(command)f(as)g(well.)38 b(And)26
+b Fr(PSfr)o(ag)g Fs(can)h(only)h(replace)g Fm(entir)m(e)0
+5174 y Fs(strings,)d(not)f(just)g(parts)g(of)g(one.)29
+b(So)23 b(if)g(your)h(EPS)e(\002le)h(contains)227 5400
+y Fl(\(I)47 b(want)h(to)f(replace)i(the)f(XXX)f(here\))h(show)1905
+5649 y Fs(10)p eop end
+%%Page: 11 11
+TeXDict begin 11 10 bop 0 91 a Fs(then)24 b(the)g Fl(\\psfrag)h
+Fs(command)g(will)e(f)o(ail)h(if)f(you)h(supply)h(just)f(the)g
+Fl(XXX)p Fs(.)0 254 y(Y)-10 b(ou)21 b(can)h(use)g(a)e(simple)i(te)o(xt)
+g(editor)h(to)e(check)h(things,)h(if)e(you)h(lik)o(e;)h(EPS)c(\002les)j
+(are)f(\(almost)h(al)o(w)o(ays\))h(just)f(simple)g(ASCII)0
+367 y(\002les.)0 530 y(Unfortunately)-6 b(,)30 b(some)d(dra)o(wing)h
+(packages)h(display)f(te)o(xt)f(by)g(sending)h(each)g(character)h
+Fm(individually)h Fs(to)d(a)f Fl(show)h Fs(com-)0 643
+y(mand.)i(In)22 b(other)h(w)o(ords,)g(if)f(you)h(use)g(the)g(dra)o
+(wing)g(tool)g(to)f(put)h(the)g(string)h(\223test\224)f(in)g(your)g
+(\002gure,)f(it)h(will)f(do)g(something)0 756 y(lik)o(e)i(this:)227
+993 y Fl(\(t\))48 b(show)g(\(e\))f(show)h(\(s\))f(show)h(\(t\))g(show)0
+1230 y Fs(If)34 b(this)g(is)g(true)g(in)g(your)g(case,)j(we)c
+(apologize;)42 b(it)33 b(mak)o(es)i(using)g Fr(PSfr)o(ag)e
+Fs(much)h(more)g(incon)l(v)o(enient\227you)39 b(will)33
+b(be)0 1343 y(limited)24 b(to)g(single-character)k(tags.)h(Such)24
+b(tools)h(also)f(pre)n(v)o(ent)g(the)g(use)g(of)g(the)f
+Fl(\\tex)i Fs(command.)0 1642 y Fk(8.2)99 b(Pr)n(oblems)25
+b(using)g(some)g Fd(x\002g)f Fk(\002gur)n(es)0 1866 y
+Fr(PSfr)o(ag)d Fs(does)i(not)f(w)o(ork)g(with)g Fr(x\002g)f
+Fs(\002gures)i(that)f(use)h(\223pattern)h(\002lls.)-6
+b(\224)27 b(When)c(painting/\002lling)i(a)d(polygon,)i
+Fr(x\002g)d Fs(pro)o(vides)0 1979 y(a)j(number)h(of)f(choices:)32
+b(simple)25 b(colors)g(or)f(gre)o(y)h(le)n(v)o(els,)f(or)g(a)g(number)h
+(of)f(patterns)i(lik)o(e)f(cross-hatches,)j(check)o(ers,)e
+Fm(etc.)0 2092 y Fs(Unfortunately)-6 b(,)37 b(using)c(a)f(pattern)i
+(\002ll)d(in)h(a)g(\002gure)g(processed)j(by)d Fr(PSfr)o(ag)f
+Fs(results)j(in)e(PostScript)h(\002les)f(that)g(will)g(not)0
+2205 y(print.)0 2368 y(F)o(ortunately)-6 b(,)25 b(there)g(are)f(w)o
+(orkarounds:)114 2605 y(1.)45 b(A)-7 b(v)n(oid)23 b(pattern)h(\002lls)d
+(in)h(your)h Fr(x\002g)e Fs(\002gures;)j(use)e(simple)h(colors)g(\(or)f
+(gre)o(ys\))h(instead.)30 b(Consult)23 b(the)f Fr(x\002g)f
+Fs(documen-)227 2718 y(tation)k(for)f(details.)114 2906
+y(2.)45 b(Open)30 b(the)g(of)n(fending)i Fl(.eps)f Fs(\002le)e
+(\(generated)j(by)e Fr(\002g2de)n(v)h Fs(or)e Fr(x\002g)p
+Fs(')-5 b(s)30 b(\223e)o(xport\224)i(command\))f(with)e(your)i(f)o(a)n
+(v)n(orite)227 3019 y(te)o(xt)k(editor)-5 b(.)64 b(Look)35
+b(for)g(the)g(de\002nition)h Fl(PATfill)h Fs(command;)k(inside)36
+b(this)f(subroutine,)41 b(replace)36 b Fl(show)f Fs(with)227
+3132 y Fl(oldshow)26 b Fs(\(there)e(is)g(only)g(one)g(occurrence\).)0
+3369 y(F)o(or)41 b(those)i(PostScript)f(hack)o(ers)i(out)e(there:)66
+b(both)43 b Fr(PSfr)o(ag)e Fs(and)h Fr(x\002g)f Fs(rede\002ne)i(the)f
+(PostScript)g Fl(show)h Fs(command.)0 3482 y Fl(oldshow)29
+b Fs(is)f(where)g Fr(x\002g)f Fs(stores)i(the)f(\223old\224)h(v)o
+(ersion)g(of)e(the)h(command.)42 b(If)27 b(you)i(can)f(determine)h(why)
+e(this)h(\002x)f(w)o(orks,)0 3595 y(and)d(con)l(vince)i(the)e
+Fr(x\002g)f Fs(maintainers)j(to)d(mak)o(e)h(the)g(change;)h(or)l(,)f
+(if)f(you)h(can)g(suggest)i(a)d(\002x)g(for)g Fr(PSfr)o(ag)p
+Fs(,)g(please)i(do.)0 3894 y Fk(8.3)99 b(Pr)n(oblems)25
+b(using)g(old)g(v)o(ersions)g(of)g(the)g Fd(seminar)f
+Fk(package)0 4118 y Fs(The)30 b(popular)j Fr(seminar)f
+Fs(package)h(w)o(as,)e(for)g(a)o(while,)i(incompatbile)g(with)e(PSfrag)
+f(3.0.)50 b(This)31 b(is)g(due)g(to)f(the)h(f)o(act)h(that)0
+4231 y(PSfrag)20 b(relies)g(on)g(certain)i(features)g(of)d(the)i(L)1414
+4215 y Fp(A)1449 4231 y Fs(T)1490 4251 y(E)1532 4231
+y(X)14 b(2)1657 4245 y Fn(e)1720 4231 y Fs(output)22
+b(routine,)g(while)e Fr(seminar)h Fs(still)f(uses)h(one)f(lar)n(gely)i
+(borro)n(wed)0 4344 y(from)h(L)222 4327 y Fp(A)257 4344
+y Fs(T)298 4364 y(E)341 4344 y(X)g(2.09.)0 4507 y(The)j(best)i
+(solution)g(for)f(this)g(problem)h(is)f(to)f(mak)o(e)h(sure)h(that)f
+(you)g(ha)n(v)o(e)g(the)g(latest)h(v)o(ersion)g(of)f(the)g
+Fr(seminar)g Fs(package,)0 4619 y(which)e(can)g(be)g(retrie)n(v)o(ed)i
+(from)d(an)o(y)h(CT)-8 b(AN)22 b(site,)j(lik)o(ely)i(from)d(the)h(same)
+g(place)h(you)f(found)h Fr(PSfr)o(ag)p Fs(.)32 b(A)24
+b(web)g(page)i(for)0 4732 y Fr(seminar)d Fs(can)g(be)f(found)h(at)f
+Fl(http://www.tug.org)q(/ap)q(pl)q(ica)q(tio)q(ns/)q(Se)q(min)q(ar/)q
+Fs(.)33 b(The)22 b(1997/10/13)j(v)o(ersion)f(seems)0
+4845 y(to)f(ha)n(v)o(e)i(corrected)h(the)d(problem.)0
+5008 y(If)28 b(for)h(some)f(reason)i(you)f(are)f(forced)i(to)e(use)h
+(an)f(older)h(v)o(ersion,)i(there)e(is)g(a)e(temporary)-6
+b(,)32 b Fr(dvips)p Fs(-speci\002c)e(\002x:)38 b(add)29
+b(the)0 5121 y(command)24 b Fl(\\special{header=ps)q(fr)q(ag.)q(pro)q
+(})29 b Fs(just)24 b(before)h Fl(\\begin{document})j
+Fs(in)c(your)g(L)3135 5105 y Fp(A)3170 5121 y Fs(T)3211
+5141 y(E)3254 5121 y(X)e(\002le.)1905 5649 y(11)p eop
+end
+%%Page: 12 12
+TeXDict begin 12 11 bop 0 91 a Fv(9)119 b(The)31 b Fq(PSfra)o(g)d
+Fv(mailing)i(list)0 348 y Fs(There)e(is)g(a)f(Majorodomo)j(mailing)f
+(list)f(for)h(purposes)h(of)e Fr(PSfr)o(ag)f Fs(maintenance.)45
+b(It)27 b Fm(is)h(not)i Fs(intended)g(to)e(replace)i(this)0
+461 y(manual)d(or)e(a)h(small)f(amount)i(of)f(educated)i(guessw)o(ork.)
+37 b(But,)26 b(it)f Fm(is)h Fs(the)g(perfect)h(place)g(for)f(b)n(ug)g
+(reports,)i(de)n(v)o(elopment)0 574 y(ideas,)i(and)f(so)f(forth.)44
+b(An)o(yone)28 b(who)g(wishes)h(to)f(assist)i(in)e Fr(PSfr)o(ag)p
+Fs(')-5 b(s)28 b(e)n(v)n(olution)j(may)d(subscribe;)33
+b(to)28 b(do)h(so,)g(just)f(send)0 687 y(mail)23 b(to)227
+924 y Fl(majordomo@rascals.)q(st)q(anf)q(ord)q(.ed)q(u)0
+1162 y Fs(with)g(the)h(line)g Fl(subscribe)50 b(psfrag)25
+b Fs(in)e(the)h Fm(body)h Fs(of)e(the)h(te)o(xt.)0 1324
+y(Bug)f(supports,)j(ideas,)e Fm(etc.)29 b Fs(should)c(go)f(to)227
+1562 y Fl(psfrag@rascals.sta)q(nf)q(ord)q(.ed)q(u)p Fs(.)0
+1799 y(If)34 b(you)g(ha)n(v)o(e)g(found)h(a)f(b)n(ug)g(to)g(report,)j
+(please)e(pro)o(vide)h(us)d(with)h(the)g(necessary)i(\002les)e(\(a)f(L)
+3048 1783 y Fp(A)3083 1799 y Fs(T)3124 1820 y(E)3167
+1799 y(X)g(\002le,)i(the)f(EPS)e(\002g-)0 1912 y(ures,)e
+Fm(etc.)p Fs(\))f(so)g(we)f(can)h(test)g(it)f(out)i(ourselv)o(es!)46
+b(T)m(ry)28 b(to)h(pro)o(vide)h(us)f(with)g(the)g(shortest)h
+(self-contained)j(e)o(xample)d(that)0 2025 y(demonstrates)c(your)f(b)n
+(ug.)k(If)24 b(this)g(is)f(not)h(possible,)h(drop)g(us)e(a)g(line)h
+(\002rst.)1905 5649 y(12)p eop end
+%%Trailer
+
+userdict /end-hook known{end-hook}if
+%%EOF
diff --git a/macros/latex/contrib/psfrag/pfgguide.tex b/macros/latex/contrib/psfrag/pfgguide.tex
new file mode 100644
index 0000000000..7e7d68c6a1
--- /dev/null
+++ b/macros/latex/contrib/psfrag/pfgguide.tex
@@ -0,0 +1,695 @@
+%% pfgguide.dtx Copyright (c) 1995 Michael C. Grant and Craig Barratt
+%% All rights are reserved.
+%%
+%% This system is distributed in the hope that it will be
+%% useful, but WITHOUT ANY WARRANTY; without even the
+%% implied warranty of MERCHANTABILITY or FITNESS FOR A
+%% PARTICULAR PURPOSE. Don't come complaining to us if you
+%% modify this file and it doesn't work! If this file is
+%% modified by anyone but the authors, those changes and
+%% their authors must be explicitly stated HERE.
+%%
+\documentclass[11pt]{ltxguide}
+\usepackage{shortvrb,psfrag,graphicx}
+
+% I prefer more to a page.
+\marginparsep 0pt \oddsidemargin 0pt \evensidemargin 0pt
+\textwidth \paperwidth \advance \textwidth by-2in
+\topmargin 0pt \headheight 0pt \headsep 0pt
+\textheight \paperheight \advance \textheight by-2in
+
+\let\pkg\textsf
+\let\fname\texttt
+\let\pscom\texttt
+\newcommand{\pfg}{\pkg{PSfrag}}
+\newcommand{\ie}{\emph{i.e.\@}}
+\newcommand{\eg}{\emph{e.g.\@}}
+\newcommand{\etc}{\emph{etc.\@}}
+\newcommand{\netaddress}[1]{\texttt{#1}}
+\MakeShortVerb{\|}
+\def\cs#1{%
+ {\ttfamily\expandafter\string\csname #1\endcsname}}
+\providecommand\marg[1]{%
+ {\ttfamily\char`\{}{\em#1\/}{\ttfamily\char`\}}}
+\providecommand\oarg[1]{%
+ {\ttfamily[}{\em #1\/}{\ttfamily]}}
+\providecommand\parg[1]{%
+ {\ttfamily(}{\em #1\/}{\ttfamily)}}
+
+\title{The \pfg\ system, version 3}
+\author{Michael C. Grant and David Carlisle\\
+ \netaddress{psfrag@rascals.stanford.edu}}
+\date{11 April 1998}
+
+\begin{document}
+
+\maketitle
+\tableofcontents
+
+\section{What is \pfg?}
+
+Many drawing and graphing packages produce output in the Encapsulated
+PostScript (EPS) format, but few can easily produce the equations and other
+scientific text of which \TeX\ is so capable. On the other hand, many
+\LaTeX\-based drawing packages are not as expressive or easy-to-use as these
+stand-alone tools.
+
+\pfg\ provides the best of both worlds by allowing the user to precisely
+overlay Encapsulated PostScript (EPS) files with arbitrary \LaTeX\
+constructions. In order to accomplish this, the user places a simple text
+``tag'' in the graphics file, as a ``position marker'' of sorts. Then, using
+simple \LaTeX\ commands, the user instructs \pfg\ to remove that tag from the
+figure, and replace it with a properly sized, aligned, and rotated \LaTeX\
+equation. \pfg\ also allows the user to place \LaTeX\ constructs directly into
+the EPS file itself.
+
+Dr.\ Craig Barratt wrote the original version of \pfg\ as a graduate student at
+Stanford University. The interface has changed very little since then, but the
+internals have been completely re-written. The current version of PSfrag is
+maintained by Michael Grant and David Carlisle. Many thanks go to the members
+of the \pfg\ mailing list, and to everyone who has submitted a bug report or
+suggestion.
+
+\section{\pfg\ necessities}
+
+In order to use \pfg, you will need the following tools:
+\begin{itemize}
+\item A recent version of \LaTeXe\ and the \pkg{graphics} package.
+ \pfg\ currently requires the 1995/12/01 version or later of these
+ packages, but it is always best to have the most recent release.
+\item If you wish to use the \pkg{seminar} package with \pfg, you
+ should make sure you have the 1997/10/13 version or later (see
+ section \ref{sec:sem-bug}).
+\item A compatible DVI-to-PostScript driver (see below). \pkg{dvips} is
+ the primary choice of the \pfg\ developers, and is certainly the
+ most widely-used.
+\end{itemize}
+
+The latest versions of \LaTeXe, the \pkg{graphics} package, \pfg,
+and \pkg{dvips} can all be found on CTAN, the
+Comprehensive \TeX\ Archive Network. The CTAN cites, and their mirrors,
+include:
+\begin{center}
+ \begin{tabular}{lll}
+ Name & IP address & Location \\ \hline
+ |ftp.dante.de| & 129.206.100.192 & Germany \\
+ |ftp.tex.ac.uk| & 128.232.1.87 & England \\
+ |ftp.cdrom.com| & 165.113.58.253 & USA \\
+ \end{tabular}
+\end{center}
+
+\subsection{Choosing a PostScript driver}
+\label{sec:compat}
+
+\pfg\ relies on some sensitive PostScript tricks to accomplish its goals. Due
+to limited time and resources, the authors could not confirm that \pfg\ works
+properly on every available PostScript driver. We have attempted to insure that
+it will \emph{eventually} work on every driver that is fully comaptible with
+the \pkg{graphics} package (\ie, one for which a \fname{.def} file is
+provided.)
+
+The drivers which have been confirmed to work with \pfg\ are:
+\begin{center}
+\begin{tabular}{lll}
+Driver & Tested by & Compatibility \\ \hline
+Thomas Rokicki's \pkg{dvips} & the authors &
+fully compatible \\
+Y\&Y's \pkg{DVIPSONE} & the authors &
+fully compatible
+\end{tabular}
+\end{center}
+Please help us add entries to this list! If \pfg\ works with your driver,
+please let us know, so we can add it to the list. If possible, test your \pfg\
+output on both Level 1 and Level 2 printers, so we can make a distinction here
+if necessary.If \pfg\ does \emph{not} work, please submit a bug report; consult
+section \ref{sec:mail} for contact information. unfortunately, we cannot
+promise a fix for everyone, but we would like to insure that the most popular
+drivers remain compatible.
+
+\section{Installing \pfg}
+
+Installing the various \pfg\ files is quite simple:
+\begin{enumerate}
+\item Run \LaTeX\ on \fname{psfrag.ins} to extract
+ \fname{psfrag.sty} and \fname{psfrag.pro}.
+\item Install \fname{psfrag.sty} in a standard location for
+ \LaTeXe\ macros. For \pkg{kpathsea}-based systems like
+ \pkg{te\TeX}, this path is determined by the
+ \texttt{TEXINPUTS} variable.
+\item Install \fname{psfrag.pro} wherever your PostScript driver
+ looks for header files. For \pkg{kpathsea}-based systems
+ like \pkg{te\TeX}, this is determined by the \texttt{DVIPSHEADERS}
+ varaible. For \pkg{dvips} in particular, the most logical choice would
+ be the same directory in which \fname{tex.pro} and
+ \fname{special.pro} are located.
+\item If you have an older version of \pfg, you may delete the
+ following files, if they exist: \fname{ps2frag.ps}, \fname{ps2frag}
+ or \fname{ps2psfrag} (the processing scripts),
+ and \fname{epsf.sty} (the one provided by \pfg,
+ \emph{not} the \pkg{dvips} version!). System managers may wish to
+ replace \fname{ps2frag} with a script which notifies users of the
+ upgrade.
+\end{enumerate}
+
+\section{Usage}
+Here is a quick summary of the usage of \pfg:
+\begin{itemize}
+
+\item Use the \cs{includegraphics} command defined by the \pkg{graphics}
+ and \pkg{graphicx} packages to add EPS figures to your new documents.
+ If you must use the \cs{epsfbox} command from \fname{epsf.sty} for
+ old documents, then \fname{epsf.sty} must be loaded \emph{before}
+ \fname{psfrag.sty}. Other packages based on \fname{graphics.sty},
+ such as \pkg{graphicx} or \pkg{epsfig}, do not suffer this restriction.
+
+\item Load \fname{psfrag.sty} with a \cs{usepackage} command.
+
+\item Make sure that your EPS figures contain a simple ``tag'' word in
+ each position that you would like a \LaTeX\ replacements. Use
+ a \emph{single} word, composed of unaccented letters and numbers.
+ Some effort has been made to allow for more arbitrary tag text,
+ but the mechanism is not infallible; see section \ref{sec:tags}.
+
+\item For each tag word in your EPS file, add a command to your
+ your \LaTeX\ document to specify how this tag is to replaced,
+ as follows:
+\begin{quote}
+ \cs{psfrag}\marg{tag}\oarg{posn}\oarg{psposn}%
+ \oarg{scale}\oarg{rot}\marg{\LaTeX\ text}
+\end{quote}
+ The tag will be replaced by the \LaTeX\ text.
+ Example: in a drawing program like \pkg{xfig}, you place the text
+ \begin{quote}
+ |xy|
+ \end{quote}
+ at a particular point. To replace this with $x+y$, one possible
+ macro would be
+ \begin{quote}
+ \cs{psfrag{xy}{$x+y$}}
+ \end{quote}
+\end{itemize}
+
+All \cs{psfrag} calls that precede the \cs{includegraphics} (or
+equivalent) in the same or surrounding environments will be utilized
+for a given PostScript file. So, you can define global \cs{psfrag}s as
+well as those that are local to a figure.
+
+Any text that is not mentioned in a \cs{psfrag} command
+will not be replaced; hence, PostScript and \LaTeX\
+text can be freely mixed.
+
+When viewing the output with a DVI previewer such as \pkg{dviwin} or
+\pkg{xdvi}, a vertical list of the replacements will be placed on the
+left side of each figure. This list allows you to check the
+typesetting of your replacements; it disappears in the final
+PostScript version. Unfortunately, DVI drivers are incapable of
+\emph{placing} the \pfg\ replacements on top of the figure, so
+for that you will need to print it out or use a PostScript
+previewer like GhostView.
+
+This version of \pfg\ \emph{should} run properly in the compatibility
+mode of \LaTeX2.09. Let us know if you find otherwise (see section
+\ref{sec:mail}).
+
+\section{Commands and Environments}\label{sec:pos}
+
+\begin{decl}
+\cs{psfrag}\marg{tag}\oarg{posn}\oarg{psposn}%
+ \oarg{scale}\oarg{rot}\marg{replacement}\\
+\cs{psfrag*}\marg{tag}\oarg{posn}\oarg{psposn}%
+ \oarg{scale}\oarg{rot}\marg{replacement}
+\end{decl}
+
+The \cs{psfrag} macro defines a \LaTeX-typeset \marg{replacement} to be placed
+at the same position as a PostScript \marg{tag}. The command should be placed
+before the call to \cs{includegraphics}, or equivalent. It matches \emph{all}
+occurrences of \marg{tag} in the figure.
+
+A \cs{psfrag} command will remain in effect until its surrounding environment
+is exited. Therefore, you can define global \cs{psfrag}s which will apply to
+every figure, or define \cs{psfrag}s inside a a |figure| environment (for
+example) which apply to a single EPS file.
+
+The optional positioning arguments \oarg{posn} and \oarg{psposn} specify how
+the bounding box of the \LaTeX\ text and the bounding box of the PostScript
+text line up, respectively. Some drawing packages would refer to these as
+``control points'' or ``alignment points.''
+
+\begin{description}
+\item{\oarg{posn}}
+the \LaTeX\ text reference point. The syntax of this argument is identical to
+that of the \cs{makebox} command. Up to two letters may be chosen, one from the
+list \{|t|,|b|,|B|,|c|\}, (top, bottom, baseline, center) and another from
+\{|l|,|r|,|c|\} (left, right, center). If either letter is omitted, then |c|
+(center) is assumed. Together, these specify one of 12 anchor points. If the
+argument is omitted altogether, then |[Bl]|, or left baseline positioning, is
+assumed---but note that supplying |[]| specifies centered positioning.
+
+When running in \LaTeX\ 2.09 compatibility mode, the default alignment
+is |[bl]|, in order to support legacy documents. Usually this should
+not make a significant difference.
+\item{\oarg{psposn}}
+the PostScript text reference point. The possible arguments are
+identical to that of \oarg{posn}, as is the default value, |[Bl]|
+(|[bl]| in \LaTeX\ 2.09 compatibility mode.)
+\end{description}
+
+The \LaTeX\ replacement may be optionally scaled and rotated about
+its reference point:
+\begin{description}
+\item{\oarg{scale}} Scaling factor (default 1). It's best if you
+ use font size changes in the \LaTeX\ text rather than scale, but
+ you can use the scale to tweak its size. Default is |[1]|.
+\item{\oarg{rotn}} Extra rotation of the text around its reference
+ point, in degrees. The nominal rotation of the \LaTeX\ text matches
+ that of the PostScript text it replaces. The total rotation is this
+ nominal value plus \oarg{rotn}. The default is |[0]|.
+\end{description}
+
+\begin{figure}[tbh]
+\psfragdebugon
+\begin{center}
+ \psfrag{gA}[br][br]{|[br][br]|}
+ \psfrag*{gA}[Br][b ][2]{|[Br][b][2]|}
+ \psfrag*{gA}[ r][bl]{|[r][bl]|}
+ \psfrag*{gA}[tr][Bl]{|[tr][Bl]|}
+ \psfrag*{gA}[b ][B ]{|[b][B]|}
+ \psfrag*{gA}[B ][Br]{|[B][Br]|}
+ \psfrag*{gA}[ ][ r]{|[][r]|}
+ \psfrag*{gA}[t ][ ][0.75][45]{|[t][][0.75][45]|}
+ \psfrag*{gA}[bl][ l][1.5][30]{|[bl][l][1.5][30]|}
+ \psfrag*{gA}[Bl][tl]{|[Bl][tl]|}
+ \psfrag*{gA}[bl][Bl]{~~~~~(baseline)}
+ \psfrag*{gA}[bl][l]{~~~~~(center line)}
+ \psfrag*{gA}[bl][t][1][-90]{~~~~~(center line)}
+ \psfrag*{gA}[ l][t ]{|[l][t]|}
+ \psfrag*{gA}[tl][tr][1][180]{|[tl][tr][1][180]|}
+ \resizebox{4in}{!}{\includegraphics[angle=30]{testfig.eps}}
+\end{center}
+\caption{An illustration of various options for the \cs{psfrag} command.}
+\label{fig:argexam}
+\end{figure}
+Figure~\ref{fig:argexam} illustrates various combinations of the arguments. If
+you're viewing this with a DVI previewer such as \pkg{xdvi}, the \pfg\
+replacements should be lined up to the left of the figure; and, if your
+previewer can display EPS files, a large, rotated |gA|. If you have printed
+this out, or are viewing it with a PostScript viewer like GhostView, then the
+replacements should superimposed on a graphical representation of the bounding
+box, center lines, and baseline of the tag |gA|. (This graphical box is
+provided only in debug mode.)
+
+If a replacement for \marg{tag} already exists, the unstarred
+command \cs{psfrag} will replace it without warning. The starred
+version \cs{psfrag*}, however, will \emph{add} the new replacement
+to a list. Using the starred command, a single piece of PostScript
+text could trigger several replacements. I can't think of a reason
+why most users would use the starred version, but it was used in
+Figure~\ref{fig:argexam} above.
+
+\begin{decl}
+\cs{begin}|{psfrags}|
+\cs{end}|{psfrags}|
+\end{decl}
+
+The |psfrags| environment may be used, if necessary, to delimit the
+scope of the \cs{psfrag} calls. As we said before, \cs{psfrag}
+commands retain their effect until the most immediate surrounding
+environment is exited. \emph{Any} environment will do: |center|,
+|figure|, \etc. Therefore, it may never be necessary to use this
+environment, and the environment has no other effect on the document.
+
+\subsection{Embedding \pfg\ operations into EPS files}
+\label{sec:texcomm}
+
+\begin{decl}
+\cs{tex}\oarg{posn}\oarg{psposn}\oarg{scale}%
+ \oarg{rot}\marg{\LaTeX\ text}\\
+\cs{psfragscanon}~~~\cs{psfragscanoff}
+\end{decl}
+
+\pfg\ 3.0 supports the embedded \cs{tex} commands found in previous release of
+\pfg. Used properly, this is a powerful tool, but it has been deprecated
+somewhat because of its reliance on a pre-processing step. Unlike previous
+versions of \pfg, support for the \cs{tex} command must be \emph{explicitly
+requested}, as described below.
+
+As you can see, the syntax of the \cs{tex} command is very similar to the
+\cs{psfrag} command. However, instead of adding the \cs{tex} command to your
+\LaTeX\ file, the \cs{tex} command is \emph{embedded in the EPS file itself}.
+In other words, the command becomes its own replacement tag.
+
+For example, you might place the text
+\begin{quote}
+ |\tex[bl][bl]{$\alpha$}|
+\end{quote}
+at a particular point in your PostScript file to have \LaTeX\ replace it
+with $\alpha$. Many \pfg\ users find this feature useful for the axis
+labels, titles, and legends of MATLAB graphs.
+
+The advantage to this approach is that changes can be made to the
+EPS file without having to modify any \cs{psfrag} commands in the
+\LaTeX\ file. (It is still necessary to \emph{re-compile} the
+\LaTeX\ file in such cases, however.)
+
+There are cautions and disadvantages to this approach, including:
+\begin{itemize}
+\item Changing the labels created by \cs{tex} commands requires editing
+ the figure; if you use \cs{psfrag} instead, you need only to edit the
+ document, which might be less cumbersome. (You must
+ run \LaTeX\ again in both cases.)
+\item Because \cs{tex} commands are long strings, they can extend
+ past the other graphics in your EPS file. As a result, they can modify
+ the EPS bounding box in an undesired way. This problem can be mitigated by
+ reducing the font size of the \cs{tex} string, since this does not affect
+ the size of its \pfg\ replacement.
+\item The \cs{tex} command is not supported in compressed PostScript files.
+\item The \TeX\ engine must scan the PostScript file for these strings,
+ which can add to the processing time of your document. (To be honest,
+ we have yet to encounter a case where this is a significant concern.)
+\item \emph{Important!} Whenever a file is scanned by \pfg,
+ it generates a file with the name \cs{jobname}\fname{.pfg}, where \cs{jobname}
+ is the base name of the master \LaTeX\ file. It will overwrite, without
+ warning, any file with that name.
+\end{itemize}
+
+This feature is no longer enabled automatically, except in \LaTeX\ 2.09
+compatibility mode. So, for \LaTeXe\ documents, you must activate it in one of
+two ways:
+\begin{itemize}
+\item To turn on scanning for a single figure, precede the \cs{epsfbox}
+ or \cs{includegraphics} command with a call to the command \cs{psfragscanon}.
+ Scanning will be turned off again when the surrounding environment is
+ exited; or, you can turn it off explicity with a call to \cs{psfragscanoff}.
+\item To turn on scanning for the entire document, pass the option
+ |scanall| to \fname{psfrag.sty} in the \cs{usepackage} command.
+\end{itemize}
+The \cs{tex} scanner will continue to be supported in this form. So, if you do
+find applications where you prefer the \cs{tex} command, do not hesitate to use
+it!
+
+\section{Package Options}
+
+There are only four package options for \pfg. Any other options
+that are not handled by \pfg\ will be forwarded to
+\fname{graphics.sty}.
+\begin{description}
+\item[|209mode|] (\LaTeXe\ native mode only) forces \pfg\
+to operate exactly as if \LaTeX\ 2.09 compatibility mode was
+enabled. As a result, |bl| alignment is the default, and
+\cs{tex} scanning is enabled for all EPS files. This option is
+useful if you are trying to convert old \LaTeX\ 2.09 documents
+to \LaTeXe.
+
+The \LaTeX 2.09 version of \pfg\ generated an auxiliary
+file for each EPS figure containing important replacement information.
+These files are no longer used and can be deleted.
+
+\item[|2emode|] (\LaTeX\ 2.09 compatibility mode only)
+forces \pfg\ to remain in \LaTeXe\ mode, even in the presence of a
+\LaTeX\ 2.09 document; this is the direct opposite of |209mode|. When
+enabled, the default alignment is |Bl|, and \cs{tex} scanning is turned
+off by default.
+
+\item[|scanall|] turns on \cs{tex} scanning by default. Use this
+option if most your figures use embedded \cs{tex} commands.
+
+\item[|debug|] turns on some of the debugging features of PSfrag. It
+inserts extra code into the PostScript file that draw the bounding boxes
+of each piece of text that is replaced. It is probably not useful to anyone
+but the developers of \pfg.
+\end{description}
+
+\section{An Example}\label{sec:example}
+
+In the following example, we demonstrate how to use \pfg\ with
+the MATLAB package. The following MATLAB commands generate a
+plot of both a sine wave and a cosine wave, places both simple
+tags and \cs{tex} replacements into the figure, and saves the
+result as an EPS file \fname{example.eps}.
+\begin{verbatim}
+ t = 0:.1:10;
+ plot(t,sin(t),t,cos(t));
+ axis('square'); grid;
+ title('\tex[B][B]{Plot of $\sin(t)$ and $\cos(t)$}');
+ xlabel('\tex[t][t]{$t$}');
+ ylabel('\tex[B][B]{$\sin(t)$, $\cos(t)$}');
+ text(t(30),sin(t(30)),'p1');
+ text(t(60),sin(t(60)),'p2');
+ text(t(90),sin(t(90)),'p2');
+ tt=text(t(50),cos(t(50)),'p3');
+ set(tt,'HorizontalAlignment','center','VerticalAlignment',...
+ 'bottom','Rotation',atan2(-sin(t(50))*10,2)*180/pi);
+ print -deps example
+\end{verbatim}
+(In MATLAB, the 'text' command defaults to a left-center alignment,
+corresponding to a \oarg{psposn} argument of |[l]|.)
+
+The code below includes \fname{example.eps} into the current document,
+resizing it to a width of 3.5 inches. Several \cs{psfrag}
+commands are used to replace the tags |p1|, |p2|, and |p3| in
+the figure, and the command \cs{psfragscanon} command is used to
+notify \pfg\ that it must scan \fname{example.eps} for the
+\cs{tex} tags.
+\begin{verbatim}
+ \begin{figure}[tbh]
+ \unitlength=1in
+ \begin{center}
+ \psfragscanon
+ \psfrag{p1}[l]{\begin{picture}(0,0)
+ \put(0.15, 0.2){\makebox(0,0)[l]{$\sin(t)$}}
+ \put(0.1,0.2){\vector(-1,-2){0.1}}
+ \end{picture}}
+ \psfrag*{p1}[][l]{$\ast$}
+ \psfrag{p2}[][l]{$\ast$}
+ \psfrag{p3}{$\cos(t)$}
+ \includegraphics[width=3.5in]{example.eps}
+ \end{center}
+ \caption{A \textsf{psfrag} example.}
+ \end{figure}
+\end{verbatim}
+Note the use of a |picture| environment within the replacement
+for |p1|.
+
+\begin{figure}[tbh]
+ \unitlength=1in
+ \begin{center}
+ \psfragscanon
+ \psfrag{p1}[l]{\begin{picture}(0,0)
+ \put(0.15, 0.2){\makebox(0,0)[l]{$\sin(t)$}}
+ \put(0.1,0.2){\vector(-1,-2){0.1}}
+ \end{picture}}
+ \psfrag*{p1}[][l]{$\ast$}
+ \psfrag{p2}[][l]{$\ast$}
+ \psfrag{p3}{$\cos(t)$}
+ \includegraphics[width=3.5in]{example.eps}
+ \end{center}
+ \caption{A \pfg\ example.}
+ \label{fig:example1}
+\end{figure}
+The result of these two steps is shown in Figure~\ref{fig:example1}.
+
+\subsection{Figure scaling and resizing}
+\label{sec:scaling}
+
+There are two ways to resize EPS figures with the \pkg{graphics}
+package, and each has as different effect on \pfg\ replacements. If you
+are used to using \fname{epsf.sty}, you will be accustomed to only one
+such behavior.
+
+If you use the \cs{scalebox} or \cs{resizebox} macros of \fname{graphics.sty},
+then the \pfg\ replacments \emph{will} scale with the figure. This
+effect is illustrated in \ref{fig:example2} below.
+\begin{figure}[tbh]\unitlength=1in
+ \begin{center}
+ \psfragscanon
+ \psfrag{p1}[l]{\begin{picture}(0,0)
+ \put(0.15, 0.2){\makebox(0,0)[l]{$\sin(t)$}}
+ \put(0.1,0.2){\vector(-1,-2){0.1}}
+ \end{picture}}
+ \psfrag*{p1}[][l]{$\ast$}
+ \psfrag{p2}[][l]{$\ast$}
+ \psfrag{p3}{$\cos(t)$}
+ \resizebox{3.5in}{!}{\includegraphics{example.eps}}
+ \end{center}
+ \caption{The same \pfg\ example as Figure~\ref{fig:example1}, using
+ \cs{resizebox} to set the width.}
+ \label{fig:example2}
+\end{figure}
+Figure~\ref{fig:example2} uses the following command to scale the figure
+to 3.5 inches in width:
+\begin{verbatim}
+\resizebox{3.5in}{!}{\includegraphics{example.eps}}
+\end{verbatim} This
+is in direct contrast to Figure~\ref{fig:example1}, which uses the
+|width=| keyword from the \fname{graphicx.sty}, as follows:
+\begin{verbatim}
+\includegraphics[width=3.5in]{\includegraphics{example.eps}}
+\end{verbatim}
+Figure~\ref{fig:example1} also reflects the behavior that
+you would see when using the \fname{epsf.sty} macros \cs{epfxsize},
+\cs{epsfysize}, \emph{etc}. In these cases, the \pfg\ text does not
+scale with it. to resize the figure.
+
+As you can see, the text in the second figure is decidedly smaller
+than the first. This is because \cs{resizebox} uses PostScript tricks to
+scale \emph{all} of the contents of its argument. Since the \cs{psfrag}
+commands are not actually typeset until \emph{within} the
+\cs{includegraphics} command, they are resized as well.
+
+The \fname{graphicx.sty} key-value pairs |width=|, |height=|,
+and |scale=| scale the figure without scaling the replacement
+text, as long as they are supplied \emph{before} an |angle=|
+rotation key. Of course, the \cs{resizebox} and \cs{scalebox}
+macros are still available in \fname{graphicx.sty}, so you can
+mix and match both behaviors as you see fit. See the \pkg{graphics}
+documentation for more details.
+
+If you are still unsure about these distinctions, then try both
+methods for scaling your figures until you find a convention that
+works best for you.
+
+\section{Common mistakes, known problems, and bugs}
+
+\pfg\ is bug-free.
+
+Well, of course we're kidding. \pfg\ uses some tricky PostScript hacks to
+achieve its goals. So it really would not surprise us if you find bugs, If you
+find any problems, please confirm they are not mentioned below; and, if not,
+report them to te \pfg\ mailing list (see below).
+
+\subsection{Using \pfg\ tags properly}
+\label{sec:tags}
+
+One of the more frequent problems that people encounter with \pfg\ is that it
+replaces \emph{some} of their tags properly, but not all of them. Whenever
+possible, you should design your figures \emph{with \pfg\ in mind}, by
+following this rule:
+\begin{quote}
+ When adding a piece of text (a \emph{tag}) in a figure for \pfg\ to
+ replace, use a \emph{single word}, containing only unaccented letters
+ and numbers.
+\end{quote}
+This is the way that \pfg\ is intended to be used; doing so will almost
+guarantee that \pfg\ works as advertised. Of course, one cannot always follow
+this rule; and a small handful of drawing packages consistently cause problems.
+Invariably, these problems can be resolved by understanding how \pfg\ looks for
+these tags.
+
+PostScript has five commands to display text---|show|, |ashow|, |kshow|,
+|widthshow|, and |awidthshow|---although, in many cases, an EPS file will
+define abbreviations of these commands. \pfg\ actually \emph{intercepts} these
+commands and checks them for the tags to replace. When the string matches a
+known tag, \pfg\ figures out where the tag \emph{would} have been displayed,
+and inserts its replacement there. When it doesn't, \pfg\ lets the |*show|
+command proceed normally.
+
+The strings that these |*show| display are delimited with parentheses, much
+like the \fname{C} language uses double quotes. For example:
+\begin{quote}
+ |(This is a test.) show| ~~~~~~~~~~~~displays~~~~~~~~~~~~|This is a test.|
+\end{quote}
+Unmatched parentheses and
+certain other special characters must be preceded by a backslash in a
+PostScript string. For example:
+\begin{quote}
+ |(x = \(0,1]) show| ~~~~~~~~~~~~displays~~~~~~~~~~~~|x = (0,1]|
+\end{quote}
+
+With this in mind, here is the rule about \pfg\ tags:
+\begin{quote}
+ The tag supplied to the \cs{psfrag} command must be typed \emph{exactly
+ as it appears in the EPS file's |*show| command}, without the surrounding
+ parentheses.
+\end{quote}
+In other words, \pfg\ will work only if the string in the \cs{psfrag} command
+exactly duplicates what is found in the EPS file. If your strings have
+backslashes added to them, as in the |x = \(0,1]| example, then you will have
+to add that backslash to the \cs{psfrag} command as well. And \pfg\ can only
+replace \emph{entire} strings, not just parts of one. So if your EPS file
+contains
+\begin{quote}
+ |(I want to replace the XXX here) show|
+\end{quote}
+then the \cs{psfrag} command will fail if you supply just the |XXX|.
+
+You can use a simple text editor to check things, if you like; EPS files are
+(almost always) just simple ASCII files.
+
+Unfortunately, some drawing packages display text by sending each character
+\emph{individually} to a |show| command. In other words, if you use the
+drawing tool to put the string ``test'' in your figure, it will do something like this:
+\begin{quote}
+ |(t) show (e) show (s) show (t) show |
+\end{quote}
+If this is true in your case, we apologize; it makes using \pfg\ much more
+inconvenient---you will be limited to single-character tags. Such tools
+also prevent the use of the \cs{tex} command.
+
+\subsection{Problems using some \pkg{xfig} figures}
+
+\pfg\ does not work with \pkg{xfig} figures that use ``pattern fills.'' When
+painting/filling a polygon, \pkg{xfig} provides a number of choices: simple
+colors or grey levels, or a number of patterns like cross-hatches, checkers,
+\etc\ Unfortunately, using a pattern fill in a figure processed by \pfg\ results
+in PostScript files that will not print.
+
+Fortunately, there are workarounds:
+\begin{enumerate}
+ \item Avoid pattern fills in your \pkg{xfig} figures; use simple
+ colors (or greys) instead. Consult the \pkg{xfig} documentation
+ for details.
+ \item Open the offending \fname{.eps} file (generated by \pkg{fig2dev}
+ or \pkg{xfig}'s ``export'' command) with your favorite text editor.
+ Look for the definition \pscom{PATfill} command; inside this
+ subroutine, replace \pscom{show} with \pscom{oldshow} (there is only
+ one occurrence).
+\end{enumerate}
+For those PostScript hackers out there: both \pfg\ and \pkg{xfig} redefine the
+PostScript \pscom{show} command. \pscom{oldshow} is where \pkg{xfig} stores the
+``old'' version of the command. If you can determine why this fix works, and
+convince the \pkg{xfig} maintainers to make the change; or, if you can suggest
+a fix for \pfg, please do.
+
+\subsection{Problems using old versions of the \pkg{seminar} package}
+\label{sec:sem-bug}
+
+The popular \pkg{seminar} package was, for awhile, incompatbile with PSfrag
+3.0. This is due to the fact that PSfrag relies on certain features of the
+\LaTeXe\ output routine, while \pkg{seminar} still uses one largely borrowed
+from \LaTeX\ 2.09.
+
+The best solution for this problem is to make sure that you have the latest
+version of the \pkg{seminar} package, which can be retrieved from any CTAN
+site, likely from the same place you found \pfg. A web page for \pkg{seminar}
+can be found at \fname{http://www.tug.org/applications/Seminar/}. The
+1997/10/13 version seems to have corrected the problem.
+
+If for some reason you are forced to use an older version, there is a
+temporary, \pkg{dvips}-specific fix: add the command
+|\special{header=psfrag.pro}| just before |\begin{document}| in your \LaTeX\
+file.
+
+\section{The \pfg\ mailing list}
+\label{sec:mail}
+
+There is a Majorodomo mailing list for purposes of \pfg\ maintenance.
+It \emph{is not} intended to replace this manual or a small amount of
+educated guesswork. But, it \emph{is} the perfect place for bug reports,
+development ideas, and so forth. Anyone who wishes to assist in
+\pfg's evolution may subscribe; to do so, just send mail to
+\begin{quote}
+ \netaddress{majordomo@rascals.stanford.edu}
+\end{quote}
+with the line |subscribe psfrag| in the \emph{body} of the text.
+
+Bug supports, ideas, \emph{etc.} should go to
+\begin{quote}
+ \netaddress{psfrag@rascals.stanford.edu}.
+\end{quote}
+If you have found a bug to report, please provide us with the
+necessary files (a \LaTeX\ file, the EPS figures, \etc) so we can
+test it out ourselves! Try to provide us with the shortest
+self-contained example that demonstrates your bug. If this is not
+possible, drop us a line first.
+
+\end{document}
diff --git a/macros/latex/contrib/psfrag/psfrag.dtx b/macros/latex/contrib/psfrag/psfrag.dtx
new file mode 100644
index 0000000000..e2baef58f9
--- /dev/null
+++ b/macros/latex/contrib/psfrag/psfrag.dtx
@@ -0,0 +1,1102 @@
+%
+% \iffalse
+% psfrag.dtx Copyright (C) 1996 Craig Barratt, Michael C. Grant,
+% and David Carlisle.
+% All rights are reserved.
+%
+% This system is distributed in the hope that it will be
+% useful, but WITHOUT ANY WARRANTY; without even the
+% implied warranty of MERCHANTABILITY or FITNESS FOR A
+% PARTICULAR PURPOSE. Don't come complaining to us if you
+% modify this file and it doesn't work! If this file is
+% modified by anyone but the authors, those changes and
+% their authors must be explicitly stated HERE.
+%
+%<package>\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+%<package>\ProvidesPackage{psfrag}[1998/04/11 v3.04 PSfrag (MCG)]
+% \fi
+%
+% \iffalse
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{graphicx,psfrag}
+\begin{document}
+ \DocInput{psfrag.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \GetFileInfo{psfrag.sty}
+% \RecordChanges
+%
+% \let\pkg\textsf
+% \let\fname\texttt
+% \let\pscom\texttt
+% \newcommand{\pfg}{\textsf{PSfrag}}
+% \newcommand{\bsl}{\protect\bslash}
+% \newcommand{\ie}{\emph{i.e.}}
+% \newcommand{\eg}{\emph{e.g.}}
+% \newcommand{\etc}{\emph{etc.}}
+% \newcommand{\netaddress}[1]{\texttt{#1}}
+% \marginparsep 0pt
+%
+% \title{\fname{psfrag.sty} and \fname{psfrag.pro}%^^A
+% \thanks{This file has version number \fileversion,
+% last revised \filedate.}}
+%
+% \author{Michael Grant, David Carlisle, and Craig Barratt \\
+% \netaddress{psfrag@rascals.stanford.edu}}
+% \date{\filedate}
+% \maketitle
+% \PrintChanges
+%
+% \changes{3.04}{1998/04/11}{Made some (theoretically) back-compatible
+% changes to \fname{psfrag.pro} which should make it more friendly
+% to EPS and page-manipulation packages like \pkg{psnup}. Fixed
+% orientation problem for DVIPSone. Added support for EPS files
+% as \pfg\ replacements.}
+% \changes{3.03}{1997/01/21}{Fixed some typographical errors that
+% broke the \pscom{awidthshow} command. Improved the scanner to
+% handle multi-line \cs{tex} commands. Fixed a bug in the
+% \pscom{replace} command which would break some legal EPS files.}
+% \changes{3.02}{1996/12/06}{Continued to improve the transformation
+% code to make it more robust to rotations and odd scaling.
+% Improved the range of strings accepted as PSfrag tags.}
+% \changes{3.01}{1996/11/26}{Expanded the PSfrag dictionary
+% for Level 1 printers. Fixed bugs that produce incorrect output
+% for rotated figures. Output should now print properly when
+% combined with page-manipulation programs like \pkg{psnup}.}
+% \changes{3.0}{1996/10/31}{Major rewrite. Elimination of the
+% preprocessing step, deprecation of the \pscom{tex} command. I've
+% wiped most of the source-level change entries as a result.}
+% \changes{2.0}{1995/04/04}{Bug fixes}
+% \changes{2.0}{1995/03/14}{Bug fixes. Better support for \LaTeX\ 2.09
+% \pfg\ files, including both naming schemes. Improved
+% documentation and separated it from this file.}
+% \changes{1.99}{1995/02/14}{Taken over from Craig, completely
+% overhauled for \LaTeXe. Completely changed the placement code;
+% baseline alignment added. Integrated \pscom{psfrag} commands into
+% the PostScript file. \textsf{graphics} package used for
+% portability across multiple DVI-to-PostScript packages.
+% Improved ps2frag.ps file provides improved (correct) support
+% for ashow, widthshow, awidthshow, and kshow.}
+% \changes{1.1}{1992/10/20}{Released version 1.1, adding support for
+% ashow, widthshow, awidthshow, and kshow.}
+% \changes{1.0}{1992/06/01}{Released version 1.0.}
+%
+% \section{\fname{psfrag.sty}}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% \subsection{Intialization}
+%
+% \begin{macrocode}
+\newif\ifpfg@compat
+\newif\ifpfg@prepass
+\newif\ifpfg@debug \pfg@debugfalse
+\if@compatibility
+ \pfg@compattrue\pfg@prepasstrue
+\else
+ \pfg@compatfalse\pfg@prepassfalse
+\fi
+\def\psfragscanon{\pfg@prepasstrue}
+\def\psfragscanoff{\pfg@prepassfalse}
+\def\psfragdebugon{\pfg@debugtrue}
+\def\psfragdebugoff{\pfg@debugfalse}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption{scanall}{\pfg@prepasstrue}
+\DeclareOption{2emode}{\pfg@compatfalse\pfg@prepassfalse}
+\DeclareOption{209mode}{\pfg@compattrue\pfg@prepasstrue}
+\DeclareOption{debugshow}{\pfg@debugtrue
+ \PassOptionsToPackage\CurrentOption{graphics}}
+\DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}}
+\ProcessOptions
+% \end{macrocode}
+%
+% \fname{psfrag.sty} requires the \pkg{graphics} package and the
+% support file \fname{psfrag.pro}. (\fname{epsf.sty} can still be
+% used,but \pkg{graphics} package is still used for internal
+% purposes.) To load \fname{psfrag.pro} in a portable way, we provide
+% and use the \cs{Gin@PS@file@header} command, which the
+% \pkg{graphics} will eventually provide for us.
+% \changes{3.01}{1996/11/25}{Added the \cs{AtBeginDocument} command
+% to save some important global transformation information.}
+% \changes{3.02}{1996/12/03}{Deleted this \cs{AtBeginDocument} info;
+% see \cs{pfg@orient}.}
+% \begin{macrocode}
+\RequirePackage{graphics}
+\providecommand\Gin@PS@file@header[1]{\AtBeginDvi{\special{header=#1}}}
+\Gin@PS@file@header{psfrag.pro}
+% \end{macrocode}
+%
+% \begin{macro}{\pfg@orient}
+% In order to properly handle all cases of rotation, scaling,
+% \etc\ that \pfg\ may encounter, it is necessary that we know a bit
+% about the transformations that the DVI to PS driver uses itself.
+% Specifically, we need to know what transformations, if any, the
+% DVI to PS driver appends to PostScript's \pscom{defaultmatrix}
+% before it starts to typeset text. At the moment, all of the drivers
+% which work with \pfg\ reverse the orientation of the $y$ axis;
+% new drivers may not. But until we can find a portable way to make
+% this determination in PostScript itself, we have to supply that
+% information here.
+% \changes{3.02}{1996/12/03}{Created. Added \pkg{dvips} and
+% \pkg{textures} as ``$y$-reversers.''}
+% \changes{3.04}{1998/04/11}{\pkg{dvipsone} now uses the same
+% orientation as \pkg{dvips}, so we added a line for it here.}
+% \begin{macrocode}
+\def\pfg@orient{1}
+\def\@tempa{dvipsone.def}\ifx\Gin@driver\@tempa\def\pfg@orient{-1}\fi%
+\def\@tempa{dvips.def}\ifx\Gin@driver\@tempa\def\pfg@orient{-1}\fi%
+\def\@tempa{textures.def}\ifx\Gin@driver\@tempa\def\pfg@orient{-1}\fi%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Interface to the \pkg{graphics}
+% and \pkg{epsf} packages}
+%
+% \begin{macro}{\pfg@epsfbox}
+% The original definition of \cs{epsfbox} from \pkg{epsf.sty} or \pkg{graphics}.
+% \begin{macro}{\pfg@Ginclude@eps}
+% The original definition of \cs{Ginclude@eps} from \pkg{graphics},
+% the key routine inside the \cs{includegraphics} routine for EPS files.
+%
+% Below we redefine these two commands to add \pfg\ functionality.
+% \begin{macrocode}
+\let\pfg@epsfbox\epsfbox
+\let\pfg@Ginclude@eps\Ginclude@eps
+% \end{macrocode}
+% \end{macro}\end{macro}
+%
+% \begin{macro}{\pfg@pcount}
+% Counts how many fragments are active in the current figure.
+% \begin{macro}{\pfg@scount}
+% Counts how many replacements strings are active in the current
+% figure.
+%
+% Since it is possible for a single string to accept multiple
+% replacements, \cs{pfg@scount} $\le$ \cs{pfg@pcount}.
+% \begin{macrocode}
+\newcount\pfg@pcount \pfg@pcount=\z@
+\newcount\pfg@scount \pfg@scount=\z@
+% \end{macrocode}
+% \end{macro}\end{macro}
+%
+% \begin{macro}{\epsfbox}
+% Here we intercept calls to \cs{epsfbox} and wrap them with the
+% \pfg\ processing. The first thing we do is revert \cs{epsfbox}
+% and \cs{Ginclude@eps} back to their original definitions, to
+% prevent recursion---which could occur if some of the replacements
+% are themselves EPS files.
+% \changes{3.04}{1998/04/11}
+% {Improved the recursion protection by reverting
+% \cs{epsfbox} and \cs{Ginclude@eps} back to their original
+% definitions within the block. Deleted \cs{ifpfg@epsf}, which
+% is no longer needed in this new system.}
+% \begin{macrocode}
+\def\epsfbox#1{%
+ \begingroup
+ \let\Ginclude@eps\pfg@Ginclude@eps
+ \let\epsfbox\pfg@epsfbox
+ \ifpfg@prepass\pfg@scan{#1}\fi
+ \ifnum\pfg@scount>\z@\pfg@hidestart\fi
+ \pfg@epsfbox{#1}%
+ \ifnum\pfg@scount>\z@\pfg@hideend\fi
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Ginclude@eps}
+% We need to override this function from the \pkg{graphics}
+% package in a similar fashion to \cs{epsfbox}. As we did for
+% \cs{epsfbox}, we revert \cs{epsfbox} and \cs{Ginclude@eps}
+% back to their original definitions in order to prevent recursion.
+% \changes{3.01}{1996/11/26}
+% {Added the \cs{pfg@hideinit} functionality.}
+% \changes{3.02}{1996/12/01}
+% {Removed \cs{pfg@hideinit}.}
+% \changes{3.04}{1998/04/11}
+% {Improved the recursion protection by reverting
+% \cs{epsfbox} and \cs{Ginclude@eps} back to their original
+% definitions within the block.}
+% \begin{macrocode}
+\def\Ginclude@eps#1{%
+ \begingroup
+ \let\Ginclude@eps\pfg@Ginclude@eps
+ \let\epsfbox\pfg@epsfbox
+ \ifpfg@prepass\pfg@scan{#1}\fi
+ \ifnum\pfg@scount>\z@\pfg@hidestart\fi
+ \pfg@Ginclude@eps{#1}%
+ \ifnum\pfg@scount>\z@\pfg@hideend\fi
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{psfrags}
+% Defines a dummy environment to delimit the scope of \pfg\
+% replacements.
+% \begin{macrocode}
+\newenvironment{psfrags}{\ignorespaces}{\global\@ignoretrue}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\psfragspecial}
+% This macro is no longer supported.
+% \begin{macrocode}
+\ifpfg@compat
+\def\psfragspecial#1#2#3#4#5#6{%
+ \PackageError{PSfrag}%
+ {\string\psfragspecial no longer implemented.}{}}
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\psfrag}
+% \marg{tag}\oarg{posn}\oarg{psposn}\oarg{scl}\oarg{rot}\\
+% The main macro \cs{psfrag} must be defined specially in order
+% to handle its odd combination of optional and required arguments.
+% In addition, catcode tricks (thanks to David Carlisle and others)
+% allow special characters to be used inside the tag text. It also
+% replaces spaces with their octal equivalents to prevent drivers
+% like \pkg{dvips} from breaking one in the middle.
+% \changes{3.01}{1996/11/26}{Now changes every space in the tag
+% text by its octal code. Some DVI to PS drivers were breaking the
+% strings onto multiple lines; this should prevent that from happening.}
+% \changes{3.01}{1996/11/26}{Removed octal code in favour of convert
+% routine in the prologue}
+% \changes{3.03}{1997/1/6}{Added another ``special'' character.}
+% \begin{macrocode}
+\newif\ifpfg@star
+\def\psfrag{\@ifstar{\pfg@startrue\@psfraga}{\pfg@starfalse\@psfraga}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@psfraga{\begingroup
+ \@makeother\"\@makeother\*\@makeother\!\@makeother\~%
+ \@makeother\:\@makeother\\\@makeother\%\@makeother\#%
+ \@makeother\ \@psfragb}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ifpfg@compat
+\def\@psfragb#1{\xdef\@gtempa{#1}\endgroup
+ \@ifnextchar[{\@psfragc{\@gtempa}}%
+ {\@psfrag{\@gtempa}[bl][bl][1][0]}}
+\def\@psfragc#1[#2]{\@ifnextchar [{\@psfragd{#1}[#2]}%
+ {\@psfrag{#1}[#2][bl][1][0]}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\else
+\def\@psfragb#1{\xdef\@gtempa{#1}\endgroup
+ \@ifnextchar [{\@psfragc{\@gtempa}}%
+ {\@psfrag{\@gtempa}[Bl][Bl][1][0]}}
+\def\@psfragc#1[#2]{\@ifnextchar [{\@psfragd{#1}[#2]}%
+ {\@psfrag{#1}[#2][Bl][1][0]}}
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@psfragd#1[#2][#3]{\@ifnextchar [{\@psfrage{#1}[#2][#3]}%
+ {\@psfrag{#1}[#2][#3][1][0]}}
+\def\@psfrage#1[#2][#3][#4]{\@ifnextchar [{\@psfrag{#1}[#2][#3][#4]}%
+ {\@psfrag{#1}[#2][#3][#4][0]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@psfrag}\marg{tag}\\
+% Now that we have all of the arguments, we need to check to check to
+% see if the string has been used yet; if not, increment the string
+% count and create a place for the new string. Then pass the string
+% number on down the line to \cs{@@psfrag}.
+% \begin{macrocode}
+\def\pfg@newstring#1.#2{%
+ \@nameedef{pfg@using@#2}{#1}%
+ \pfg@starfalse\advance\pfg@scount\@ne}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@psfrag#1{%
+ \@ifundefined{pfg@using@#1}%
+ {\expandafter\pfg@newstring\the\pfg@scount.{#1}}%
+ {}%
+ \edef\@tempa{\@nameuse{pfg@using@#1}}%
+ \expandafter\@@psfrag\@tempa.{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@psfrag}\marg{tag-key}.\marg{tag}\\
+% \cs{@@psfrag} passes along the current \emph{replacement} number to
+% to \cs{@@@psfrag}, which is doing all of the dirty work.
+% \begin{macrocode}
+\def\@@psfrag{\expandafter\@@@psfrag\the\pfg@pcount.}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@@psfrag}
+% \marg{repl-key}.\marg{tag-key}.\marg{tag}\oarg{posn}%
+% \oarg{psposn}\oarg{scl}\oarg{rot}\oarg{repl}
+% \begin{macro}{\pfg@align}\marg{tag-key}.
+% \begin{macro}{\pfg@place}\marg{repl-key}.\\
+% \cs{@@@psfrag}, armed with numeric keys for the tag string and the
+% replacement, creates a \cs{pfg@place} procedure call for this
+% fragment and appends the control point, scale, and rotation
+% information to the proper tag's list, found in
+% \cs{pfg@align\emph{<tag-key>}.}
+% \changes{3.01}{1996/11/26}{Added some extra spaces in
+% \cs{pfg@align@} to encourage more benevlolent line-breaking
+% by DVI to PS drivers.}
+% \begin{macrocode}
+\def\@nameedef#1#2{\expandafter\edef\csname #1\endcsname{#2}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@@@psfrag#1.#2.#3[#4][#5][#6][#7]#8{%
+ \advance\pfg@pcount\@ne
+ \ifpfg@star\else\@nameedef{pfg@align@#2}{(#3)[}\fi
+ \@nameedef{pfg@align@#2}{\@nameuse{pfg@align@#2}[#1(#5)#6 #7]}%
+ \@namedef{pfg@place@#1}{\pfg@@place{#1}{#4}{#8}}\ignorespaces}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\pfg@align#1.{\@nameuse{pfg@align@#1}}
+\def\pfg@place#1.{\@nameuse{pfg@place@#1}}
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}
+%
+% \subsection{Fragment processing}
+%
+% \begin{macro}{\pfg@hidestart}
+% This procedure provides PostScript with a list of the strings that
+% \pfg\ would like to replace, and the control points, scales, and
+% rotations of each one. The PostScript code in \fname{psfrag.pro}
+% will use this information to construct transformation matrices for
+% each replacement to move them into proper position.
+% \changes{3.01}{1996/11/26}{Moved the \pkg{xdvi} stub to
+% \cs{pfg@hideinit}}.
+% \changes{3.02}{1996/12/01}{Moved it back.}
+% \begin{macrocode}
+\def\pfg@hidestart{%
+ \def\pfg@{}\count@=\z@\loop\ifnum\count@<\pfg@scount
+ \toks@=\expandafter{\expandafter\pfg@align\the\count@.}%
+ \edef\pfg@{\pfg@\the\toks@]}%
+ \advance\count@ by\@ne\repeat
+ \Gin@PS@raw{/PSfrag where{pop\pfg@\the\pfg@scount\space
+ \ifpfg@debug1\else0\fi\space\pfg@orient/Begin
+ PSfrag}{userdict /PSfrag{pop}put}ifelse}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pfg@hideend}
+% Now that the EPS file has been loaded, and (therefore) all of the
+% replacement positions have been determined, move each replacement
+% to its proper position by calling the \cs{pfg@place} procedure for
+% each one. Except for the calls to \cs{Gin@PS@raw}, it looks like
+% we're building a vertical list of the replacements: that's the idea,
+% because we want it to look decent when viewed by a DVI viewer.
+% \begin{macrocode}
+\def\pfg@hideend{%
+ \Gin@PS@raw{/End PSfrag}%
+ \vbox to\z@{\vss
+ \Gin@PS@raw{/Hide PSfrag}%
+ \hbox to\z@{\hss \raisebox{\depth}{%
+ \underline{PSfrag replacements}}}%
+ \Gin@PS@raw{/Unhide PSfrag}%
+ \count@=\z@\loop\ifnum\count@<\pfg@pcount
+ \expandafter\pfg@place\the\count@.%
+ \advance\count@ by\@ne\repeat}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pfg@@place}
+% \marg{repl-key}\marg{posn}\marg{replacement}\\
+% The following macro does the dirty work. Its job is to insert the
+% appropriate code so that the \TeX\ replacement is transformed to
+% its requested location; and, if desired, repeated for as many times
+% as the PostScript tag text appeared in the figure.
+%
+% It performs this magic by first surrounding the \TeX-produced code
+% in curly braces, so we can defer its execution while we figure out
+% where to place it. Then, we call the \pscom{Place} routine in
+% \fname{psfrag.pro}, which takes \marg{repl-key}
+% and provides the proper coordinate transformations.
+%
+% We're allowed to reassign these dimension registers because we are
+% always inside a group when we use them. This technique is taken from
+% \fname{graphics.sty}...
+% \begin{macrocode}
+\let\pfg@dp\leftmargini\let\pfg@wd\leftmarginii
+\let\pfg@dx\leftmarginiii\let\pfg@dy\leftmarginiv
+% \end{macrocode}
+% We need to stuff the curly braces into macros.
+% \begin{macrocode}
+\edef\pfg@bchar{ \string{ }
+\edef\pfg@echar{ \string} }
+\def\pfg@@place#1#2#3{\begingroup
+% \end{macrocode}
+% Typeset the replacement into a box and determine its dimensions.
+% \begin{macrocode}
+ \sbox\z@{#3}%
+ \dimen@=\ht\z@ \advance\dimen@ by\dp\z@%
+% \end{macrocode}
+% Determine the desired alignment of the \TeX\ box, and the glue
+% that will be needed in order to achieve this alignment.
+% \begin{macrocode}
+ \pfg@wd=0.5\wd\z@\pfg@dp=0.5\dimen@
+ \pfg@dx=\pfg@wd\pfg@dy=\pfg@dp
+ \@tfor\@tempa:=#2\do{%
+ \if l\@tempa \pfg@dx=\z@ \pfg@wd=\wd\z@ \else
+ \if r\@tempa \pfg@dx=\wd\z@ \pfg@wd=\z@ \else
+ \if b\@tempa \pfg@dy=\z@ \pfg@dp=\z@ \else
+ \if t\@tempa \pfg@dy=\dimen@\pfg@dp=\dimen@\else
+ \if B\@tempa \pfg@dy=\dp\z@ \pfg@dp=\dp\z@ \fi\fi\fi\fi\fi}%
+% \end{macrocode}
+% Create a zero-area box with the desired \pfg\ replacement
+% text typeset inside of it (and aligned with the glue). This
+% is actually the box that will be moved, rotated, and/or scaled.
+% \begin{macrocode}
+ \setbox\z@\hbox to\z@{\hskip-\pfg@dx\box\z@\hss}%
+ \setbox\z@\vbox to\z@{\vss\box\z@\vskip-\pfg@dy}%
+% \end{macrocode}
+% Typeset the box. The inner, zero-size box is the one we place
+% with the PostScript code, and the outer, full-height, right-\
+% justified box is the one that we use to stack up the preview
+% list.
+% \begin{macrocode}
+ \vbox to\dimen@{\vss\hbox to\z@{\hss
+ \Gin@PS@raw{\pfg@bchar}\box\z@
+ \Gin@PS@raw{\pfg@echar#1/Place PSfrag}%
+ \hskip\pfg@wd}\vskip\pfg@dp}%
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</package>
+%<*filepro>
+% \end{macrocode}
+%
+% \section{The PostScript library, \fname{psfrag.pro}}
+% This code must perform two functions: 1) determine and save the
+% alignment point, rotation, and scaling for each piece of PostScript
+% text that is going to serve as a \pfg\ tag; and 2) use that
+% information to properly transform the coordinate system for each
+% \TeX\ replacement.
+%
+% The only two symbols that we define globally are \pscom{PSfragLib},
+% the library of support routines, \pscom{PSfragDict}, the dictionary
+% containing the ``magic'' \pscom{show} commands,
+% and \pscom{PSfrag}, the gateway from
+% the global namespace to \pscom{PSfragLib}. This technique minimizes
+% the possibility that our procedure names will conflict with those
+% defined by the PostScript driver or the figure itself.
+% \changes{3.02}{1996/12/03}{Added code to insure that \pscom{PSfragLib}
+% and \pscom{PSfrag} are stored in \pscom{userdict}. Some cruel DVI to
+% PostScript drivers try and force these into their own dictionary. Also
+% moved \pscom{PSfragDict} out of \pscom{PSfragLib}.}
+% \begin{macrocode}
+userdict begin
+/PSfragLib 90 dict def
+/PSfragDict 6 dict def
+/PSfrag { PSfragLib begin load exec end } bind def
+end
+% \end{macrocode}
+%
+% \begin{macro}{PSfragLib}
+% \pscom{PSfragLib} is the dictionary with the meaty stuff. We're also
+% defining some useful abbreviations. Of note is the \pscom{OE} command
+% (``outside exec''), which executes some code after removing
+% \pscom{PSfragLib} from the stack (to insure that there are no
+% collisions with \pscom{PSfragLib}'s internal names.
+% \changes{3.01}{1996/11/26}{Fixed \pscom{islev2}.}
+% \changes{3.02}{1996/12/03}{Added \pscom{readonly} to \pscom{BD} to
+% help insure that this dictionary isn't being trampled on.}
+% \changes{3.02}{1996/12/03}{Added some abbreviations.}
+% \changes{3.04}{1998/04/11}{Added the default definition of \pscom{S} to
+% avert potential problems if it is defined elsewhere. Thanks again to
+% J. Scott Berg for this fix.}
+% \begin{macrocode}
+PSfragLib begin
+/RO /readonly load def
+/CP /currentpoint load def
+/CM /currentmatrix load def
+/B { bind RO def } bind def
+/X { exch def } B
+/MD { { X } forall } B
+/OE { end exec PSfragLib begin } B
+/S false def
+/tstr 8 string def
+/islev2 { languagelevel } stopped { false } { 2 ge } ifelse def
+% \end{macrocode}
+% Allocate some space for matrices that we will use frequently.
+% \pscom{sM} is the matrix we encounter at the time this library
+% is defined; this should theoretically be \pscom{initmatrix}, unless
+% we are in an EPS/psnup situation.
+% \pscom{srcFM} contains a matrix which describes the difference
+% between PostScript's \pscom{defaultmatrix} and the transformation
+% defined by the DVI-to-PS driver's ``default matrix.'' This information
+% is crucial to the proper placing of the \pfg\ replacements.
+% \changes{3.02}{1996/12/01}{Changed the names to be a tiny bit
+% more descriptive, and added a couple.}
+% \changes{3.02}{1996/12/03}{Added the \pscom{readonly} commands.}
+% \changes{3.04}{1998/04/11}{Added \pscom{sM}, which stores the
+% \pscom{currentmatrix} found at the time \pscom{PSfragLib} is defined.
+% See the \pscom{replace} command for its use. Thanks to J. Scott Berg.}
+% \begin{macrocode}
+[ /sM /tM /srcM /dstM /dM /idM /srcFM /dstFM ] { matrix def } forall
+sM currentmatrix RO pop
+dM defaultmatrix RO idM invertmatrix RO pop
+srcFM identmatrix pop
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{Hide}
+% \begin{macro}{Unhide}
+% Surrounding a (fairly) arbitrary piece of PostScript code with calls
+% to \pscom{Hide} and \pscom{Unhide} should render it invisible.
+% \pfg\ uses these calls to hide unused replacements. Note that we are
+% assuming that the DVI-to-PS driver isn't relying on any of the
+% information that will be wiped out by the \pscom{grestore}, except
+% for the \pscom{currentpoint}.
+% \begin{macrocode}
+/Hide { gsave { CP } stopped not newpath clip { moveto } if } B
+/Unhide { { CP } stopped not grestore { moveto } if } B
+% \end{macrocode}
+% \end{macro}\end{macro}
+%
+% \begin{macro}{setrepl}
+% \begin{macro}{getrepl}
+% These macros are defined differently for Level 1 and Level 2
+% PostScript. \pscom{setrepl} accepts an array of N elements,
+% followed by the length N, and store them in a global variable (or
+% the equivalent) for later use. \pscom{getrepl} restores that exact
+% information to the stack. This is used to store the replacement
+% information in a persistent fashion.
+% \begin{macrocode}
+/setrepl islev2 {{ /glob currentglobal def true setglobal array astore
+ globaldict exch /PSfrags exch put glob setglobal }}
+ {{ array astore /PSfrags X }} ifelse B
+/getrepl islev2 {{ globaldict /PSfrags get aload length }}
+ {{ PSfrags aload length }} ifelse B
+% \end{macrocode}
+% \end{macro}\end{macro}
+%
+% \begin{macro}{convert}
+% This routine takes a string and replaces every character whose
+% ASCII code is less than 32 with a space. This makes the replacement
+% dictionary robust to multiple-line tags, etc.
+% \begin{macrocode}
+/convert {
+ /src X src length string
+ /c 0 def src length {
+ dup c src c get dup 32 lt { pop 32 } if put /c c 1 add def
+ } repeat
+} B
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{Begin}
+% \pfg\ calls this routine once per figure, once it has placed
+% on the stack all of each tag's alignment, rotation, and scaling
+% information. This information is collected into a dictionary:
+% each tag has an entry which is an array of [ repl-key, (psposn),
+% scl, rot ] quads. Then it saves the current transformation
+% information in a form ready for \pscom{/replace} to use.
+% \changes{3.02}{1996/12/03}{\pscom{PSfragDict} now goes at the
+% \emph{bottom} of the read-write portion of the dictionary stack,
+% to insure that it does not conflict with dictionary manipulation
+% by the EPS file or the DVI to PS driver.}
+% \changes{3.02}{1996/12/03}{Changes to account for transformation
+% rearrangement; see \pscom{/replace}.}
+% \begin{macrocode}
+/Begin {
+ /saver save def
+ srcFM exch 3 exch put
+ 0 ne /debugMode X 0 setrepl
+ dup /S exch dict def { S 3 1 roll exch convert exch put } repeat
+ srcM CM dup invertmatrix pop
+ mark { currentdict { end } stopped { pop exit } if } loop
+ PSfragDict counttomark { begin } repeat pop
+} B
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{End}
+% End converts the alignment information that has been collected
+% into a dictionary: each repl-key that was encountered in
+% \pscom{Begin} has an entry which is an array of
+% transformation matrices.
+% \changes{3.02}{1996/12/03}{Changes to the dictionary placement
+% as discussed in \pscom{/Begin}.}
+% \begin{macrocode}
+/End {
+ mark { currentdict end dup PSfragDict eq { pop exit } if } loop
+ counttomark { begin } repeat pop
+ getrepl saver restore
+ 7 idiv dup /S exch dict def {
+ 6 array astore /mtrx X tstr cvs /K X
+ S K [ S K known { S K get aload pop } if mtrx ] put
+ } repeat
+} B
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{Place}
+% This macro is called once for each \pfg\ replacement. It checks to
+% see if the replacement's tag was actually encountered in the PS
+% figure; if not, it surrounds the code in a ``clip all'' context and
+% executes it. This makes it invisible, as requested, but still allows
+% it to run so that any side effects that the code may have will take
+% place.
+%
+% If the replacement's tag \emph{was} encountered, however, it
+% retrieves the transformation matrix that was calculated for it; it
+% prepends this calculation to the current (\TeX) transformation matrix
+% (some tricky math to wade through there!), and then draws the
+% replacement.
+%
+% If there are multiple copies of the replacement to be laid down,
+% this will do it, surrounding all but the last replacement in a
+% \pscom{save}-\pscom{restore} pair. This \pscom{save}-\pscom{restore}
+% pair may slow things down, but theoretically it is necessary,
+% because the procedure might modify other variables in the PostScript
+% namespace. We need to be sure that those modifications do not
+% ``accumulate''.
+%
+% For multiple replacements to work, the code that \pfg\ surrounds with
+% curly braces must leave the stack the same way it found it. So far,
+% we have confirmed this fact for \pkg{dvips} and \pkg{DVIPSONE}.
+% \changes{3.02}{1996/12/03}{Changes to account for transformation
+% rearrangement; see \pscom{/replace}.}
+% \begin{macrocode}
+/Place {
+ tstr cvs /K X
+ S K known {
+ bind /proc X tM CM pop
+ CP /cY X /cX X
+ 0 0 transform idtransform neg /aY X neg /aX X
+ S K get dup length /maxiter X
+ /iter 1 def {
+ iter maxiter ne { /saver save def } if
+ tM setmatrix aX aY translate
+ [ exch aload pop idtransform ] concat
+ cX neg cY neg translate cX cY moveto
+ /proc load OE
+ iter maxiter ne { saver restore /iter iter 1 add def } if
+ } forall
+ /noXY { CP /cY X /cX X } stopped def
+ tM setmatrix noXY { newpath } { cX cY moveto } ifelse
+ } {
+ Hide OE Unhide
+ } ifelse
+} B
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{normalize}
+% This function accepts three numbers, $x$, $y$, and $s$, and returns
+% $sx/\sqrt{x^2+y^2}$ and $sy/\sqrt{x^2+y^2}$.
+% \begin{macrocode}
+/normalize {
+ 2 index dup mul 2 index dup mul add sqrt div
+ dup 4 -1 roll exch mul 3 1 roll mul
+} B
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{replace}
+% This routine is called for every string in the string list. It
+% must determine the translation, scaling, and rotation necessary to
+% move a piece of \TeX code to the proper orientation. It stores in
+% \pscom{replArray}, for each alignment/scale/rotation combination, a
+% transformation matrix that achieves this.
+% \begin{macrocode}
+/replace {
+ aload pop MD
+% \end{macrocode}
+% Trace out the text and determine its bounding box. We need to
+% temporarily revert to an identity transformation matrix, so that
+% we can be sure to get the tightest bounding box possible. If the
+% text is rotated, the bounding box that PostScript produces with the
+% \pscom{pathbbox} command is not optimal.
+%
+% We also need to save the position of the point following the text
+% placement, and move to that position when we've finished, to fool
+% the PS interpreter into thinking we actually drew that text.
+% \changes{3.01}{1996/11/22}{Modified this transformation to put the
+% beginning of the text at the origin, and forced its width to be
+% $\sim5$ in. Some figures were using coordinate systems that were
+% so ``large'' that they would break PostScript with
+% ``limitcheck'' errors here.}
+% \changes{3.01}{1996/12/03}{The added transformation is no longer
+% ``slipped under'' the CTM, but now it is more properly appended.
+% this should allow the replacements to move properly if the entire
+% figure is rotated or transformed. This required changes throughout
+% the code, but primarily here.}
+% \changes{3.03}{1997/01/06}{Added a \pscom{gsave}/\pscom{grestore}
+% pair around the bounding-box calculations. I thought I was being
+% clever by avoiding it; but it wasn't infallible, so I was wrong.}
+% \changes{3.04}{1998/04/11}{Changed \pscom{initmatrix} to \pscom{sM}
+% \pscom{setmatrix}, to be more EPS-friendly. Thanks to J. Scott Berg.}
+% \begin{macrocode}
+ CP /bY X /lX X gsave sM setmatrix
+ str stringwidth abs exch abs add dup 0 eq
+ { pop } { 360 exch div dup scale } ifelse
+ lX neg bY neg translate newpath lX bY moveto
+ str { /ch X ( ) dup 0 ch put false charpath ch Kproc } forall
+ flattenpath pathbbox [ /uY /uX /lY /lX ] MD
+ CP grestore moveto
+% \end{macrocode}
+% If the FontMatrix shows that the font is draw in the opposite X or
+% opposite Y direction, then the X or Y coordinates of the bounding
+% box, respectively, need to be swapped. This actually occurs quite
+% often. Here we also determine the center of the box.
+% \begin{macrocode}
+ currentfont /FontMatrix get dstFM copy dup
+ 0 get 0 lt { uX lX /uX X /lX X } if
+ 3 get 0 lt { uY lY /uY X /lY X } if
+ /cX uX lX add 0.5 mul def
+ /cY uY lY add 0.5 mul def
+% \end{macrocode}
+% If debug mode has been enabled, we draw the bounding box, the
+% baseline, and the center lines of the text.
+% \begin{macrocode}
+ debugMode { gsave 0 setgray 1 setlinewidth
+ lX lY moveto lX uY lineto uX uY lineto uX lY lineto closepath
+ lX bY moveto uX bY lineto lX cY moveto uX cY lineto
+ cX lY moveto cX uY lineto stroke
+ grestore } if
+% \end{macrocode}
+% Add each replacement's alignment to \pscom{replArray}.
+% \changes{3.02}{1996/12/01}{Now saves the current CTM here.}
+% \begin{macrocode}
+ dstFM dup invertmatrix dstM CM srcM
+ 2 { dstM concatmatrix } repeat pop
+ getrepl /temp X
+ S str convert get {
+% \end{macrocode}
+% Retrieve the replacement information
+% \begin{macrocode}
+ aload pop [ /rot /scl /loc /K ] MD
+% \end{macrocode}
+% Determine the PostScript alignment point.
+% \begin{macrocode}
+ /aX cX def /aY cY def
+ loc {
+ dup 66 eq { /aY bY def } { % B
+ dup 98 eq { /aY lY def } { % b
+ dup 108 eq { /aX lX def } { % l
+ dup 114 eq { /aX uX def } { % r
+ dup 116 eq { /aY uY def } % t
+ if } ifelse } ifelse } ifelse } ifelse pop
+ } forall
+% \end{macrocode}
+% Store the replacement key, and the transformation information, in
+% \pscom{replArray}. These transformations are appended to the CTM
+% encountered when \pscom{Place} is run. Indeed, this and
+% \pscom{Place} are the two most difficult pieces of code to
+% understand.
+% \changes{3.03}{1996/12/03}{The added transformation is no longer
+% ``slipped under'' the CTM, but now it is more properly appended.
+% this should allow the replacements to move properly if the entire
+% figure is rotated or transformed. This required changes throughout
+% the code, but primarily here.}
+% \begin{macrocode}
+ K srcFM rot tM rotate dstM
+ 2 { tM concatmatrix } repeat aload pop pop pop
+ 2 { scl normalize 4 2 roll } repeat
+ aX aY transform
+ /temp temp 7 add def
+ } forall
+ temp setrepl
+} B
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{rs}
+% \begin{macro}{rks}
+% \begin{macro}{ras}
+% \begin{macro}{rws}
+% \begin{macro}{raws}
+% These macros intercept calls to their PostScript
+% counterparts and execute \pscom{replace} in their stead if the
+% argument string matches one in the replacement list.
+% \changes{3.03}{1996/12/17}{Corrected typo for \pscom{raws}.}
+% \begin{macrocode}
+/Rif {
+ S 3 index convert known { pop replace } { exch pop OE } ifelse
+} B
+/XA { bind [ /Kproc /str } B /XC { ] 2 array astore def } B
+/xs { pop } XA XC
+/xks { /kern load OE } XA /kern XC
+/xas { pop ax ay rmoveto } XA /ay /ax XC
+/xws { c eq { cx cy rmoveto } if } XA /c /cy /cx XC
+/xaws { ax ay rmoveto c eq { cx cy rmoveto } if }
+ XA /ay /ax /c /cy /cx XC
+/raws { xaws { awidthshow } Rif } B
+/rws { xws { widthshow } Rif } B
+/rks { xks { kshow } Rif } B
+/ras { xas { ashow } Rif } B
+/rs { xs { show } Rif } B
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
+%
+% \begin{macro}{restore}
+% In Level 1 PostScript, this is necessary because global variables
+% do not exist (and we need one!). Every call to \pscom{restore}
+% wipes out any variables that were modified since the previous call
+% to \pscom{save}. Unfortunately, this is not guaranteed to work,
+% although it does work for \pkg{dvips}.
+%
+% For Level 2, we can use global variables so this is not necessary.
+% We make this distinction \emph{at print time}, so a file that does
+% not seem to work on a Level 1 printer for which it was originally
+% intended should still work on a Level 2 printer without
+% modification.
+% \changes{3.04}{1998/04/11}{Added a fix recommended by J. Scott Berg.}
+% \begin{macrocode}
+/rrs { getrepl dup 2 add -1 roll //restore exec setrepl } B
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{Dict}
+% This dictionary is added to the stack just before the figure, so
+% that its definitions of the \pscom{show} operators can substitute
+% for the originals.
+% \changes{3.02}{1996/12/03}{Made \pscom{Dict} read-only to help
+% track down problems.}
+% \changes{3.03}{1996/12/17}{Corrected typo in \pscom{awidthshow}.}
+% \begin{macrocode}
+PSfragDict begin
+islev2 not { /restore { /rrs PSfrag } B } if
+/show { /rs PSfrag } B
+/kshow { /rks PSfrag } B
+/ashow { /ras PSfrag } B
+/widthshow { /rws PSfrag } B
+/awidthshow { /raws PSfrag } B
+end PSfragDict RO pop
+end
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</filepro>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% \section{The scanner}
+% This code implements the \TeX-based scanner that performs the work
+% that the \pfg\ Perl script used to perform. This is
+% very similar to the code used
+% to scan for bounding boxes in \fname{graphics.sty}.
+%
+% We need to read the string with two sets of catcodes: as `verbatim
+% text' for using in the first argument of |\psfrag|, and as normal
+% \TeX\ commands for using in the replacemnt text argument.
+% The only way to do this sensibly in standard \TeX\ is to write
+% the string to a file and then read it back. So while reading the
+% EPS file, the character |\| will be `active'.
+% Then the argument can be duplicated
+% before writing this temp file, once with |\| expanding to |\\| (two
+% catcode 12 tokens) and once to |\| (one catcode 12 token). When this
+% is read back, these tokens will be re-catcoded by the |psfrag|
+% command.
+% \begin{macrocode}
+\newwrite\pfg@temp
+% \end{macrocode}
+%
+% \begin{macro}{\pfg@scan}
+% The main command. |#1| is the name of the file. It might be better
+% to use the bounding box (`|.bb|') file name so
+% that compressed files could work by you copying any lines with
+% |(\\tex|\ldots strings in them to the |bb| file before compressing.
+% However, if you are
+% doing that, you may as well just move the |\psfrag| commands to the
+% main \TeX\ file. So currently compression is not supported by this
+% system.
+% \begin{macrocode}
+\def\pfg@scan#1{\begingroup
+% \end{macrocode}
+% First the standard making `safe' of illegal characters.
+% \begin{macrocode}
+ \@tempcnta\z@
+ \loop
+ \ifnum\@tempcnta<\@xxxii
+ \catcode\@tempcnta12 \advance\@tempcnta\@ne
+ \repeat
+% \end{macrocode}
+%
+% Now normalise some catcodes we need. Most things are treated verbatim,
+% but |{}| have their normal catcodes so |\read| will read multi-line
+% |\\tex| expresions; and, as discussed above, |\| is made active.
+% The end of a line is treated as space. Originally this meant that
+% multi-line |\tex| commands did not work, but with v3.02, the PS side
+% of things normalises white space to `space', as well so everyone is in
+% agreement.
+% \begin{macrocode}
+ \let\do\@makeother\dospecials\catcode`\ 10 %
+ \catcode`\{=1\catcode`\}=2\catcode127=12 %
+ \catcode`\\=\active\catcode\endlinechar5 %
+% \end{macrocode}
+%
+% Open the scratch file. Don't complain if it already exists as that
+% is probably just a previous graphic, or a previous run.
+% \fname{pfgguide.tex} warns that any existing file of this name will
+% be zapped, so: you've been warned.
+% \begin{macrocode}
+ \immediate\openout\pfg@temp=\jobname.pfg %
+% \end{macrocode}
+%
+% If the graphic file is not there, complain, else start reading it
+% line by line. Look at each line with |\pfg@find|. Unlike the looking
+% for |%%BoundingBox| where you can stop once you've found it, here
+% you need to go to the end of the file looking for all the occurrences
+% of |\tex| so if you give it megabytes of data, this may take a while.
+% \begin{macrocode}
+ \immediate\openin\@inputcheck=#1 %
+ \ifeof\@inputcheck
+ \PackageWarning{psfrag}{Could not scan #1...}\endgroup
+ \else
+ \message{<psfrag:#1>}%
+ \@tempswatrue
+ \loop
+ \ifeof\@inputcheck
+ \@tempswafalse
+ \else
+ \read\@inputcheck to\@tempa
+ \expandafter\pfg@find\@tempa{\@nil}%
+ \fi
+ \if@tempswa
+ \repeat
+ \closein\@inputcheck
+ \fi
+ \immediate\closeout\pfg@temp
+ \endgroup
+ \@input{\jobname.pfg}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pfg@find}
+% \changes{3.03}{1997/01/07}
+% {Find strings even if nested inside brace groups}
+% This command first looks for an explicit brace group |{ }|.
+% (one definitely exists as |{\@nil}| is added at the end as
+% a `marker').
+% \begin{macrocode}
+\long\def\pfg@find#1#{\pfg@finda{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% To enable an `active' copy or |\| to be accessed easily, use a special
+% lowercase table while defining these macros.
+% \begin{macrocode}
+\begingroup
+ \lccode`\~=`\\
+ \lowercase{\endgroup
+% \end{macrocode}
+%
+% \begin{macro}{\pfg@finda}
+% If the group found contained the |\@nil| marker stop, else
+% start looking for |(\\tex| in the tokens before the group.
+% \begin{macrocode}
+\long\def\pfg@finda#1#2{%
+ \def\@tempa{#2}%
+ \ifx\@tempa\@nnil
+ \else
+ \pfg@findb#1(~~tex(~~tex%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pfg@findb}
+% Having found a brace group, look for the string |\\tex| in the
+% preceding tokens. If there is such, discard any tokens before that
+% then take all tokens after |\\tex| (up to the brace already found)
+% to be the optional arguments. In that case write out a suitable
+% call to |\psfrag|, and then continue after the brace group.
+% Otherwise if no |\\tex| is found, Add the contents of the brace group
+% (without the braces) back in front of the list before restarting the
+% search. In that way any strings inside brace groups will be found.
+%
+% As |{}| have their normal catcodes, multiline |\tex| commands work
+% as long as any line breaks occur inside the main |{ }| argument, not
+% between the optional arguments (normally there is no space at all
+% there, so no possibility of a break). This is because \TeX\ will
+% read more than a line if necessary to ensure that braces balance.
+%
+% The arguments are delimited by |(\\tex| sequences:\\
+% |#1| Is always discarded; the tokens before any |(\\tex| string.\\
+% |#2| contains any optional arguments (complete with |[]| brackets).\\
+% |#3| Will be the `dummy tokens' placed at the end, unless
+% no |(\\tex| is in the string, in which case |#3| will be empty.
+% This argument is |\fi| delimited which allows for tail recursion
+% in a slightly sneaky way.
+% \begin{macrocode}
+\long\def\pfg@findb#1(~~tex#2(~~tex#3\fi{%
+ \fi
+ \ifx\box#3\box
+ \else
+% \end{macrocode}
+% Since |\| is the PS escape character in strings, as well as the \TeX\
+% escape character, the following looks a bit weird, but it's probably
+% right. A |\| will appear in the PS string as |\\|, so\ldots
+%
+% First set |\| to be |\string| (recall |\| is active, and can be written
+% as |~| due to the |\lowercase| above).
+% This means that
+% |\\foo| expands to |\foo| (one catcode 12 |\| coming from |\string\|
+% and then a catcode 11 |foo|). This expansion is frozen by an |\edef|
+% for use in the second argument. Then redefine |\| to be |\relax|
+% so it is a non-expandable active token, which writes as itself.
+%
+% Now write a call to |\psfrag| to the temp file.
+% The `user' string |\foo| which was the literal PS |\\foo| thus ends
+% up as:\\
+% |\psfrag{|\ldots |\\foo| \ldots |}{| \ldots |\foo| |}%|
+%
+% When this file is read back |\psfrag| will read the first argument
+% verbatim, and the second argument with normal catcodes so finally
+% |\foo| gets to be a single token instead of 4, and is executed
+% as part of the replacement text.
+%
+% Finally reset |\@tempa| (which contatined the contents of the brace group
+% to empty, as we've done with that.
+% \begin{macrocode}
+ {\let~\string
+ \edef\@tempb{\@tempa}%
+ \let~\relax
+ \immediate\write\pfg@temp{%
+ \string\psfrag\space
+ {\string\\tex#2{\@tempa}}#2\@percentchar
+ ^^J\@spaces\@spaces{\@tempb}\@percentchar}}%
+ \let\@tempa\@empty
+ \fi
+% \end{macrocode}
+%
+% Now start looking for the next brace group to test. First tip
+% the contents of |\@tempa| in front of the tokens not yet seen, so that
+% the contents of a brace group will be searched if they were not
+% used as the argument to |\tex|.
+% \begin{macrocode}
+ \expandafter\pfg@find\@tempa}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% Finally close the call to |\lowercase|.
+% \begin{macrocode}
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+%
diff --git a/macros/latex/contrib/psfrag/psfrag.ins b/macros/latex/contrib/psfrag/psfrag.ins
new file mode 100644
index 0000000000..9c22e7cf66
--- /dev/null
+++ b/macros/latex/contrib/psfrag/psfrag.ins
@@ -0,0 +1,25 @@
+%%
+%% This file is part of the standard PSfrag bundle. It extracts the
+%% files from psfrag.dtx to be installed in the TeX hierarchy.
+%%
+%% This file may not be changed unless it is distributed under a
+%% different name, accompanied by a copy of the original file.
+%% The author of the changes and their scope should be clearly
+%% documented, so that questions can be distributed to the proper author.
+%%
+\def\batchfile{psfrag.ins}
+\input docstrip
+\preamble
+
+Copyright (c) 1996 Craig Barratt, Michael C. Grant, and David Carlisle.
+All rights reserved.
+
+This file is part of the PSfrag package.
+
+\endpreamble
+\generateFile{psfrag.sty}{f}{\from{psfrag.dtx}{package}}
+\def\npostamble{}\usepostamble\npostamble
+\generateFile{psfrag.pro}{f}{\from{psfrag.dtx}{filepro}}
+
+
+
diff --git a/macros/latex/contrib/psfrag/testfig.eps b/macros/latex/contrib/psfrag/testfig.eps
new file mode 100644
index 0000000000..437bb54899
--- /dev/null
+++ b/macros/latex/contrib/psfrag/testfig.eps
@@ -0,0 +1,6 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%BoundingBox: 0 0 245 163
+(Courier) findfont 216 scalefont setfont
+-13 41 moveto (gA) show
+showpage
+%%EOF