diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/generic/boxedeps |
Initial commit
Diffstat (limited to 'macros/generic/boxedeps')
-rw-r--r-- | macros/generic/boxedeps/ReadMe.boxedeps | 26 | ||||
-rw-r--r-- | macros/generic/boxedeps/bb.ps | 557 | ||||
-rw-r--r-- | macros/generic/boxedeps/bb4gs.ps | 596 | ||||
-rw-r--r-- | macros/generic/boxedeps/boxedeps.cfg | 70 | ||||
-rw-r--r-- | macros/generic/boxedeps/boxedeps.doc | 1242 | ||||
-rw-r--r-- | macros/generic/boxedeps/boxedeps.doc-old | 1107 | ||||
-rw-r--r-- | macros/generic/boxedeps/boxedeps.sty | 78 | ||||
-rw-r--r-- | macros/generic/boxedeps/boxedeps.tex | 1042 | ||||
-rw-r--r-- | macros/generic/boxedeps/boxedeps.tex-old | 861 | ||||
l--------- | macros/generic/boxedeps/boxedeps.txt | 1 | ||||
-rw-r--r-- | macros/generic/boxedeps/gdisk.eps | 14 | ||||
-rw-r--r-- | macros/generic/boxedeps/rose.eps | 811 | ||||
-rw-r--r-- | macros/generic/boxedeps/rosetest.tex | 19 |
13 files changed, 6424 insertions, 0 deletions
diff --git a/macros/generic/boxedeps/ReadMe.boxedeps b/macros/generic/boxedeps/ReadMe.boxedeps new file mode 100644 index 0000000000..114daf50ae --- /dev/null +++ b/macros/generic/boxedeps/ReadMe.boxedeps @@ -0,0 +1,26 @@ +%% ReadMe.boxedeps + +INDEX to boxedeps directory core April 1995 + + boxedeps.tex; boxedeps.doc; boxedeps.cfg --- + integration of encapsulated PostScript into TeX; + designed to work with (almost) all PostScript drivers + + labelfig.tex --- + semi-interactive TeX labelling on just about anything; + contains its own documentation following \endinput + + Details and Miscellaneous: + + -- ASCII.test; Test.tex; TestPlain.tex; gdisk.eps; + rosetest.tex; rose.eps --- test files + -- bb.ps; bb4gs.ps : for PS ==> EPSF conversion; see boxedeps.doc + -- newins.tex ==> W. Neumann's patch file to Plain.tex for + floating inserts under Plain, AmS, and LamsTeX (load anytime). + + Laurent Siebenmann <lcs@topo.math.u-psud.fr> + Mathematique, Bat. 425, + Univ de Paris-Sud, + 91405-Orsay, + France + diff --git a/macros/generic/boxedeps/bb.ps b/macros/generic/boxedeps/bb.ps new file mode 100644 index 0000000000..b290f005f0 --- /dev/null +++ b/macros/generic/boxedeps/bb.ps @@ -0,0 +1,557 @@ +%! +% bb.ps -- +% +% Prints a file, but keeps track of bounding box info, and prints the box at +% the end (around the figure.) +% +% $Header: bb.ps,v 1.10 90/06/27 10:47:22 cosell Exp $ +% RCS log info at end + +50 dict /$BoundingBox exch def + +$BoundingBox begin + +/xdef { + exch def +} def + +/xstore { + exch store +} def + +/addcoords { + exch + 4 -1 roll add + 3 1 roll add +} def + +% +% Stubs of old functions. +% + +/-stroke /stroke load def +/-fill /fill load def +/-eofill /eofill load def +/-image /image load def +/-show /show load def +/-awidthshow /awidthshow load def +/-showpage /showpage load def +/-restore /restore load def +/-imagemask /imagemask load def + +end % $BoundingBox + +% +% New Functions. --- These go into the user dict to intercept the calls +% + +/stroke { + $BoundingBox begin + gsave + initmatrix + (stroke called\n) traceprint %%DEBUG + { + strokepath % Make sure to take line width into account. + 0 setlinejoin + flattenpath + } stopped { % strokepath often hits a limitcheck. + (Can't set up a strokepath\n) traceprint % DEBUG + grestore % Restore the original path + gsave + } if + includepath % Accumulate it into our box. + grestore + + -stroke + end % $BoundingBox +} def + +/fill { + $BoundingBox begin + gsave + (fill called\n) traceprint %%DEBUG + includepath + grestore + + -fill + end % $BoundingBox +} def + +/eofill { + $BoundingBox begin + gsave + (eofill called\n) traceprint %%DEBUG + includepath + grestore + + -eofill + end % $BoundingBox +} def + +% +% Text is implemented by reducing everything to an `awidthshow'. +% + +/show { + $BoundingBox begin + (show called\n) traceprint %%DEBUG + 0 0 0 0 0 % Extra parameters for awidthshow + 6 -1 roll % Bring the string back up + awidthshow + end % $BoundingBox +} def + +/widthshow { + $BoundingBox begin + (widthshow called\n) traceprint %%DEBUG + 0 0 % Extra parameters for awidthshow + 3 -1 roll % Bring the string back up. + awidthshow + end % $BoundingBox +} def + +/ashow { + $BoundingBox begin + (ashow called\n) traceprint %%DEBUG + 0 0 0 + 6 3 roll + awidthshow + end % $BoundingBox +} def + + +% This does all of the work of the text-rendering operators +% What it does, is compute, basically brute force, what 'charpath' +% would have given us virtually for free, if 'show' were the only +% operator that we needed to do. + +/awidthshow { + $BoundingBox begin + gsave + 6 (awidthshow:) debug %%DEBUG + currentpoint + 2 copy /@starty xdef /@startx xdef + 2 index stringwidth % Get the natural length of the string + addcoords % Add to the start to get the end. + + 2 index length % How many characters? + + dup % Add the offsets to each character + 6 index mul + exch 5 index mul + addcoords + + 5 index 3 index + chcount % How many padding characters? + + dup % Add the offsets for each pad. + 9 index mul + exch 8 index mul + addcoords + + /@endy xdef /@endx xdef + + % We now have the left and right edges (in user coords) + % of the text. Now we need only correct for the vertical + % displacements needed for the font and we can get the + % top and bottom edges of the enclosing box + + fontheight % Get the height and depth of the current font. + + @startx @starty addcoords + /@starty xdef /@startx xdef + @endx @endy addcoords + /@endy xdef /@endx xdef + newpath + @startx @starty moveto + @endx @starty lineto + @endx @endy lineto + @startx @endy lineto + closepath + includepath + grestore + + -awidthshow + end % $BoundingBox +} def + +% +% `image': +% +% Assume here that the image lands in the unit square. +% + +/image { + $BoundingBox begin + (image called\n) traceprint %%DEBUG + gsave + newpath + 0 0 moveto + 1 0 rlineto + 1 1 rlineto + -1 0 rlineto + closepath + includepath + grestore + + -image + end % $BoundingBox +} def + +/imagemask +{ + $BoundingBox begin + (imagemask called\n) traceprint %%DEBUG + gsave + newpath + 0 0 moveto + 1 0 rlineto + 1 1 rlineto + -1 0 rlineto + closepath + includepath + grestore + + -imagemask + end % $BoundingBox +} def + +% Just define this one out of existence +/framedevice { pop pop pop pop } def + +% Handle restoring VM --- this is all OK, except that we have to +% hang onto the bb info we collected while in the about-to-be-discarded +% environment + +/restore +{ + $BoundingBox begin + bbox-llx bbox-lly bbox-urx bbox-ury + 5 -1 roll + -restore + /bbox-ury xstore /bbox-urx xstore + /bbox-lly xstore /bbox-llx xstore + end % $BoundingBox +} def + + +% +% `showpage': +% +% Just draw the box around the figure and print the page, and then initialize +% the bounding box variables again. +% + +$BoundingBox begin +/temp-string 10 string def +end % $BoundingBox + +/showpage { + $BoundingBox begin + initgraphics + + (showpage\n) traceprint % DEBUG + dump-bbox % DEBUG + + /bbox-llx round_down + /bbox-lly round_down + /bbox-ury round_up + /bbox-urx round_up + + bbox-llx bbox-lly moveto % Make the box + bbox-llx bbox-ury lineto + bbox-urx bbox-ury lineto + bbox-urx bbox-lly lineto + closepath + + bwstroke % Draw the box. + +% Print the size of the bounding box both above and below the actual box + 0 setgray + /Courier findfont 10 scalefont setfont + 100 100 moveto + bbox-llx bbox-lly 12 sub moveto + (%%BoundingBox: ) -show + bbox-llx temp-string cvs -show ( ) -show + bbox-lly temp-string cvs -show ( ) -show + bbox-urx temp-string cvs -show ( ) -show + bbox-ury temp-string cvs -show + + bbox-llx bbox-ury 12 add moveto + (%%BoundingBox: ) -show + bbox-llx temp-string cvs -show ( ) -show + bbox-lly temp-string cvs -show ( ) -show + bbox-urx temp-string cvs -show ( ) -show + bbox-ury temp-string cvs -show + + init + -showpage + tracedump %% DEBUG + end % $BoundingBox +} def + +% +% BoundingBox functions: +% +% We accumulate the information about the bounding box into four variables. +% The data is stored in default coordinates. +% + +$BoundingBox begin + +/init { + /bbox-llx 99999 store + /bbox-lly 99999 store + /bbox-urx -99999 store + /bbox-ury -99999 store +} def + +/bbox-llx 0 def +/bbox-lly 0 def +/bbox-urx 0 def +/bbox-ury 0 def + +% +% - `includepath' - +% +% Incorporates the bounding box of the path into the bounding box info. +% ... Gets the bounding box in default coords + +/includepath { + (Adding a path: ) traceprint %%DEBUG + gsave + initmatrix + { + 0 setlinejoin + flattenpath + } stopped { + (Couldn't flatten the path\n) traceprint % DEBUG + grestore + gsave + initmatrix + } if + pathbbox + 4 2 roll % Just so we get lower-left first + 2 copy dump-coord %%DEBUG + dup bbox-lly lt { + /bbox-lly xstore + } { + pop + } ifelse + dup bbox-llx lt { + /bbox-llx xstore + } { + pop + } ifelse + + (; ) traceprint 2 copy dump-coord (\n) traceprint %%DEBUG + dup bbox-ury gt { + /bbox-ury xstore + } { + pop + } ifelse + dup bbox-urx gt { + /bbox-urx xstore + } { + pop + } ifelse + dump-bbox %%DEBUG + grestore +} def + +% +% A nice black-and white line drawing function. +% + +/bwstroke { + 0 setlinewidth % Thinnest possible lines + 1 setgray % White first + [5] 0 setdash % Only half the line + gsave -stroke grestore + 0 setgray % Then black + [5] 5 setdash % On the other half + -stroke +} def + +% +% Stuff for text. +% + +% +% char-code string `chcount' occurs +% +% Counts the number of times a character appears in a string. +% + +/chcount { + 0 exch + { + 2 index eq { + 1 add + } if + } forall + exch pop +} def + +% +% - `fontheight' heightx heighty depthx depthy +% +% Returns the offsets to the lowest point and highest point in the current +% font. +% + +/fontheight { + currentfont begin + /FontBBox load aload pop + exch pop 0 exch + FontMatrix transform + 4 2 roll + exch pop 0 exch + FontMatrix transform + end +} def + +% key round_{down|up} - These will round the value of the given key +% up or down, as appropriate, to the nearest integer +/round_up { dup load ceiling cvi store } def +/round_down { dup load floor cvi store } def + +% key binddefinition - this will do a 'bind' on the procedure given by 'key' +/binddefinition +{ + dup where + { + exch + 2 copy + get bind put + } + { undefined } ifelse +} def + +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % +% +% Debugging utilities +% + +/$tracedict where +{ % Trace package loaded... do the tracing + pop +% This is a debugging function to print out what is going on. +% Format <argn> <argn-1> ... <arg1> n <string> debug <argn> ... <arg1> +% (that is, the 'n' args will be *left* on the stack!) +/debug +{ + traceprint (\n) traceprint + dup 1 add % Now total number of args (including arg count) + copy + { + ( ) traceprint + trace= + (\n) traceprint + } repeat + pop % Remove the extra copy of the arg count +} def + +% Print out a coordinate on the stack: x y --- +/dump-coord +{ + (\() traceprint exch trace= (, ) traceprint trace= (\)) traceprint +} def + +% Print out bb's current notion of its bounding box + +/dump-bbox +{ + (Bounding Box: ) traceprint + bbox-llx bbox-lly dump-coord + (; ) traceprint + bbox-urx bbox-ury dump-coord + (\n) traceprint +} def + +tracebegin %% DEBUG + +} +{ % No trace package loaded, so don't trace. Stub out the various calls + +/traceprint { pop } def +/dump-coord { pop pop } def +/dump-bbox { } def +/debug { pop pop } def +/tracedump { } def + +} ifelse + +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % + +% Bind everything + +/xdef binddefinition +/xstore binddefinition +/addcoords binddefinition +/stroke binddefinition +/fill binddefinition +/eofill binddefinition +/show binddefinition +/widthshow binddefinition +/ashow binddefinition +/awidthshow binddefinition +/image binddefinition +/showpage binddefinition +/init binddefinition +/includepath binddefinition +/bwstroke binddefinition +/chcount binddefinition +/fontheight binddefinition + +/debug binddefinition +/dump-coord binddefinition +/dump-bbox binddefinition + +% Start it up. + +init + +end % $BoundingBox + +% end of bb.ps + +% $Log: bb.ps,v $ +% Revision 1.10 90/06/27 10:47:22 cosell +% Added a bunch of improvements from Joe Pallas at stanford. +% +% Revision 1.9 90/06/26 10:50:20 cosell +% Stack got botched in the 'debug' stub +% +% Revision 1.8 90/06/25 09:34:51 cosell +% Minor bug in 'restore' +% +% Revision 1.7 90/06/25 09:29:58 cosell +% Added code to catch and deal with 'restore'. Thanks to Frank +% Jensen for finding this one +% +% Revision 1.6 90/06/25 09:23:26 cosell +% Small bugfix in the text-handling stuff +% +% Revision 1.5 90/06/10 09:04:02 cosell +% Changed the printed string to explictly say "%%BoundingBox" +% +% Revision 1.4 90/06/10 08:55:39 cosell +% Added 'bind' machinery to insulate this package from later redefinitions +% of things we need from the systemdict. +% +% Revision 1.3 90/06/10 08:28:53 cosell +% Added debugging hooks. They don't affect anything (and don't do +% anything) in the normal use of bbfig. But if the 'trace' package +% is loaded ahead of this, it'll print out some helpful info. Probably +% I'll end up removing all of this if/when I really get the package +% up to snuff. +% +% Revision 1.2 90/05/25 12:08:24 cosell +% Major improvements and tuneups: fixed it to really use its private +% discionary, and the most importnat: it now computes the bounding box +% in *default* coords +% +% Revision 1.1 90/05/23 08:18:54 cosell +% Initial revision +% This is Ned Bachelder's original version diff --git a/macros/generic/boxedeps/bb4gs.ps b/macros/generic/boxedeps/bb4gs.ps new file mode 100644 index 0000000000..19b2861aee --- /dev/null +++ b/macros/generic/boxedeps/bb4gs.ps @@ -0,0 +1,596 @@ +%! +% bb.ps -- +% +% Prints a file, but keeps track of bounding box info, and prints the box at +% the end (around the figure.) +% +% $Header: bb.ps,v 1.14 91/03/21 13:04:02 cosell Exp $ +% RCS log info at end +% +% This version, bb4gs.ps, modified for Ghostscript by William L. Kath +% <kath@nwu.edu>, 92/03/01; all changes clearly marked by `Ghostscript' + +/strokepath { } def %% added by wlk for Ghostscript (I think + %% the strokepath operator is still not + %% fully implemented). + +%% /show /print load def %% added by wlk for Ghostscript; uncomment + %% this lines to write %%BoundingBox to + %% stdout (e.g, for use in a filter to add + %% %%BoundingBox to a Postscript file); + %% alternatively, add these two lines to + %% a separate file and invoke before this + %% one when such a filter is desired. + +50 dict /$BoundingBox exch def + +$BoundingBox begin + +/xdef { + exch def +} def + +/xstore { + exch store +} def + +/addcoords { + exch + 4 -1 roll add + 3 1 roll add +} def + +% +% Stubs of old functions. +% + +/-stroke /stroke load def +/-fill /fill load def +/-eofill /eofill load def +/-image /image load def +/-show /show load def +/-awidthshow /awidthshow load def +/-showpage /showpage load def +/-restore /restore load def +/-imagemask /imagemask load def + +end % $BoundingBox + +% +% New Functions. --- These go into the user dict to intercept the calls +% + +/stroke { + $BoundingBox begin + gsave + initmatrix + (stroke called\n) traceprint %%DEBUG + { + strokepath % Make sure to take line width into account. + 0 setlinejoin + flattenpath + } stopped { % strokepath often hits a limitcheck. + (Can't set up a strokepath\n) traceprint % DEBUG + grestore % Restore the original path + gsave + } if + includepath % Accumulate it into our box. + grestore + + -stroke + end % $BoundingBox +} def + +/fill { + $BoundingBox begin + gsave + (fill called\n) traceprint %%DEBUG + includepath + grestore + + -fill + end % $BoundingBox +} def + +/eofill { + $BoundingBox begin + gsave + (eofill called\n) traceprint %%DEBUG + includepath + grestore + + -eofill + end % $BoundingBox +} def + +% +% Text is implemented by reducing everything to an `awidthshow'. +% + +/show { + $BoundingBox begin + (show called\n) traceprint %%DEBUG + 0 0 0 0 0 % Extra parameters for awidthshow + 6 -1 roll % Bring the string back up + awidthshow + end % $BoundingBox +} def + +/widthshow { + $BoundingBox begin + (widthshow called\n) traceprint %%DEBUG + 0 0 % Extra parameters for awidthshow + 3 -1 roll % Bring the string back up. + awidthshow + end % $BoundingBox +} def + +/ashow { + $BoundingBox begin + (ashow called\n) traceprint %%DEBUG + 0 0 0 + 6 3 roll + awidthshow + end % $BoundingBox +} def + +% This does all of the work of the text-rendering operators +% What it does, is compute, basically brute force, what 'charpath' +% would have given us virtually for free, if 'show' were the only +% operator that we needed to do. + +/awidthshow { + $BoundingBox begin + gsave + 6 (awidthshow:) debug %%DEBUG + currentpoint + 2 copy /@starty xdef /@startx xdef + 2 index stringwidth % Get the natural length of the string + addcoords % Add to the start to get the end. + + 2 index length % How many characters? + + dup % Add the offsets to each character + 6 index mul + exch 5 index mul + addcoords + + 5 index 3 index + chcount % How many padding characters? + + dup % Add the offsets for each pad. + 9 index mul + exch 8 index mul + addcoords + + /@endy xdef /@endx xdef + + % We now have the left and right edges (in user coords) + % of the text. Now we need only correct for the vertical + % displacements needed for the font and we can get the + % top and bottom edges of the enclosing box + + fontheight % Get the height and depth of the current font. + + @startx @starty addcoords + /@starty xdef /@startx xdef + @endx @endy addcoords + /@endy xdef /@endx xdef + newpath + @startx @starty moveto + @endx @starty lineto + @endx @endy lineto + @startx @endy lineto + closepath + includepath + grestore + + -awidthshow + end % $BoundingBox +} def + +% +% `image': +% +% Assume here that the image lands in the unit square. +% + +/image { + $BoundingBox begin + (image called\n) traceprint %%DEBUG + gsave + newpath + 0 0 moveto + 1 0 rlineto + 1 1 rlineto + -1 0 rlineto + closepath + includepath + grestore + + -image + end % $BoundingBox +} def + +/imagemask +{ + $BoundingBox begin + (imagemask called\n) traceprint %%DEBUG + gsave + newpath + 0 0 moveto + 1 0 rlineto + 1 1 rlineto + -1 0 rlineto + closepath + includepath + grestore + + -imagemask + end % $BoundingBox +} def + +% Just define this one out of existence +/framedevice { pop pop pop pop } def + +% Handle restoring VM --- this is all OK, except that we have to +% hang onto the bb info we collected while in the about-to-be-discarded +% environment + +/restore +{ + $BoundingBox begin + (restore called\n) traceprint %%DEBUG + tracedump %% HACK, but the only way I see right now to get this stuff! + bbox-llx bbox-lly bbox-urx bbox-ury + 5 -1 roll + -restore + /bbox-ury xstore /bbox-urx xstore + /bbox-lly xstore /bbox-llx xstore + end % $BoundingBox +} def + +% +% `showpage': +% +% Just draw the box around the figure and print the page, and then initialize +% the bounding box variables again. +% + +$BoundingBox begin +/temp-string 10 string def +end % $BoundingBox + +/showpage { + $BoundingBox begin + initgraphics + + (showpage\n) traceprint % DEBUG + dump-bbox % DEBUG + + /bbox-llx round_down + /bbox-lly round_down + /bbox-ury round_up + /bbox-urx round_up + + bbox-llx bbox-lly moveto % Make the box + bbox-llx bbox-ury lineto + bbox-urx bbox-ury lineto + bbox-urx bbox-lly lineto + closepath + + bwstroke % Draw the box. + +% Print the size of the bounding box both above and below the actual box + 0 setgray + %% /Courier findfont 10 scalefont setfont + %% bbox-llx 36 max bbox-lly 12 sub 36 max moveto + /Courier findfont 25 scalefont setfont %% changed by wlk + bbox-llx 36 max bbox-lly 29 sub 36 max moveto %% for Ghostscript + (%%BoundingBox: ) -show + bbox-llx temp-string cvs -show ( ) -show + bbox-lly temp-string cvs -show ( ) -show + bbox-urx temp-string cvs -show ( ) -show + bbox-ury temp-string cvs -show + + bbox-llx 36 max bbox-ury 12 add 740 min moveto + /-show load /print load ne %% added by wlk for Ghostscript + { %% added by wlk for Ghostscript + (%%BoundingBox: ) -show + bbox-llx temp-string cvs -show ( ) -show + bbox-lly temp-string cvs -show ( ) -show + bbox-urx temp-string cvs -show ( ) -show + bbox-ury temp-string cvs -show + } if %% added by wlk for Ghostscript + + init + -showpage + tracedump %% DEBUG + end % $BoundingBox +} def + +% +% BoundingBox functions: +% +% We accumulate the information about the bounding box into four variables. +% The data is stored in default coordinates. +% + +$BoundingBox begin + +/init { + /bbox-llx 99999 store + /bbox-lly 99999 store + /bbox-urx -99999 store + /bbox-ury -99999 store +} def + +/bbox-llx 0 def +/bbox-lly 0 def +/bbox-urx 0 def +/bbox-ury 0 def + +% +% - `includepath' - +% +% Incorporates the bounding box of the path into the bounding box info. +% ... Gets the bounding box in default coords + +/includepath { + (Adding a path: ) traceprint %%DEBUG + gsave + initmatrix + { + 0 setlinejoin + flattenpath + } stopped { + (Couldn't flatten the path\n) traceprint % DEBUG + grestore + gsave + initmatrix + } if + { pathbbox } stopped not + { + 4 2 roll % Just so we get lower-left first + 2 copy dump-coord %%DEBUG + dup bbox-lly lt { + /bbox-lly xstore + } { + pop + } ifelse + dup bbox-llx lt { + /bbox-llx xstore + } { + pop + } ifelse + + (; ) traceprint 2 copy dump-coord (\n) traceprint %%DEBUG + dup bbox-ury gt { + /bbox-ury xstore + } { + pop + } ifelse + dup bbox-urx gt { + /bbox-urx xstore + } { + pop + } ifelse + dump-bbox %%DEBUG + } if + grestore +} def + +% +% A nice black-and white line drawing function. +% + +/bwstroke { + 0 setlinewidth % Thinnest possible lines + 1 setgray % White first + [5] 0 setdash % Only half the line + gsave -stroke grestore + 0 setgray % Then black + [5] 5 setdash % On the other half + -stroke +} def + +% +% Stuff for text. +% + +% +% char-code string `chcount' occurs +% +% Counts the number of times a character appears in a string. +% + +/chcount { + 0 exch + { + 2 index eq { + 1 add + } if + } forall + exch pop +} def + +% +% - `fontheight' heightx heighty depthx depthy +% +% Returns the offsets to the lowest point and highest point in the current +% font. +% + +/fontheight { + currentfont begin + /FontBBox load aload pop + exch pop 0 exch + FontMatrix transform + 4 2 roll + exch pop 0 exch + FontMatrix transform + end +} def + +% key round_{down|up} - These will round the value of the given key +% up or down, as appropriate, to the nearest integer +/round_up { dup load ceiling cvi store } def +/round_down { dup load floor cvi store } def + +% key binddefinition - this will do a 'bind' on the procedure given by 'key' +/binddefinition +{ + dup where + { + exch + 2 copy + get bind put + } + { undefined } ifelse +} def + +% Given two numbers on the stack, return with just the smallest +/min { 2 copy ge { exch } if pop } def + +% Dito for the largest of the pair +/max { 2 copy lt { exch } if pop } def + +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % +% +% Debugging utilities +% + +/$tracedict where +{ % Trace package loaded... do the tracing + pop +% This is a debugging function to print out what is going on. +% Format <argn> <argn-1> ... <arg1> n <string> debug <argn> ... <arg1> +% (that is, the 'n' args will be *left* on the stack!) +/debug +{ + traceprint (\n) traceprint + dup 1 add % Now total number of args (including arg count) + copy + { + ( ) traceprint + trace= + (\n) traceprint + } repeat + pop % Remove the extra copy of the arg count +} def + +% Print out a coordinate on the stack: x y --- +/dump-coord +{ + (\() traceprint exch trace= (, ) traceprint trace= (\)) traceprint +} def + +% Print out bb's current notion of its bounding box + +/dump-bbox +{ + (Bounding Box: ) traceprint + bbox-llx bbox-lly dump-coord + (; ) traceprint + bbox-urx bbox-ury dump-coord + (\n) traceprint +} def + +tracebegin %% DEBUG + +} +{ % No trace package loaded, so don't trace. Stub out the various calls + +/traceprint { pop } def +/dump-coord { pop pop } def +/dump-bbox { } def +/debug { pop pop } def +/tracedump { } def + +} ifelse + +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % + +% Bind everything + +/xdef binddefinition +/xstore binddefinition +/addcoords binddefinition +/stroke binddefinition +/fill binddefinition +/eofill binddefinition +/show binddefinition +/widthshow binddefinition +/ashow binddefinition +/awidthshow binddefinition +/image binddefinition +/showpage binddefinition +/init binddefinition +/includepath binddefinition +/bwstroke binddefinition +/chcount binddefinition +/fontheight binddefinition + +/debug binddefinition +/dump-coord binddefinition +/dump-bbox binddefinition + +% Start it up. + +init + +end % $BoundingBox + +% end of bb.ps + +% $Log: bb.ps,v $ +% Revision 1.14 91/03/21 13:04:02 cosell +% Relocated the position of the constrained BBox info +% +% Revision 1.13 91/03/21 12:21:04 cosell +% Forced the %BoundingBox info to stay within the page boundaries +% +% Revision 1.12 91/03/21 12:15:17 cosell +% Added a tracing hook to bridge restores. +% +% Revision 1.11 90/07/02 08:48:40 cosell +% bbfig now correctly copes with empty paths +% +% Revision 1.10 90/06/27 10:47:22 cosell +% Added a bunch of improvements from Joe Pallas at stanford. +% +% Revision 1.9 90/06/26 10:50:20 cosell +% Stack got botched in the 'debug' stub +% +% Revision 1.8 90/06/25 09:34:51 cosell +% Minor bug in 'restore' +% +% Revision 1.7 90/06/25 09:29:58 cosell +% Added code to catch and deal with 'restore'. Thanks to Frank +% Jensen for finding this one +% +% Revision 1.6 90/06/25 09:23:26 cosell +% Small bugfix in the text-handling stuff +% +% Revision 1.5 90/06/10 09:04:02 cosell +% Changed the printed string to explictly say "%%BoundingBox" +% +% Revision 1.4 90/06/10 08:55:39 cosell +% Added 'bind' machinery to insulate this package from later redefinitions +% of things we need from the systemdict. +% +% Revision 1.3 90/06/10 08:28:53 cosell +% Added debugging hooks. They don't affect anything (and don't do +% anything) in the normal use of bbfig. But if the 'trace' package +% is loaded ahead of this, it'll print out some helpful info. Probably +% I'll end up removing all of this if/when I really get the package +% up to snuff. +% +% Revision 1.2 90/05/25 12:08:24 cosell +% Major improvements and tuneups: fixed it to really use its private +% discionary, and the most importnat: it now computes the bounding box +% in *default* coords +% +% Revision 1.1 90/05/23 08:18:54 cosell +% Initial revision +% This is Ned Bachelder's original version diff --git a/macros/generic/boxedeps/boxedeps.cfg b/macros/generic/boxedeps/boxedeps.cfg new file mode 100644 index 0000000000..98bb70a6e1 --- /dev/null +++ b/macros/generic/boxedeps/boxedeps.cfg @@ -0,0 +1,70 @@ + + %%%%% boxedeps.cfg + %% --- optional configuration file for boxedeps.tex + %% that provides a default driver specification + %% for use by the PostScript integration utility boxedeps.tex. + %% + %%% AIM: Make PostScript integration more driver-independent + %%% USE: Uncomment one of the \Set... commands in following table. + %% See documentation after \endinput. + + %% \SetepsfEPSFSpecial %% ******* will work for many: + %%% --- dvips, the Y&Y drivers, DirectTeX, CMacTeX, OzTeX>=1.7 + %% \SetEPSFMultiSpecial %% ******* may work for more + %% \SetTexturesEPSFSpecial %% Textures + %% \SetUnixCoopEPSFSpecial %% dvi2ps early unix + %% \SetNiponUnixEPSFSpecial %% dvi2ps j-version + %% \SetBechtolsheimDVI2PSEPSFSpecial and + %% \SetBechtolsheimDVITPSEPSFSpecial %% by S.P.Bechtolsheim + %% \SetLisEPSFSpecial %% dvi2ps by Tony Lis + %% \SetRokickiEPSFSpecial %% dvips by Tom Rokicki + %% \SetDVIPSoneEPSFSpecial %% DVIPSONE of Y&Y same as + %% \SetDVIWindowEPSFSpecial %% DVIWindow of Y&Y + %% \SetDirectTeXEPSFSpecial %% DirectTeX by Wilfried Ricken + %% \SetCMacTeXEPSFSpecial %% CMacTeX by Tom Kiffe + %% \SetOzTeXEPSFSpecial %% OzTeX (>=1.7) by Andrew Trevorrow + %% \SetOldOzTeXEPSFSpecial %% OzTeX 1.42--1.6x + %% \SetPSprintEPSFSpecial %% PSprint by Andrew Trevorrow + %% --- also for OzTeX versions <= 1.41 !! + %% \SetArborEPSFSpecial %% ArborTeX DVILASER/PS + %% \SetClarkEPSFSpecial %% dvitops by James Clark + %% \SetBeebeEPSFSpecial %% DVIALW by N. Beebe + %% \SetNorthlakeEPSFSpecial %% Northlake Software + %% \SetStandardEPSFSpecial %% Nonexistant: Placebo used + +\endinput + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + ***** DOCUMENTATION for boxedeps.cfg ***** + + ***** INSTALLATION: + + (1) Uncomment the line that corresponds to the +dvi-to-postscript printer driver that you use and comment out any +other such lines. + + (2) Place the modified file in one of your "TeX inputs" +directories. An end-user might put it alongside his TeX files. A +system operator might put it in a read-only directory. + + ***** USE: + + Place a command \input boxedeps.cfg in style file for your .tex +typescript. Or in its header. Then no command +\Set<driver>EPSFSpecial is needed in your .tex typescript, and as +a consequence, it becomes is perfectly portable between sites that +that are equipped with boxedeps.tex and such a configuration file. +Highly recommended for all typescripts that use several drivers, +say at home, at the office, on visit etc. + +NB: If you give a \Set<driver>EPSFSpecial after this file has been +input it will overrule this configuration file. Watch the log file +for sign of this; it can trip you up! But it can also be +convenient. + + + + + + diff --git a/macros/generic/boxedeps/boxedeps.doc b/macros/generic/boxedeps/boxedeps.doc new file mode 100644 index 0000000000..d534f4e218 --- /dev/null +++ b/macros/generic/boxedeps/boxedeps.doc @@ -0,0 +1,1242 @@ +%%%%% boxedeps.doc of Nov 1995 + %% + %%% POSTINGS: + %% --- ftp matups.matups.fr + %% This is the master copy in 1995. + %% Locate the full package on the CTAN servers + %% by using (while connected) the command + %% quote site index boxedeps + %%%% NEWS (11-95): + %% * BoundingBox trimming in percentage "pct" units. + %% * High resolution bounding boxes are used when available. + %% * Log file epsf.lst reports epsf files integrated; + %% use it as an inventory for exporting. + %% * EPSP the PC binary EPS format for including preview + %% as a Windows metafile bitmap or a TIFF bitmap + %% is now supported by this package. Beware that few + %% drivers on other platforms support it. + %%%% NEWS (1-95): + %% * \SetepsfEPSFSpecial works for the + %% several drivers that support the particular special syntax + %% first supported by Rokicki in dvips and used in his epsf.tex. + %% * Experimental feature: \SetEPSFMultiSpecial + %% works also for Textures. Intended to create ".dvi" files + %% for posting on the internet that will print with graphics + %% insertions on all major operating systems. Some drivers + %% produce spurious error reports but print correctly. + + ******************************************************* + + + ********* The BoxedEPSF Utility ********** + + by Laurent Siebenmann 1989-95 + + (in distribution since Winter 1991) + + + ******************************************************* + + --- THE DOCUMENTATION --- + + +COMMAND SUMMARY + + BoxedEPSF lets one integrate Encapsulated PostScript Files (EPSFs) +into TeX documents by making them behave as TeX boxes --- using the +commands in the following list. The user should promptly familiarize +him/her self with the left alligned commands; the indented ones are +less used. + + %%% Commands for article header or style file + \input boxedeps.tex %% obligatory (except for LaTeX, see below) + \input boxedeps.cfg %% can replace next line: + \Set...EPSFSpecial %% e.g. \SetOzTeXEPSFSpecial + \ShowDisplacementBoxes%\HideDisplacementBoxes %%alternatives + \SetEPSFDirectory{<directory pathname>} + \SetDefaultEPSFScale{<scale in mils>} + \EmulateRokicki + %%% EPSF insertion + \BoxedEPSF{<filename> scaled <scale in mils>} + %% scaled ... is optional + \tBoxedEPSF{...} %% 3 variants: + \bBoxedEPSF{...} + \cBoxedEPSF{...} + \EPSFbox{...} %% like Rokicki's syntax: + \EPSFfile{...} + %%% Adjustments that may preceed each \BoxedEPSF... + \TrimTop{<percentage>} + \TrimLeft{<percentage>} + \TrimBottom{<percentage>} + \TrimRight{<percentage>} + \TrimBoundingBox{<percentage>} + \hSlide{<dimen>} + \vSlide{<dimen>} + \ForceWidth{<dimen>} + \EPSFxsize=<dimen> + \ForceHeight{<dimen>} + \EPSFysize=<dimen> + \ForceOn (cf.\ForceOff) + + %%% Typical (minimal) Plain TeX example: + + \input boxedeps.tex + \input boxedeps.cfg + \midinsert + \centerline{\BoxedEPSF{gdisk.eps}} + \endinsert + \bye + +This list can serve to locate details by string search. Some +alternative older terminology is supported for compatibility (but not +recommended); it is found inside boxedeps.tex. + + *** LaTeX syntax variants *** + + BoxedEPS is compatible with LaTeX (2.09 or 2e). No change of +syntax is necessary. + + However, those who use LaTeX to the exclusion of other +TeX formats will find Alun Carr's "LaTeX wraper" boxedeps.sty +helpful to bring BoxedEPS into line with LaTeX conventions. +The following LaTeX syntax is valid as soon as the auxilliary file +boxedeps.sty is available to LaTeX. + +\usepackage[<option list>]{boxedeps} %% loads package, sets options + +Then \input boxedeps.tex must be omitted and \input boxedeps.cfg +also. The LaTeX option keywords with their Plain TeX equivalents +are: + + %% Driver support (use at most one) + epsf <==> \SetepsfEPSFSpecial + epsfmulti <==> \SetEPSFMultiSpecial + textures <==> \SetTexturesEPSFSpecial + unixcoop <==> \SetUnixCoopEPSFSpecial + niponunix <==> \SetNiponUnixEPSFSpecial + bechtolsheim <==> \SetBechtolsheimDVITPSEPSFSpecial + lis <==> \SetLisEPSFSpecial + rokicki <==> \SetRokickiEPSFSpecial + dvipsone <==> \SetDVIPSoneEPSFSpecial + dviwindow <==> \SetDVIWindowEPSFSpecial + directtex <==> \SetDirectTeXEPSFSpecial + cmactex <==> \SetCMacTeXEPSFSpecial + oztex <==> \SetOzTeXEPSFSpecial + oldoztex <==> \SetOldOzTeXEPSFSpecial + psprint <==> \SetPSprintEPSFSpecial + arbor <==> \SetArborEPSFSpecial + clark <==> \SetClarkEPSFSpecial + beebe <==> \SetBeebeEPSFSpecial + northlake <==> \SetNorthlakeEPSFSpecial + standard <==> \SetStandardEPSFSpecial %% (default!) + + %% Displacement Boxes (use at most one) + showboxes <==> \ShowDisplacementBoxes %% (default!) + hideboxes <==> \HideDisplacementBoxes + + %% Emulation of Rokicki's \epsfbox, \epsfxsize, \epsfysize + emulaterokicki <==> \EmulateRokicki + + %%% Typical (minimal) LaTeX example: + + \documentclass{article} + \usepackage[oztex,hideboxes]{boxedeps} + + \begin{document} + \begin{figure}\BoxedEPSF{gdisk.eps}\end{figure} + \end{document} + + +INTRODUCTION + + BoxedEPSF is a highly portable package for insertion of EPSFs +(Encapsulated PostScript Files) in TeX documents. It originated as +a fraction of a larger less portable package for several graphics +norms on the Mac (see BoxedArt.tex below) that was initially put +together for the GUTenberg special year for graphics, 1989. +BoxedEPSF was first posted in winter 1991, in response to Berthold +Horn's plea on the net in late 1990 for a standard for EPSF +integration, cf. his article in TUGboat 12 (1991) 377-381. The +use of bitmaps for preview is a technical obstacle to such a +standard and none has appeared since. BoxedEPSF is not the +standard he was calling for, but it seems to accomplish nearly as +much. + + PostScript is currently the unchallenged high performance +standard for electronic specification and typesetting of printed +graphics, while TeX is the unchallenged high performance standard for +the specification and typesetting of scientific manuscripts, minus +graphics. The convenient integration of PostScript graphics in TeX +manuscripts is clearly vital to the scientific publication process; +the BoxedEPSF package is a link in the integration chain. + + A PostScript printer is presumed to be the ultimate output device. +Is this an unfortunate restriction? In practice not; such is the +domination of PostScript printers. In addition, there are +increasingly computer based PostScript interpreters able to pilot +the screen and/or non-PostScript printers. (A new one +for Macintosh is T-SCRIPT tscript@teletype.com.) + + What of direct screen viewing? The Next-Step Graphical User +Interface (GUI) uses Display PostScript, an offshoot of +PostScript; no problem there. Another offshoot of PostScript is +PDF used by Acrobat viewers. Ghostview is a PostScript viewer +available on most unix workstations. The bigest chink in +PostScript's claim to universal acceptance is that only a tiny +proportion of GUIs exploit or even decently support PostScript. +Speed has been a stumbling block. Consequently, screen viewing of +PS graphics integrated in TeX frequently uses prefabricated +bitmaps as we shall further discuss below. + + + The main task of BoxedEPSF is to make EPSFs (Encapsulated +PostScript Files) behave for the TeX user like big characters or +boxes. In contrast, the \special command, the TeX primitive through +which such integration is normally accomplished, makes EPSFs behave +like dimensionless points. This is Knuth's recommendation, because +that permits TeX to typeset without any knowledge of the graphics +file. The box-like behavior is obviously more desirable from the +user's point of view. In the case of the EPSF norm, it is +attainable because TeX is clever enough to be able to read the EPSF +file to extract the dimensions of the bounding box of the graphics +object described. These are normally located in a comment line in +the header beginning "%%Bounding Box:" or better "%%HiResBounding +Box:". + + There are other packages that do the same essential job, +notably psfig of Trevor Darrell(1987), and T. Rokicki's "epsf.tex" +for his driver "dvips", but differences remain. This one is built, +above all, for portability and hence makes LOWEST-COMMON-DENOMINATOR +requirements on the driver. It does offer convenient adjustments +that others may not, eg. box trimming, and, above all, ready-made +adaptation to nearly all dvi-to-PostScript drivers. + + The basic requirement of BoxedEPSF is a "dvi-to-PostScript" +printer driver that for EPSF graphics implements in one way or +another Knuth's \special protocol. This \special should implement +scaling in some form since TeX cannot provide it. But translation +(=pushing the graphics around) can be done by TeX, which is +fortunate since some drivers (e.g. Textures' driver in versions <= +1.4 approx) do not bother to provide a \special command executing +translations. + + Until a standard for \special integration of EPSFs is well +established, BoxedEPSF will have to initialize the integration process +by using a driver-specific command of the form: \Set...EPSFSpecial (or +a corresponding LaTeX option in \usepackage[...]{boxedeps}). For +example, \SetOzTeXEPSFSpecial will initialize for the driver used by +OzTeX on Macintosh computers. (See a list of current alternatives +below.) This command can be put in the author's typescript header or +style file, but it is still better to put it in a configuration file +--- see mention of boxedeps.cfg below --- replacing +\Set...EPSFSpecial by \input boxedeps.cfg. + + Then, the primary command + + \BoxedEPSF{<filename> scaled <scale in mils>} + +scales by <scale in mils> the graphics object in the file <filename> +and inserts it at the current ".dvi" insertion point as a TeX box of +the dimensions of the bounding box scaled again by <scale in mils>. + + A tiny EPS test file gdisk.eps given below will let you run +trials. (Beware that many TeX screen previewers are still unable to +let you preview the graphics; but any printer of the PostScript norm +will let you run tests.) + + --- <filename> A file specification. This may be a simple +filename in case the file is in the default directory for TeX. + + More generally (but les portably!!), it can be a file pathname. +Better, one can separately specify the directory that will be the +directory in which TeX looks thereafter for simple EPSF names, by +typing + + \SetEPSFDirectory{<directory pathname>} + +For example, on a Macintosh, \SetEPSFDirectory{HardDisk:MyArtFolder:} +will direct TeX to the folder MyArtFolder of the volume HardDisk. And +\SetEPSFDirectory{:YourArtFolder:} will direct TeX to the subfolder +YourArtFolder of the directory that is the default directory for TeX. +Similarly for unix systems but with "/" in place of ":". + + Spaces in filenames or directory names are strictly forbidden +(usually already by TeX and drivers); this package gives a warning. + + For greater portability, please use in file names and directory +names only letters, digits, and perhaps one period ".". Beware of +conversions and confusions between upper and lower case letters. +Unix is case sensitive, but most other systems not; DOS even forces +to uppercase; while unix traditionally prefers lowercase. There is +a consensus that, for portability, lowercase letters only should be +used if at all possible, and failing that only uppercase. + + Also for portability, follow the DOS 8+3 rule: =< 8 +characters before an otioonal period and =< 3 after. To respect this +rule, public postings of BoxedEPSF, the macro file (for example) +bears the name "boxedeps.tex". + + [[To PC\DOS users: Slash / should replace backslash of the MSDOS +world, since backslash will upset TeX; if / does not work try \\.]] + + --- scaled <scale in mils> Optional. To conform to TeX syntax, +and avoid decimals most of the time, the scale is specified in mils +(=thousand'ths), rather than as a positive real number. (If you are a +precision freak, don't hesitate to add decimal parts of a mil.) + + If you specify no scale you get a default scale. This default +scale can be changed from its initial value of 1000 (for the rest of +the .tex file) by the command + + \SetDefaultEPSFScale{<scale in mils>} + + The scaling you select (however you do so) will always +be corrected by the TeX magnification factor. Thus if you select +scaling by 1000 mils at \magstep1 you in reality get scaling to 1200 +mils on the printed paper. + + There is a rather different way to specify scaling (championed +notably by Trevor Darrell since 1987); one can force width or height +to a specified dimension, by one (not both) of the commands: + + \ForceWidth{<dimen>} + \ForceHeight{<dimen>} + +This must precede the figure and normally applies to it alone. Any +such command takes precedence over any scaling command that might be +present. If you have two such commands, the last takes precedence. + + This forcing will persist indefinitely if you type + + \ForceOn + +and can then be stopped by + + \ForceOff + + There are some convenient uses of this "forced" dimensioning, for +example: + + a) To force neighboring figures to the same height or width. + + b) To maintain the exact same height for a figure through +minor revisions after TeX pagebreaks have been fixed. + + c) Artists may rescale their originals when they revise; +this will not affect the user if "forced" dimensioning is used. + +Incidentally, note that \ForceWidth{0.66\hsize} is perfectly +legitimate; similarly for all dimension specifications. + + On the other hand, scaling is the only right approach if you +have a well proportioned line diagram with included labelling of a +known point size. You scale to make the labels of about the same +size as that of the printed text. + + In actual practice, the "BoundingBox" posted in the EPSF is more +often than often not far from what it should be, namely the least +rectangle containing the ink that will print the graphic object; it +tends to be somewhat larger. Thus, the \Trim... commands described +below are provided to optionally correct the box to fit the object. +Since such corrections require the human eye and some trial and error +it is reasonable to cast about for tools that will instead +automatically correct "BoundingBox" marked in the EPS file. (See for +example the keywords ghostscript ane bb4gs.ps.) + + For diagnostic purposes, one has: + + \ShowDisplacementBoxes, \HideDisplacementBoxes + +to show (with a black frame), respectively hide, the corrected scaled +and positioned bounding boxes. The physical term "displacement" is +used to remind you that these are boxes that displace other boxes, like +TeX character boxes (see the TeXbook Chap 11), or indeed any TeX box. +In case you make the graphics neatly fit into this displacement box the +term "bounding box image" would be justified, but just as for TeX +characters, this is not always how things work out (cf. TeXbook p.63). + + For the sake of users who do not have preview of their EPSFs +the default has been set to \ShowDisplacementBoxes. It is +demoralising to beginners to see nothing at all! + + Before any individual \BoxedEPSF{...} command, one can insert +commands to adjust the bounding box: + + \TrimBoundingBox{...} + \TrimTop{...} + \TrimLeft{...} + \TrimBottom{...} + \TrimRight{...} + + Each such command takes a percentage argument as in + + \TrimTop{5pct} + +This means to trim off of the top of the BoundingBox five percent +of its height. One must not forget the percentage units +specification "pct". Indeed it is equally OK to specify a +TeX dimension unit: pt, bp, cm, etc. For example + + \TrimLeft{15bp} + +trims 15 big points (PostScript units) off of the left side of the +original BoundingBox (not the image on paper). + + Both percentage and dimension units remain valid if the user +subsequently changes scale on paper. + + The use of percent units is the best choice. Typically the user +sees a scaled image and so cannot perceive dimensions on the art +source file. Also, percentage specifications will remain valid if the +artist changes the scale of his source. In practice, even the user may +want to dramatically increase the source file scale to enhance the +precision of bitmapped previews supplied automatically by an art +program such as Adobe Illustrator, or he may reduce scale to make the +bitmaps smaller. + + The names of these trimming commands say what they do; note +that they do NOT mask off part of the object when the box becomes +too small; thus trimming is NOT is commonly referred to as "clipping". + + + TeX is pretty good at shunting boxes around. But the command to +*slide* an image around without changing its displacement box nor +shunting neighboring boxes is not readily accessible. So we provide: + + \hSlide{...} + \vSlide{...} + +which respectively slide horizontally to the right and vertically down +in dimension units of the TeX page, NOT the artist's page. + + + A good order of steps for implanting a graphics object is to trim +using percentage units, then scale, and finally, slide, or shunt using +TeX tools. + + + By default, the box is produced vertically "centered" using \vcenter. +This seems most agreeable in case of linefigures in text --- though +mostly it does not matter. The "height" mentioned above is the sum of +the height and the depth of this box (with rare exceptions mentioned +immediately below). + + The two other obvious choices of baseline are also available: + + --- \tBoxedEPSF{...} baseline at top as for washing hanging on a +clothesline. + + --- \bBoxedEPSF{...} baseline at bottom as for trucks on a highway + + The default choice is + + --- \cBoxedEPSF{...} baseline centered as for khebabs on a skewer. + +More precisely, it is centered on the "axis" of mathematics in prose, +which for computer modern ten point system is 2.5pt above the +baseline; this makes \cBoxedEPSF very convenient for insertion of +small "linefigures" in prose; for example, $\left(\BoxedEPSF{mylinefig +scaled 300}\right)$ should neatly fit "mylinefig" between parentheses. + + Beware, however, that TeX's refusal of negative heights or depths +for boxes leads to surprising results with \cBoxedEPSF when very tiny +linefigures occur (so tiny they do not reach the baseline). For example, +if the scaling is zero, the height is the math axis height, and the depth +is zero! If such extreme cases interest you, experiment with \hrule +\cBoxedEPSF{myfig scaled 0} \hrule. No such subtleties occur with +\tBoxedEPSF and \bBoxedEPSF! + + You can change the default behavior to "baseline at top" (for example) +by the command + + \let \BoxedEPSF=\tBoxedEPSF + + + + ****** Some file trickery ****** + + (A) The first trick is standard; if several authors on different +platforms are collaborating on one TeX typescript, each should use +boxedeps.cfg to specify the DVI-to-PS driver and not a command +\Set...EPSFSpecial Then provided each +author preserves and protects his boxedeps.cfg all other parts of the +".tex" typescript can be maintained identical for all authors. + + (B) The following comments respond to requests and suggestions of +Douglas Gray-Stephens <gray@SCR.SLB.COM>. + + Ad hoc user-macros can perform file searchs that might at +first sight seem beyond the scope of BoxedEPSF. + + 1) Graphics objects to be reused can be macros and they need not be in +a specific directory. Since \SetEPSFDirectory respects TeX grouping, +one can set out a definition as follows: + + \def\ourlogo#1{\bgroup\SetEPSFDirectory{<logopathname>}% + \BoxedEPSF{<logoname> scaled #1}\egroup} + +Then one inserts the boxed logo using \ourlogo{<scale>}. The directory +for EPSFs (if any) is momentarily changed but is the same before and +after \ourlogo{<scale>} is used. + + If just a few graphics objects are to be reused often, economy +and speed are best assured by storing the graphics object is a TeX box. +Suppose for example that a logo is to be used on each page. Then one +can prepare the box by + + \newbox\logobox + \bgroup\SetEPSFDirectory{<logopathname> + \global\setbox\logobox=% + \hbox{\BoxedEPSF + {<logo file name> scaled <scale in mils>}}\egroup + \gdef\Logo{\copy\logobox} + +Thereafter, \Logo places the logo very quickly and can be reused +at no extra cost to TeX. + + 2) It is possible to use simultaneously several graphics directories by +further exploiting TeX grouping. Suppose, for example, that one wants +an extra directory <graphpath> for scientific graphs. Then one can +define \BoxedGraph behaving just like \BoxedEPSF but always using +directory <graphpathname>, as follows: + + \def\BoxedGraph#1{\bgroup\SetEPSFDirectory{<graphpathname>}% + \BoxedEPSF{#1}\egroup} + +\BoxedGraph is insensitive to occurences elsewhere of \SetEPSFDirectory. + + 3) A useful special case of this approach gives a "wildcard" macro: + + \def\BoxedEPSFx#1{\bgroup\SetEPSFDirectory{}% + \BoxedEPSF{#1}\egroup} + +(This of course assumes one has used or will use +\SetEPSFDirectory{<pathname>}, for otherwise \BoxedEPSFx will behave +much like \BoxedEPSF.) One can use either "full" or "relative" file +specifications in + + \BoxedEPSFx{<filespec> [scaled <scale>]} + +Here "full" means no separator out front, and "relative" +means separator out front. The separator is the character "/" for +unix or PC and ":" for Macintosh. In the relative case, your current +directory behaves as root; normally, this is the directory of +the .tex file you launched. + + Example for the Macintosh: + + \BoxedEPSFx{:art:monalisa.eps} + +This searches in "art" a subdirectory of the default directory +for an EPS file called monalisa.eps. + + + + ****** Selecting PostScript printer drivers ****** + + The obstacle to portability is a lack of standard syntax for +the \special commands; they vary from driver to driver. This is +overcome by using a local standard "fake special" within boxedeps.tex, +and relating each driver to it. + + This local BoxedEPSF standard is a two-argument macro + + \EPSFSpecial#1#2 + +where #1 is <file spec> and #2 is <scale in mils>. A different +definition is given for each driver. For example, for Textures, the +user types (in his article header or in boxedeps.cfg): + + \SetTexturesEPSFSpecial + +and this package then institutes essentially the definition: + + \gdef\EPSFSpecial#1#2{\relax + \special{postscriptfile #1 scaled #2}}% + +Actually, it is not quite that simple, because we allow decimal +scaling factors like 726.7 (mils) while Textures <=1.6 required integer +values. + + Definitions for most known drivers are provided: + + %% \SetepsfEPSFSpecial %% ******* will work for many: + %% ----- dvips, the Y&Y drivers, DirectTeX, CMacTeX, OzTeX>=1.7 + %% \SetEPSFMultiSpecial %% ******* may work for more + %% \SetTexturesEPSFSpecial %% Textures + %% \SetUnixCoopEPSFSpecial %% dvi2ps early unix + %% \SetNiponUnixEPSFSpecial %% dvi2ps j-version + %% \SetBechtolsheimDVI2PSEPSFSpecial and + %% \SetBechtolsheimDVITPSEPSFSpecial %% by S.P.Bechtolsheim + %% \SetLisEPSFSpecial %% dvi2ps by Tony Lis + %% \SetRokickiEPSFSpecial %% dvips by Tom Rokicki + %% \SetDVIPSoneEPSFSpecial %% DVIPSONE of Y&Y same as + %% \SetDVIWindowEPSFSpecial %% DVIWindow of Y&Y + %% \SetDirectTeXEPSFSpecial %% DirectTeX by Wilfried Ricken + %% \SetCMacTeXEPSFSpecial %% CMacTeX by Tom Kiffe + %% \SetOzTeXEPSFSpecial %% OzTeX (>=1.7) by Andrew Trevorrow + %% \SetOldOzTeXEPSFSpecial %% OzTeX (1.42--1.6x) + %% \SetPSprintEPSFSpecial %% PSprint by Andrew Trevorrow + %% --- also for OzTeX versions <= 1.41 !! + %% \SetArborEPSFSpecial %% ArborTeX DVILASER/PS + %% \SetClarkEPSFSpecial %% dvitops by James Clark + %% \SetBeebeEPSFSpecial %% DVIALW by N. Beebe + %% \SetNorthlakeEPSFSpecial %% Northlake Software + %% \SetStandardEPSFSpecial %% Nonexistant: Placebo used + +and others will be on request --- see appendix. + + -------------------- + + OzTeX note June 1994: OzTeX 1.7 revised its \special for +EPSF insertion to place the lower left corner of the bounding box +at the TeX insertion point; \SetOzTeXEPSFSpecial is revised in +consequence. Users of OzTeX versions 1.4.2 to 1.6 must now either +update to OzTeX1.7, or use \SetOzTeXEPSFSpecial\PSOrigintrue or +\SetOldOzTeXEPSFSpecial in place of \SetOzTeXEPSFSpecial. Otherwise +the updated boxedeps.tex will badly misplace EPSFs. + + Since OzTeX's own \special syntax has changed so often, +where archival ".tex" files are involved, consider using +\SetepsfEPSFSpecial based on a stable syntax of Rokicki; this will +work with OzTeX in versions >= 1.7. + + -------------------- + + + ****** Compatibility with T. Rokicki's integration package ****** + + For users of Rokicki's integration package epsf.tex +attached to his DVI-to-PS driver dvips, we support the following +alternative syntax. + + \EPSFbox or \EPSFfile equivalent to \bBoxedEPSF. + \EPSFxsize=126pt equivalent to \ForceWidth{126pt} + \EPSFysize=76pt equivalent to \ForceHeight{76pt} + +This compatibility makes it straightforeward to move a manuscript +prepared with the most basic features of epsf.tex to a TeX site with +any other driver. + + Rokicki uses all-lowercase commands (epsf for EPSF); hence +his epsf.tex can be loaded along with boxedeps.tex without +conflict. If, on the other hand, you want BoxedEPSF to accept the +lowercase syntax and execute the three commands in place of +epsf.tex, you can type \EmulateRokicki. + + The (undocumented) \special syntax of dvips employed by +epsf.tex has gradually become widespread in other drivers; it is +this syntax on which \SetepsfEPSFSpecial above is based. + + -------------------- + + + ****** Known Problems ****** + + 1) The process of reading bounding boxes may prove annoyingly slow +on smaller computers when inserts are numerous. This problem will +be lessened if you can make the "BoundingBox" comment one of the +first in each PostScript file. The larger BoxedArt.tex package for +Macintosh users provides a complete cure through use of a "graphics +specification file", which can be read quickly. + + 2) TeX permanently uses up the string space needed to record the +(full) name of each EPS file it opens. If you are short on string +space use succinct EPS file names like F1, F2, ... and put your TeX +file in your graphics directory to make the default directory +coincide with the graphics directory. Then \BoxedEPSF{F1} will use +up just two string characters. + + 3) Early Textures problem (not in versions >=1.4??): PostScript +files that have a resource fork may upset the Textures driver. +Typically, nothing after the figure will print. This can be cured +by deleting the resource fork. For a PostScript file of +Illustrator88, the preview graphics are in a PICT resource; try +deleting all resources EXCEPT this PICT. + + 4) A common driver problem: EPS files seldom include the +PostScript fonts they need. Usually this does not cause a problem, +because (hopefully) the required font is already present in the +printer, or at least will be downloaded to the printer for the job +in which the EPSF is embedded. + + However, if necessary the driver should attempt to locate and +include the fonts needed. Unfortunately, few do. (Textures >= 1.7 and +DVIPSONE are admirable exceptions.) The *user* is then obliged to +intervene to assure the presence of the fonts. Fortunately an EPSF +header comment + + %%DocumentFonts: ... + +usually tells exactly which fonts are needed. Here are two +ways to download them: + + (a) Use a utility to download the fonts before the printing job is +run. (For Macintosh look for the name "LaserWriter [Font] +Utility".) + (b) Artificially employ in the TeX manuscript all the fonts +required for the EPS file; they are listed in the header. To +avoid adding an extra page to the output one can have the extra +material printed off-page using say + + \rightlap{\smash\hbox{\kern\hsize <text using fonts for EPSFs>}} + +This approach (b) makes the TeX document portable without special +instructions. However (b) sometimes fails; for example if the EPS +file uses CM/PS type1 Adobe fonts while the main text uses CM fonts of +the classical metafont sort. + + (c) Where figure labels are concerned, one can usually outright +avoid this font inclusion problem by puting the labels in a TeX +overlay, using, for example, the utility "labelfig.tex" +(often posted as a companion to boxedeps.tex). + + Laurent Siebenmann + Mathematique, Bat. 425, + Univ de Paris-Sud, + 91405-Orsay, + France + + lcs@topo.math.u-psud.fr + + + Fax number: 33-1-6941-6348 + + + REFERENCES + + The following may give you leads to alternative solutions. + + --- PSFIG a package by Trevor Darrell (for at least two drivers) +available by anonymous ftp from whitechapel.media.mit.edu +(18.85.0.124) in ./psfig or linc.cis.upenn.edu (130.91.6.8) in the +directory ./dist/psfig. + + --- Merging PostScript Illustrations: Gerald Roylance 1987, 1989, +see MIT AI Laboratory Working Paper 299a; this package supports dvi2ps +and DVILASER/PS. + + --- dvips and epsf.tex by by T. Rokicki <rokicki@Neon.Stanford.EDU> + + --- Une meilleure integration du graphisme Macintosh, par Laurent +Siebenmann, Cahiers GUTenberg, No. 4 (Dec 1989), pages 29-38. The +native Macintosh grapics norm is called PICT. TeX has not been able to +read PICT resources and files, as the resources are not files and the +files are "binary". Nevertheless, good integration under Textures (and +subsequently other Macintosh TeX implementations) has become possible +with the help of a preprocessor "ArtDealer" and the notion of a +"graphics description file". The strong points of this approach are +speed and compactness. Portability poses some problems. These ideas are +implemented by the parallel package consisting of BoxedArt.tex, +BoxedArt.doc, and ArtDealer available (hopefully) from the same sources +as this package. + + --- Nicolas Jungers <EDITEX@BUCLLN11.BITNET> two postings in the +GUTenberg forum <GUT@FRULM11.BITNET> 9 Nov 90 and 17 Nov 90. [A good +"do-it-yourself" kit!] + + --- Michael Ferguson <mike@inrs-telecom.uquebec.ca> espouses the +\ForceHeight{...} approach in Cahiers GUTenberg, No. 3 (May 1989); for +many drivers, it does not require TeX to read the EPS file. N. Beebe +indicates that his macros are available for DVIALW. + + +APPENDIX: A FIRST QUICK TEST OF BoxedEPSF + + Hopefully you have found your PostScript printer driver in the +above list of \Set...EPSFSpecial commands. In that case, try the +following test to check that this package is working + + ------ cut here + + %%%% test.tex for Plain TeX; by puting + %% everything from \input to ZZ into the middle of a LateX file. + + \input boxedeps.tex + \Set...EPSFSpecial %%%% complete this line!!!!!!!! + \ShowDisplacementBoxes%\HideDisplacementBoxes %%alternatives + \null\vfill\vfill + AA\BoxedEPSF{gdisk.eps scaled 500}ZZ + %% lower case "8+3" convention for file names + \bye + + %%%% test.tex for LaTeX (2e) + \documentclass{article} + \usepackage[standard,showboxes]{boxedeps} + %% change "standard" to indicate your PostScript printer driver + %% or omit and rely on boxedeps.cfg configuration + %% showboxes --> hideboxes for final version + \documentclass{article} + \usepackage[oztex,hideboxes]{boxedeps} + + \begin{document} + \begin{figure}AA\BoxedEPSF{gdisk.eps scaled 500}ZZ\end{figure} + \end{document} + + ------ cut here + %!PS-Adobe-2.0 EPSF-1.2 + %%Title: gdisk.eps + %%Remark: A simple test file + %%Remark: DELETE SPACES BEFORE ALL %% (especially for Textures) + %%Pages: 0 + %%BoundingBox: 216 216 432 432 + %%EndComments + + 72 72 scale % units are now inches instead of big points + newpath + 4.5 4.5 1.5 0 360 arc + closepath + 0.9 setgray + fill + + ------ cut here + + The files test.tex and gdisk.eps should be in the same +directory. + + A grey disk should appear fitting snuggly between AA and ZZ. +It should be neatly bounded by a square (the displacement box). + + Once this test is working you should be able to elaborate and +test all features. + + If it does not work, examine the TeX log for helpful +comments. + + If the one fault is that the box is blank on printing, test +settings for other drivers. In case you have no clue about your +printer driver, a sequence of commands of the form + +\Set...EPSFSpecial \string\Set...EPSFSpecial +\vfill\vfill + AA\BoxedEPSF{gdisk.eps scaled 500}ZZ\vfill\eject + +will conveniently try out *all* possibilities in a single TeX run. + + + APPENDIX: HOW TO GET SUPPORT FOR YOUR DRIVER + + To get support for your dvi to PostScript printer driver, +please send the \special syntax required to insert a file myfile.eps +with scaling 76 percent! + + For example, the answer for the ArborText DVILASER/PS driver +was: + + \special{ps: epsfile myfile.eps 760} + +And that was (almost) enough to let me program \SetArborEPSFSpecial. + + One more scrap of information is essential. Some \special's +for EPSFs place the lower left corner of the (scaled) bounding box at +the TeX insertion point, and others place the lower left corner of the +artist's page at the insertion point. No other choice seems consistent +with Knuth's recommendations in the TeXbook. Textures and ArborTeX +belong to the first type, while OzTeX (versions <=1.6x) and Rokicki's +dvips belong to the second. The first type of driver must read the +"bounding box comment" in the EPS File header. Please report on the +basis of documentation and/or experimentation, which type is in +question. An experimental test routine is provided below. + + In general, some testing and/or driver documentation may be +needed to clear up lingering questions. For example, are decimals +allowed in in the scaling specification? For ArborTeX I believe the +answer is no. + + An information form is included below for those who would like +to see BoxedEPSF adapted to another driver. + + + APPENDIX: AN INFORMATION KIT FOR OTHER DRIVERS + + -------------------------------cut +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %%% spectest.tex for Plain TeX + %%% Test to discover which point in + % the graphics page (plane) your \special + % command distinguishes and identifies to + % the TeX insertion point. + % + % --- Put the file gsquare.eps into the same folder as + % TeX and this testfile. Hopefully this will make + % gsquare.eps accessible to the printer driver. + % + % --- Complete the \special{... gsquare.eps ...} command below + % as your driver documentation recommends for printing + % the EPSF gsquare.eps --- without any scaling, or other + % refinement. For example + % \special{ps: epsfile gsquare.eps 1000} + % is suitable for the ArborteX driver. + % + % --- Typeset this file + % + % --- Print the resulting .dvi file using your driver. + % + % INTERPRETATION: + % + % If the black box lies in the square, the + % distinguished point is the lower, left-hand corner of the + % PostScript bounding box. + % + % If the black box lies outside the square, the + % distinguished point is the lower, left-hand corner of the + % artist's page, i.e. the the PostScript origin. + % + % If the square is missing, your driver has probably not found + % the EPS file gsquare.eps, or you have formulated the \special + % command incorrectly. Follow driver instructions more + % carefully. + % + % --- report results to Laurent Siebenmann + % <lcs@topo.math.u-psud.fr> + % on the special reply "reply.doc" form provided below. + % + % + + \null + \vfill + \vskip -1 in + \moveright 1 in \vbox{\hrule height 1 in width 1 in} + \vskip 1 in + \special{... gsquare.eps ...}%% please carefully adjust this + \eject + \bye + + %% end of spectest.tex + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + -------------------------------cut +%!PS-Adobe-2.0 EPSF-1.2 + %%Title: gsquare.eps + %%Remark: Another simple test file + %%Remark: DELETE SPACES BEFORE ALL %% (especially for Textures) + %%Pages: 0 + %%BoundingBox: 216 216 432 432 + %%EndComments + + 72 72 scale % units are now inches instead of big points + + newpath + 3 3 moveto + 3 6 lineto + 6 6 lineto + 6 3 lineto + closepath + 0.8 setgray + fill + + -------------------------------cut +%!PS-Adobe-2.0 EPSF-1.2 + %%Title: heat.eps + %%Remark: Another simple test file + %%Remark: DELETE SPACES BEFORE ALL %% (especially for Textures) + %%Pages: 0 + %%BoundingBox: 216 216 432 432 + %%EndComments + + 72 72 scale % units are now inches instead of big points + newpath + 4.5 4.5 1.5 0 360 arc + closepath + 0.9 setgray + fill + + /Times-Italic findfont + .8 scalefont + setfont + 3.75 4.3 moveto + 0 setgray + (Heat) show + + -------------------------------cut + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %%% reply.doc %%% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + INFORMATION FORM for adaptation of BoxedEPSF + to other "dvi-to-PostScript" printer drivers + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + Please provide information on the following items: + + --- Name and email address(es) of correspondent. + + --- Driver information: Name, version, date, copyright, vendor, +computer(s) served, price etc. + + --- Syntax required to print the EPS File gsquare.eps scaled to +76 percent using a command of the form \special{... gsquare.eps +...}. Is scaling to exactly 76.33 percent available? + + --- More info on \special. + + --- Location of the distinguished point. (Report result of test +in spectest.tex above). + + --- Source(s) of your EPSFs. + + --- Do you progam TeX? PostScript? + + A trial adaptation to your driver will be returned with +an update of BoxedEPSF. Thank you for cooperating! + + Laurent Siebenmann + Mathematique, Bat. 425, + Univ de Paris-Sud, + 91405-Orsay, + France + + lcs@topo.math.u-psud.fr + + Fax number: 33-1-6941-6348 + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + -------------------------------cut + + + + APPENDIX. HOW ARE THE EPS GRAPHICS FILES BEING CREATED? + + While everyone admires PostScript graphics, few TeX users are +entirely happy with their tools for producing the EPSFs. As soon +as your integration problem has been disposed of, this one will be +back to haunt you! Here are a few notes that may help. + + a) Illustrator on the Mac by Adobe Corp is a MacDraw-like program +that uses the EPSF norm. It is favored by professionals since it is +geared for highest quality output. + + b) DrawOver 1.0 copyright Michael Everest 1986, is a converter to +EPSF from the PICT graphics norm of the Macintosh, a norm for which +there are many excellent drawing programs such as MacDraw. It was +distributed with Illustrator 88 on the Mac. To get preview, and +sometimes even to print, its output has to be "validated" by passage +through Illustrator. The original DrawOver is aging inasmuch as it +handles the PICTs of more recent MacDraw versions less and less +well. One does best by using PICT files (re)generated by MacDraw +versions anterior to MacDrawII. Illustrator 3.0 included an +updated DrawOver. From Adobe, there is also a converter Streamline +for PICT, TIFF and MacPaint files. + + c) LaserWriter >= 8.1.1 of 1994 provides an option to "print" +almost any graphics objects to file of EPSF type. This approach +probably going to become the dominant one for Mac users. It has been +available on ftp.apple.com in directory dts and is distributed with +Systems >+ 7.5. Some bugs remain to be eliminated. In a pinch consider +converting the more reliable "PS job" files to EPSF form using bb.ps +or bb4gs.ps as described below. Pioneering users should be sure that +the graphics object well within the page being used; one way is to +use an big page as provided say by the Agfa printer configuration +file. + + d) fig and xfig by Micah Beck, Cornell University +<beck@cs.cornell.edu> are MacDraw-like programs for unix and unix +X-windows, for which a translator transfig exists to EPSF norm. + + e) Naked PostScript code. PostScript is a beautiful language, and the +three Adobe manuals are very helpful. + + f) Aldus Freehand on the Macintosh: see Berthold K.P. Horn's +comments below; cf Aldus Intellidraw below. + + g) Canvas (Denaba Software) on Macintosh in versions from 1991 +(3.0) on will have the ability to save a file in EPS format (and +also PICT and Illustrator 88 formats etc., the most impressive list +so far). + + h) Classic MacDraw, MacDraw Pro, indeed all versions from 1991 of +MacDraw on Macintosh, on will hopefully have the ability to save a +file in EPS as well as PICT format. At the same time Apple is +producing more and more non-PostScript printers... + + i) CricketDraw and CricketGraph + + ***************************************** + + Several users have kindly extended and updated the above list! + + Berthold K.P. HORN mentioned many possibilities: + +(*) Aldus Freehand on the Mac is a more sophisticated tool for +generating graphic illustrations than Adobe Illustrator. Both are +constrained to basically two-dimensional patterns. Both can +produce output in EPS form. [[See the "export" menu item, and use +the simple or Mac version of EPS format, not the IBMPC version that +yields a partly binary file. The Mac version includes a PICT +resource containing a bitmap visible in the Textures or OzTeX preview. +Aldus Freehand freehand also imports PICT resources via the Mac +clipboard, and this provides an interesting alternative to +DrawOver. This conversion sometimes handles MacDrawII PICT +files better than DrawOver. Freehand, unlike Illustrator, has +its own binary file format.]] + +(*) Micrografx Designer on the PC is a more sophisticated tool for +generating graphics illustrations than Adobe Illustrator. It is the +PC's answer to `MacEnvy', since it provides a Windows based tool that +is about as good as any on the Mac. Designer is also constrained to +basically two-dimensional patterns. It can produce output in EPS +form. + +(*) There are also CAD/CAM applications that run on high end PC's, Sun +workstations that can handle `solid modelling' of three dimensional +objects, but they are an order of magnitude more expensive, so few +people have access to them. + +(*) Illustrate on the Symbolics LispMachine was one of the first +drawing programs and is still used quite a bit. It can produce output +in EPS form. Very similar features to the other 2-D illustration +applications mentioned above. + +(*) Screen Dumps. Another useful source of graphic illustrations are +screen dumps available on LispMachine, Windows on PC, and on Mac in +EPS form. OF course, they are in bitmap form so very limited in +quality and not resolution-independent, but useful for illustrating +program operations. + +(*) Paint Programs. On the Mac and the PC there are programs that +instead of manipulating curves and areas work directly with bitmaps. +The output can be in EPS form. But same drawback as screendumps. Not +used much. + + Max CALVIANI <fisica@astrpd.unipd.it> mentions + +(**) Mongo or Supermongo ... superb ... produce a .ps file ... on +vax/vms, also under Unix. They are copyrighted, Mongo costs approx +500 USD, SuperMongo only 250 USD. + + Antonio POSSOLO in Seattle <antonio@atc.boeing.com> makes +recommendations for unix: + +An excellent tool to generate postscript figures in Unix is the S +programming environment for data analysis and graphics, +originally from AT&T Bell Labs, and S-PLUS, a superset [of S] +from Statistical Sciences, Inc. (Seattle, Washington, USA). This +is not a drawing tool in the sense of Adobe's Illustrator, or +MacDraw: instead, it is driven by issuing drawing commands. S is +described in R.A. Becker, J.M. Chambers, & A.R. Wilks (1988) +"The New S Language", Wadsworth & Brooks/Cole, and you will find +there many examples of its capabilities to produce beautiful +pictures (note the postscript() command, in particular, as means +to generate postscript output). + +============================= +Aldus (now Adobe) Intellidraw +(report by Alun J. Carr <ajcarr@ccvax.ucd.ie> Nov 1995) + +An excellent cross-platform (Mac and Windows) drawing package. It is +extremely flexible, if a little non-intuitive at times, and is capable of +producing top quality illustrations. On the Mac, Intellidraw can import +PICT, TIFF, and EPS graphics, although only the PICT variety are editable +in the program. Similarly, it can export in a few formats: PICT, EPS, +Illustrator 88, and Illustrator 1.1. I highly recommend this application, +particularly at its low price (less than 150 Irish pounds when I bought +version 2). + +============================= +A hint on generating EPS from Cricket Graph III on the Mac +(report by Alun J. Carr <ajcarr@ccvax.ucd.ie> Nov 1995) + +Using LaserWriter 8.3, printing to an EPS file from Cricket Graph produces +a very wrong BoundingBox. I have found that the following approach produces +an excellent EPS file: + +1) In Cricket Graph `Save As...' a PICT. + +2) Change the creator of the PICT to ttxt (I use Type Resolve 2.0.1, which +is a very handy drag-and-drop utility). + +3) Open the PICT file in SimpleText (Apple's current TeachText replacement). + +4) Print to an EPS file using the LaserWriter 8.3 driver. + +The bounding box is very close to being correct (usually within a +millimetre or two), and the Postscript code is of high quality and very +standard. + + + + **************************************** + + +Determining Bounding Boxes via bb.ps and bb4gs.ps + + Many postscript files originally created without regard to +EPSF standards will successfully function as EPSFs if they are +provided with a suitable Bounding Box comment in the header. Ned +Bachelder has distributed a PostScript "header" file bb.ps since 1990 +(modified by Bernie Cosell <cosell@bbn.com>) that will cause a +following Postscript file to have its bounding box marked +numerically and graphically on printing. + + William L. Kath <kath@nwu.edu> has distributed a +version modified for ghostscript (see below) called bb4gs.ps; it +is included in the unix ghostscript distribution. + + +Ghostscript. + + These computer-based Postscript interpreters with +electronic rather than physical output were initially programmed by +Peter L. Deutsch, and have become of increasing interest for TeX +preview. + + Ghostscript's public FTP site for all platforms is: +ftp.cs.wisc.edu in the directory: /pub/ghost. + + These Postscript interpreters are certainly of great +interest for PostScript programming. + + The preparation of preview bitmaps for EPSFs is +another important use. + + The frustration engendered by using PostScript graphics +without preview has been major obstacle to the use of PostScript +with TeX. The Adobe standard for Macintosh previewing of +encapsulated PostScript graphics is part of the EPSF standard +available from ftp adobe.com, and involves addition of a bitmap as +a PICT resource number 256. [There is a variant for PC supported by +DVIWindo of Y&Y and by DVIWin (on CTAN).] + + +Building Macintosh Preview for EPSFs. + + [Similar remarks apply to PC's under MSWindows.] + + There is shareware utility called epsConvert by Sam Weiss +1993-- (currently $25, Artemis software). It will convert many EPS +files to a format valid for Adobe Illustrator, which in turn will +provide the PICT bitmap preview. In conjunction with LaserWriter >= +8.1.1, it will also provide vectorized PICT resource preview. + + Ghostscript can be adapted to provide the PICT resource +just mentioned (and Bounding box comment) in a mechanized way. +(Is batch mode still missing? And automatic BoundingBox +insertion on demand?) + +PS2EPS+ by Peter Lerup <ptl@automation.alfalaval.se> + (reported by Alun J. Carr Nov 1995) + +This is a freeware application for the Mac, available from any +Info-Mac mirror in the directory /gst/grf/ under the name +ps-to-eps-plus-10.hqx. It uses Peter Lerup's own Mac port of +Ghostscript (v2.5) to interpret EPS files that have no preview, +and it then allows a PICT preview to be attached in Mac or PC +preview format, and also for the image to be saved separately as +a PICT or TIFF graphic. A very handy tool. + + -------------- + + +SOMMAIRE FRANCAIS: boxedeps.tex d'efinit des macro-commandes + qui permettent d'int'egrer dans un document TeX des + objets graphiques de norme EPSF, tout en accordant + `a chacun le statut d'une bo^ite TeX ayant + les bonnes dimensions. La contribution principale + de cet utilitaire est de faire cela d'une fa_con universelle, + c'est a dire de fa_con `a pouvoir commod'ement + servir avec tout pilote d'imprimante de norme + PostScript --- malgr'e l'absence d'une norme + pour \special. + + diff --git a/macros/generic/boxedeps/boxedeps.doc-old b/macros/generic/boxedeps/boxedeps.doc-old new file mode 100644 index 0000000000..d202bfa8c9 --- /dev/null +++ b/macros/generic/boxedeps/boxedeps.doc-old @@ -0,0 +1,1107 @@ +%%%%% boxedeps.doc + %% + %%% POSTINGS: + %% --- ftp matups.matups.fr + %% This is the master copy in 1995. + %% Locate the full package on the CTAN servers + %% by using (while connected) the command + %% quote site index boxedeps + %%%% NEWS (4-95): + %% * High resolution bounding boxes are used when available. + %% * Log file epsf.lst reports epsf files integrated; + %% use it as an inventory for exporting. + %%%% NEWS (1-95): + %% * \SetepsfEPSFSpecial works for the + %% several drivers that support the particular special syntax + %% first supported by Rokicki in dvips and used in his epsf.tex. + %% * Experimental feature: \SetEPSFMultiSpecial + %% works also for Textures. Intended to create ".dvi" files + %% for posting on the internet that will print with graphics + %% insertions on all major operating systems. Some drivers + %% produce spurious error reports but print correctly. + + ******************************************************* + + + ********* The BoxedEPSF Utility ********** + + by Laurent Siebenmann 1989-95 + + (in distribution since Winter 1991) + + + ******************************************************* + + --- THE DOCUMENTATION --- + + +SYNOPSIS + + BoxedEPSF lets one integrate Encapsulated +PostScript Files (EPSFs) into TeX documents by making them +behave as TeX boxes --- using the following commands: + + \input boxedeps.tex %% lower case "8+3" convention for file names + \Set...EPSFSpecial %% e.g. \SetOzTeXEPSFSpecial + \BoxedEPSF{<filename> scaled <scale in mils>} + \tBoxedEPSF{...} + \bBoxedEPSF{...} + \cBoxedEPSF{...} + \EPSFbox{...} + \EPSFfile{...} + \EmulateRokicki + \ShowDisplacementBoxes + \HideDisplacementBoxes + \SetEPSFDirectory{<directory pathname>} + \SetDefaultEPSFScale{<scale in mils>} + \ForceWidth{<dimen>} + \EPSFxsize=<dimen> + \ForceHeight{<dimen>} + \EPSFysize=<dimen> + \ForceOn + \ForceOff + \TrimTop{<dimen>} + \TrimLeft{<dimen>} + \TrimBottom{<dimen>} + \TrimRight{<dimen>} + \TrimBoundingBox{<dimen>} + \hSlide{<dimen>} + \vSlide{<dimen>} + +This list can serve to locate details by string search. +The user should promptly familiarize him/her self with the left +alligned commands; the indented ones are less used. + + +INTRODUCTION + + BoxedEPSF is a highly portable package for insertion of +EPSFs (Encapsulated PostScript Files) in TeX documents. It is a +fraction of a larger less portable package for several graphics +norms on the Mac (see BoxedArt.tex below) that was initially put +together for the GUTenberg special year for graphics, 1989. +BoxedEPSF was first posted in winter 1991, in response to Bert +Horn's plea on the net in late 1990 for a standard for EPSF +integration, cf. his article in TUGboat 12 (1991) 377-381. The use +of bitmaps for preview is a technical obstacle to such a standard +and none has appeared since. BoxedEPSF is not the standard Bert was +calling for, but it seems to accomplish nearly as much. + + PostScript is currently the unchallenged high performance +standard for electronic specification and typesetting of printed +graphics, while TeX is the unchallenged high performance standard for +the specification and typesetting of scientific manuscripts, minus +graphics. The convenient integration of PostScript graphics in TeX +manuscripts is clearly vital to the scientific publication process. +BoxedEPSF is a link in the integration chain. + + The main task of BoxedEPSF is to make EPSFs (Encapsulated +PostScript Files) behave for the TeX user like big characters or +boxes. In contrast, the \special command, the TeX primitive through +which such integration is normally accomplished, makes EPSFs behave +like dimensionless points. This is Knuth's recommendation, because +that permits TeX to typeset without any knowledge of the graphics +file. The box-like behavior is obviously more desirable from the +user's point of view. In the case of the EPSF norm, it is +attainable because TeX is clever enough to be able to read the EPSF +file to extract the dimensions of the bounding box of the graphics +object described. These are normally located in a comment line in +the header beginning "%%Bounding Box:" or better "%%HiResBounding +Box:". + + There are other packages that do the same essential job, +notably psfig of Trevor Darrell(1987), and T. Rokicki's "epsf.tex" for +his driver "dvips", but differences remain. This one is built above all +for portability and hence makes LOWEST-COMMON-DENOMINATOR +requirements on the driver. It should be easy to understand to the +point that with a bit of luck, a texpert will be able to port it to a +new driver in a few hours. It does provide a few useful things +that others may not, eg. box fitting, and, above all, ready-made +adaptation to nearly all dvi-to-PostScript drivers. + + It is well known that, in a spirit of self reliance, texperts +tend to do adhoc programming to integrate their graphics. See for +example N. Jungers' <ANORSU@BUCLLN11.BITNET> posting on the +GUTenberg bulletin board dated 17 November 1990 for a good +explanation of the principles. A bit of understanding of TeX and +PostScript programming can go a long way. If this is your +inclination, perusal of Trevor Darrell psfig package is also highly +recommended. + + It seems to me there is room for packages which require no +tinkering with any programming language --- whether it be for +everyday use or for porting --- even at the cost of being heavier. +Most users have neither time nor taste for more adventurous +approaches. + + The basic requirement of BoxedEPSF is a "dvi-to-PostScript" +printer driver that for EPSF graphics implements in one way or another +Knuth's \special protocol. This \special should implement scaling in +some form since TeX cannot provide it. But translation (=pushing the +graphics around) can be done by TeX, which is fortunate since some +drivers (e.g. Textures' driver) do not bother to provide a \special +command executing translations. + + Until a standard for \special integration of EPSFs is well +established, BoxedEPSF will have to be initialize the integration +process by using a driver-specific command of the form: +\Set...EPSFSpecial. For example, \SetOzTeXEPSFSpecial will initialize +for the driver used by OzTeX on Macintosh computers. (See a list of +current alternatives below.) This command can be put in the author's +typescript header or style file, but it is still better to put it in a +configuration file (see mention of boxedeps.cfg below). + + Then, the primary command + + \BoxedEPSF{<filename> scaled <scale in mils>} + +scales by <scale in mils> the graphics object in the file <filename> +and inserts it at the current ".dvi" insertion point as a TeX box of +the dimensions of the bounding box scaled again by <scale in mils>. A +tiny EPSF test file gdisk.eps given below will let you run trials. +(Beware that in 1991 many TeX screen previewers are unable to let you +see the graphics; but any printer of the PostScript norm will let you +run tests.) + + --- <filename> A file specification. This may be a simple +filename in case the file is in the default directory for TeX. More +generally, it can be a file pathname. Better, one can separately +specify the directory that will be the directory in which TeX looks +thereafter for simple EPSF names, by typing + + \SetEPSFDirectory{<directory pathname>} + +For example, on a Macintosh, +\SetEPSFDirectory{HardDisk:MyArtFolder:} will direct TeX to the +folder MyArtFolder of the volume HardDisk. And +\SetEPSFDirectory{:YourArtFolder:} will direct TeX to the subfolder +YourArtFolder of the directory that is the default directory for TeX. +Similarly for unix systems but with "/" in place of ":". + + Spaces in filenames or directory names are strictly forbidden +(usually already by TeX and drivers); this package gives a warning. + + For greater portability, use in file names and directory names +only letters, digits, and perhaps one period ".". Beware of +conversions and confusions between upper and lower case letters. +Unix is case sensitive, but most other systems not; DOS even forces +to uppercase; while unix traditionally prefers lowercase. There is a +consensus that for portability only lowercase letters should be used +if at all possible, and failing that only uppercase. Thus all public +postings of BoxedEPSF the macro file should bear the name +"boxedeps.tex". + + [[To experts: On an experimental basis, current versions of +BoxedEPSF are a bit more liberal in allowing five punctuation marks +punctuation: :,;?! and also any character that has catcode 11 +(=letter) or 12 (=other). The backslash is used as a directory separator +in the PC world; thus BoxedEPSF lets one use backslash provided +backslash is coded as \\ inside the arguments of \SetEPSFDirectory{...} +and \BoxedEPSF{...}. I have been told that the slash / can +often replace backslash in the MSDOS world, so this backslash feature +may not be essential. This \\ is of course a marco; one can +hopefully use other TeX macros in these arguments provided they +expand under \edef without mishap.]] + + --- scaled <scale in mils> Optional. To conform to TeX syntax, +and avoid decimals most of the time, the scale is specified in mils +(=thousand'ths), rather than as a positive real number. (If you are a +precision freak, don't hesitate to add decimal parts of a mil.) + + If you specify no scale you get a default scale. This default +scale can be changed from its initial value of 1000 (for the rest of +the .tex file) by the command + + \SetDefaultEPSFScale{<scale in mils>} + + The scaling you select (however you do so) will always +be corrected by the TeX magnification factor. Thus if you select +scaling by 1000 mils at \magstep1 you in reality get scaling to 1200 +mils on the printed paper. + + There is a rather different way to specify scaling (championed +notably by Trevor Darrell since 1987); one can force width or height +to a specified dimension, by one (not both) of the commands: + + \ForceWidth{<dimen>} + \ForceHeight{<dimen>} + +This must precede the figure and normally applies to it alone. Any +such command takes precedence over any scaling command that might be +present. If you have two such commands, the last takes precedence. + + This forcing will persist indefinitely if you type + + \ForceOn + +and can then be stopped by + + \ForceOff + + As W. Neumann pointed out to me, there are some unique uses for +this "forced" dimensioning, for example: + + a) To force neighboring figures to the same height or width. + + b) To maintain the exact same height for a figure through +minor revisions after TeX pagebreaks have been fixed. + +Incidentally, note that \ForceWidth{0.66\hsize} is perfectly +legitimate; similarly for all dimension specifications. + + On the other hand, scaling is the only right approach if you +have a well proportioned line diagram with included labelling of a +known point size. You scale to make the labels of optimal size. + + In actual practice (notably on Macintosh computers), the +Bounding Box posted in the EPSF is often not what it should be, +namely the least rectangle containing the ink that will print the +graphic object; it tends to be somewhat larger. Thus, tools are provided +to correct the box to fit the object. + + For diagnostic purposes, one has: + + \ShowDisplacementBoxes, \HideDisplacementBoxes + +to show (with a black frame), respectively hide, the corrected scaled +and positioned bounding boxes. The physical term "displacement" is +used to remind you that these are boxes that displace other boxes, +like TeX character boxes (see the TeXbook Chap 11), or indeed any TeX +box. In case you make the graphics neatly fit into this displacement +box the term "bounding" box would be justified, but just as for TeX +characters, this is not necessarily so (cf. TeXbook p.63). These +commands are used intensively; some alternative older +terminology (less recommended) can be found inside boxedeps.tex. + + For the sake of users who do not have preview of their EPSFs +the default has been set to \ShowDisplacementBoxes. It is +demoralising to beginners to see nothing at all! + + Before any individual \BoxedEPSF{...} command, one can insert +commands to adjust the bounding box: + + \TrimBoundingBox{...} + \TrimTop{...} + \TrimLeft{...} + \TrimBottom{...} + \TrimRight{...} + +Each takes a dimension argument referring to the PostScript (artist's) +coordinates; with no scaling. Their names say what they do; just +remember that they do NOT mask off part of the object when the box +becomes too small; thus trimming is NOT "clipping". + + TeX is pretty good at shunting boxes around. But the command +to *slide* an image around without changing its box nor shunting +neighboring boxes is not readily accessible. So we provide: + + \hSlide{...} + \vSlide{...} + +which respectively slide horizontally to the right and vertically down +in dimension units of the TeX page, NOT the artist's page. + + A good order of steps for implanting a graphics object is to +scale, then trim. Finally, slide, or shunt using TeX tools. + + By default, the box produced has a baseline (roughly!) through +the middle like the letter "g"; it is constructed using TeX's \vcenter. +This seems most agreeable in case of linefigures in text --- though +mostly it does not matter. The "height" mentioned above is the sum +of the height and the depth of this box (with rare exceptions +mentioned immediately below). + + The two other obvious choices of baseline are also available: + + --- \tBoxedEPSF{...} baseline at top as for washing hanging on a +clothesline. + + --- \bBoxedEPSF{...} baseline at bottom as for trucks on a highway + + The default choice is + + --- \cBoxedEPSF{...} baseline centered as for khebabs on a skewer. + +More precisely, it is centered on the "axis" of mathematics in prose, +which for computer modern ten point system is 2.5pt above the baseline; +this makes \cBoxedEPSF very convenient for insertion of small +"linefigures" in prose; for example, $\left(\BoxedEPSF{mylinefig +scaled 300}\right)$ should neatly fit "mylinefig" between +parentheses. + + Beware however that TeX's refusal of negative heights or depths +for boxes leads to surprising results with \cBoxedEPSF when very tiny +linefigures occur (so tiny they do not reach the baseline). For example, +if the scaling is zero, the height is the math axis height, and the depth +is zero! If such extreme cases interest you, experiment with \hrule +\cBoxedEPSF{myfig scaled 0} \hrule. No such subtleties occur with +\tBoxedEPSF and \bBoxedEPSF! + + You can change the default behavior to "baseline at top" (for example) +by the command + + \let \BoxedEPSF=\tBoxedEPSF + + + + ****** Some file trickery ****** + + (A) The first trick is standard but it solves an important problem +mentioned by Georg Denk <denk@mathematik.tu-muenchen.de> concerning +co-authors sharing a develloping ".tex" plus ".eps" document in a +heterogeneous networked environment. As they use quite different +drivers, the above documentation seems to suggest that before +compiling, an author must reset his driver declaration, say from +\SetTexturesEPSFSpecial to \SetBechtolsheimDVITPSEPSFSpecial. This is +a pain which can easily be avoided, as follows. The authors agree to +each set up a file "boxedeps.cfg" in his TeX inputs directory that +contains just the command \Set...EPSFSpecial appropriate to his +driver; then in the the ".tex" source file the variable command +\Set...EPSFSpecial is replaced by the invariable command \input +boxedeps.cfg. This tells each TeX which is its appropriate driver. A +model boxedeps.cfg file with some advice may be included in the +BoxedEPSF distribution. + + (B) The following comments respond to requests and suggestions of +Douglas Gray-Stephens <gray@SCR.SLB.COM>. + + Ad hoc user-macros can perform file searchs that might at +first sight seem beyond the scope of BoxedEPSF. + + 1) Graphics objects to be reused can be macros and they need not be in +the a specific directory. Since \SetEPSFDirectory respects TeX grouping, +one can set out a definition as follows: + + \def\ourlogo#1{\bgroup\SetEPSFDirectory{<logopathname>}% + \BoxedEPSF{<logoname> scaled #1}\egroup} + +Then one inserts the boxed logo using \ourlogo{<scale>}. The directory +for EPSFs (if any) is momentarily changed but is the same before and +after \ourlogo{<scale>} is used. + + If just a few graphics objects are to be reused often, economy +and speed are best assured by storing the graphics object is a TeX box. +Suppose for example that a logo is to be used on each page. Then one +can prepare the box by + + \newbox\logobox + \bgroup\SetEPSFDirectory{<logopathname> + \global\setbox\logobox=% + \hbox{\BoxedEPSF + {<logo file name> scaled <scale in mils>}}\egroup + \gdef\Logo{\copy\logobox} + +Thereafter, \Logo places the logo very quickly and can be reused. + + 2) It is possible to use simultaneously several graphics directories by +further exploiting TeX grouping. Suppose, for example, that one wants +an extra directory <graphpath> for scientific graphs. Then one can +define \BoxedGraph behaving just like \BoxedEPSF but always using +directory <graphpathname>, as follows: + + \def\BoxedGraph#1{\bgroup\SetEPSFDirectory{<graphpathname>}% + \BoxedEPSF{#1}\egroup} + +\BoxedGraph is insensitive to occurences elsewhere of \SetEPSFDirectory. + + 3) A useful special case of this approach gives a "wildcard" macro: + + \def\BoxedEPSFx#1{\bgroup\SetEPSFDirectory{}% + \BoxedEPSF{#1}\egroup} + +(This of course assumes one has used or will use +\SetEPSFDirectory{<pathname>}, for otherwise \BoxedEPSFx will behave +much like \BoxedEPSF.) One can use either "full" or "relative" file +specifications in + + \BoxedEPSFx{<filespec> [scaled <scale>]} + +Here "full" means no separator out front, and "relative" +means separator out front. The separator is the character "/" for +unix and ":" for Macintosh. In the relative case, your current +directory behaves as root; normally, this is the directory of +the .tex file you launched. + + Example for the Macintosh: + + \BoxedEPSFx{:art:monalisa.eps} + +This searches in "art" a subdirectory of the default directory +for an EPS file called monalisa.eps. + + + + ****** Changing PostScript printer drivers ****** + + The obstacle to portability is a lack of standard syntax for +the \special commands; they vary from driver to driver. This is +overcome by using a local standard "fake special" within boxedeps.tex, +and relating each driver to it. + + This local BoxedEPSF standard is a two-argument macro + + \EPSFSpecial#1#2 + +where #1 is <file spec> and #2 is <scale in mils>. A different +definition is given for each driver. For example, for Textures, the +user types + + \SetTexturesEPSFSpecial + +and this package then institutes essentially the definition: + + \gdef\EPSFSpecial#1#2{\relax + \special{postscriptfile #1 scaled #2}}% + +Actually, it is not quite that simple, because we allow decimal +scaling factors like 726.7 (mils) while Textures <=1.6 required integer +values. + + Definitions for most known drivers are provided: + + %% \SetepsfEPSFSpecial %% ******* will work for many: + %% ----- dvips, the Y&Y drivers, DirectTeX, CMacTeX, OzTeX>=1.7 + %% \SetEPSFMultiSpecial %% ******* may work for more + %% \SetTexturesEPSFSpecial %% Textures + %% \SetUnixCoopEPSFSpecial %% dvi2ps early unix + %% \SetBechtolsheimDVI2PSEPSFSpecial and + %% \SetBechtolsheimDVITPSEPSFSpecial %% by S.P.Bechtolsheim + %% \SetLisEPSFSpecial %% dvi2ps by Tony Lis + %% \SetRokickiEPSFSpecial %% dvips by Tom Rokicki + %% \SetDVIPSoneEPSFSpecial %% DVIPSONE of Y&Y same as + %% \SetDVIWindowEPSFSpecial %% DVIWindow of Y&Y + %% \SetDirectTeXEPSFSpecial %% DirectTeX by Wilfried Ricken + %% \SetCMacTeXEPSFSpecial %% CMacTeX by Tom Kiffe + %% \SetOzTeXEPSFSpecial %% OzTeX (>=1.7) by Andrew Trevorrow + %% \SetOldOzTeXEPSFSpecial %% OzTeX (1.42--1.6x) + %% \SetPSprintEPSFSpecial %% PSprint by Andrew Trevorrow + %% --- also for OzTeX versions <= 1.41 !! + %% \SetArborEPSFSpecial %% ArborTeX DVILASER/PS + %% \SetClarkEPSFSpecial %% dvitops by James Clark + %% \SetBeebeEPSFSpecial %% DVIALW by N. Beebe + %% \SetNorthlakeEPSFSpecial %% Northlake Software + %% \SetStandardEPSFSpecial %% Nonexistant: Placebo used + +and others will be on request --- see appendix. + + -------------------- + + OzTeX note June 1994: OzTeX 1.7 revised its +\special for EPSF insertion to place the lower left corner of the +bounding box at the TeX insertion point; \SetOzTeXEPSFSpecial is +revised in consequence. Users of OzTeX 1.4.2--1.6 must now either +update to OzTeX1.7, or use \SetOzTeXEPSFSpecial\PSOrigintrue in +place of \SetOzTeXEPSFSpecial; otherwise the updated boxedeps.tex +will badly misplace EPSFs. + + Since OzTeX's own \special syntax has changed so often, where +archival ".tex" files are involved, consider using \SetepsfEPSFSpecial +based on a stable syntax of Rokicki; this will work with OzTeX in +versions =>1.7. + + -------------------- + + + ****** Compatibility with T. Rokicki's integration package ****** + + For users of Rokicki's integration package epsf.tex +attached to his C driver dvips, we support the following +alternative syntax. + + \EPSFbox or \EPSFfile equivalent to \bBoxedEPSF. + \EPSFxsize=126pt equivalent to \ForceWidth{126pt} + \EPSFysize=76pt equivalent to \ForceHeight{76pt} + +This compatibility makes it straightforeward to move a manuscript +prepared with the most basic features of epsf.tex to a TeX site with +any other driver. + + Rokicki uses all-lowercase commands (epsf for EPSF); hence his +epsf.tex can be loaded along with boxedeps.tex without conflict. If, +on the other hand, you want BoxedEPSF to accept the lowercase syntax +and execute the three commands in place of epsf.tex, you can type +\EmulateRokicki. + + The (undocumented) \special syntax of dvips employed by epsf.tex +has gradually become widespread in other drivers; it is this syntax on +which \SetepsfEPSFSpecial above is based. + + -------------------- + + + ****** Known Problems ****** + + 1) The process of reading bounding boxes may prove annoyingly slow on +smaller computers when inserts are numerous. This problem will be +lessened if you can make the "BoundingBox" comment one of the first in +each PostScript file. The larger BoxedArt.tex package for Macintosh +users provides a complete cure through use of a "graphics +specification file", which can be read quickly. + + 2) TeX permanently uses up the string space needed to record the +(full) name of each EPS file it opens. If you are short on string +space use succinct EPS file names like F1, F2, ... and put your TeX +file in your graphics directory to make the default directory coincide +with the graphics directory. Then \BoxedEPSF{F1} will use up just two +string characters. + + 3) Early Textures problem (not in versions >=1.4??): PostScript files +that have a resource fork may upset the Textures driver. Typically, +nothing after the figure will print. This can be cured by deleting the +resource fork. For a PostScript file of Illustrator88, the preview +graphics are in a PICT resource; try deleting all resources EXCEPT +this PICT. + + 4) A common driver problem: EPS files seldom include the PostScript +fonts they need. Usually this does not cause a problem, because +(hopefully) the required font is already present in the printer, or at +least will be downloaded to the printer for the job in which the EPSF +is embedded. + + However, if necessary the driver should attempt to locate and +include the fonts needed. Unfortunately, few do. (Textures >= 1.7 is +an admirable exception.) The *user* is then obliged to intervene to +assure the presence of the fonts. Fortunately an EPSF header comment + + %%DocumentFonts: ... + +usually tells exactly which fonts are needed. Here are two +ways to download them: + + (a) Use a utility to download the fonts before the printing job is +run. (For Macintosh look for the name "LaserWriter [Font] +Utility".) + (b) Artificially employ in the TeX manuscript all the fonts +required for the EPS file; they are listed in the header. To +avoid adding an extra page to the output one can have the extra +material printed off-page using say + + \rightlap{\smash\hbox{\kern\hsize <text using fonts for EPSF>}} + +This approach (b) makes the TeX document portable without special +instructions. However (b) sometimes fails; for example if the EPS +file uses CM/PS type1 Adobe fonts while the main text uses CM fonts of +classical metafont type. + + (c) Where figure labels are concerned, one can usually outright +avoid this font inclusion problem by puting the labels in a TeX +overlay, using, for example, the utility "labelfig.tex" that is normally +posted as a companion to boxedeps.tex. + + Laurent Siebenmann + Mathematique, Bat. 425, + Univ de Paris-Sud, + 91405-Orsay, + France + + lcs@topo.math.u-psud.fr + + + Fax number: 33-1-6941-6348 + + + REFERENCES + + The following may give you leads to alternative solutions. + + --- PSFIG a package by Trevor Darrell (for at least two drivers) +available by anonymous ftp from whitechapel.media.mit.edu +(18.85.0.124) in ./psfig or linc.cis.upenn.edu (130.91.6.8) in the +directory ./dist/psfig. + + --- Merging PostScript Illustrations: Gerald Roylance 1987, 1989, +see MIT AI Laboratory Working Paper 299a; this package supports dvi2ps +and DVILASER/PS. + + --- dvips and epsf.tex by by T. Rokicki <rokicki@Neon.Stanford.EDU> + + --- Une meilleure integration du graphisme Macintosh, par Laurent +Siebenmann, Cahiers GUTenberg, No. 4 (Dec 1989), pages 29-38. The +native Macintosh grapics norm is called PICT. TeX has not been able +to read PICT resources and files, as the resources are not files and +the files are "binary". Nevertheless, good integration under Textures +is possible with the help of a preprocessor "ArtDealer" and the notion +of a "graphics description file". The strong points of this approach +are speed and compactness. Portability poses some problems. These +ideas are implemented by the parallel package consisting of BoxedArt.tex, +BoxedArt.doc, and ArtDealer available (hopefully) from the same sources as +this package. + + --- Nicolas Jungers <EDITEX@BUCLLN11.BITNET> two postings in the +GUTenberg forum <GUT@FRULM11.BITNET> 9 Nov 90 and 17 Nov 90. [A good +"do-it-yourself" kit!] + + --- Michael Ferguson <mike@inrs-telecom.uquebec.ca> espouses the +\ForceHeight{...} approach in Cahiers GUTenberg, No. 3 (May 1989); it +does not require TeX to read the EPS file. N. Beebe indicates that his +macros are available for DVIALW. + + +APPENDIX: A FIRST QUICK TEST OF BoxedEPSF + + Hopefully you have found your PostScript printer driver in the +above list of \Set...EPSFSpecial commands. In that case, try the +following test to check that this package is working + + ------ cut here + + %%%% test.tex for Plain TeX; can be adapted to LaTeX, by puting + %% everything from \input to ZZ into the middle of a LateX file. + %\magnification=1200 %% uncomment later + \input boxedeps.tex %% lower case "8+3" convention for file names + \Set...EPSFSpecial %%%% complete this line!!!!!!!! + \ShowDisplacementBoxes%\HideDisplacementBoxes %%alternatives + \null\vfill\vfill + AA\BoxedEPSF{gdisk.eps scaled 500}ZZ + + \bye + + ------ cut here + %!PS-Adobe-2.0 EPSF-1.2 + %%Title: gdisk.eps + %%Remark: A simple test file + %%Remark: DELETE SPACES BEFORE ALL %% (especially for Textures) + %%Pages: 0 + %%BoundingBox: 216 216 432 432 + %%EndComments + + 72 72 scale % units are now inches instead of big points + newpath + 4.5 4.5 1.5 0 360 arc + closepath + 0.9 setgray + fill + + ------ cut here + + The files test.tex and gdisk.eps should be in the same +directory. + + A grey disk should appear fitting snuggly between AA and ZZ. +It should be neatly bounded by a square (the displacement box). + + Once this test is working you should be able to elaborate and +test all features. + + + + APPENDIX: HOW TO GET SUPPORT FOR YOUR DRIVER + + To get support for your dvi to PostScript printer driver, +please send the \special syntax required to insert a file myfile.eps +with scaling 76 percent! + + For example, the answer for the ArborText DVILASER/PS driver +was: + + \special{ps: epsfile myfile.eps 760} + +And that was (almost) enough to let me program \SetArborEPSFSpecial. + + One more scrap of information is essential. Some \special's +for EPSFs place the lower left corner of the (scaled) bounding box at +the TeX insertion point, and others place the lower left corner of the +artist's page at the insertion point. No other choice seems consistent +with Knuth's recommendations in the TeXbook. Textures and ArborTeX +belong to the first type, while OzTeX (versions <=1.6x) and Rokicki's +dvips belong to the second. The first type of driver must read the +"bounding box comment" in the EPS File header. Please report on the +basis of documentation and/or experimentation, which type is in +question. An experimental test routine is provided below. + + In general, some testing and/or driver documentation may be +needed to clear up lingering questions. For example, are decimals +allowed in in the scaling specification? For ArborTeX I believe the +answer is no. + + An information form is included below for those who would like +to see BoxedEPSF adapted to another driver. + + + APPENDIX: AN INFORMATION KIT FOR OTHER DRIVERS + + -------------------------------cut +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %%% spectest.tex for Plain TeX + %%% Test to discover which point in + % the graphics page (plane) your \special + % command distinguishes and identifies to + % the TeX insertion point. + % + % --- Put the file gsquare.eps into the same folder as + % TeX and this testfile. Hopefully this will make + % gsquare.eps accessible to the printer driver. + % + % --- Complete the \special{... gsquare.eps ...} command below + % as your driver documentation recommends for printing + % the EPSF gsquare.eps --- without any scaling, or other + % refinement. For example + % \special{ps: epsfile gsquare.eps 1000} + % is suitable for the ArborteX driver. + % + % --- Typeset this file + % + % --- Print the resulting .dvi file using your driver. + % + % INTERPRETATION: + % + % If the black box lies in the square, the + % distinguished point is the lower, left-hand corner of the + % PostScript bounding box. + % + % If the black box lies outside the square, the + % distinguished point is the lower, left-hand corner of the + % artist's page, i.e. the the PostScript origin. + % + % If the square is missing, your driver has probably not found + % the EPS file gsquare.eps, or you have formulated the \special + % command incorrectly. Follow driver instructions more + % carefully. + % + % --- report results to Laurent Siebenmann + % <lcs@topo.math.u-psud.fr> + % on the special reply "reply.doc" form provided below. + % + % + + \null + \vfill + \vskip -1 in + \moveright 1 in \vbox{\hrule height 1 in width 1 in} + \vskip 1 in + \special{... gsquare.eps ...}%% please carefully adjust this + \eject + \bye + + %% end of spectest.tex + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + -------------------------------cut +%!PS-Adobe-2.0 EPSF-1.2 + %%Title: gsquare.eps + %%Remark: Another simple test file + %%Remark: DELETE SPACES BEFORE ALL %% (especially for Textures) + %%Pages: 0 + %%BoundingBox: 216 216 432 432 + %%EndComments + + 72 72 scale % units are now inches instead of big points + + newpath + 3 3 moveto + 3 6 lineto + 6 6 lineto + 6 3 lineto + closepath + 0.8 setgray + fill + + -------------------------------cut +%!PS-Adobe-2.0 EPSF-1.2 + %%Title: heat.eps + %%Remark: Another simple test file + %%Remark: DELETE SPACES BEFORE ALL %% (especially for Textures) + %%Pages: 0 + %%BoundingBox: 216 216 432 432 + %%EndComments + + 72 72 scale % units are now inches instead of big points + newpath + 4.5 4.5 1.5 0 360 arc + closepath + 0.9 setgray + fill + + /Times-Italic findfont + .8 scalefont + setfont + 3.75 4.3 moveto + 0 setgray + (Heat) show + + -------------------------------cut + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %%% reply.doc %%% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + INFORMATION FORM for adaptation of BoxedEPSF + to other "dvi-to-PostScript" printer drivers + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + Please provide information on the following items: + + --- Name and email address(es) of correspondent. + + --- Driver information :Name, version, date, copyright, vendor, +computer(s) served, price etc. + + --- Syntax required to print the EPS File gsquare.eps scaled to 76 +percent using a command of the form \special{... gsquare.eps ...}. Is +scaling to exactly 76.33 percent available? + + --- More info on \special. + + --- Location of the distinguished point. (Report result of test in +spectest.tex above). + + --- Source(s) of your EPSFs. + + --- Do you progam TeX? PostScript? + + A trial adaptation to your driver will be returned with +an update of BoxedEPSF. Thank you for cooperating! + + Laurent Siebenmann + Mathematique, Bat. 425, + Univ de Paris-Sud, + 91405-Orsay, + France + + lcs@topo.math.u-psud.fr + + Fax number: 33-1-6941-6348 + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + -------------------------------cut + + + + APPENDIX. HOW ARE THE EPS GRAPHICS FILES BEING CREATED? + + While everyone admires PostScript graphics, few TeX users are +entirely happy with their tools for producing the EPSFs. As soon +as your integration problem has been disposed of, this one will be +back to haunt you! Here are a few notes that may help. + + a) Illustrator 88 on the Mac by Adobe Corp is a MacDraw-like +program that uses the EPSF norm. Although in some respects rustic, +it is favored by professionals since it is geared for highest +quality output. Illustrator 3.0 is an update of 1990. + + b) DrawOver 1.0 copyright Michael Everest 1986, is a converter to +EPSF from the PICT graphics norm of the Macintosh, a norm for which +there are many excellent drawing programs such as MacDraw. It is +distributed with Illustrator 88 on the Mac. To get preview, and +sometimes to print, its output has to be "validated" by passage +through Illustrator. The original DrawOver is aging inasmuch as it +handles the PICTs of more recent MacDraw versions less and less +well. One does best by using PICT files (re)generated by MacDraw +versions anterior to MacDrawII. Illustrator 3.0 included an +updated DrawOver. From Adobe, there is also a converter Streamline +for PICT, TIFF and MacPaint files. + + c) Macintosh output to LaserWriter printers is PostScript code, and +can be diverted into a file. This file cannot be used as is, but a +header file can be added which with a few other changes produces a +(bulky) EPSF. See the macps converter of unix, or OzTeX or the +$20 shareware Mac package AddLPrep copyright 1988 by SoftWare 101, +15151 Old Ranch road, Los Gatos CA. The output is I believe +equivalent at similar resolution to what the Macintosh-LaserWriter +combination produces. However, starting from the same PICT file, +method (a) often gives better results! + + d) fig and xfig by Micah Beck, Cornell University +<beck@cs.cornell.edu> are MacDraw-like programs for unix and unix +X-windows, for which a translator transfig exists to EPSF norm. + + e) Naked PostScript code. PostScript is a beautiful language, and the +three Adobe manuals are very helpful. + + f) Aldus Freehand on the Macintosh: see Berthold K.P. Horn's +comments below. + + g) Canvas (Denaba Software) on Macintosh in versions from 1991 (3.0) +on will have the ability to save a file in EPS format (and also PICT and +Illustrator 88 formats etc., the most impressive list so far). + + h) Classic MacDraw, MacDraw Pro, indeed all versions from 1991 of +MacDraw on Macintosh, on will hopefully have the ability to save a file +in EPS as well as PICT format. At the same time Apple is producing +more and more non-PostScript printers... + + i) LaserWriter 8.1.1 of 1993 provides an option to "print" almost any +graphics objects to file of EPSF type. This approach probably going to +become the dominant one for Mac users. It has been available on +ftp.apple.com in directory dts and is ditributed with System 7.5. +Bounding boxes do not yet behave correctly in all cases, and many other +bugs remain to be eliminated. Perhaps not yet ripe for general use as of +early 1994. In a pinch consider converting the more reliable "PS job" +files to EPSF form using bb.ps or bb4gs.ps as described below. +Pioneering users should be sure that the graphics object well within the +page being used; one way is to use an big page as provided say by the +Agfa printer configuration file. + + + ***************************************** + + Several users have kindly extended and updated the above list! + + Berthold K.P. HORN mentioned many possibilities: + +(*) Aldus Freehand on the Mac is a more sophisticated tool for +generating graphic illustrations than Adobe Illustrator. Both are +constrained to basically two-dimensional patterns. Both can +produce output in EPS form. [[See the "export" menu item, and use +the simple or Mac version of EPS format, not the IBMPC version that +yields a partly binary file. The Mac version includes a PICT +resource containing a bitmap visible in the Textures or OzTeX preview. +Aldus Freehand freehand also imports PICT resources via the Mac +clipboard, and this provides an interesting alternative to +DrawOver. This conversion sometimes handles MacDrawII PICT +files better than DrawOver. Freehand, unlike Illustrator, has +its own binary file format.]] + +(*) Micrografx Designer on the PC is a more sophisticated tool for +generating graphics illustrations than Adobe Illustrator. It is the +PC's answer to `MacEnvy', since it provides a Windows based tool that +is about as good as any on the Mac. Designer is also constrained to +basically two-dimensional patterns. It can produce output in EPS +form. + +(*) There are also CAD/CAM applications that run on high end PC's, Sun +workstations that can handle `solid modelling' of three dimensional +objects, but they are an order of magnitude more expensive, so few +people have access to them. + +(*) Illustrate on the Symbolics LispMachine was one of the first +drawing programs and is still used quite a bit. It can produce output +in EPS form. Very similar features to the other 2-D illustration +applications mentioned above. + +(*) Screen Dumps. Another useful source of graphic illustrations are +screen dumps available on LispMachine, Windows on PC, and on Mac in +EPS form. OF course, they are in bitmap form so very limited in +quality and not resolution-independent, but useful for illustrating +program operations. + +(*) Paint Programs. On the Mac and the PC there are programs that +instead of manipulating curves and areas work directly with bitmaps. +The output can be in EPS form. But same drawback as screendumps. Not +used much. + + Max CALVIANI <fisica@astrpd.unipd.it> mentions + +(**) Mongo or Supermongo ... superb ... produce a .ps file ... on +vax/vms, also under Unix. They are copyrighted, Mongo costs approx 500 +USD, SuperMongo only 250 USD. + + Antonio POSSOLO in Seattle <antonio@atc.boeing.com> makes +recommendations for unix: + +An excellent tool to generate postscript figures in Unix is the S +programming environment for data analysis and graphics, +originally from AT&T Bell Labs, and S-PLUS, a superset [of S] +from Statistical Sciences, Inc. (Seattle, Washington, USA). This +is not a drawing tool in the sense of Adobe's Illustrator, or +MacDraw: instead, it is driven by issuing drawing commands. S is +described in R.A. Becker, J.M. Chambers, & A.R. Wilks (1988) +"The New S Language", Wadsworth & Brooks/Cole, and you will find +there many examples of its capabilities to produce beautiful +pictures (note the postscript() command, in particular, as means +to generate postscript output). + + **************************************** + + +Determining Bounding Boxes via bb.ps and bb4gs.ps + + Many postscript files originally created without regard to +EPSF standards will successfully function as EPSFs if they are +provided with a suitable Bounding Box comment in the header. Ned +Bachelder has distributed a PostScript "header" file bb.ps since 1990 +(modified by Bernie Cosell <cosell@bbn.com>) that will cause a +following Postscript file to have its bounding box marked +numerically and graphically on printing. + + William L. Kath <kath@nwu.edu> has distributed a +version modified for ghostscript (see below) called bb4gs.ps; it +is included in the unix ghostscript distribution. + + +Ghostscript. + + These computer based Postscript interpreters with +electronic rather than physical output were initially programmed by +Peter L. Deutsch, and have become of increasing interest for TeX +preview. + + For PC see the distribution of emtex on ftp +rusinfo.rus.uni-stuttgart.de. + + For Macintosh see the directory /info-mac/util/ of ftp +sumex.stanford.edu; the author is Martin Fong +<mwfong@nisc.sri.com>; the February 1993 version (2.5.2beta2) +works well. (For some Macintosh EPSFs you may need to load +some "laserprep" macros using a menu, but that is a sign +of non-portability of the EPSFs.) + + These Postscript interpreters are certainly of great +interest for PostScript programming. + + The preparation of preview bitmaps for EPSFs is +another important use. + + The frustration engendered by using PostScript graphics +without preview is still a major obstacle to the use of PostScript +with TeX. The Adobe standard for Macintosh previewing of +encapsulated PostScript graphics is part of the EPSF standard +available from ftp adobe.com, and involves addition of a bitmap as +a PICT resource, normally number 256. (There is a variant for PC +but I have not yet seen extensive support for it.) Macintosh +sources of PostScript graphics do follow this standard faithfully, +but PostScript graphics coming from non-Mac sources more often do +not, especially where unix systems are concerned. + + +Macintosh Preview for EPSFs. + + MacGS could undoubtedly be adapted to provide the PICT +resource just mentioned (and Bounding box comment) in a fully +mechanized way. Until that comes to pass here is a recipe to do +the job by hand. Transfer the graphics window image via clipboard +to a MacPaint-like program and select just the interior of the +bounding box indicated by the bb4gs.ps header; transfer this +selection via the Mac clipboard to the Mac scrapbook; then +transfer the PICT resource from there to the resource fork of the +PS file using ResEdit, changing the PICT number to 256. Remember +to insert in the EPSF (data fork) header the Bound Box comment +provided by bb4gs.ps. + + +Mechanized Macintosh Preview production with unix help. + + Georg DENK <denk@mathematik.tu-muenchen.de> exploits +unix tools to obtain Macintosh preview (under Textures, OzTeX, +and Direct TeX) for PostScript graphics coming from other +computers. (Georg's PostScript material is coming from various +data analysis programs on Sun workstations.) + + He reports extensive experience with a solution +mounted on the Sun side of his local network. The enhanced Mac +PostScript file is created under unix (as a MacBinary file) using +ghostscript (gs), pbmplus-package, and the shell script +ps2eps-mac with its C-language programs ps-pict2macb, st_echo, +er_echo, pbmtoepsi. The most recent item is ps2eps-mac by George +Jefferson, <george@mech.seas.upenn.edu>; the graphics conversion +package pbmplus-package (by ...) is also rather new and it is +conveniently included in the shar-file distribution of +ps2eps-mac, available from ftp sumex.stanford.edu in the directory +/info-mac/unix/. Setting up these tools requires knowledge of C +compilation and the unix shell. + + -------------- + + +SOMMAIRE FRANCAIS: boxedeps.tex d'efinit des macro-commandes + qui permettent d'int'egrer dans un document TeX des + objets graphiques d'ecrits par fichier de norme EPSF, tout + en accordant `a chacun le statut d'une bo^ite TeX ayant + les bonnes dimensions. La (seule!) contribution unique + de ce fichier est de faire cela d'une fa_con universelle, + c'est a dire de fa_con `a pouvoir commod'ement + servir avec tout pilote d'imprimante de norme + PostScript --- malgr'e l'absence d'une norme + pour \special. + + diff --git a/macros/generic/boxedeps/boxedeps.sty b/macros/generic/boxedeps/boxedeps.sty new file mode 100644 index 0000000000..3ed515e2f4 --- /dev/null +++ b/macros/generic/boxedeps/boxedeps.sty @@ -0,0 +1,78 @@ +%%% boxedeps.sty : Nov 1995 -- + %% LaTeX wraper designed by Alun J. Carr <ajcarr@ccvax.ucd.ie> + %% for boxedeps package of Laurent Siebenmann <lcs@topo.matups.fr>. + %% See documentation in boxedeps.doc. + + \NeedsTeXFormat{LaTeX2e}[1994/06/01] + \ProvidesPackage{boxedeps} + [1995/08/01 (Laurent Siebenmann)] + \input{boxedeps.tex} + + %% Driver support options + \DeclareOption{epsf} + {\SetepsfEPSFSpecial} + \DeclareOption{epsfmulti} + {\SetEPSFMultiSpecial} + \DeclareOption{textures} + {\SetTexturesEPSFSpecial} + \DeclareOption{unixcoop} + {\SetUnixCoopEPSFSpecial} + \DeclareOption{niponunix} + {\SetNiponUnixEPSFSpecial} + \DeclareOption{bechtolsheim} + {\SetBechtolsheimDVITPSEPSFSpecial} + \DeclareOption{lis} + {\SetLisEPSFSpecial} + \DeclareOption{rokicki} + {\SetRokickiEPSFSpecial} + \DeclareOption{dvipsone} + {\SetDVIPSoneEPSFSpecial} + \DeclareOption{dviwindow} + {\SetDVIWindowEPSFSpecial} + \DeclareOption{directtex} + {\SetDirectTeXEPSFSpecial} + \DeclareOption{cmactex} + {\SetCMacTeXEPSFSpecial} + \DeclareOption{oztex} + {\SetOzTeXEPSFSpecial} + \DeclareOption{oldoztex} + {\SetOldOzTeXEPSFSpecial} + \DeclareOption{psprint} + {\SetPSprintEPSFSpecial} + \DeclareOption{arbor} + {\SetArborEPSFSpecial} + \DeclareOption{clark} + {\SetClarkEPSFSpecial} + \DeclareOption{beebe} + {\SetBeebeEPSFSpecial} + \DeclareOption{northlake} + {\SetNorthlakeEPSFSpecial} + \DeclareOption{standard} %% default + {\SetStandardEPSFSpecial} + + %% Emulation of Rokicki's \epsfbox, \epsfxsize, \epsfysize + \DeclareOption{emulaterokicki} + {\EmulateRokicki} + + %% Displacement Box options + \DeclareOption{showboxes} + {\ShowDisplacementBoxes} + \DeclareOption{hideboxes} + {\HideDisplacementBoxes} + \ExecuteOptions{showboxes} %% set default + + %% Preconfigured Options + \InputIfFileExists{boxedeps.cfg} + {\typeout{**************************************^^J% + *^^J% + * Local config file boxedeps.cfg used^^J% + *^^J% + **************************************}}% + {\ExecuteOptions{standard}} + + \ProcessOptions + + \endinput + %% + %% End of file `boxedeps.sty'. + diff --git a/macros/generic/boxedeps/boxedeps.tex b/macros/generic/boxedeps/boxedeps.tex new file mode 100644 index 0000000000..038a7257f6 --- /dev/null +++ b/macros/generic/boxedeps/boxedeps.tex @@ -0,0 +1,1042 @@ + %% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %% + %%%%% boxedeps.tex + %%%%% MACROS FOR FIGURE INSERTS OF EPSF NORM %%%%% + %%%%% (EPSF = Encapsulated PostScript File) + %% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %% + %%% AUTHOR: Laurent Siebenmann + %% lcs@topo.math.u-psud.fr + %% + %%% VERSIONS: Feb 1991 -- Nov 1995 + %% Revisions bi-annual approx. + %% + %%% SOMMAIRE: boxedeps.tex d\'efinit des macro-commandes + %% qui permettent d'int\'egrer dans un document TeX des + %% objets graphiques d\'ecrits par fichier de norme EPSF, + %% tout en accordant a chacun le statut d'une bo\^ite TeX ayant + %% les bonnes dimensions. La (seule!) contribution unique + %% de ce fichier est de faire cela d'une fa{\c}con universelle. + %% C'est a dire de fa{\c}con \`a pouvoir commod\'ement + %% servir avec tout pilote d'imprimante de norme + %% PostScript --- malgr\'e l'absence d'une norme + %% pour \special. + %% + %%%% ACTIVATION: + %% by a driver-by-driver protocol + %% see \SetTexturesEPSFSpecial + %% and its companions below. + %% + %%%% DOCUMENTATION: + %% --- see boxedeps.doc + %% The complete utility is called BoxedEPSF but for + %% portability the nickname boxedeps is useful. + %% + %%%% POSTINGS: anonymous ftp + %% --- ftp matups.math.u-psud.fr [192.54.146.4] + %% is the master copy in 1995. + %% --- ftp.uni-stuttgart.de + %% --- ftp ftp.TeX.AC.UK + %% --- ftp ftp.SHSU.edu + %% Locate the full package on these three + %% "CTAN" servers by using (while connected) the command + %% QUOTE SITE INDEX boxedeps + + %%%% RECENT ADDITIONS: \SetepsfEPSFSpecial simultaneously serves + %% dvips, the Y&Y drivers, DirectTeX, CMacTeX, OzTeX>=1.7 + %% \SetOldOzTeXEPSFSpecial %% OzTeX 1.42--1.6x + + + \chardef\EPSFCatAt\the\catcode`\@ + \catcode`\@=11 + + \chardef\C@tColon\the\catcode`\: + \chardef\C@tSemicolon\the\catcode`\; + \chardef\C@tQmark\the\catcode`\? + \chardef\C@tEmark\the\catcode`\! + \chardef\C@tDqt\the\catcode`\" + + \def\PunctOther@{\catcode`\:=12 + \catcode`\;=12 \catcode`\?=12 \catcode`\!=12 \catcode`\"=12} + \PunctOther@ + + %%%% MESSAGES (separate macro best for Europe) + %% + \def\ms@g{\immediate\write16} + + %%%% Prevent double input + \let\EX@\expandafter + + \ifx\BoxedArtundefined\relax + \ms@g{}\ms@g{ !!! Bad news. + \noexpand\BoxedEPSF or \noexpand\BoxedArt macros already input.}% + \ms@g{ !!! Hit RETURN to exit, or c and RETURN to forge bravely on.}% + {\endlinechar=-1\gdef\Temp{c}% + \global\read16 to \temp}% + \ifx\temp\Temp + \else + \EX@\EX@\EX@\end + \fi + \else + \global\let\BoxedArtundefined\relax + \fi + + + + %%temporarily suppress Plain's logging of allocations + \let\wlog@ld\wlog + \def\wlog#1{\relax} + + %% New for TOOLS + %\newif\ifIN@ + \newdimen\XShift@ \newdimen\YShift@ + \newtoks\Realtoks + + %%% New for BoxedEPSF + % + \newdimen\Wd@ \newdimen\Ht@ + \newdimen\Wd@@ \newdimen\Ht@@ + % + \newdimen\TT@ + \newdimen\LT@ + \newdimen\BT@ + \newdimen\RT@ + % + \newdimen\XSlide@ \newdimen\YSlide@ + % + \newdimen\TheScale %% secretly scale in mils: 1pt= 1mil + \newdimen\FigScale %% secretly scale in mils: 1pt= 1mil + % + \newdimen\ForcedDim@@ + + \newtoks\EPSFDirectorytoks@ + \newtoks\EPSFNametoks@ + \newtoks\BdBoxtoks@ + \newtoks\LLXtoks@ %% useful info for Oz + \newtoks\LLYtoks@ + \newtoks\URXtoks@ %% useful for epsf.tex syntax + \newtoks\URYtoks@ + + + \newif\ifRepeat@ + \newif\ifNotIn@ + \newif\ifForcedDim@ + \newif\ifForceOn@ + \newif\ifForcedHeight@ + \newif\ifPSOrigin + \newif\ifPCfmt@ + \newif\ifPCfmtOK@ + + + \newread\EPSFile@ + \newwrite \epsf@log + \def\WrLog@{\immediate\write\epsf@log} + + \gdef\InitLog@{% + \def\epsf@log@name{epsf.lst}% + \count255=\time\divide\count255 by 60 + \edef\temp@{\the\count255}% + \multiply\count255 by -60\relax + \advance\count255 by \time + \immediate\openout\epsf@log \epsf@log@name + \WrLog@{ \pct@@\space boxedeps.tex log, date + \the\day-\the\month-\the\year, + time \temp@:\the\count255.}\WrLog@{}% + \ms@g{}\ms@g{ **** See file \epsf@log@name\space + for list of EPSFs integrated by boxedeps.tex}% + \global\let\InitLog@\relax} + + \def\noArtList{\global\let\InitLog@\relax} + \let\noEPSFList\noArtList + \def\noArtReports{\global\let\ReportEPSF@\relax} + \let\noEPSFReports\noArtReports + + %%%% WORD-PROCESSING MACROS + %% + %%% \IN@0#1@#2@ : Is 1st exp of #1 in 1st exp of #2 ?? + %% Answer in \ifIN@ + \newif\ifIN@\def\IN@{\EX@\INN@\EX@} + \long\def\INN@0#1@#2@{\long\def\NI@##1#1##2##3\ENDNI@ + {\ifx\m@rker##2\IN@false\else\IN@true\fi}% + \EX@\NI@#2@@#1\m@rker\ENDNI@} + \def\m@rker{\m@@rker} + + %%% \SPLIT@0#1@#2@ : Split 1st exp of #2 at 1st exp of #1 + %% \Initialtoks@ , \Terminaltoks@ will contain pieces + \newtoks\Initialtoks@ \newtoks\Terminaltoks@ + \def\SPLIT@{\EX@\SPLITT@\EX@} + \def\SPLITT@0#1@#2@{\def\TTILPS@##1#1##2@{% + \Initialtoks@{##1}\Terminaltoks@{##2}}\EX@\TTILPS@#2@} + + %%%% MACROS TO TRIM \ForeTrim@0#1@ and \Trim@0#1@ + %% result appears in \Trimtoks@ + %% LIMITATION: assume no multiple spaces to trim + + \newtoks\Trimtoks@ + + %%% \ForeTrim@0#1@ trims initial space of first erpansion of #1 + %% #1 of form \the\toks0 or \mymacro + \def\ForeTrim@{\EX@\ForeTrim@@\EX@} + \def\ForePrim@0 #1@{\Trimtoks@{#1}} + \def\ForeTrim@@0#1@{\IN@0\m@rker. @\m@rker.#1@% + \ifIN@\ForePrim@0#1@% + \else\Trimtoks@\EX@{#1}\fi} + %%\m@rker expands here to \m@@rker since spot initial, + %% so no confusuion with \m@rker + + %%% \Trim@0#1@ trims init and terminal spaces + %% Same syntax. + %% Warns if internal spaces found. + %% + \def\Trim@0#1@{% + \ForeTrim@0#1@% + \IN@0 @\the\Trimtoks@ @% + \ifIN@ + \SPLIT@0 @\the\Trimtoks@ @\Trimtoks@\Initialtoks@ + \IN@0\the\Terminaltoks@ @ @% + \ifIN@ \else \Trimtoks@{FigNameWithSpace}\fi + \fi } + + + %%%% MATH MACROS (provisional) + %% use dimen registers for reals; unit 1pt + %% (numerical dimension arguments OK unless contrary noted) + + %%%% One needs the point token seq (pt with cat 12) USES dimen 0 + \newtoks\pt@ks + \def\getpt@ks 0.0#1@{\pt@ks{#1}} + \dimen0=0pt\relax\EX@\getpt@ks\the\dimen0@ + + %%% Convert dimen to "decimal multiplier"% USES dimens 0,2 + %\newtoks\Realtoks% the output! + \def\Real#1{% + \dimen2=#1% + \SPLIT@0\the\pt@ks @\the\dimen2@%% lop off the points + \Realtoks=\Initialtoks@ %\showthe\Realtoks + } + + %%% Multiplication + % USES dimens 0,2,4,6; preserves args; output \Product + \newdimen\Product + \def\Mult#1#2{% + \dimen4=#1\relax + \dimen6=#2% + \Real{\dimen4}% + \Product=\the\Realtoks\dimen6% + } + + %%% Inverse + % USES dimens 0; preserves arg; output \Inverse + \newdimen\Inverse + \newdimen\hmxdim@ \hmxdim@=8192pt%halfmaxdimen + \def\Invert#1{% + \Inverse=\hmxdim@ + \dimen0=#1% + \divide\Inverse \dimen0% + \multiply\Inverse 8} + + %%% \Rescale#1#2#3 % USES dimens 0,2,4,6 + %% alters dimen register #1 by ratio #2/#3 + %% where #2,#3 can be raw dimensions OR dimen registers + \def\Rescale#1#2#3{% Adequate accuracy. Can improve. + \divide #1 by 100\relax + \dimen2=#3\divide\dimen2 by 100 \Invert{\dimen2}% + \Mult{#1}{#2}% + \Mult\Product\Inverse + #1=\Product} + + %%% \Scale#1 scales dimen register #1 + %% by dimen register real \TheScale; USES dimen 0 + \def\Scale#1{\dimen0=\TheScale + \divide #1 by 1280 %% 1280*5120*10=1000*2^16 + \divide \dimen0 by 5120 + \multiply#1 by \dimen0 + \divide#1 by 10 %% max size of #1 about 32000/10 pt + } + + %%% SCRUNCHING BOXES AND SHIFTING CONTENTS + %% TeX has to do this in general + %% since some drivers do not let + %% one do it readily using Postscript + + \newbox\scrunchbox + + %%% \Scrunched#1 puts #1 in an hbox + %% then in effect zeros the dimensions of this box + \def\Scrunched#1{{\setbox\scrunchbox\hbox{#1}% + \wd\scrunchbox=0pt + \ht\scrunchbox=0pt + \dp\scrunchbox=0pt + \box\scrunchbox}} + + %%% \Shifted@#1 puts #1 in \hbox + %% then locates basepoint to bottom left corner + %% then translates ink only by \XShift@,\YShift@ + %% with Postscript convention + %% For simplicity use only on scrunched boxes + %\newdimen\XShift@ + %\newdimen\YShift@ + \def\Shifted@#1{% + \vbox {\kern-\YShift@ + \hbox {\kern\XShift@\hbox{#1}\kern-\XShift@}% + \kern\YShift@}} + + %%% \cBoxedEPSF#1 the main macro + %% component macros are explained in order below + + \def\cBoxedEPSF#1{{\leavevmode + %% double brace for amstex \allign, \alligned, ... + \ReadNameAndScale@{#1}% + \SetEPSFSpec@ + \InitLog@ + \ReadEPSFile@ \ReadBdB@x + %% Calculations + \TrimFigDims@ + \CalculateFigScale@ + \ScaleFigDims@ + \SetInkShift@ + \hbox{$\mathsurround=0pt\relax + \vcenter{\hbox{% + \FrameSpider{\hskip-.4pt\vrule}% + \vbox to \Ht@{\offinterlineskip\parindent=\z@% + \FrameSpider{\vskip-.4pt\hrule}\vfil + \hbox to \Wd@{\hfil}% + \vfil + \InkShift@{\EPSFSpecial{\EPSFSpec@}{\FigSc@leReal}}% + \FrameSpider{\hrule\vskip-.4pt}}% + \FrameSpider{\vrule\hskip-.4pt}}}% + $\relax}% + \CleanRegisters@ + \ReportEPSF@ + }} + + \def\tBoxedEPSF#1{\setbox4\hbox{\cBoxedEPSF{#1}}% + \setbox4\hbox{\raise -\ht4 \hbox{\box4}}% + \box4 + } + + \def\bBoxedEPSF#1{\setbox4\hbox{\cBoxedEPSF{#1}}% + \setbox4\hbox{\raise \dp4 \hbox{\box4}}% + \box4 + } + + \let\BoxedEPSF\cBoxedEPSF% default setting + + %% Some compatibility with BoxedArt.tex + % + \let\BoxedArt\BoxedEPSF + + %% Some compatibility with Sweet-teX + % + \def\gLinefigure[#1scaled#2]_#3{% + \BoxedEPSF{#3 scaled #2}} + + %% Some compatibility with Rokicki's dvips + % + \let\EPSFbox\bBoxedEPSF \let\EPSFfile\bBoxedEPSF + + \def\EPSFxsize{\afterassignment\ForceW@\ForcedDim@@} + \def\ForceW@{\ForcedDim@true\ForcedHeight@false} + + \def\EPSFysize{\afterassignment\ForceH@\ForcedDim@@} + \def\ForceH@{\ForcedDim@true\ForcedHeight@true} + + \def\EmulateRokicki{% + \let\epsfbox\bBoxedEPSF \let\epsffile\bBoxedEPSF + \let\epsfxsize\EPSFxsize \let\epsfysize\EPSFysize} + + %%% \ReadNameAndScale@#1 + % + \def\ReadNameAndScale@#1{\IN@0 scaled@#1@% DOUBLE BARRELED + \ifIN@\ReadNameAndScale@@0#1@% + \else \ReadNameAndScale@@0#1 scaled\DefaultMilScale @% + \fi} + + \def\ReadNameAndScale@@0#1scaled#2@{% HELPER MACRO + \let\OldBackslash@\\% + \def\\{\OtherB@ckslash}% + \edef\temp@{#1}% + \Trim@0\temp@ @% + \EPSFNametoks@\EX@{\the\Trimtoks@ }% + \FigScale=#2 pt% + \let\\\OldBackslash@ + } + + \def\SetDefaultEPSFScale#1{% + \global\def\DefaultMilScale{#1}} + + \SetDefaultEPSFScale{1000} + + + %%% \ReadEPSFile@ + % + \def \SetBogusBbox@{% + \global\BdBoxtoks@{ BoundingBox:0 0 100 100 }% + \global\def\BdBoxLine@{ BoundingBox:0 0 100 100 }% + \ms@g{ !!! Will use placeholder !!!}% + } + + {\catcode`\%=12\relax\gdef\P@S@{%!}\gdef\pct@@{%%}} + %% %! min sign of PS file + + %%% Opening and closing + \def\ReadEPSFile@{%\show\EPSFSpec@% + \openin\EPSFile@\EPSFSpec@ + \relax %necessary to prevent precocious expansion of \ifeof + \ifeof\EPSFile@ + \ms@g{}% + \ms@g{ !!! EPS FILE \the\EPSFDirectorytoks@ + \the\EPSFNametoks@\space WAS NOT FOUND !!!}% + \SetBogusBbox@ + \else + \ReadEPSFile@@ + \fi + \closein\EPSFile@ + } + + %% \AdvanceLcnt@ for PC EPSF case only + \global\let\AdvanceLcnt@\relax %% initialize + \def\AdvanceLcnt@@{% + \advance\count255 1 \ifnum \count255>50 \Lcnt@ms@g \fi} + + \def\Lcnt@ms@g{\ms@g{}% + \ms@g{ !!! PC binary EPS preview probably before BoundingBox.}% + \ms@g{ !!! To accellerate, use utility to move all previews after \pct@@ EOF.}% + \global\let\AdvanceLcnt@\relax + \global\let\AdvanceLcnt@@\relax %% in all, one test, one complaint + } + + %%% Header tests + \def\ReadEPSFile@@{% + \begingroup%% + \chardef\other=12 \chardef\cmt=14 \catcode"0C=9 \catcode"7F=\cmt + \def\do##1{\catcode`##1=\other}\dospecials \catcode`\ =10 + \catcode"00=\cmt \catcode`\\=\cmt \catcode`\!=12 \catcode`\:=12 + %% next to recognize PC-type header + \global\PCfmt@false%% initialize + \catcode"C5=\other \catcode"D0=\other \catcode"D3=\other \catcode"C6=\cmt + \global\read\EPSFile@ to \HdLine@ + \IN@0\P@S@ @\HdLine@ @% + \ifIN@ %% %! accepted as %!PS so do BdBox search loop!! + %\message{*********}% + %\showthe\catcode`\% + %\showthe\catcode`\! + %\show\HdLine@ + %\show\P@S@ + \let\temp@\ReadEPSFile@@@ + \else + \def\temp@@{^^c5^^d0^^d3}% + \ifx\temp@@\HdLine@ %% sign of PC binary PostScript file header + \global\PCfmt@true + \count255=0 %% will be line counter + \let\AdvanceLcnt@\AdvanceLcnt@@ + \let\temp@\ReadEPSFile@@@ + \ifPCfmtOK@\else %% + \ms@g{}% + \ms@g{ !!! PC binary EPS file header encountered. Designated }% + \ms@g{ !!! driver may not accept this and similar EPS files.}% + \relax\global\PCfmtOK@true %% just one warning + \fi + \else + \ms@g{}% + \ms@g{ !!! \the\EPSFNametoks@\space is not PostScript.}% + \ms@g{ !!! It should begin with the "\P@S@" or PC binary header.}% + \SetBogusBbox@ + \fi + \fi + \temp@ + \endgroup%\relax + } + + %%% BoundingBox search loop + \def\ReadEPSFile@@@{\Repeat@true + \loop + \ifeof\EPSFile@\relax\Repeat@false + \ms@g{}% + \ms@g{ !!! BoundingBox NOT FOUND IN % + \the\EPSFDirectorytoks@\the\EPSFNametoks@\space!!! }% + \SetBogusBbox@ + \else + \ReadEPSFile@@@@ + \fi + \ifRepeat@ + \AdvanceLcnt@ %% is \relax unless PC EPSF; >50 => complaint + \repeat + \global\BdBoxtoks@\expandafter{\BdBoxLine@}% + } + + %%% BoundingBox or HiResBoundingBox + %% HiRes normally on line following if present at all + \def\ReadEPSFile@@@@{% + \global\read\EPSFile@ to \BdBoxLine@ + %\BdBoxtoks@\EX@{\BdBoxLine@}\ms@g{}\ms@g{ * \the\BdBoxtoks@}%%%% + \IN@0BoundingBox@\BdBoxLine@ @% + \ifIN@ + %\ms@g{}\ms@g{ * SCORE!!} + \Repeat@false + \read\EPSFile@ to \temp@ + \IN@0HiResBoundingBox:@\temp@ @% + \ifIN@ + \global\let\BdBoxLine@\temp@ + \fi + \fi} + + %%% \ReadBdB@x + % Rmk For simplicity 0 not used in syntax + % of \ReadBdB@x@, \ReadBdB@x@@ + \def\ReadBdB@x{% PART 0 + \EX@\ReadBdB@x@\the\BdBoxtoks@ @} + + \def\ReadBdB@x@#1BoundingBox:#2@{% PART 1 + \ForeTrim@0#2@% + \IN@0atend@\the\Trimtoks@ @% + \ifIN@ \Trimtoks@={0 0 100 100 }% + \ms@g{}% + \ms@g{ !!! BoundingBox not found in % + \the\EPSFDirectorytoks@\the\EPSFNametoks@\space !!!}% + \ms@g{ !!! It must not be at end of EPSF !!!}% + \ms@g{ !!! Will use placeholder !!!}% + \fi%% cf \SetBogusBbox@ + \EX@\ReadBdB@x@@\the\Trimtoks@ @% + } + + \def\ReadBdB@x@@#1 #2 #3 #4@{% PART 2 + \Wd@=#3bp\advance\Wd@ by -#1bp% + \Ht@=#4bp\advance\Ht@ by-#2bp% + \Wd@@=\Wd@ \Ht@@=\Ht@ %% useful info for Clark + \LLXtoks@={#1}\LLYtoks@={#2}%% useful for Oz + \URXtoks@={#3}\URYtoks@={#4}%% useful for epsf.tex + \ifPSOrigin\XShift@=-#1bp\YShift@=-#2bp\fi + } + + %%% \SetEPSFDirectory + % + \def\G@bbl@#1{} + \bgroup + \global\edef\OtherB@ckslash{\EX@\G@bbl@\string\\} + \egroup + + \def\SetEPSFDirectory{% Part 1 + \bgroup\PunctOther@\relax + \let\\\OtherB@ckslash + \SetEPSFDirectory@} + + \def\SetEPSFDirectory@#1{% Part 2 + \edef\temp@{#1}% + \Trim@0\temp@ @% result in \Trimtoks@ + \global\toks1\EX@{\the\Trimtoks@ }\relax + \egroup + \EPSFDirectorytoks@=\toks1 + } + + \def\SetEPSFSpec@{% + \bgroup + \let\\=\OtherB@ckslash + \global\edef\EPSFSpec@{% + \the\EPSFDirectorytoks@\the\EPSFNametoks@}% + \global\edef\EPSFSpec@{\EPSFSpec@}% + \egroup} + + %%% Is trimming done percentage-wise?? + \newif\ifPCT@ + + \def\PCTtrueErrTst@{}% + \def\PCTfalseErrTst@{}% + + %%%% Trimming figure dimensions (source) + %% + %%% \TrimSide@ + %% #1 is one of \TT@,...,\RT@; #2 is arg of \TrimTop,... + \def\TrimSide@#1#2{% + \IN@0pct@#2@% + \ifIN@ + \PCT@true\PCTtrueErrTst@ + \SPLIT@0pct@#2@% + \advance#1 by \the\Initialtoks@ pt + \else + \PCTfalseErrTst@ + \advance#1 by #2 + \fi} + + \def\TrimTop#1{\TrimSide@{\TT@}{#1}}% + \def\TrimLeft#1{\TrimSide@{\LT@}{#1}}% + \def\TrimBottom#1{\TrimSide@{\BT@}{#1}}% + \def\TrimRight#1{\TrimSide@{\RT@}{#1}}% + + \def\TrimBoundingBox#1{% + \TrimTop{#1}% + \TrimLeft{#1}% + \TrimBottom{#1}% + \TrimRight{#1}% + } + + %%% Convert percentage trim to dimension trim on source (if nec) + %% #1 is percent trim (pt is unit); #2 is source width or height + \def\PCTtoSideTrimDims@{% + \ifPCT@ + \Rescale\LT@\Wd@{100pt}%\showthe\LT@ + \Rescale\RT@\Wd@{100pt}% + \Rescale\TT@\Ht@{100pt}% + \Rescale\BT@\Ht@{100pt}% + \fi} + + \def\TrimFigDims@{% + \PCTtoSideTrimDims@ + \advance\Wd@ by -\LT@ + \advance\Wd@ by -\RT@ \RT@=\z@ + \advance\Ht@ by -\TT@ \TT@=\z@ + \advance\Ht@ by -\BT@ + } + + + %%% \CalculateFigScale@ + % + \def\ForceWidth#1{\ForcedDim@true + \ForcedDim@@#1\ForcedHeight@false} + + \def\ForceHeight#1{\ForcedDim@true + \ForcedDim@@=#1\ForcedHeight@true} + + \def\ForceOn{\ForceOn@true} + \def\ForceOff{\ForceOn@false\ForcedDim@false} + + \def\CalculateFigScale@{% + %Have default \FigScale or read \FigScale + \ifForcedDim@\FigScale=1000pt% %% start afresh + \ifForcedHeight@ + \Rescale\FigScale\ForcedDim@@\Ht@ + \else + \Rescale\FigScale\ForcedDim@@\Wd@ + \fi + \fi + \Real{\FigScale}% + \edef\FigSc@leReal{\the\Realtoks}% + } + + \def\ScaleFigDims@{\TheScale=\FigScale + \ifForcedDim@ + \ifForcedHeight@ \Ht@=\ForcedDim@@ \Scale\Wd@ + \else \Wd@=\ForcedDim@@ \Scale\Ht@ + \fi + \else \Scale\Wd@\Scale\Ht@ + \fi + \ifForceOn@\relax\else\global\ForcedDim@false\fi + \Scale\LT@\Scale\BT@ %%%\Scale\Wd@\Scale\Ht@ + \Scale\XShift@\Scale\YShift@ + } + + %%% \ShowDisplacementBoxes + %% shows (prints) corrected scaled and positioned + %% bounding boxes; for diagnostics + %%% \HideDisplacementBoxes makes them invisible again + %% + \def\HideDisplacementBoxes{\global\def\FrameSpider##1{\null}} + \def\ShowDisplacementBoxes{\global\def\FrameSpider##1{##1}} + \let\HideFigureFrames\HideDisplacementBoxes %% some synonyms + \let\ShowFigureFrames\ShowDisplacementBoxes + \ShowDisplacementBoxes + + %%% \hSlide#1, \vSlide#1 + %% + \def\hSlide#1{\advance\XSlide@ by #1} + \def\vSlide#1{\advance\YSlide@ by #1} + + %%% \SetInkShift@, \InkShift@#1 + %% + \def\SetInkShift@{% + \advance\XShift@ by -\LT@ + \advance\XShift@ by \XSlide@ + \advance\YShift@ by -\BT@ + \advance\YShift@ by -\YSlide@ + } + % + \def\InkShift@#1{\Shifted@{\Scrunched{#1}}} + + %%% \CleanRegisters@ + % + \def\CleanRegisters@{% + \globaldefs=1\relax + \XShift@=\z@\YShift@=\z@\XSlide@=\z@\YSlide@=\z@ + \TT@=\z@\LT@=\z@\BT@=\z@\RT@=\z@ + \globaldefs=0 + \global\PCT@false} + + \def\ReportEPSF@{% + \ms@g{ *** Box composed for the EPS file \the\EPSFNametoks@}% + \edef\temp@{\the\EPSFDirectorytoks@}% + \ifx\temp@\LastEPSFDirectory@\else + \WrLog@{--- change EPSF directory ==> \temp@}% + \global\let\LastEPSFDirectory@\temp@ + \fi + \def\temp@{}% + \ifPCfmt@ \edef\temp@{\space \pct@@\space EPSP binary}% + \fi + %\show\temp@ + \WrLog@\EX@{\the\EPSFNametoks@\temp@}% + } + + \gdef\LastEPSFDirectory@{}%% initialize + + %%% Special syntax for several drivers. The macros + %% \SetTexturesEPSFSpecial %% Textures + %% \SetUnixCoopEPSFSpecial %% dvi2ps early unix + %% \SetNiponUnixEPSFSpecial %% dvi2ps j-version + %% \SetBechtolsheimDVI2PSEPSFSpecial and + %% \SetBechtolsheimDVITPSEPSFSpecial %% by S.P.Bechtolsheim + %% \SetLisEPSFSpecial %% dvi2ps by Tony Lis + %% \SetepsfEPSFSpecial %% ******* will work for many: + %% ----- dvips, the Y&Y drivers, DirectTeX, CMacTeX, OzTeX>=1.7 + %% \SetRokickiEPSFSpecial %% dvips by Tom Rokicki + %% \SetDVIPSoneEPSFSpecial %% DVIPSONE of Y&Y same as + %% \SetDVIWindowEPSFSpecial %% DVIWindow of Y&Y + %% \SetDirectTeXEPSFSpecial %% DirectTeX by Wilfried Ricken + %% \SetCMacTeXEPSFSpecial %% CMacTeX by Tom Kiffe + %% \SetOzTeXEPSFSpecial %% OzTeX (>=1.7) by Andrew Trevorrow + %% ----- + %% \SetOldOzTeXEPSFSpecial %% OzTeX 1.42--1.6x + %% \SetPSprintEPSFSpecial %% PSprint by Andrew Trevorrow + %% --- also for OzTeX versions <= 1.41 !! + %% \SetArborEPSFSpecial %% ArborTeX DVILASER/PS + %% \SetClarkEPSFSpecial %% dvitops by James Clark + %% \SetBeebeEPSFSpecial %% DVIALW by N. Beebe + %% \SetNorthlakeEPSFSpecial %% Northlake Software + %% \SetStandardEPSFSpecial %% Nonexistant: Placebo used + %% + %% These many drivers are supported roughly + %% by (re-)defining the macro \EPSFSpecial#1#2, where + %% #1 = EPS file pathname (use \\ for the letter backslash) + %% #2 = scale in mils + %% Be wary of using strange characters in pathnames! + + %% Textures, Blue Sky Research, Barry Smith + \def\SetTexturesEPSFSpecial{\PSOriginfalse%\PSOrigintrue + \gdef\EPSFSpecial##1##2{\relax + \edef\specialtemp{##2}% + \SPLIT@0.@\specialtemp.@\relax + \special{illustration ##1 scaled + \the\Initialtoks@}}} + + %% Unix : dvi2ps by: Mark Senn, Stephan Bechtolsheim, + % Bob Brown, Richard, Furuta, James Schaad, Robert Wells, + % Norm Hutchinson, Neal Holt, Scott Jones, Howard Trickey. + % Introduced by B. Horn <bkph@ai.mit.edu> + \def\SetUnixCoopEPSFSpecial{\PSOrigintrue % Please test! + \gdef\EPSFSpecial##1##2{% + \dimen4=##2pt% convert real to dimen + \divide\dimen4 by 1000\relax + \Real{\dimen4}%dimens 0,2 used here + \edef\Aux@{\the\Realtoks}% + %%convert dimen to real + \special{psfile=##1\space + hscale=\Aux@\space + vscale=\Aux@}}} + + %% Unix : dvi2ps j-version 1.91j + % Introduced by Takashi Matsushita matsu@tmuds1.phys.metro-u.ac.jp + % Takafumi Sakurai, sakurai@math.s.chiba-u.ac.jp + % Kazuhiro Kazama, kazama@square.ntt.jp + \def\SetNiponUnixEPSFSpecial{\PSOriginfalse % Please test! + \gdef\EPSFSpecial##1##2{% + \dimen4=##2pt% convert real to dimen + \divide\dimen4 by 1000\relax + \Real{\dimen4}%dimens 0,2 used here + \edef\Aux@{\the\Realtoks}% + %%convert dimen to real + \special{epsfile=##1\space + hscale=\Aux@\space + vscale=\Aux@}}} + + %% Unix : dvi2ps j-version 1.91j + % Introduced by Takashi Matsushita matsu@tmuds1.phys.metro-u.ac.jp + % Takafumi Sakurai, sakurai@math.s.chiba-u.ac.jp + % Kazuhiro Kazama, kazama@square.ntt.jp + \def\SetNiponUnixEPSFSpecial{\PSOriginfalse % Please test! + \gdef\EPSFSpecial##1##2{% + \dimen4=##2pt% convert real to dimen + \divide\dimen4 by 1000\relax + \Real{\dimen4}%dimens 0,2 used here + \edef\Aux@{\the\Realtoks}% + %%convert dimen to real + {\dimen6=\the\URYtoks@ pt % + \advance\dimen6 by -\the\LLYtoks@ pt % + \dimen6=\Aux@\dimen6 + \Real{\dimen6}% + \XShift@=0bp\YShift@=\the\Realtoks bp + \Shifted@{\special{epsfile=##1\space + hscale=\Aux@\space + vscale=\Aux@}}}}} +%%% \Shifted@{\special{illustration ##1}}}}} + + + + %% dvi2ps and dvitps by S.P. Bechtolsheim, + % Introduced by B. Horn <bkph@ai.mit.edu> and Carl.M.Jones, + % testing by R. Evans <Robert@cm.cardiff.ac.uk> + % and George Denk <denk@mathematik.tu-muenchen.de> + % Note that a prolog file psfig.pro + % specific to the driver should be available. + \def\SetBechtolsheimEPSFSpecial@{%% tool macro only + \PSOrigintrue + \special{\DriverTag@ Include0 "psfig.pro"}% + \gdef\EPSFSpecial##1##2{% + \dimen4=##2pt %% convert real to dimen + \divide\dimen4 by 1000\relax + \Real{\dimen4} %% dimens 0,2 used here + \edef\Aux@{\the\Realtoks}%% convert dimen to real + \special{\DriverTag@ Literal "10 10 0 0 10 10 startTexFig + \the\mag\space 1000 div + dup 3.25 neg mul 1 index .25 neg mul translate %% correction line + \Aux@\space mul dup scale "}% + \special{\DriverTag@ Include1 "##1"}% + \special{\DriverTag@ Literal "endTexFig "}% + }} + + \def\SetBechtolsheimDVITPSEPSFSpecial{\def\DriverTag@{dvitps: }% + \SetBechtolsheimEPSFSpecial@} + + \def\SetBechtolsheimDVI2PSEPSFSSpecial{\def\DriverTag@{DVI2PS: }% + \SetBechtolsheimEPSFSpecial@} + + %% dvi2ps by Tony Lis, + % implantations? ; dates?; availability? + % Introduced by B. Horn <bkph@ai.mit.edu> + \def\SetLisEPSFSpecial{\PSOrigintrue + \gdef\EPSFSpecial##1##2{% + \dimen4=##2pt% convert real to dimen + \divide\dimen4 by 1000\relax + \Real{\dimen4}% dimens 0,2 used here + \edef\Aux@{\the\Realtoks}% + %%convert dimen to real + \special{pstext="10 10 0 0 10 10 startTexFig\space + \the\mag\space 1000 div \Aux@\space mul + \the\mag\space 1000 div \Aux@\space mul scale"}% + \special{psfile=##1}% + \special{pstext=endTexFig}% + }} + + %% dvips by Tom Rokicki; free driver in portable C + % Introduced by W.D. Neumann <neumann@mps.ohio-state.edu> + \def\SetRokickiEPSFSpecial{\PSOrigintrue + \gdef\EPSFSpecial##1##2{% + \dimen4=##2pt% convert real to dimen + \divide\dimen4 by 10\relax + \Real{\dimen4}% dimens 0,2 used here + \edef\Aux@{\the\Realtoks}% + %%convert dimen to real + \special{psfile="##1"\space + hscale=\Aux@\space + vscale=\Aux@}}} + + \def\SetInlineRokickiEPSFSpecial{\PSOrigintrue + \gdef\EPSFSpecial##1##2{% + \dimen4=##2pt% convert real to dimen + \divide\dimen4 by 1000\relax + \Real{\dimen4}% dimens 0,2 used here + \edef\Aux@{\the\Realtoks}% + %%convert dimen to real + \special{ps::[begin] 10 10 0 0 10 10 startTexFig\space + \the\mag\space 1000 div \Aux@\space mul + \the\mag\space 1000 div \Aux@\space mul scale}% + \special{ps: plotfile ##1}% + \special{ps::[end] endTexFig}% + }} + + %%% Rokicki's epsf.tex syntax. + %% Is followed by DirectTeX (W. Ricken) + %% CMacTeX (Tom Kiffe), Y&Y's drivers, and OzTeX >= 1.7 + \def\SetepsfEPSFSpecial{\PSOriginfalse + \gdef\epsfclipstring{}% + %% make { clip} if you want to clip (non-portably) + %% down to the PostScript bounding box. (OzTeX refuses this) + \gdef\EPSFSpecial##1##2{% + \dimen4=##2pt %% convert mil scale to dimen + \divide\dimen4 by 100 %% 1000ths to 10ths + \Real{\dimen4}%% dimens 0,2 used here + \edef\theScaleholder@{\the\Realtoks}% + \dimen6=\the\URXtoks@ pt %% not bp!!!!! + \advance\dimen6 by -\the\LLXtoks@ pt + %% \dimen6 now (bbox width) * points + \dimen6=\theScaleholder@\dimen6 \Real{\dimen6}%% dimens 0,2 used here + \edef\Temp{\the\Realtoks}% + %% \Temp now holds decimal real no + %% 10 times desired "real width" (rwi) in bp + \dimen6=\the\URYtoks@ pt % + \advance\dimen6 by -\the\LLYtoks@ pt % + \dimen6=\theScaleholder@\dimen6 \Real{\dimen6}% + \special{PSfile=##1\space + llx=\the\LLXtoks@\space lly=\the\LLYtoks@\space + urx=\the\URXtoks@\space ury=\the\URYtoks@\space + rwi=\Temp\space rhi=\the\Realtoks + \epsfclipstring}% + }} + %% Rmk: Under epsf.tex only multiples of (1/10) bp available widths + %% but considerably more accuracy available here. + + \let\SetDirectTeXEPSFSpecial=\SetepsfEPSFSpecial + \let\SetCMacTeXEPSFSpecial=\SetepsfEPSFSpecial + \let\SetOzTeXEPSFSpecial=\SetepsfEPSFSpecial + %%% \SetOzTeXEPSFSpecial only for OzTeX in versions 1.7 and later + + %%% Old OzTeX versions (1.42 to 1.6), by Andrew Trevorrow. + %%% For versions <= 1.41 use \SetPSprintEPSFSpecial below. + %% Nota: Version 1.42--1.5 may give + %% spurious "offpage" error notices on printing. + \def\SetOldOzTeXEPSFSpecial{\PSOrigintrue + \gdef\EPSFSpecial##1##2{% + \dimen4=##2pt%% convert real to dimen + \divide\dimen4 by 1000\relax + \Real{\dimen4}%% dimens 0,2 used here + \edef\Aux@{\the\Realtoks}%% convert dimen to real + \special{epsf=\string"##1\string"\space scale=\Aux@}% + }} + + %% PSprint, by AndrewTrevorrow for VaX VMS + %% and OzTeX versions <= 1.41 + % tested 2-91 by Max Calviani <ISICA@ASTRPD.infn.it> + \def\SetPSprintEPSFSpecial{\PSOriginfalse % artifice; see below + \gdef\EPSFSpecial##1##2{%note order + \special{##1\space + ##2 1000 div \the\mag\space 1000 div mul + ##2 1000 div \the\mag\space 1000 div mul scale + \the\LLXtoks@\space neg \the\LLYtoks@\space neg translate + }}} + + %% DVILASER/PS driver originally written by David Fuchs + % marketed and supported by ArborTeXt 535 W. William St. + % Suite 300, Ann Arbor, MI 48103, U.S.A + % (313) 996-3566 (313) 996-3573 + % help@arbortext.com, Andrew Dobrowolski + \def\SetArborEPSFSpecial{\PSOriginfalse % check! + \gdef\EPSFSpecial##1##2{% + \edef\specialthis{##2}% + \SPLIT@0.@\specialthis.@\relax % suppress decimals (nec!) + \special{ps: epsfile ##1\space \the\Initialtoks@}}} + + %% dvitops, (c) James Clark <jjc@jclark.uucp> + % public domain; distributed by UK TeX Archive + % computers: unix, msdos, vms, primos and vm/cms, + % introduced by S. Ratz <spqr@uk.ac.southampton.ecs> + \def\SetClarkEPSFSpecial{\PSOriginfalse % please test! + \gdef\EPSFSpecial##1##2{% + \Rescale {\Wd@@}{##2pt}{1000pt}% + \Rescale {\Ht@@}{##2pt}{1000pt}% + \special{dvitops: import + ##1\space\the\Wd@@\space\the\Ht@@}}} + + %% DVIPSONE, for PC compatibles + % Y&Y, 106 Indian Hill, Carlisle MA 01741, USA + % (508) 371-3286 + % (introduced by B. Horn <bkph@ai.mit.edu>) + \let\SetDVIPSONEEPSFSpecial\SetepsfEPSFSpecial + \let\SetDVIPSoneEPSFSpecial\SetepsfEPSFSpecial + \let\SetDVIWindowEPSFSpecial\SetepsfEPSFSpecial + + %% DVIALW by N. Beebe, public domain + % DVI Driver Distribution, Center for Scientific Computing, + % Department of Mathematics, 220 South Physics Building, + % University of Utah, Salt Lake City, UT 84112, USA + % (introduced by B. Horn <bkph@ai.mit.edu>) + % Proposed standard; see TUGboat article 1993. + \def\SetBeebeEPSFSpecial{%please test! + \PSOriginfalse% + \gdef\EPSFSpecial##1##2{\relax + \special{language "PS", + literal "##2 1000 div ##2 1000 div scale", + position = "bottom left", + include "##1"}}} + \let\SetDVIALWEPSFSpecial\SetBeebeEPSFSpecial + + %% Northlake software + \def\SetNorthlakeEPSFSpecial{\PSOrigintrue + \gdef\EPSFSpecial##1##2{% + \edef\specialthis{##2}% + \SPLIT@0.@\specialthis.@\relax % suppress decimals (nec!) + \special{insert ##1,magnification=\the\Initialtoks@}}} + + %%% MultiSpecial for Textures PLUS drivers supporting epsf.tex + %%% syntax of Rokicki (one of many dvips syntaxes) + %% *experimental* 2-95 + \def\SetEPSFMultiSpecial{\PSOriginfalse + \csname newwrite\endcsname \EPSFile@@ + \immediate\openout\EPSFile@@ illustration + \immediate\write\EPSFile@@ {\P@S@}% + \immediate\write\EPSFile@@ {\pct@@ Remark: Tranquilizer for OzTeX...}% + \immediate\closeout\EPSFile@@ + \gdef\EPSFSpecial##1##2{% + \dimen4=##2pt %% convert mil scale to dimen + \divide\dimen4 by 100 %% 1000ths to 10ths + \Real{\dimen4}%% dimens 0,2 used here + \edef\theScaleholder@{\the\Realtoks}% + \dimen6=\the\URXtoks@ pt %% not bp!!!!! + \advance\dimen6 by -\the\LLXtoks@ pt + %% \dimen6 now (bbox width) * points + \dimen6=\theScaleholder@\dimen6 \Real{\dimen6}%% dimens 0,2 used here + \edef\Temp{\the\Realtoks}% + %% \Temp now holds decimal real no + %% 10 times desired "real width" (rwi) in bp + \dimen6=\the\URYtoks@ pt % + \advance\dimen6 by -\the\LLYtoks@ pt % + \dimen6=\theScaleholder@\dimen6 \Real{\dimen6}% + \special{PSfile=##1\space + llx=\the\LLXtoks@\space lly=\the\LLYtoks@\space + urx=\the\URXtoks@\space ury=\the\URYtoks@\space + rwi=\Temp\space rhi=\the\Realtoks}% + \edef\specialtemp{##2}% + \SPLIT@0.@\specialtemp.@\relax + \special{illustration ##1 scaled \the\Initialtoks@}% + }} + + \def\SetStandardEPSFSpecial{% + \gdef\EPSFSpecial##1##2{% + \ms@g{} + \ms@g{% + !!! Sorry! There is still no standard for \noexpand + \special EPSF integration !!!}% + \ms@g{% + --- So you will have to identify your driver using a command}% + \ms@g{% + --- of the form \string\Set...EPSFSpecial, in order to get}% + \ms@g{% + --- your graphics to print.}% + \ms@g{% + Update your BoxedEPSF and read the documentation.}% + \ms@g{} + \gdef\EPSFSpecial####1####2{} + }} + + \SetStandardEPSFSpecial %% currently gives warning + + \let\wlog\wlog@ld %%restore logging + + \catcode`\:=\C@tColon + \catcode`\;=\C@tSemicolon + \catcode`\?=\C@tQmark + \catcode`\!=\C@tEmark + \catcode`\"=\C@tDqt + + \catcode`\@=\EPSFCatAt + + \endinput + +%%%%%%%%%%%% ASCII Character test + % + % Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ + % Lower case letters: abcdefghijklmnopqrstuvwxyz + % Digits: 0123456789 + % Square, curly, angle braces, parentheses: [] {} <> () + % Backslash, slash, vertical bar: \ / | + % Punctuation: . ? ! , : ; + % Underscore, hyphen, equals sign: _ - = + % Quotes--right left double: ' ` " + %"at", "number" "dollar", "percent", "and": @ # $ % & + % "hat", "star", "plus", "tilde": ^ * + ~ + % + %%%%%%%%%%%%%%%%%%%%%%%% + % + % Une seule erreur de transmission peut empoisoner un programme! + % + % A single transmission error can poison a whole program. + % + %%%%%%%%%%%%%%%%%%%%%%%% diff --git a/macros/generic/boxedeps/boxedeps.tex-old b/macros/generic/boxedeps/boxedeps.tex-old new file mode 100644 index 0000000000..73113c21b1 --- /dev/null +++ b/macros/generic/boxedeps/boxedeps.tex-old @@ -0,0 +1,861 @@ + %% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %% + %%%%% boxedeps.tex + %%%%% MACROS FOR FIGURE INSERTS OF EPSF NORM %%%%% + %%%%% (EPSF = Encapsulated PostScript File) + %% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %% + %%% AUTHOR: Laurent Siebenmann + %% lcs@topo.math.u-psud.fr + %% + %%% VERSIONS: Feb 1991 -- Feb 1995 + %% Revisions bi-annual approx. + %% + %%% SOMMAIRE: boxedeps.tex d\'efinit des macro-commandes + %% qui permettent d'int\'egrer dans un document TeX des + %% objets graphiques d\'ecrits par fichier de norme EPSF, + %% tout en accordant a chacun le statut d'une bo\^ite TeX ayant + %% les bonnes dimensions. La (seule!) contribution unique + %% de ce fichier est de faire cela d'une fa{\c}con universelle. + %% C'est a dire de fa{\c}con \`a pouvoir commod\'ement + %% servir avec tout pilote d'imprimante de norme + %% PostScript --- malgr\'e l'absence d'une norme + %% pour \special. + %% + %%%% ACTIVATION: + %% by a driver-by-driver protocol + %% see \SetTexturesEPSFSpecial + %% and its companions below. + %% + %%%% DOCUMENTATION: + %% --- see boxedeps.doc + %% The complete utility is called BoxedEPSF + %% + %%%% POSTINGS: anonymous ftp + %% --- ftp matups.math.u-psud.fr [192.54.146.4] + %% is the master copy in 1994. + %% --- ftp.uni-stuttgart.de + %% --- ftp ftp.TeX.AC.UK + %% --- ftp ftp.SHSU.edu + %% Locate the full package on these three + %% "CTAN" servers by using (while connected) the command + %% QUOTE SITE INDEX boxedeps + + %%%% RECENT ADDITIONS: \SetepsfEPSFSpecial simultaneously serves + %% dvips, the Y&Y drivers, DirectTeX, CMacTeX, OzTeX>=1.7 + %% \SetOldOzTeXEPSFSpecial %% OzTeX 1.42--1.6x + + \ifx\MYUNDEFINED\BoxedEPSF + \let\temp\relax + \else + \message{} + \message{ !!! \string\BoxedEPSF or \string\BoxedArt % + macros already defined !!!} + \let\temp\endinput + \fi + \temp + + \chardef\EPSFCatAt\the\catcode`\@ + \catcode`\@=11 + + \chardef\C@tColon\the\catcode`\: + \chardef\C@tSemicolon\the\catcode`\; + \chardef\C@tQmark\the\catcode`\? + \chardef\C@tEmark\the\catcode`\! + \chardef\C@tDqt\the\catcode`\" + + \def\PunctOther@{\catcode`\:=12 + \catcode`\;=12 \catcode`\?=12 \catcode`\!=12 \catcode`\"=12} + \PunctOther@ + + %%temporarily suppress Plain's logging of allocations + \let\wlog@ld\wlog + \def\wlog#1{\relax} + + %% New for TOOLS + %\newif\ifIN@ + \newdimen\XShift@ \newdimen\YShift@ + \newtoks\Realtoks + + %%% New for BoxedEPSF + % + \newdimen\Wd@ \newdimen\Ht@ + \newdimen\Wd@@ \newdimen\Ht@@ + % + \newdimen\TT@ + \newdimen\LT@ + \newdimen\BT@ + \newdimen\RT@ + % + \newdimen\XSlide@ \newdimen\YSlide@ + % + \newdimen\TheScale %% secretly scale in mils: 1pt= 1mil + \newdimen\FigScale %% secretly scale in mils: 1pt= 1mil + % + \newdimen\ForcedDim@@ + + \newtoks\EPSFDirectorytoks@ + \newtoks\EPSFNametoks@ + \newtoks\BdBoxtoks@ + \newtoks\LLXtoks@ %% useful info for Oz + \newtoks\LLYtoks@ + \newtoks\URXtoks@ %% further useful epsf.tex syntax + \newtoks\URYtoks@ + + + \newif\ifNotIn@ + \newif\ifForcedDim@ + \newif\ifForceOn@ + \newif\ifForcedHeight@ + \newif\ifPSOrigin + + \newread\EPSFile@ + + %%%% MESSAGES (separate macro best for Europe) + %% + \def\ms@g{\immediate\write16} + + %%%% WORD-PROCESSING MACROS + %% + %%% \IN@0#1@#2@ : Is 1st exp of #1 in 1st exp of #2 ?? + %% Answer in \ifIN@ + \newif\ifIN@\def\IN@{\expandafter\INN@\expandafter} + \long\def\INN@0#1@#2@{\long\def\NI@##1#1##2##3\ENDNI@ + {\ifx\m@rker##2\IN@false\else\IN@true\fi}% + \expandafter\NI@#2@@#1\m@rker\ENDNI@} + \def\m@rker{\m@@rker} + + %%% \SPLIT@0#1@#2@ : Split 1st exp of #2 at 1st exp of #1 + %% \Initialtoks@ , \Terminaltoks@ will contain pieces + \newtoks\Initialtoks@ \newtoks\Terminaltoks@ + \def\SPLIT@{\expandafter\SPLITT@\expandafter} + \def\SPLITT@0#1@#2@{\def\TTILPS@##1#1##2@{% + \Initialtoks@{##1}\Terminaltoks@{##2}}\expandafter\TTILPS@#2@} + + %%%% MACROS TO TRIM \ForeTrim@0#1@ and \Trim@0#1@ + %% result appears in \Trimtoks@ + %% LIMITATION: assume no multiple spaces to trim + + \newtoks\Trimtoks@ + + %%% \ForeTrim@0#1@ trims initial space of first erpansion of #1 + %% #1 of form \the\toks0 or \mymacro + \def\ForeTrim@{\expandafter\ForeTrim@@\expandafter} + \def\ForePrim@0 #1@{\Trimtoks@{#1}} + \def\ForeTrim@@0#1@{\IN@0\m@rker. @\m@rker.#1@% + \ifIN@\ForePrim@0#1@% + \else\Trimtoks@\expandafter{#1}\fi} + %%\m@rker expands here to \m@@rker since spot initial, + %% so no confusuion with \m@rker + + %%% \Trim@0#1@ trims init and terminal spaces + %% Same syntax. + %% Warns if internal spaces found. + %% + \def\Trim@0#1@{% + \ForeTrim@0#1@% + \IN@0 @\the\Trimtoks@ @% + \ifIN@ + \SPLIT@0 @\the\Trimtoks@ @\Trimtoks@\Initialtoks@ + \IN@0\the\Terminaltoks@ @ @% + \ifIN@ + \else \Trimtoks@ {FigNameWithSpace}% + \fi + \fi + } + + + %%%% MATH MACROS (provisional) + %% use dimen registers for reals; unit 1pt + %% (numerical dimension arguments OK unless contrary noted) + + %%%% One needs the point token seq (pt with cat 12) USES dimen 0 + \newtoks\pt@ks + \def\getpt@ks 0.0#1@{\pt@ks{#1}} + \dimen0=0pt\relax\expandafter\getpt@ks\the\dimen0@ + + %%% Convert dimen to "decimal multiplier"% USES dimens 0,2 + %\newtoks\Realtoks% the output! + \def\Real#1{% + \dimen2=#1% + \SPLIT@0\the\pt@ks @\the\dimen2@%% lop off the points + \Realtoks=\Initialtoks@ %\showthe\Realtoks + } + + %%% Multiplication + % USES dimens 0,2,4,6; preserves args; output \Product + \newdimen\Product + \def\Mult#1#2{% + \dimen4=#1\relax + \dimen6=#2% + \Real{\dimen4}% + \Product=\the\Realtoks\dimen6% + } + + %%% Inverse + % USES dimens 0; preserves arg; output \Inverse + \newdimen\Inverse + \newdimen\hmxdim@ \hmxdim@=8192pt%halfmaxdimen + \def\Invert#1{% + \Inverse=\hmxdim@ + \dimen0=#1% + \divide\Inverse \dimen0% + \multiply\Inverse 8} + + %%% \Rescale#1#2#3 % USES dimens 0,2,4,6 + %% alters dimen register #1 by ratio #2/#3 + %% where #2,#3 can be raw dimensions OR dimen registers + \def\Rescale#1#2#3{% Adequate accuracy. Can improve. + \divide #1 by 100\relax + \dimen2=#3\divide\dimen2 by 100 \Invert{\dimen2}% + \Mult{#1}{#2}% + \Mult\Product\Inverse + #1=\Product} + + %%% \Scale#1 scales dimen register #1 + %% by dimen register real \TheScale; USES dimens 0 + \def\Scale#1{\dimen0=\TheScale + \divide #1 by 1280 %% 1280*5120*10=1000*2^16 + \divide \dimen0 by 5120 + \multiply#1 by \dimen0 + \divide#1 by 10 %% max size of #1 about 32000/10 pt + } + + %%% SCRUNCHING BOXES AND SHIFTING CONTENTS + %% TeX has to do this in general + %% since some drivers do not let + %% one do it readily using Postscript + + \newbox\scrunchbox + + %%% \Scrunched#1 puts #1 in an hbox + %% then in effect zeros the dimensions of this box + \def\Scrunched#1{{\setbox\scrunchbox\hbox{#1}% + \wd\scrunchbox=0pt + \ht\scrunchbox=0pt + \dp\scrunchbox=0pt + \box\scrunchbox}} + + %%% \Shifted@#1 puts #1 in \hbox + %% then locates basepoint to bottom left corner + %% then translates ink only by \XShift@,\YShift@ + %% with Postscript convention + %% For simplicity use only on scrunched boxes + %\newdimen\XShift@ + %\newdimen\YShift@ + \def\Shifted@#1{% + \vbox {\kern-\YShift@ + \hbox {\kern\XShift@\hbox{#1}\kern-\XShift@}% + \kern\YShift@}} + + %%% \cBoxedEPSF#1 the main macro + %% component macros are explained in order below + + \def\cBoxedEPSF#1{{\leavevmode + %% double brace for amstex \allign, \alligned, ... + \ReadNameAndScale@{#1}% + \SetEPSFSpec@ + \ReadEPSFile@ \ReadBdB@x + %% Calculations + \TrimFigDims@ + \CalculateFigScale@ + \ScaleFigDims@ + \SetInkShift@ + \hbox{$\mathsurround=0pt\relax + \vcenter{\hbox{% + \FrameSpider{\hskip-.4pt\vrule}% + \vbox to \Ht@{\offinterlineskip\parindent=\z@% + \FrameSpider{\vskip-.4pt\hrule}\vfil + \hbox to \Wd@{\hfil}% + \vfil + \InkShift@{\EPSFSpecial{\EPSFSpec@}{\FigSc@leReal}}% + \FrameSpider{\hrule\vskip-.4pt}}% + \FrameSpider{\vrule\hskip-.4pt}}}% + $\relax}% + \CleanRegisters@ + \ms@g{ *** Box composed for the % + EPS file \the\EPSFNametoks@}% + }} + + \def\tBoxedEPSF#1{\setbox4\hbox{\cBoxedEPSF{#1}}% + \setbox4\hbox{\raise -\ht4 \hbox{\box4}}% + \box4 + } + + \def\bBoxedEPSF#1{\setbox4\hbox{\cBoxedEPSF{#1}}% + \setbox4\hbox{\raise \dp4 \hbox{\box4}}% + \box4 + } + + \let\BoxedEPSF\cBoxedEPSF% default setting + + %% Some compatibility with BoxedArt.tex + % + \let\BoxedArt\BoxedEPSF + + %% Some compatibility with Sweet-teX + % + \def\gLinefigure[#1scaled#2]_#3{% + \BoxedEPSF{#3 scaled #2}} + + %% Some compatibility with Rokicki's dvips + % + \let\EPSFbox\bBoxedEPSF \let\EPSFfile\bBoxedEPSF + + \def\EPSFxsize{\afterassignment\ForceW@\ForcedDim@@} + \def\ForceW@{\ForcedDim@true\ForcedHeight@false} + + \def\EPSFysize{\afterassignment\ForceH@\ForcedDim@@} + \def\ForceH@{\ForcedDim@true\ForcedHeight@true} + + \def\EmulateRokicki{% + \let\epsfbox\bBoxedEPSF \let\epsffile\bBoxedEPSF + \let\epsfxsize\EPSFxsize \let\epsfysize\EPSFysize} + + %%% \ReadNameAndScale@#1 + % + \def\ReadNameAndScale@#1{\IN@0 scaled@#1@% DOUBLE BARRELED + \ifIN@\ReadNameAndScale@@0#1@% + \else \ReadNameAndScale@@0#1 scaled\DefaultMilScale @% + \fi} + + \def\ReadNameAndScale@@0#1scaled#2@{% HELPER MACRO + \let\OldBackslash@\\% + \def\\{\OtherB@ckslash}% + \edef\temp@{#1}% + \Trim@0\temp@ @% + \EPSFNametoks@\expandafter{\the\Trimtoks@ }% + \FigScale=#2 pt% + \let\\\OldBackslash@ + } + + \def\SetDefaultEPSFScale#1{% + \global\def\DefaultMilScale{#1}} + + \SetDefaultEPSFScale{1000} + + + %%% \ReadEPSFile@ + % + \def \SetBogusBbox@{% + \global\BdBoxtoks@{ BoundingBox:0 0 100 100 }% + \global\def\BdBoxLine@{ BoundingBox:0 0 100 100 }% + \ms@g{ !!! Will use placeholder !!!}% + } + + {\catcode`\%=12\gdef\P@S@{%!}\gdef\pct@@{%%}} %% %! min sign of PS file + + \def\ReadEPSFile@{%\show\EPSFSpec@% + \openin\EPSFile@\EPSFSpec@ + \relax %necessary to prevent precocious expansion of \ifeof + \ifeof\EPSFile@ + \ms@g{}% + \ms@g{ !!! EPS FILE \the\EPSFDirectorytoks@ + \the\EPSFNametoks@\space WAS NOT FOUND !!!}% + \SetBogusBbox@ + \else%\fi + \begingroup%% + \catcode`\%=12\catcode`\:=12\catcode`\!=12 + \catcode"00=14 \catcode"7F=14 \catcode`\\=14 + %% 14 = comment, terminates input line; + %% 5 = CR just picks up extra space + \global\read\EPSFile@ to \BdBoxLine@ %\show\BdBoxLine@ + \IN@0\P@S@ @\BdBoxLine@ @% + \ifIN@ %% %! accepted as %!PS so do BdBox search!! + \NotIn@true + \loop + \ifeof\EPSFile@\NotIn@false + \ms@g{}% + \ms@g{ !!! BoundingBox NOT FOUND IN % + \the\EPSFDirectorytoks@\the\EPSFNametoks@\space!!! }% + \SetBogusBbox@ + \else\global\read\EPSFile@ to \BdBoxLine@ + %\show\BdBoxLine@ + \fi + \global\BdBoxtoks@\expandafter{\BdBoxLine@}% + \IN@0BoundingBox:@\the\BdBoxtoks@ @% + \ifIN@\NotIn@false\fi% + \ifNotIn@ + \repeat + \else + \ms@g{}% + \ms@g{ !!! \the\EPSFNametoks@\space is not PostScript.}% + \ms@g{ !!! It should begin with the "\P@S@". }% + \ms@g{ !!! Also, all other header lines until }% + \ms@g{ !!! "\pct@@ EndComments" should begin with "\pct@@". }% + \SetBogusBbox@ + \fi + \endgroup\relax + \fi + \closein\EPSFile@ + } + + + %%% \ReadBdB@x + % Rmk For simplicity 0 not used in syntax + % of \ReadBdB@x@, \ReadBdB@x@@ + \def\ReadBdB@x{% PART 0 + \expandafter\ReadBdB@x@\the\BdBoxtoks@ @} + + \def\ReadBdB@x@#1BoundingBox:#2@{% PART 1 + \ForeTrim@0#2@% + \IN@0atend@\the\Trimtoks@ @% + \ifIN@ \Trimtoks@={0 0 100 100 }% + \ms@g{}% + \ms@g{ !!! BoundingBox not found in % + \the\EPSFDirectorytoks@\the\EPSFNametoks@\space !!!}% + \ms@g{ !!! It must not be at end of EPSF !!!}% + \ms@g{ !!! Will use placeholder !!!}% + \fi%% cf \SetBogusBbox@ + \expandafter\ReadBdB@x@@\the\Trimtoks@ @% + } + + \def\ReadBdB@x@@#1 #2 #3 #4@{% PART 2 + \Wd@=#3bp\advance\Wd@ by -#1bp% + \Ht@=#4bp\advance\Ht@ by-#2bp% + \Wd@@=\Wd@ \Ht@@=\Ht@ %% useful info for Clark + \LLXtoks@={#1}\LLYtoks@={#2}%% useful for Oz + \URXtoks@={#3}\URYtoks@={#4}%% useful for epsf.tex + \ifPSOrigin\XShift@=-#1bp\YShift@=-#2bp\fi + } + + %%% \SetEPSFDirectory + % + \def\G@bbl@#1{} + \bgroup + \global\edef\OtherB@ckslash{\expandafter\G@bbl@\string\\} + \egroup + + \def\SetEPSFDirectory{% Part 1 + \bgroup\PunctOther@\relax + \let\\\OtherB@ckslash + \SetEPSFDirectory@} + + \def\SetEPSFDirectory@#1{% Part 2 + \edef\temp@{#1}% + \Trim@0\temp@ @% result in \Trimtoks@ + \global\toks1\expandafter{\the\Trimtoks@ }\relax + \egroup + \EPSFDirectorytoks@=\toks1 + } + + \def\SetEPSFSpec@{% + \bgroup + \let\\=\OtherB@ckslash + \global\edef\EPSFSpec@{% + \the\EPSFDirectorytoks@\the\EPSFNametoks@}% + \global\edef\EPSFSpec@{\EPSFSpec@}% + \egroup} + + %%% \TrimFigDims@ + % + \def\TrimTop#1{\advance\TT@ by #1} + \def\TrimLeft#1{\advance\LT@ by #1} + \def\TrimBottom#1{\advance\BT@ by #1} + \def\TrimRight#1{\advance\RT@ by #1} + + \def\TrimBoundingBox#1{% + \TrimTop{#1}% + \TrimLeft{#1}% + \TrimBottom{#1}% + \TrimRight{#1}% + } + + \def\TrimFigDims@{% + \advance\Wd@ by -\LT@ + \advance\Wd@ by -\RT@ \RT@=\z@ + \advance\Ht@ by -\TT@ \TT@=\z@ + \advance\Ht@ by -\BT@ + } + + + %%% \CalculateFigScale@ + % + \def\ForceWidth#1{\ForcedDim@true + \ForcedDim@@#1\ForcedHeight@false} + + \def\ForceHeight#1{\ForcedDim@true + \ForcedDim@@=#1\ForcedHeight@true} + + \def\ForceOn{\ForceOn@true} + \def\ForceOff{\ForceOn@false\ForcedDim@false} + + \def\CalculateFigScale@{% + %Have default \FigScale or read \FigScale + \ifForcedDim@\FigScale=1000pt% %% start afresh + \ifForcedHeight@ + \Rescale\FigScale\ForcedDim@@\Ht@ + \else + \Rescale\FigScale\ForcedDim@@\Wd@ + \fi + \fi + \Real{\FigScale}% + \edef\FigSc@leReal{\the\Realtoks}% + } + + \def\ScaleFigDims@{\TheScale=\FigScale + \ifForcedDim@ + \ifForcedHeight@ \Ht@=\ForcedDim@@ \Scale\Wd@ + \else \Wd@=\ForcedDim@@ \Scale\Ht@ + \fi + \else \Scale\Wd@\Scale\Ht@ + \fi + \ifForceOn@\relax\else\global\ForcedDim@false\fi + \Scale\LT@\Scale\BT@ %%%\Scale\Wd@\Scale\Ht@ + \Scale\XShift@\Scale\YShift@ + } + + %%% \ShowDisplacementBoxes + %% shows (prints) corrected scaled and positioned + %% bounding boxes; for diagnostics + %%% \HideDisplacementBoxes makes them invisible again + %% + \def\HideDisplacementBoxes{\global\def\FrameSpider##1{\null}} + \def\ShowDisplacementBoxes{\global\def\FrameSpider##1{##1}} + \let\HideFigureFrames\HideDisplacementBoxes %% some synonyms + \let\ShowFigureFrames\ShowDisplacementBoxes + \ShowDisplacementBoxes + + %%% \hSlide#1, \vSlide#1 + %% + \def\hSlide#1{\advance\XSlide@ by #1} + \def\vSlide#1{\advance\YSlide@ by #1} + + %%% \SetInkShift@, \InkShift@#1 + %% + \def\SetInkShift@{% + \advance\XShift@ by -\LT@ + \advance\XShift@ by \XSlide@ + \advance\YShift@ by -\BT@ + \advance\YShift@ by -\YSlide@ + } + % + \def\InkShift@#1{\Shifted@{\Scrunched{#1}}} + + %%% \CleanRegisters@ + % + \def\CleanRegisters@{% + \globaldefs=1\relax + \XShift@=\z@\YShift@=\z@\XSlide@=\z@\YSlide@=\z@ + \TT@=\z@\LT@=\z@\BT@=\z@\RT@=\z@ + \globaldefs=0\relax} + + %%% Special syntax for several drivers. The macros + %% \SetTexturesEPSFSpecial %% Textures + %% \SetUnixCoopEPSFSpecial %% dvi2ps early unix + %% \SetBechtolsheimDVI2PSEPSFSpecial and + %% \SetBechtolsheimDVITPSEPSFSpecial %% by S.P.Bechtolsheim + %% \SetLisEPSFSpecial %% dvi2ps by Tony Lis + %% \SetepsfEPSFSpecial %% ******* will work for many: + %% ----- dvips, the Y&Y drivers, DirectTeX, CMacTeX, OzTeX>=1.7 + %% \SetRokickiEPSFSpecial %% dvips by Tom Rokicki + %% \SetDVIPSoneEPSFSpecial %% DVIPSONE of Y&Y same as + %% \SetDVIWindowEPSFSpecial %% DVIWindow of Y&Y + %% \SetDirectTeXEPSFSpecial %% DirectTeX by Wilfried Ricken + %% \SetCMacTeXEPSFSpecial %% CMacTeX by Tom Kiffe + %% \SetOzTeXEPSFSpecial %% OzTeX (>=1.7) by Andrew Trevorrow + %% ----- + %% \SetOldOzTeXEPSFSpecial %% OzTeX 1.42--1.6x + %% \SetPSprintEPSFSpecial %% PSprint by Andrew Trevorrow + %% --- also for OzTeX versions <= 1.41 !! + %% \SetArborEPSFSpecial %% ArborTeX DVILASER/PS + %% \SetClarkEPSFSpecial %% dvitops by James Clark + %% \SetBeebeEPSFSpecial %% DVIALW by N. Beebe + %% \SetNorthlakeEPSFSpecial %% Northlake Software + %% \SetStandardEPSFSpecial %% Nonexistant: Placebo used + %% + %% These many drivers are supported roughly + %% by (re-)defining the macro \EPSFSpecial#1#2, where + %% #1 = EPS file pathname (use \\ for the letter backslash) + %% #2 = scale in mils + %% Be wary of using strange characters in pathnames! + + %% Textures, Blue Sky Research, Barry Smith + \def\SetTexturesEPSFSpecial{\PSOriginfalse%\PSOrigintrue + \gdef\EPSFSpecial##1##2{\relax + \edef\specialtemp{##2}% + \SPLIT@0.@\specialtemp.@\relax + \special{illustration ##1 scaled + \the\Initialtoks@}}} + + %% Unix : dvi2ps by: Mark Senn, Stephan Bechtolsheim, + % Bob Brown, Richard, Furuta, James Schaad, Robert Wells, + % Norm Hutchinson, Neal Holt, Scott Jones, Howard Trickey. + % Introduced by B. Horn <bkph@ai.mit.edu> + \def\SetUnixCoopEPSFSpecial{\PSOrigintrue % Please test! + \gdef\EPSFSpecial##1##2{% + \dimen4=##2pt% convert real to dimen + \divide\dimen4 by 1000\relax + \Real{\dimen4}%dimens 0,2 used here + \edef\Aux@{\the\Realtoks}% + %%convert dimen to real + \special{psfile=##1\space + hscale=\Aux@\space + vscale=\Aux@}}} + + + %% dvi2ps and dvitps by S.P. Bechtolsheim, + % Introduced by B. Horn <bkph@ai.mit.edu> and Carl.M.Jones, + % testing by R. Evans <Robert@cm.cardiff.ac.uk> + % and George Denk <denk@mathematik.tu-muenchen.de> + % Note that a prolog file psfig.pro + % specific to the driver should be available. + \def\SetBechtolsheimEPSFSpecial@{%% tool macro only + \PSOrigintrue + \special{\DriverTag@ Include0 "psfig.pro"}% + \gdef\EPSFSpecial##1##2{% + \dimen4=##2pt %% convert real to dimen + \divide\dimen4 by 1000\relax + \Real{\dimen4} %% dimens 0,2 used here + \edef\Aux@{\the\Realtoks}%% convert dimen to real + \special{\DriverTag@ Literal "10 10 0 0 10 10 startTexFig + \the\mag\space 1000 div + dup 3.25 neg mul 1 index .25 neg mul translate %% correction line + \Aux@\space mul dup scale "}% + \special{\DriverTag@ Include1 "##1"}% + \special{\DriverTag@ Literal "endTexFig "}% + }} + + \def\SetBechtolsheimDVITPSEPSFSpecial{\def\DriverTag@{dvitps: }% + \SetBechtolsheimEPSFSpecial@} + + \def\SetBechtolsheimDVI2PSEPSFSSpecial{\def\DriverTag@{DVI2PS: }% + \SetBechtolsheimEPSFSpecial@} + + %% dvi2ps by Tony Lis, + % implantations? ; dates?; availability? + % Introduced by B. Horn <bkph@ai.mit.edu> + \def\SetLisEPSFSpecial{\PSOrigintrue + \gdef\EPSFSpecial##1##2{% + \dimen4=##2pt% convert real to dimen + \divide\dimen4 by 1000\relax + \Real{\dimen4}% dimens 0,2 used here + \edef\Aux@{\the\Realtoks}% + %%convert dimen to real + \special{pstext="10 10 0 0 10 10 startTexFig\space + \the\mag\space 1000 div \Aux@\space mul + \the\mag\space 1000 div \Aux@\space mul scale"}% + \special{psfile=##1}% + \special{pstext=endTexFig}% + }} + + %% dvips by Tom Rokicki; free driver in portable C + % Introduced by W.D. Neumann <neumann@mps.ohio-state.edu> + \def\SetRokickiEPSFSpecial{\PSOrigintrue + \gdef\EPSFSpecial##1##2{% + \dimen4=##2pt% convert real to dimen + \divide\dimen4 by 10\relax + \Real{\dimen4}% dimens 0,2 used here + \edef\Aux@{\the\Realtoks}% + %%convert dimen to real + \special{psfile="##1"\space + hscale=\Aux@\space + vscale=\Aux@}}} + + \def\SetInlineRokickiEPSFSpecial{\PSOrigintrue + \gdef\EPSFSpecial##1##2{% + \dimen4=##2pt% convert real to dimen + \divide\dimen4 by 1000\relax + \Real{\dimen4}% dimens 0,2 used here + \edef\Aux@{\the\Realtoks}% + %%convert dimen to real + \special{ps::[begin] 10 10 0 0 10 10 startTexFig\space + \the\mag\space 1000 div \Aux@\space mul + \the\mag\space 1000 div \Aux@\space mul scale}% + \special{ps: plotfile ##1}% + \special{ps::[end] endTexFig}% + }} + + %%% Rokicki's epsf.tex syntax. + %% Is followed by DirectTeX (W. Ricken) + %% CMacTeX (Tom Kiffe), Y&Y's drivers, and OzTeX >= 1.7 + \def\SetepsfEPSFSpecial{\PSOriginfalse + \gdef\epsfclipstring{}% + %% make { clip} if you want to clip (non-portably) + %% down to the PostScript bounding box. + \gdef\EPSFSpecial##1##2{% + \dimen6=\the\URXtoks@ pt %% not bp!!!!! + \advance\dimen6 by -\the\LLXtoks@ pt + %% \dimen6 now bbox width * points + \dimen4=##2pt %% convert mil scale to dimen + \divide\dimen4 by 100 %% 1000ths to 10ths + \Real{\dimen4}%% dimens 0,2 used here + \dimen6=\the\Realtoks\dimen6 + \Real{\dimen6}%% dimens 0,2 used here + %% \Realtoks now holds decimal real no + %% 10 times desired "real width" (rwi) in bp + \special{PSfile=##1\space + llx=\the\LLXtoks@\space lly=\the\LLYtoks@\space + urx=\the\URXtoks@\space ury=\the\URYtoks@\space + rwi=\the\Realtoks\space + \epsfclipstring}% + }} + %% Minor Bug (my laziness): scaling not performed if bb width zero + %% Rmk: Under epsf.tex only multiples of (1/10) bp available widths + %% but considerably more accuracy available here. + + \let\SetDirectTeXEPSFSpecial=\SetepsfEPSFSpecial + \let\SetCMacTeXEPSFSpecial=\SetepsfEPSFSpecial + \let\SetOzTeXEPSFSpecial=\SetepsfEPSFSpecial + %%% \SetOzTeXEPSFSpecial only for OzTeX in versions 1.7 and later + + %%% Old OzTeX versions (1.42 to 1.6), by Andrew Trevorrow. + %%% For versions <= 1.41 use \SetPSprintEPSFSpecial below. + %% Nota: Version 1.42--1.5 may give + %% spurious "offpage" error notices on printing. + \def\SetOldOzTeXEPSFSpecial{\PSOrigintrue + \gdef\EPSFSpecial##1##2{% + \dimen4=##2pt%% convert real to dimen + \divide\dimen4 by 1000\relax + \Real{\dimen4}%% dimens 0,2 used here + \edef\Aux@{\the\Realtoks}%% convert dimen to real + \special{epsf=\string"##1\string"\space scale=\Aux@}% + }} + + %% PSprint, by AndrewTrevorrow for VaX VMS + %% and OzTeX versions <= 1.41 + % tested 2-91 by Max Calviani <ISICA@ASTRPD.infn.it> + \def\SetPSprintEPSFSpecial{\PSOriginfalse % artifice; see below + \gdef\EPSFSpecial##1##2{%note order + \special{##1\space + ##2 1000 div \the\mag\space 1000 div mul + ##2 1000 div \the\mag\space 1000 div mul scale + \the\LLXtoks@\space neg \the\LLYtoks@\space neg translate + }}} + + %% DVILASER/PS driver originally written by David Fuchs + % marketed and supported by ArborTeXt 535 W. William St. + % Suite 300, Ann Arbor, MI 48103, U.S.A + % (313) 996-3566 (313) 996-3573 + % help@arbortext.com, Andrew Dobrowolski + \def\SetArborEPSFSpecial{\PSOriginfalse % check! + \gdef\EPSFSpecial##1##2{% + \edef\specialthis{##2}% + \SPLIT@0.@\specialthis.@\relax % suppress decimals (nec!) + \special{ps: epsfile ##1\space \the\Initialtoks@}}} + + %% dvitops, (c) James Clark <jjc@jclark.uucp> + % public domain; distributed by UK TeX Archive + % computers: unix, msdos, vms, primos and vm/cms, + % introduced by S. Ratz <spqr@uk.ac.southampton.ecs> + \def\SetClarkEPSFSpecial{\PSOriginfalse % please test! + \gdef\EPSFSpecial##1##2{% + \Rescale {\Wd@@}{##2pt}{1000pt}% + \Rescale {\Ht@@}{##2pt}{1000pt}% + \special{dvitops: import + ##1\space\the\Wd@@\space\the\Ht@@}}} + + %% DVIPSONE, for PC compatibles + % Y&Y, 106 Indian Hill, Carlisle MA 01741, USA + % (508) 371-3286 + % (introduced by B. Horn <bkph@ai.mit.edu>) + \let\SetDVIPSONEEPSFSpecial\SetepsfEPSFSpecial + \let\SetDVIPSoneEPSFSpecial\SetepsfEPSFSpecial + \let\SetDVIWindowEPSFSpecial\SetepsfEPSFSpecial + + %% DVIALW by N. Beebe, public domain + % DVI Driver Distribution, Center for Scientific Computing, + % Department of Mathematics, 220 South Physics Building, + % University of Utah, Salt Lake City, UT 84112, USA + % (introduced by B. Horn <bkph@ai.mit.edu>) + % Proposed standard; see TUGboat article 1993. + \def\SetBeebeEPSFSpecial{%please test! + \PSOriginfalse% + \gdef\EPSFSpecial##1##2{\relax + \special{language "PS", + literal "##2 1000 div ##2 1000 div scale", + position = "bottom left", + include "##1"}}} + \let\SetDVIALWEPSFSpecial\SetBeebeEPSFSpecial + + %% Northlake software + \def\SetNorthlakeEPSFSpecial{\PSOrigintrue + \gdef\EPSFSpecial##1##2{% + \edef\specialthis{##2}% + \SPLIT@0.@\specialthis.@\relax % suppress decimals (nec!) + \special{insert ##1,magnification=\the\Initialtoks@}}} + + %%% MultiSpecial for Textures PLUS drivers supporting epsf.tex + %%% syntax of Rokicki (one of many dvips syntaxes) + %% *experimental* 2-95 + \def\SetEPSFMultiSpecial{\PSOriginfalse + \csname newwrite\endcsname \EPSFile@@ + \immediate\openout\EPSFile@@ illustration + \immediate\write\EPSFile@@ {\P@S@}% + \immediate\write\EPSFile@@ {\pct@@ Remark: Tranquilizer for OzTeX...}% + \immediate\closeout\EPSFile@@ + \gdef\EPSFSpecial##1##2{%% epsf but have dropped \clipstring + \dimen6=\the\URXtoks@ pt %% not bp!!!!! + \advance\dimen6 by -\the\LLXtoks@ pt + %% \dimen6 now bbox width * points + \dimen4=##2pt %% convert mil scale to dimen + \divide\dimen4 by 100 %% 1000ths to 10ths + \Real{\dimen4}%% dimens 0,2 used here + \dimen6=\the\Realtoks\dimen6 + \Real{\dimen6}%% dimens 0,2 used here + %% \Realtoks now holds decimal real no + %% 10 times desired "real width" (rwi) in bp + \special{PSfile=##1\space + llx=\the\LLXtoks@\space lly=\the\LLYtoks@\space + urx=\the\URXtoks@\space ury=\the\URYtoks@\space + rwi=\the\Realtoks}% + % + \edef\specialtemp{##2}% + \SPLIT@0.@\specialtemp.@\relax + \special{illustration ##1 scaled \the\Initialtoks@}% + }} + + \def\SetStandardEPSFSpecial{% + \gdef\EPSFSpecial##1##2{% + \ms@g{} + \ms@g{% + !!! Sorry! There is still no standard for \string% + \special\space EPSF integration !!!}% + \ms@g{% + --- So you will have to identify your driver using a command}% + \ms@g{% + --- of the form \string\Set...EPSFSpecial, in order to get}% + \ms@g{% + --- your graphics to print.}% + \ms@g{% + Update your BoxedEPSF and read the documentation.}% + \ms@g{} + \gdef\EPSFSpecial####1####2{} + }} + + \SetStandardEPSFSpecial %% currently gives warning + + \let\wlog\wlog@ld %%restore logging + + \catcode`\:=\C@tColon + \catcode`\;=\C@tSemicolon + \catcode`\?=\C@tQmark + \catcode`\!=\C@tEmark + \catcode`\"=\C@tDqt + + \catcode`\@=\EPSFCatAt + + \endinput + +%%%%%%%%%%%% ASCII Character test + % + % Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ + % Lower case letters: abcdefghijklmnopqrstuvwxyz + % Digits: 0123456789 + % Square, curly, angle braces, parentheses: [] {} <> () + % Backslash, slash, vertical bar: \ / | + % Punctuation: . ? ! , : ; + % Underscore, hyphen, equals sign: _ - = + % Quotes--right left double: ' ` " + %"at", "number" "dollar", "percent", "and": @ # $ % & + % "hat", "star", "plus", "tilde": ^ * + ~ + % + %%%%%%%%%%%%%%%%%%%%%%%% + % + % Une seule erreur de transmission peut empoisoner un programme! + % + % A single transmission error can poison a whole program. + % + %%%%%%%%%%%%%%%%%%%%%%%% diff --git a/macros/generic/boxedeps/boxedeps.txt b/macros/generic/boxedeps/boxedeps.txt new file mode 120000 index 0000000000..4b8f6aa98e --- /dev/null +++ b/macros/generic/boxedeps/boxedeps.txt @@ -0,0 +1 @@ +boxedeps.doc
\ No newline at end of file diff --git a/macros/generic/boxedeps/gdisk.eps b/macros/generic/boxedeps/gdisk.eps new file mode 100644 index 0000000000..10848992df --- /dev/null +++ b/macros/generic/boxedeps/gdisk.eps @@ -0,0 +1,14 @@ +%!PS-Adobe-2.0 EPSF-1.2 +%%Title: gdisk.eps +%%Remark: A simple test file +%%Remark: DELETE SPACES BEFORE ALL %% (especially for Textures) +%%Pages: 0 +%%BoundingBox: 216 216 432 432 +%%EndComments + + 72 72 scale % units are now inches instead of big points + newpath + 4.5 4.5 1.5 0 360 arc + closepath + 0.9 setgray + fill diff --git a/macros/generic/boxedeps/rose.eps b/macros/generic/boxedeps/rose.eps new file mode 100644 index 0000000000..db4b60eab5 --- /dev/null +++ b/macros/generic/boxedeps/rose.eps @@ -0,0 +1,811 @@ +%!PS-Adobe-2.0 EPSF-1.2 +%%Creator:Adobe Illustrator(TM) 1.1 M00002152N +%%For:Barry Smith Kellerman and Smith +%%Title:SmallRose +%%CreationDate:8/29/87 4:43 PM +%%DocumentProcSets:Adobe_Illustrator_1.1 0 0 +%%DocumentSuppliedProcSets:Adobe_Illustrator_1.1 0 0 +%%DocumentFonts:Courier +%%BoundingBox:29 39 160 211 +%%TemplateBox:276 368 276 368 +%%EndComments +%%BeginProcSet:Adobe_Illustrator_1.1 0 0 +% Copyright (C) 1987 Adobe Systems Incorporated. +% All Rights Reserved. +% Adobe Illustrator is a trademark of Adobe Systems Incorporated. +/Adobe_Illustrator_1.1 dup 100 dict def load begin +/Version 0 def +/Revision 0 def +% definition operators +/bdef {bind def} bind def +/ldef {load def} bdef +/xdef {exch def} bdef +% graphic state operators +/_K {3 index add neg dup 0 lt {pop 0} if 3 1 roll} bdef +/_k /setcmybcolor where +{/setcmybcolor get} {{1 sub 4 1 roll _K _K _K setrgbcolor pop} bind} ifelse def +/g {/_b xdef /p {_b setgray} def} bdef +/G {/_B xdef /P {_B setgray} def} bdef +/k {/_b xdef /_y xdef /_m xdef /_c xdef /p {_c _m _y _b _k} def} bdef +/K {/_B xdef /_Y xdef /_M xdef /_C xdef /P {_C _M _Y _B _k} def} bdef +/d /setdash ldef +/_i currentflat def +/i {dup 0 eq {pop _i} if setflat} bdef +/j /setlinejoin ldef +/J /setlinecap ldef +/M /setmiterlimit ldef +/w /setlinewidth ldef +% path construction operators +/_R {.25 sub round .25 add} bdef +/_r {transform _R exch _R exch itransform} bdef +/c {_r curveto} bdef +/C /c ldef +/v {currentpoint 6 2 roll _r curveto} bdef +/V /v ldef +/y {_r 2 copy curveto} bdef +/Y /y ldef +/l {_r lineto} bdef +/L /l ldef +/m {_r moveto} bdef +% error operators +/_e [] def +/_E {_e length 0 ne {gsave 0 g 0 G 0 i 0 J 0 j 1 w 10 M [] 0 d +/Courier 20 0 0 1 z [0.966 0.259 -0.259 0.966 +_e 0 get _e 2 get add 2 div _e 1 get _e 3 get add 2 div] e _f t T grestore} if} +bdef +/_fill {{fill} stopped +{/_e [pathbbox] def /_f (ERROR: can't fill, increase flatness) def n _E} if} +bdef +/_stroke {{stroke} stopped +{/_e [pathbbox] def /_f (ERROR: can't stroke, increase flatness) def n _E} if} +bdef +% path painting operators +/n /newpath ldef +/N /n ldef +/F {p _fill} bdef +/f {closepath F} bdef +/S {P _stroke} bdef +/s {closepath S} bdef +/B {gsave F grestore S} bdef +/b {closepath B} bdef +% text block construction and painting operators +/_s /ashow ldef +/_S {(?) exch {2 copy 0 exch put pop dup false charpath currentpoint _g +setmatrix +_stroke _G setmatrix moveto 3 copy pop rmoveto} forall pop pop pop n} bdef +/_A {_a moveto _t exch 0 exch} bdef +/_L {0 _l neg translate _G currentmatrix pop} bdef +/_w {dup stringwidth exch 3 -1 roll length 1 sub _t mul add exch} bdef +/_z [{0 0} bind {dup _w exch neg 2 div exch neg 2 div} bind {dup _w exch neg +exch neg} bind] def +/z {_z exch get /_a xdef /_t xdef /_l xdef exch findfont exch scalefont setfont} +bdef +/_g matrix def +/_G matrix def +/_D {_g currentmatrix pop gsave concat _G currentmatrix pop} bdef +/e {_D p /t {_A _s _L} def} bdef +/r {_D P /t {_A _S _L} def} bdef +/a {_D /t {dup p _A _s P _A _S _L} def} bdef +/o {_D /t {pop _L} def} bdef +/T {grestore} bdef +% group construction operators +/u {} bdef +/U {} bdef +% font construction operators +/Z {findfont begin currentdict dup length dict begin +{1 index /FID ne {def} {pop pop} ifelse} forall /FontName exch def dup length 0 +ne +{/Encoding Encoding 256 array copy def 0 exch {dup type /nametype eq +{Encoding 2 index 2 index put pop 1 add} {exch pop} ifelse} forall} if pop +currentdict dup end end /FontName get exch definefont pop} bdef +end +%%EndProcSet +%%EndProlog +%%BeginSetup +Adobe_Illustrator_1.1 begin +n +%%EndSetup +u +0 g +0 G +1 i +0 J +0 j +0.125 w +10 M +[]0 d +%%Note: +152.9985 45.9242 m +152.9985 203.9242 L +35.9985 203.9242 L +35.9985 45.9242 L +152.9985 45.9242 L +s +94.4985 124.9242 m +S +U +u +0.75 w +154.999 43.899 m +154.999 205.9495 L +33.998 205.9495 L +33.998 43.899 L +154.999 43.899 L +s +94.4985 124.9242 m +S +U +u +0.0625 w +58.7123 69.5624 m +58.8728 68.7319 59.4833 68.5639 59.4591 67.9414 c +S +u +93.5396 175.4626 m +94.1809 172.6676 97.6574 172.9324 95.2237 168.9578 C +95.308 169.5803 95.5018 169.9229 94.5829 171.3921 c +94.5639 171.4221 94.0447 171.6254 93.7568 171.9812 c +93.4686 172.3369 93.0492 173.3212 93.1274 173.6138 c +93.5969 175.3708 94.295 176.4491 90.1393 178.0765 C +93.3026 178.8709 93.7624 178.1366 94.7745 180.6974 c +95.7869 183.2585 97.6351 182.8121 97.8649 182.4449 C +98.8773 185.006 98.872 183.7602 99.4931 184.8572 C +100.7984 183.6067 101.7276 184.6292 y +104.2648 183.081 104.568 181.761 y +105.3253 178.4606 l +104.408 173.188 l +S +104.1474 182.6419 m +104.6172 184.3989 105.1574 184.5799 105.93 185.0169 c +106.7024 185.4538 106.5619 185.0386 106.9739 185.8557 c +107.4984 186.8979 106.7063 186.3881 107.9799 186.8595 C +107.9863 185.9158 108.3276 186.3675 109.0176 186.1414 c +110.101 185.7859 110.2523 186.4665 111.2911 186.0599 c +112.33 185.653 112.9121 186.6036 113.4839 185.0625 c +S +105.1076 177.0327 m +106.4104 175.1591 106.8554 175.5972 106.9703 175.4136 c +107.0851 175.2301 108.0091 172.5522 107.9699 172.4056 C +109.3633 173.9395 106.7355 174.5353 110.0896 174.8162 c +112.8225 175.0451 112.6295 173.8908 113.8199 172.8239 c +115.0104 171.7572 116.4795 170.5062 117.6357 170.5384 c +118.7919 170.571 120.2883 171.2616 121.9432 170.7059 c +123.5981 170.1504 124.2092 168.7559 125.5977 169.044 C +123.4001 168.7954 123.7447 168.2447 121.0115 169.0607 c +118.2785 169.8768 118.4351 170.4622 116.5062 169.993 c +114.5773 169.5238 116.1107 169.8937 114.441 169.167 C +116.7267 169.5636 117.0516 169.8089 118.8431 168.9219 c +121.3049 167.7039 121.5027 166.6039 123.4682 166.597 c +125.4336 166.5897 125.2405 166.4804 126.1695 167.5028 c +127.0988 168.5256 124.8253 168.6071 128.6388 168.1534 c +132.4523 167.6998 131.3718 167.3374 133.418 168.246 c +135.4643 169.1544 135.1172 169.0824 135.3911 170.1073 c +135.6648 171.1323 135.6698 169.9232 135.9828 171.0944 c +S +102.1821 182.6491 m +103.1667 178.3585 103.8585 177.8799 103.1175 175.721 c +102.3765 173.5618 103.4629 175.3257 103.9975 174.1056 c +104.9919 171.8354 105.0681 171.9767 104.3736 171.8326 c +103.6793 171.6885 101.3669 171.6237 99.7117 172.1792 c +98.0568 172.7349 97.4457 174.1295 98.106 175.3728 c +98.7663 176.616 99.732 177.162 100.5069 178.2217 c +101.2821 179.2814 101.7883 180.562 102.1821 182.6491 C +s +102.2211 182.7954 m +100.6785 182.5445 101.3313 181.9193 101.7126 180.8921 c +S +107.39 174.377 m +107.6272 175.8784 108.2074 176.3618 107.4398 177.1706 c +106.6724 177.9795 106.5183 178.0167 107.0662 180.0666 c +107.6139 182.1162 106.4627 183.3294 109.2398 183.9057 c +112.0171 184.4817 114.4886 185.755 115.9897 185.2366 c +117.4905 184.7182 117.6129 186.4031 120.654 185.5128 c +123.6952 184.6222 125.003 183.9947 124.262 181.8358 c +123.5208 179.6766 123.1542 179.5315 122.7679 179.3131 c +S +124.4159 181.7985 m +127 182.2653 130.7404 182.7648 131.3929 182.1396 c +132.0457 181.5143 134.732 178.6831 134.8076 178.3533 c +134.8835 178.0231 134.265 177.5492 134.8026 177.1075 c +135.3405 176.6658 135.8782 176.2241 136.4186 176.4055 c +136.9587 176.5868 138.1049 174.1278 138.066 173.9812 C +139.8775 174.0113 139.0317 174.5275 138.8701 172.6959 c +138.7085 170.8647 137.2786 172.2621 137.2319 170.2472 C +136.1196 171.6068 134.7019 171.209 134.159 170.4049 c +133.6161 169.6008 130.1057 168.7344 129.9516 168.7714 c +129.1481 168.9656 127.7746 168.9077 127.3897 169.0006 c +126.7302 169.16 125.9167 169.3174 125.791 169.153 c +125.665 168.9887 125.791 169.153 125.5977 169.044 c +S +110.8987 174.7764 m +111.1398 177.2121 108.6694 176.2503 109.2538 177.8234 c +109.8384 179.3968 109.1784 180.6084 110.1466 181.7771 c +112.244 184.3101 110.1967 182.2717 113.9618 184.0898 C +114.8858 183.8668 115.1578 184.4244 115.8501 184.1013 c +117.0199 183.5558 117.4452 183.0146 117.6382 183.1239 c +117.8315 183.2332 120.6543 182.4939 121.0148 181.8019 c +121.3399 181.1777 121.0067 179.7776 y +S +112.2919 183.3634 m +111.4905 182.9723 110.8959 181.2067 111.0814 179.4472 c +111.2669 177.688 109.9989 178.6178 109.175 177.3751 c +S +102.9086 171.7189 m +105.8466 171.5158 105.0984 169.943 105.2889 169.4295 C +108.3362 170.0962 109.7563 168.6619 109.9861 168.2947 c +110.2158 167.9276 109.2137 167.858 109.3236 166.4287 c +109.4334 164.9993 109.1253 165.0736 109.8587 165.3643 C +110.5713 165.27 110.531 164.8122 110.3171 164.3182 c +110.1032 163.8245 111.0088 163.8395 111.2789 163.9299 C +111.7409 163.8184 110.6628 164.0787 110.8875 162.4658 c +111.1123 160.8529 111.611 160.2649 112.7647 159.6744 c +113.9187 159.0842 115.0332 158.3471 116.6124 158.1216 c +118.1917 157.896 118.3091 158.3352 119.0817 158.7721 c +119.8541 159.2091 123.7875 159.8174 124.4389 158.8809 c +S +106.3795 172.2832 m +110.3054 171.0232 109.4927 170.1285 110.8005 169.501 c +112.1083 168.8732 116.26 166.3116 117.4947 166.637 c +S +131.7851 164.6659 m +131.7181 164.7988 131.4777 164.9738 131.2469 165.0297 c +130.7849 165.1412 130.0465 163.605 129.4304 163.7538 c +129.1222 163.8284 128.3829 164.4356 127.0921 164.4356 c +125.8007 164.4358 123.958 163.8289 123.4582 164.1054 C +124.1575 165.4953 123.4607 164.7282 124.8884 165.1629 c +126.3161 165.5973 125.238 165.8577 126.6265 166.1455 c +128.0152 166.4337 127.5507 165.9225 128.5139 165.8457 C +130.4453 166.9377 129.8267 166.4637 131.0611 166.7889 c +132.2958 167.1143 134.3395 167.3999 135.0363 168.1668 c +135.7333 168.9336 136.0829 169.6284 136.5031 168.7475 c +136.9237 167.8667 136.7304 167.7576 136.3051 167.3927 c +135.8796 167.0278 135.9555 166.6979 134.4102 165.8243 c +132.8651 164.9504 133.7721 165.2769 133.4642 165.3512 C +132.7881 164.969 132.516 164.4114 131.7851 164.6659 C +s +97.2911 168.0296 m +95.5605 168.9155 94.8807 168.8262 94.2675 169.5978 c +93.6539 170.3693 91.9597 170.7788 91.8816 170.4859 c +91.8032 170.193 91.4168 169.9747 90.9548 170.0862 c +90.4929 170.1977 90.3805 171.0043 90.0334 170.9323 c +89.6862 170.8603 88.2194 170.2795 87.8697 169.5844 c +87.5201 168.8896 86.7892 169.222 86.4028 169.0037 c +86.0165 168.7851 82.0856 168.7995 81.8458 166.6754 c +81.6061 164.5513 82.0581 161.9482 82.987 162.9706 c +83.916 163.993 84.9576 164.2091 86.0015 165.048 c +87.0453 165.8869 88.0138 167.0559 88.1262 166.2493 c +88.2383 165.443 88.8518 164.6714 88.0402 164.0882 c +87.2286 163.5049 87.1452 161.9663 87.4116 161.1227 c +87.6781 160.2788 87.5165 158.4476 89.054 157.4526 c +90.5916 156.4577 92.2465 155.9023 93.5179 155.751 c +94.789 155.6 93.5543 155.2745 94.9455 156.1855 c +S +82.8227 162.8157 m +84.0181 162.9943 86.7641 162.9934 87.3018 162.552 c +S +108.1877 152.3633 m +107.0971 149.5096 104.9284 146.9163 106.1578 145.9956 c +107.3875 145.0753 106.5809 145.7378 106.4999 144.8219 c +106.4193 143.9062 106.5708 143.2462 107.6489 142.9859 c +108.727 142.7256 110.6116 141.8027 112.736 143.004 c +114.8607 144.2052 119.6183 148.5114 121.8111 147.514 c +124.0039 146.5168 124.0012 145.8941 123.4927 143.9905 c +122.984 142.0872 122.9815 141.4645 124.4067 141.2759 c +125.8318 141.0876 129.4307 144.7384 130.7802 144.88 c +132.1297 145.0216 132.6331 145.6794 131.5476 144.0712 c +130.462 142.463 131.5793 142.349 132.4301 143.0788 c +133.2809 143.8083 133.2367 142.4163 134.7086 144.2428 c +135.1264 144.7604 134.7945 144.383 134.5181 144.7565 c +132.8314 147.0342 130.9468 147.957 131.6535 151.2154 c +S +122.388 147.2189 m +125.3507 146.0357 124.38 144.2439 124.7221 143.0702 c +125.0642 141.8964 125.6021 141.4548 126.8782 142.5492 c +S +125.5398 154.7183 m +125.3468 154.609 124.5402 155.2715 123.8899 156.5195 c +123.8153 156.663 123.3762 157.0505 123.2738 156.6683 c +122.8435 155.0579 122.6477 154.3258 120.9903 154.2585 c +119.3329 154.1915 116.1404 155.7418 113.5641 157.1436 c +110.9874 158.5452 109.1077 160.7138 107.3744 160.9766 c +105.6413 161.2392 102.8691 161.909 102.3704 162.4969 c +101.872 163.0849 102.8282 165.5464 100.7672 166.3133 c +99.5743 166.7572 95.9613 169.1886 94.4555 168.4613 c +92.9494 167.734 91.7982 168.9472 90.3655 167.2673 c +88.9328 165.587 89.7419 165.5473 90.7026 164.8478 c +91.6632 164.1483 91.8955 164.4039 94.1323 164.7985 c +96.0475 165.1359 97.8749 164.6155 98.3625 164.3321 C +98.2042 164.1755 98.1964 163.8826 96.8079 164.0743 c +95.4217 164.2656 93.7245 163.1339 93.3913 162.6396 c +92.8487 161.8355 92.6846 159.3813 94.1047 157.9472 c +95.5249 156.5131 93.6052 156.5762 97.869 154.856 c +99.7929 154.0794 101.6876 155.6481 102.1913 156.3056 C +101.3305 153.0845 102.3721 153.3006 104.0659 152.8915 c +105.7601 152.4823 106.2588 151.8941 108.6129 152.7282 c +110.9674 153.5623 110.8917 153.8925 111.2046 155.0637 C +110.8814 151.4009 112.9013 155.2773 112.9794 155.5702 C +111.962 151.7633 112.2309 151.5425 113.0767 151.0266 c +113.9226 150.5106 117.7778 150.8263 118.9708 150.3821 c +120.1637 149.9382 120.127 150.4147 121.9777 150.591 c +123.8282 150.7676 125.6057 151.8969 125.6497 153.2889 c +125.6939 154.681 124.8748 152.2292 125.6964 155.304 c +S +123.0958 160.2963 m +125.4135 161.6069 123.4115 162.0906 125.9904 161.3115 C +125.8024 162.4483 125.6533 163.731 124.2673 164.0659 c +122.8811 164.4008 123.5364 164.3983 122.529 163.083 C +121.605 163.306 121.0281 163.6014 120.1823 164.1174 c +119.3365 164.6333 117.9895 165.1148 117.6474 166.2882 c +117.3053 167.462 116.6136 167.9409 115.7285 168.3106 c +114.8438 168.6802 112.0399 171.0719 109.923 171.7392 c +107.8061 172.4061 109.0407 172.7316 104.9532 172.1603 c +S +126.1053 161.128 m +129.1464 160.2376 128.3774 161.0885 130.5374 161.1485 c +130.8664 161.158 132.8598 161.4606 134.1245 162.9904 c +135.6289 164.8099 137.9506 165.0616 139.1062 164.3783 C +139.4976 165.8424 141.5096 167.85 142.0525 168.6541 c +142.5955 169.4582 142.4831 170.2648 141.9452 170.7064 c +141.4075 171.1478 140.1387 171.9219 138.6353 171.8176 c +S +130.3638 161.1127 m +134.2166 160.8053 132.6178 160.9577 133.9649 160.4766 c +135.3116 159.9954 135.862 162.668 137.5587 162.8816 c +139.2553 163.0952 139.4458 162.5815 139.6756 162.2144 c +139.9053 161.8472 140.2841 160.197 140.8977 159.4255 c +141.5113 158.6536 143.3592 158.2072 144.3691 160.1456 c +145.3791 162.0836 145.1732 158.8603 145.5621 159.7014 C +144.0509 157.7286 143.9778 158.6815 143.6257 157.3636 c +143.2736 156.0458 142.0603 151.5072 140.8624 150.7053 c +139.6645 149.9037 139.0826 148.9533 138.8971 150.7126 c +138.7113 152.472 139.1708 151.7375 139.4864 153.5317 c +139.8021 155.3257 137.9464 153.9036 137.6357 153.3551 c +137.3253 152.8066 136.5112 151.6006 134.9684 151.3498 c +133.4258 151.0989 131.2283 150.8505 130.5388 151.9522 c +130.1941 152.5029 129.2794 152.6072 128.0686 153.3671 c +126.8576 154.1272 125.3507 155.5435 125.0439 155.9293 C +126.6307 157.5722 124.477 158.7159 123.3648 160.0755 c +122.2525 161.4353 118.6298 161.3752 117.8988 161.7076 c +117.1679 162.04 114.5106 162.5259 112.9413 165.243 c +111.3723 167.9598 110.529 169.0988 108.8741 169.6545 c +107.2192 170.21 105.366 169.4109 104.1313 169.0855 c +102.8969 168.7603 102.4714 168.3954 101.5474 168.6187 c +100.6234 168.8418 100.629 170.2433 98.8439 167.2453 c +S +123.5189 160.0382 m +124.756 160.9864 124.6019 161.0236 125.9489 160.5425 c +127.2957 160.0613 127.489 160.1703 128.6427 159.5798 c +129.7964 158.9896 130.2951 158.4014 131.339 159.2405 c +132.3831 160.0794 132.2632 159.0172 133.6125 159.1587 c +134.962 159.3003 134.6149 159.2286 136.0793 159.1865 c +137.5437 159.1446 135.8103 159.4074 136.7396 160.4298 c +137.6685 161.4523 137.8666 162.8071 138.8495 162.8037 c +S +132.9574 159.1612 m +134.1454 157.4716 135.1817 156.4419 135.837 156.4394 c +136.492 156.4372 137.5078 155.0228 139.2776 154.2835 c +S +113.1869 173.5226 m +114.7344 175.019 114.357 176.9807 114.2079 178.2634 c +114.0589 179.5465 113.0409 180.3378 114.5442 180.4423 c +116.0478 180.5467 117.94 181.4923 118.1308 180.9786 c +118.3213 180.4652 117.8176 179.8074 118.6659 179.9142 c +119.5142 180.021 120.4774 179.9442 121.6704 179.5003 c +122.8633 179.0564 123.8265 178.9794 124.5207 179.1234 c +125.2149 179.2675 124.6748 179.0862 124.4008 178.0615 c +124.1269 177.0366 124.5574 178.647 125.0901 176.9598 c +125.623 175.2723 125.549 176.0695 125.2361 174.8983 C +124.561 176.24 124.081 178.5188 121.8584 178.3638 C +121.2373 177.2669 121.086 177.9269 120.9636 176.2419 c +120.841 174.557 119.9963 174.5445 120.6833 173.66 c +121.0156 173.2314 121.0532 173.1357 121.1055 173.0976 c +121.1586 173.0603 121.2265 173.0809 122.9423 174.7508 c +124.1611 175.9374 122.4427 177.4824 123.7725 177.5508 c +S +121.3922 172.6314 m +122.65 173.9643 122.5888 173.1218 124.5594 174.3603 c +126.53 175.5989 125.5081 175.4559 127.2437 175.8161 c +128.9795 176.176 129.8253 175.6601 130.6762 176.3899 c +131.2647 176.8953 132.0532 177.6181 132.3152 176.6953 c +133.0751 174.0179 128.9787 171.6977 128.4216 171.6349 c +127.6726 171.5503 125.0517 172.2151 124.3182 171.9247 c +123.5848 171.6343 122.4377 171.4827 121.8595 171.4666 c +S +132.3152 176.6953 m +133.8161 176.1768 133.2183 176.0873 133.4431 174.4744 c +133.6678 172.8614 134.0124 172.3107 131.8513 171.5859 c +129.6902 170.8608 130.3062 170.712 128.727 170.9376 c +127.1477 171.1634 125.5607 171.8195 124.6172 171.9695 c +S +133.5605 174.9138 m +135.8707 174.3556 136.4058 173.2912 135.8239 172.3408 c +135.2421 171.3904 134.2789 171.4671 132.773 170.7398 c +131.2669 170.0125 130.6926 170.9306 128.5682 169.7291 c +128.0567 169.4401 127.0768 169.0571 126.8073 169.1222 c +S +124.3363 169.2318 m +125.3802 170.0706 125.253 169.5947 126.1795 169.9944 c +127.1063 170.3941 127.8909 170.2631 128.3373 171.0127 c +S +142.1699 169.0932 m +143.9397 168.3542 144.8147 165.493 143.4966 163.6292 c +142.1788 161.7654 141.4064 161.3288 141.0957 160.7803 c +140.7853 160.2318 140.592 160.1225 140.668 159.7926 c +S +144.0863 166.4484 m +145.0395 163.8801 144.981 161.3616 144.9785 160.7386 c +S +0.125 w +106.9922 152.1847 m +105.7425 148.1222 104.5785 146.2212 104.1116 145.0872 c +103.6446 143.953 101.7838 141.2851 101.8962 140.4788 c +102.0086 139.6722 100.9172 138.9618 100.7213 138.2297 c +S +106.2337 145.6658 m +104.0598 141.8266 102.3532 139.1215 101.8837 137.3645 c +S +86.5411 136.3946 m +85.843 135.3163 83.2262 136.26 82.4536 135.8233 C +83.3202 135.6918 83.7628 135.5071 83.9155 135.1583 C +82.9523 135.2353 78.2256 136.26 76.947 134.5428 C +77.9383 134.2643 78.0184 135.0242 78.8648 134.6638 C +77.5611 133.9267 76.5471 133.3535 76.0801 132.2192 C +76.7651 132.4823 77.3222 132.6984 77.2082 132.3755 c +76.9545 131.6574 77.5261 132.4156 77.004 131.9961 c +74.9161 130.3181 77.0747 130.4202 75.4465 128.0082 c +75.3825 127.9128 74.6335 127.1134 74.0944 127.2436 c +73.3243 127.4297 73.1301 127.0089 73.0934 127.4853 c +73.0567 127.9618 72.5555 127.927 72.1302 127.5621 c +71.4424 126.9721 69.3783 126.3616 68.5609 126.4759 c +66.6729 126.7396 66.8459 126.5007 65.3084 127.4956 C +67.4461 127.2127 66.5647 127.4661 67.3705 127.5429 c +68.2958 127.6311 67.4698 127.1902 68.4327 128.1437 c +69.5981 129.2976 69.1297 128.9105 69.2471 129.3497 c +69.3644 129.7888 70.6797 131.0299 69.9071 130.5929 c +69.1347 130.1563 70.0806 130.6291 68.7117 130.4141 C +70.0662 131.8014 69.7947 131.3995 70.186 132.8636 C +69.3085 132.647 70.329 132.4784 68.4894 132.65 C +69.553 133.5621 69.4448 133.0036 69.9608 134.3208 C +69.6515 134.0838 69.9594 134.0093 68.3795 134.0794 C +S +68.3025 134.0977 m +69.113 134.3698 69.657 135.4851 70.4308 136.2336 C +69.6885 136.0622 69.5227 135.5955 68.6585 136.3498 C +69.4496 136.5484 69.9238 137.0963 70.3994 137.9555 C +70.0053 138.1677 69.8701 138.1224 69.2059 138.2439 C +69.2841 138.5368 70.326 138.9084 71.1378 139.4917 C +70.3287 139.5314 72.2184 139.8541 70.0598 139.7523 C +70.5635 140.4098 72.3016 141.3927 73.497 141.5716 C +72.3825 142.3084 73.5754 141.8645 72.4974 142.1248 C +72.8834 142.3431 73.6194 143.2565 75.9663 142.2221 c +78.3129 141.1877 78.6576 140.6367 79.3468 139.535 c +80.036 138.4333 80.271 139.312 80.8893 139.7859 c +81.5079 140.2599 79.5501 142.1356 79.7092 143.3441 c +79.868 144.5526 81.3299 143.8879 82.2539 143.6645 c +83.1781 143.4415 85.0211 141.7493 84.7471 140.7244 c +84.4734 139.6997 84.6197 137.7939 86.5411 136.3946 C +87.8122 136.2433 89.5619 134.4983 87.5307 133.3498 c +86.7583 132.9132 80.896 131.8354 80.4705 131.4705 c +80.0452 131.1055 78.7399 132.356 76.7251 129.7254 c +76.4297 129.3388 75.6487 127.9982 75.3205 127.8435 c +S +0.0625 w +79.9996 138.9098 m +78.6083 137.9989 78.1511 136.9014 78.1878 136.4249 c +S +120.441 170.9128 m +120.8151 172.9268 119.7554 172.9488 119.1849 174.8012 c +118.6142 176.6536 118.9379 175.7182 118.2279 176.4352 c +S +121.5583 170.7991 m +122.0606 171.1451 122.1023 171.9144 120.1467 174.4132 c +118.1914 176.9117 119.7473 175.6784 117.7856 176.6199 C +116.6083 176.203 115.4128 176.0242 115.1964 174.9074 c +114.9801 173.7907 115.6573 174.4844 116.1716 173.0353 c +116.5599 171.943 115.484 172.1491 115.5388 171.4346 c +S +0.125 w +98.9949 132.9966 m +98.4887 131.7161 89.9555 116.5473 88.1056 113.4163 c +86.0101 109.8701 79.9768 99.8713 79.6271 99.1765 c +79.1115 98.1524 78.7752 98.1352 79.0806 97.4382 c +79.3863 96.7409 80.0872 97.3981 80.7002 97.6704 c +81.6219 98.0795 80.8751 98.0178 83.3052 98.5218 C +81.8545 97.9441 76.7543 93.3056 75.1808 90.8207 c +71.1409 84.4416 66.372 74.4821 60.7992 70.1354 c +58.5569 68.3878 59.4761 67.0261 59.4422 68.1253 c +59.408 69.2245 58.7479 67.9812 59.9509 70.0286 C +58.1369 69.3758 58.0195 68.9366 55.0932 69.6433 C +61.9604 71.4137 66.7775 80.8489 67.3201 81.653 c +67.863 82.4571 71.7433 89.0011 71.9391 89.7332 c +72.1347 90.4653 74.2572 93.7957 74.8095 94.3394 c +76.1446 95.6533 74.8537 95.7315 76.4405 97.3744 c +78.0273 99.0174 83.2841 109.111 84.623 112.2704 c +85.5662 114.4971 85.4324 114.7633 85.4533 115.148 c +85.495 115.9173 86.5781 116.9025 85.8496 117.8579 c +85.1212 118.813 85.3195 120.1681 86.2168 122.9127 C +86.0579 121.7042 85.535 120.3948 86.6637 119.0639 c +87.1624 118.4759 87.0476 118.6595 86.5388 116.7562 C +86.9669 117.7438 87.1967 117.3767 87.6244 118.3644 c +88.0525 119.352 88.9208 124.4417 89.3539 126.6751 c +89.7867 128.9083 89.9065 129.9705 87.917 133.5684 c +S +97.4171 133.5337 m +95.9035 130.9378 90.1744 119.9305 89.1305 119.0917 c +S +0.0625 w +137.0736 152.4779 m +137.7653 151.9992 138.9936 150.7673 139.0862 149.8876 c +S +0.125 w +89.3007 132.6108 m +90.0807 134.916 89.6187 135.0276 90.8558 135.9757 c +92.093 136.9239 96.8822 139.5078 99.3073 138.7663 c +101.7321 138.0245 103.3063 136.5531 103.3798 135.6002 C +102.4947 135.9699 103.1108 135.8211 102.4166 135.6773 C +103.8393 134.866 102.9409 135.5065 103.5311 134.9402 c +104.9307 133.5977 104.3647 133.7648 104.9123 133.3598 C +103.8334 133.4644 104.2178 133.2158 103.7166 133.181 C +104.8717 132.902 105.2177 132.6625 105.5637 132.4231 C +104.8314 132.4442 104.9084 132.4256 104.445 132.2256 C +105.3287 131.7981 105.8001 131.6743 106.046 131.4301 c +106.2919 131.1854 106.4841 131.0124 106.5405 131.0182 C +104.981 131.3169 105.5782 131.2507 105.2113 131.1055 C +106.6916 130.2024 106.6446 130.4864 107.0284 130.082 C +106.2388 130.1949 106.3431 129.8189 105.9776 129.9852 C +107.5349 129.0635 106.9761 129.1205 107.3808 129.1007 C +106.5717 129.1402 106.639 129.0852 y +107.3894 128.8259 107.8219 128.6045 107.7646 128.6963 C +107.4748 128.5325 107.8219 128.6045 107.2818 128.4232 C +107.8208 128.293 107.8378 127.7434 108.779 126.9705 c +110.0993 125.8869 109.7005 126.1244 y +108.5362 126.5227 107.939 126.5889 106.5575 128.0138 C +105.5401 129.756 102.611 131.9769 96.5985 133.6925 c +93.0926 134.6927 90.8361 133.2091 90.7674 133.1916 c +89.533 132.8664 90.4987 133.4124 89.8384 132.1691 C +90.9114 130.663 90.4269 125.169 90.1138 123.9975 c +89.8008 122.8262 88.3871 116.3098 87.9957 114.8456 c +S +109.7586 126.1884 m +108.9172 127.7943 107.6876 128.715 107.8099 130.3999 c +107.9323 132.0849 108.5768 134.1893 107.6956 135.4932 c +106.8145 136.7971 105.8538 137.4966 105.0055 137.3898 c +104.2025 137.2891 102.9826 137.4888 102.4411 136.9959 c +S +79.863 143.3069 m +79.4719 141.8428 77.7361 141.4828 77.6969 141.3365 c +S +78.4303 141.6269 m +78.5527 143.3119 78.0907 143.4234 79.5209 144.4806 c +80.9511 145.5381 82.9634 147.5457 82.1593 148.8312 c +81.3552 150.1165 79.1206 150.3443 78.2384 151.337 c +77.3559 152.3294 76.3145 152.1132 76.0898 153.7262 c +75.865 155.3391 73.3201 155.0187 72.4326 154.7653 c +71.5453 154.5122 69.1152 154.0082 68.9711 156.5367 c +68.8273 159.0653 64.4759 159.9606 62.0044 158.6873 c +59.5326 157.4137 60.073 157.5951 59.1098 157.6718 C +60.2243 156.935 59.1829 156.7189 59.8382 156.7167 C +58.452 157.0513 58.2198 156.7957 57.6037 156.9445 C +58.5644 156.245 58.0815 155.9718 58.4286 156.0439 C +57.3898 156.4508 57.0563 156.2002 56.8202 156.1596 c +56.5838 156.1195 56.445 156.2892 56.0979 156.2172 C +57.4813 155.2595 56.5965 155.6292 57.3272 155.2968 C +56.0169 155.3015 55.8214 154.5695 54.7433 154.8298 C +55.6464 154.2221 54.973 154.4627 55.3177 153.912 C +54.2396 154.1723 55.0854 153.6564 53.2739 153.6263 c +51.6385 153.5988 51.3058 153.0105 50.7315 153.9286 c +50.1571 154.8468 50.4066 154.5525 49.9324 156.4597 C +49.6951 154.9583 49.7368 155.7276 49.6195 155.2882 C +49.1964 155.5463 49.3786 155.3074 49.2637 155.4912 C +49.6267 154.7021 49.3002 154.804 49.5569 154.1345 c +49.9783 153.0378 49.5964 151.9817 49.2192 151.6443 c +47.9698 150.5259 49.5405 150.0859 50.8472 149.1469 c +52.1536 148.2076 53.5215 148.1111 53.4394 146.884 c +53.3574 145.6568 52.4106 145.0283 53.0425 144.0186 c +53.1385 143.8651 53.2976 143.6451 53.8107 143.3653 C +53.374 142.6524 54.0216 143.0807 52.8053 142.5172 C +53.8338 141.9181 55.3652 141.8208 56.2147 142.2391 C +55.6537 141.6734 55.8461 141.6266 55.0938 141.4189 C +56.0948 141.1769 58.0787 140.9316 59.2375 141.5869 C +58.9649 140.8734 58.8291 140.6723 58.482 140.6003 C +59.5993 140.4866 61.4926 141.7434 61.9779 142.6393 C +62.0525 141.998 62.3423 142.1618 62.1284 141.6681 C +63.4899 142.1721 62.4527 142.4163 63.4382 143.2671 c +64.094 143.8331 65.2447 144.7498 66.0209 145.6557 c +66.7969 146.5608 67.1969 147.4539 67.2003 147.4567 c +67.6277 147.8772 68.1968 147.5852 68.5106 147.4519 c +69.2379 147.1435 71.5322 146.4882 71.9147 145.7725 c +72.2971 145.0566 73.3677 142.9278 74.4457 142.6672 c +S +64.875 144.2776 m +67.9629 145.4021 69.6178 144.8466 70.6934 143.9633 c +71.728 143.1141 72.6172 143.187 73.4631 142.6708 c +S +49.0646 151.5255 m +48.8666 150.1707 50.8313 150.0077 51.7945 149.931 c +52.7577 149.8542 54.7411 149.7905 54.8332 148.4179 c +54.9722 146.3177 52.701 145.3478 52.8525 144.6878 c +S +0.0625 w +53.2164 151.2633 m +53.947 150.9309 54.5625 150.6263 55.8155 150.7134 c +57.0827 150.8018 58.0974 150.3996 60.3923 150.8157 c +61.1811 150.9587 62.1231 149.9301 63.0863 149.8534 c +64.0495 149.7763 62.0839 149.7836 64.5897 149.9577 c +67.0954 150.1318 71.4977 147.5195 73.2469 146.4637 c +74.3092 145.8226 76.223 143.7967 76.9659 141.6689 c +S +61.4895 150.4728 m +60.1192 149.9466 59.4399 148.7856 57.9806 147.6185 c +S +64.2042 149.8951 m +62.4369 151.2571 63.2454 151.0619 62.248 152.2378 c +61.2506 153.4138 61.0045 153.6867 60.1759 154.4529 c +S +67.5935 149.3881 m +68.0216 150.3757 68.7556 150.8218 67.6066 152.6578 c +66.4579 154.4941 66.5208 153.349 66.274 154.2657 c +S +0.125 w +89.4571 133.1963 m +89.076 134.2237 89.1517 133.8936 88.653 134.4816 c +S +0.0625 w +131.3495 142.7161 m +130.2139 143.0685 129.5956 142.5943 128.114 143.1859 c +S +125.6132 153.7654 m +S +125.591 153.0695 m +126.3208 152.4256 131.3034 145.611 132.0721 145.1134 c +S +0.125 w +82.3315 148.5556 m +82.9489 148.7183 84.301 148.4343 84.4692 148.273 c +84.7958 147.9604 84.6013 147.5398 85.1379 146.7866 C +85.4764 147.1338 85.7356 146.8762 85.853 147.3154 C +86.1205 146.7833 86.1664 146.1875 86.0788 146.014 C +86.4273 146.3972 86.3686 146.1778 86.5433 146.5252 C +86.7536 146.0846 86.6432 145.8874 86.6557 145.7186 c +86.7107 145.0041 86.2852 144.6391 85.6471 144.0921 C +86.1091 143.9802 86.1091 143.9802 86.7644 143.978 C +85.4502 143.0485 86.6078 143.3923 85.1985 142.7197 C +86.1239 142.8079 85.641 142.5348 86.4134 142.9717 C +85.829 141.3983 85.9256 141.4531 84.768 141.109 c +S +99.1532 138.8033 m +99.102 140.4523 98.7505 144.0442 98.946 144.7763 c +99.1418 145.5083 99.3944 145.2268 98.3914 145.7675 c +97.3153 146.3475 90.1677 144.141 88.4168 142.7995 c +88.0897 142.5484 88.3267 142.9175 86.2229 143.4854 c +S +86.7422 143.2818 m +88.0906 143.1122 88.9205 143.4571 89.4804 143.7116 C +88.5954 144.0812 88.8446 143.7872 88.3264 144.302 C +89.2126 144.2439 91.1598 144.4748 91.5656 144.7665 C +90.7198 145.2825 90.5268 145.1734 90.4706 145.5765 C +91.2015 145.2441 93.4945 145.2357 94.4799 145.8552 C +94.0961 146.2596 93.9787 145.8204 93.7685 146.2607 C +94.6571 146.8253 95.5252 147.0053 96.9123 146.9819 c +98.2996 146.9585 99.6055 146.4812 99.5671 145.8732 c +99.4436 143.8768 99.7968 145.5058 99.561 144.3159 c +99.3248 143.1261 99.1145 143.5666 98.9947 142.5044 c +S +100.3848 138.3502 m +100.2382 140.2557 100.0374 143.0318 100.849 143.6153 c +101.6609 144.1986 101.5068 144.2356 102.0837 143.9405 c +102.6605 143.6454 102.0275 144.3438 102.9662 142.9481 c +S +100.3492 143.8918 m +100.5839 144.7702 101.3775 145.5918 102.1279 145.3325 c +102.8783 145.0733 103.1105 145.3289 103.7227 144.2459 c +S +100.315 144.991 m +99.9534 146.0916 100.3139 144.6798 100.3631 147.3176 c +100.414 150.0244 98.3174 151.3186 96.5084 151.9113 c +94.6994 152.5043 92.4871 153.4283 91.4666 153.5968 C +92.2615 152.4306 91.4443 152.9006 91.9063 152.7891 C +91.0202 152.8473 91.0411 153.2319 90.0008 153.3273 c +88.9606 153.4227 89.0952 153.3123 88.5562 153.4425 C +88.9203 152.9649 89.0168 153.0194 89.2284 152.8906 C +88.5339 152.7466 87.61 152.9696 86.7422 152.7897 C +87.2028 152.3666 87.0673 152.1655 87.2211 152.1285 C +86.4315 152.2412 86.1372 152.002 85.4867 152.0799 c +84.8511 152.1555 84.773 151.8627 84.5026 151.772 c +84.2325 151.6813 84.0003 151.4257 83.3831 151.263 C +84.0565 151.0224 84.037 150.9492 84.2484 150.8202 C +83.3806 150.6402 83.8242 150.7668 82.7631 150.4775 c +81.7023 150.1885 82.0714 150.9565 81.5313 150.7751 c +80.9908 150.5941 80.6829 150.6683 80.0265 150.3593 c +S +100.281 146.0905 m +101.5939 146.7085 101.5939 146.7085 102.9409 146.2273 c +104.2876 145.7461 103.0777 146.7396 104.3452 145.6543 c +S +104.8937 143.1058 m +105.4497 142.426 106.2771 142.1481 107.6828 141.8867 c +109.0885 141.625 111.2655 141.4887 111.8374 139.9478 c +112.4092 138.4069 113.4906 134.1712 114.0661 133.5646 c +114.6418 132.9579 113.9682 133.1985 114.3337 133.0325 c +S +104.0796 141.8998 m +104.847 141.091 108.6227 140.8022 109.6996 140.2304 c +110.7763 139.6585 111.8396 138.9548 112.5544 136.1899 c +112.9093 134.8195 113.625 134.0608 113.8939 133.8399 c +S +105.7092 144.6233 m +106.0941 144.5304 106.3253 144.4745 106.5561 144.4189 c +S +111.7901 142.5311 m +113.6172 141.7001 115.4003 139.4769 115.4932 138.5972 C +114.9931 138.8739 115.2999 138.4881 114.7623 138.9295 C +114.9895 137.9396 115.8668 135.7015 115.6712 134.9694 c +115.4757 134.2374 115.3361 133.102 115.2187 132.6628 c +S +102.001 137.8036 m +104.2381 138.1986 105.0889 138.9282 106.6654 138.0798 c +108.2422 137.2315 110.1243 135.6856 110.2734 134.4029 c +110.4225 133.1198 110.8352 130.3704 110.4439 128.9063 c +110.0526 127.4422 110.2948 130.1894 110.9765 127.2191 c +111.6583 124.2489 111.1888 122.4919 111.7267 122.0502 c +113.4269 120.6531 114.2513 117.3878 114.3662 117.2042 c +114.5044 116.9831 114.2992 114.8824 113.5799 113.3417 C +113.4859 113.91 113.3885 113.6218 113.294 114.1122 C +112.9235 113.0327 112.9246 113.344 112.8832 112.5749 C +112.627 112.8681 112.4832 113.547 112.3272 113.2936 c +112.2796 113.2163 112.3227 112.9076 112.3258 112.9432 C +112.1862 111.8081 112.1672 111.8904 111.9917 111.3873 C +111.379 112.3146 111.7531 111.8737 111.1851 112.0498 C +111.4602 110.9314 110.8147 110.9703 110.3696 110.5323 c +109.9249 110.0942 109.7121 109.9118 108.7476 109.677 C +109.2513 110.3348 108.8076 110.2083 109.2916 110.7926 C +108.4814 110.5209 108.2686 110.3384 107.825 110.2119 C +108.6574 111.1798 108.5253 111.913 108.9509 112.2779 C +108.3924 112.3346 108.547 112.4534 108.3159 112.509 C +108.8001 113.0937 108.8488 113.2764 109.5236 113.3473 C +109.1019 113.9167 108.8986 113.6152 108.6674 113.6711 C +109.4596 114.1812 109.941 114.1428 110.116 114.4902 C +109.3264 114.6028 110.3288 114.6726 108.9987 114.6042 C +110.0439 115.7546 112.6331 117.4671 112.6003 118.8778 c +S +114.2981 115.7985 m +114.3081 118.2901 112.9769 118.7868 111.6969 119.4855 c +111.1459 119.7868 111.3707 119.7982 110.0971 119.3264 C +110.7204 121.0464 109.7511 119.5659 111.4552 121.648 c +113.1594 123.7304 110.974 126.5961 111.6001 128.9389 c +112.2262 131.2813 110.9727 135.7924 109.3227 137.5939 c +107.6728 139.3952 105.2063 139.3676 102.3117 138.3521 c +S +111.4663 133.9587 m +113.5443 133.1451 118.0104 132.0662 118.4623 129.4634 c +118.9143 126.8603 117.3225 123.9716 115.9316 123.0607 c +114.5403 122.1498 113.5721 120.9811 113.2982 119.9561 c +S +0.0625 w +87.9874 166.4974 m +89.6815 166.0883 88.4163 166.491 89.6481 166.1934 c +S +136.1866 169.0969 m +135.7441 169.2815 135.2816 169.2376 135.1759 169.3021 c +S +86.14 146.8565 m +87.3941 147.2547 89.0738 148.0182 90.769 147.9203 c +92.4646 147.8227 93.8163 148.587 94.4129 148.3651 c +95.0092 148.1431 96.6864 148.2836 97.9525 146.8865 c +S +91.9255 147.9529 m +91.2079 146.8014 90.1455 146.2006 y +S +89.0724 147.7067 m +88.4394 148.4051 87.0156 148.9049 86.303 148.9992 c +S +93.9117 148.3303 m +92.7983 149.3786 91.9133 149.7482 91.2205 149.9154 c +S +113.7718 180.0054 m +113.6884 178.4667 112.2167 176.6402 112.2849 174.4418 c +S +U +U +%%Trailer +_E end diff --git a/macros/generic/boxedeps/rosetest.tex b/macros/generic/boxedeps/rosetest.tex new file mode 100644 index 0000000000..dde6e442db --- /dev/null +++ b/macros/generic/boxedeps/rosetest.tex @@ -0,0 +1,19 @@ + +%% SmallRoseBoxedEPS.tex +%% ) 1993, Antonio Possolo +\magnification=\magstep3 +\hsize = 4.5 true in +\input BoxedEPS.tex +\SetTexturesEPSFSpecial +\HideDisplacementBoxes +\parindent=0pt +The petals of a small rose can be +pressed between the pages of a +beautiful book. +\bigskip +\centerline{\BoxedEPSF{SmallRose scaled +1250}} +\bigskip The Encapsulated PostScript +picture of a small rose can be typeset to +fit among the words of a beautiful book. \bye + |