Graphics drivers for L^{A}TEX 2ε^{∗}

Sebastian Rahtz and David Carlisle

1995/12/04

1 Driver files

This file implements the currently supported drivers. If the driver you use is not in this list then a ‘.def’ file may be distributed with the driver. If not, send us some details of the driver’s \special syntax, and we will try to produce a suitable file.

Note that some of these files are for drivers to which we have no access, so they are untested. Please send any corrections to the latexbugs address.

2 A Template

Before the code for the actual driver options, we present a ‘template’ driver file that shows the basics of the code needed to support a new driver. This template file is not extracted by default, but may be extracted with by specifiying the ‘template’ module to docstrip. A suitable docstrip command is commented out in the install file.

2.1 color

3 Colour

Most of the drivers that support colour use one of three methods.

• color1: ‘dvips’ style colour specials.

• color2: ‘textures’ style colour specials.

• color3: Colour implemented via literal PostScript specials.

Some drivers do not use any of these modules and have their own code. Note that drivers using the ‘color3’ code can not fully support the L^{A}TEX colour commands.

1 ⟨∗color1 | color2 | color3⟩

∗Version v2.14, revised 1995/12/04

 2 \def\c@lor@arg#1{%
 3 \dimen@#1\p@
 4 \ifdim\dimen@<\z@\dimen@\maxdimen\fi
 5 \ifdim\dimen@>\p@
 6  \PackageError{color}{Argument `#1' not in range [0,1]}\@ehd
 7 \fi}

Need to make sure of a trailing .0 for textures. Apparently it is OK to always add a . as 1.3. is accepted by textures. textures gray special is reversed, so just use rgb instead.

 8 \def\color@gray#1#2{%
 9 \c@lor@arg{#2}%
10 ⟨color1⟩ \def#1{gray #2}%
11 ⟨color2⟩ \def#1{rgb #2. #2. #2.}%
12 ⟨color3⟩ \def#1{#2 setgray}%

13 }

14 \def\color@cmyk#1#2{\c@lor@@cmyk#2\@@#1}
15 \def\c@lor@@cmyk#1,#2,#3,#4\@@#5{%
16 \c@lor@arg{#1}%
17 \c@lor@arg{#2}%
18 \c@lor@arg{#3}%
19 \c@lor@arg{#4}%
20 ⟨color1⟩ \def#5{cmyk #1 #2 #3 #4}%
21 ⟨color2⟩ \def#5{cmyk #1. #2. #3. #4.}%
22 ⟨color3⟩ \def#5{#1 #2 #3 #4 setcmykcolor}%

23 }

24 \def\color@rgb#1#2{\c@lor@@rgb#2\@@#1}
25 \def\c@lor@@rgb#1,#2,#3\@@#4{%
26 \c@lor@arg{#1}%
27 \c@lor@arg{#2}%
28 \c@lor@arg{#3}%
29 ⟨color1⟩ \def#4{rgb #1 #2 #3}%
30 ⟨color2⟩ \def#4{rgb #1. #2. #3.}%
31 ⟨color3⟩ \def#4{#1 #2 #3 setrgbcolor}%

32 }

33 ⟨∗color1 | color3⟩

34 \def\color@hsb#1#2{\c@lor@@hsb#2\@@#1}
35 \def\c@lor@@hsb#1,#2,#3\@@#4{%
36 \c@lor@arg{#1}%
37 \c@lor@arg{#2}%
38 \c@lor@arg{#3}%
39 ⟨color1⟩ \def#4{hsb #1 #2 #3}%
40 ⟨color3⟩ \def#4{#1 #2 #3 sethsbcolor}%

41 } 42 ⟨/color1 | color3⟩

43 \def\color@named#1#2{\c@lor@@named#2,,\@@#1}
44 \def\c@lor@@named#1,#2,#3\@@#4{%
45 \@ifundefined{col@#1}%

46  {\PackageError{color}{Undefined color `#1'}\@ehd}%

47 ⟨color1&!dvipsone⟩ {\def#4{ #1}}%

48 ⟨color2⟩ {\edef#4{ #1 \if!#2!\else #2.\fi}}%
49 ⟨color3 | dvipsone⟩ {\edef#4{\csname col@#1\endcsname}}%

50 }

Conversion from \special syntax to PostScript (for PSTricks).

51 ⟨∗color1 | color2⟩

52 \def\c@lor@to@ps#1 #2\@@{\csname c@lor@ps@#1\endcsname#2 \@@}

53 ⟨/color1 | color2⟩ 54 ⟨∗color3⟩

55 \def\c@lor@to@ps#1\@@{#1}

56 ⟨/color3⟩

57 ⟨∗color1⟩

58 \def\c@lor@ps@#1 #2\@@{TeXDict begin #1 end}
59 \def\c@lor@ps@rgb#1\@@{#1 setrgbcolor}
60 \def\c@lor@ps@hsb#1\@@{#1 sethsbcolor}
61 \def\c@lor@ps@cmyk#1\@@{#1 setcmykcolor}
62 \def\c@lor@ps@gray#1\@@{#1 setgray}

63 ⟨/color1⟩ 64 ⟨∗color2⟩

65 \def\c@lor@to@ps@#1 #2\@@{\csname c@lor@ps@#1@\endcsname#2 \@@}
66 \def\c@lor@ps@#1 #2\@@{%
67 \expandafter\expandafter\expandafter
68  \c@lor@to@ps@\csname col@#1\expandafter\endcsname\space#2. \@@{#1}}
69 \def\c@lor@ps@rgb#1. #2. #3. #4\@@{#1 #2 #3 setrgbcolor}
70 \def\c@lor@ps@rgb@#1. #2. #3. #4. #5\@@#6{#1 #2 #3 setrgbcolor}
71 \def\c@lor@ps@cmyk#1. #2. #3. #4. #5. #6\@@{#1 #2 #3 #4 setcmykcolor}
72 \def\c@lor@ps@cmyk@#1. #2. #3. #4. #5. #6\@@#7{%
73  #1 #2 #3 #4  (#7)  findcustomcmykcolor
74  \if!\@firstofone#5!1 \else#5 \fi setcustomcolor}

75 ⟨/color2⟩

76 ⟨color1&!dvipsone⟩\def\current@color{ Black}
77 ⟨color1 & dvipsone⟩\def\current@color{gray 0}
78 ⟨color2⟩\def\current@color{rgb 0. 0. 0.}
79 ⟨color3⟩\def\current@color{0 setgray}

80 ⟨∗color1⟩

81 \def\set@color{%
82 ⟨!dvipsone⟩ \special{color push
83 ⟨dvipsone⟩ \special{color push}\special{color
84  \current@color}\aftergroup\reset@color}
85 \def\reset@color{\special{color pop}}
86 \def\set@page@color{\special{background \current@color}}
87 \def\define@color@named#1#2{%
88 ⟨!dvipsone⟩ \expandafter\let\csname col@#1\endcsname\@nnil}
89 ⟨dvipsone⟩ \expandafter\edef\csname col@#1\endcsname{#2}}

90 ⟨/color1⟩ 91 ⟨∗color2⟩

92 \def\set@color{%

 93 \special{color push}%
 94 \special{color \current@color}%
 95 \aftergroup\reset@color}
 96 \def\reset@color{\special{color pop}}
 97 \def\set@page@color{\c@lor@special\sixt@@n{background \current@color}}
 98 \def\define@color@named#1#2{%
 99 \AtBeginDvi{\special{color define #1 #2}}%
100 \expandafter\edef\csname col@#1\endcsname{#2}}

101 ⟨/color2⟩ 102 ⟨∗color3⟩

103 \def\set@color{%
104 \Gin@PS@raw{\current@color}\aftergroup\reset@color}
105 \def\reset@color{\Gin@PS@raw{\current@color}}
106 \def\set@page@color{%
107 \c@lor@special\sixt@@n{background color ignored: \current@color}}
108 \def\define@color@named#1#2{%
109 \expandafter\edef\csname col@#1\endcsname{#2}}

110 ⟨/color3⟩

111 ⟨/color1 | color2 | color3⟩

112 ⟨∗colorfix⟩

113 \AtBeginDocument{%
114 \let\@ldc@l@r\color
115 \def\color{\if@inlabel\leavevmode\fi\@ldc@l@r}%
116 \let\@ldtextc@l@r\textcolor
117 \def\textcolor{\if@inlabel\leavevmode\fi\@ldtextc@l@r}%
118 \let\@lduseb@x\usebox
119 \def\usebox#1{\@lduseb@x{#1}\set@color}}

120 ⟨/colorfix⟩

121 ⟨∗dvipsnames⟩

122 \DefineNamedColor{named}{GreenYellow}   {cmyk}{0.15,0,0.69,0}
123 \DefineNamedColor{named}{Yellow}        {cmyk}{0,0,1,0}
124 \DefineNamedColor{named}{Goldenrod}     {cmyk}{0,0.10,0.84,0}
125 \DefineNamedColor{named}{Dandelion}     {cmyk}{0,0.29,0.84,0}
126 \DefineNamedColor{named}{Apricot}       {cmyk}{0,0.32,0.52,0}
127 \DefineNamedColor{named}{Peach}         {cmyk}{0,0.50,0.70,0}
128 \DefineNamedColor{named}{Melon}         {cmyk}{0,0.46,0.50,0}
129 \DefineNamedColor{named}{YellowOrange}  {cmyk}{0,0.42,1,0}
130 \DefineNamedColor{named}{Orange}        {cmyk}{0,0.61,0.87,0}
131 \DefineNamedColor{named}{BurntOrange}   {cmyk}{0,0.51,1,0}
132 \DefineNamedColor{named}{Bittersweet}   {cmyk}{0,0.75,1,0.24}
133 \DefineNamedColor{named}{RedOrange}     {cmyk}{0,0.77,0.87,0}
134 \DefineNamedColor{named}{Mahogany}      {cmyk}{0,0.85,0.87,0.35}
135 \DefineNamedColor{named}{Maroon}        {cmyk}{0,0.87,0.68,0.32}
136 \DefineNamedColor{named}{BrickRed}      {cmyk}{0,0.89,0.94,0.28}
137 \DefineNamedColor{named}{Red}           {cmyk}{0,1,1,0}
138 \DefineNamedColor{named}{OrangeRed}     {cmyk}{0,1,0.50,0}
139 \DefineNamedColor{named}{RubineRed}     {cmyk}{0,1,0.13,0}
140 \DefineNamedColor{named}{WildStrawberry}{cmyk}{0,0.96,0.39,0}
141 \DefineNamedColor{named}{Salmon}        {cmyk}{0,0.53,0.38,0}

142 \DefineNamedColor{named}{CarnationPink} {cmyk}{0,0.63,0,0}
143 \DefineNamedColor{named}{Magenta}       {cmyk}{0,1,0,0}
144 \DefineNamedColor{named}{VioletRed}     {cmyk}{0,0.81,0,0}
145 \DefineNamedColor{named}{Rhodamine}     {cmyk}{0,0.82,0,0}
146 \DefineNamedColor{named}{Mulberry}      {cmyk}{0.34,0.90,0,0.02}
147 \DefineNamedColor{named}{RedViolet}     {cmyk}{0.07,0.90,0,0.34}
148 \DefineNamedColor{named}{Fuchsia}       {cmyk}{0.47,0.91,0,0.08}
149 \DefineNamedColor{named}{Lavender}      {cmyk}{0,0.48,0,0}
150 \DefineNamedColor{named}{Thistle}       {cmyk}{0.12,0.59,0,0}
151 \DefineNamedColor{named}{Orchid}        {cmyk}{0.32,0.64,0,0}
152 \DefineNamedColor{named}{DarkOrchid}    {cmyk}{0.40,0.80,0.20,0}
153 \DefineNamedColor{named}{Purple}        {cmyk}{0.45,0.86,0,0}
154 \DefineNamedColor{named}{Plum}          {cmyk}{0.50,1,0,0}
155 \DefineNamedColor{named}{Violet}        {cmyk}{0.79,0.88,0,0}
156 \DefineNamedColor{named}{RoyalPurple}   {cmyk}{0.75,0.90,0,0}
157 \DefineNamedColor{named}{BlueViolet}    {cmyk}{0.86,0.91,0,0.04}
158 \DefineNamedColor{named}{Periwinkle}    {cmyk}{0.57,0.55,0,0}
159 \DefineNamedColor{named}{CadetBlue}     {cmyk}{0.62,0.57,0.23,0}
160 \DefineNamedColor{named}{CornflowerBlue}{cmyk}{0.65,0.13,0,0}
161 \DefineNamedColor{named}{MidnightBlue}  {cmyk}{0.98,0.13,0,0.43}
162 \DefineNamedColor{named}{NavyBlue}      {cmyk}{0.94,0.54,0,0}
163 \DefineNamedColor{named}{RoyalBlue}     {cmyk}{1,0.50,0,0}
164 \DefineNamedColor{named}{Blue}          {cmyk}{1,1,0,0}
165 \DefineNamedColor{named}{Cerulean}      {cmyk}{0.94,0.11,0,0}
166 \DefineNamedColor{named}{Cyan}          {cmyk}{1,0,0,0}
167 \DefineNamedColor{named}{ProcessBlue}   {cmyk}{0.96,0,0,0}
168 \DefineNamedColor{named}{SkyBlue}       {cmyk}{0.62,0,0.12,0}
169 \DefineNamedColor{named}{Turquoise}     {cmyk}{0.85,0,0.20,0}
170 \DefineNamedColor{named}{TealBlue}      {cmyk}{0.86,0,0.34,0.02}
171 \DefineNamedColor{named}{Aquamarine}    {cmyk}{0.82,0,0.30,0}
172 \DefineNamedColor{named}{BlueGreen}     {cmyk}{0.85,0,0.33,0}
173 \DefineNamedColor{named}{Emerald}       {cmyk}{1,0,0.50,0}
174 \DefineNamedColor{named}{JungleGreen}   {cmyk}{0.99,0,0.52,0}
175 \DefineNamedColor{named}{SeaGreen}      {cmyk}{0.69,0,0.50,0}
176 \DefineNamedColor{named}{Green}         {cmyk}{1,0,1,0}
177 \DefineNamedColor{named}{ForestGreen}   {cmyk}{0.91,0,0.88,0.12}
178 \DefineNamedColor{named}{PineGreen}     {cmyk}{0.92,0,0.59,0.25}
179 \DefineNamedColor{named}{LimeGreen}     {cmyk}{0.50,0,1,0}
180 \DefineNamedColor{named}{YellowGreen}   {cmyk}{0.44,0,0.74,0}
181 \DefineNamedColor{named}{SpringGreen}   {cmyk}{0.26,0,0.76,0}
182 \DefineNamedColor{named}{OliveGreen}    {cmyk}{0.64,0,0.95,0.40}
183 \DefineNamedColor{named}{RawSienna}     {cmyk}{0,0.72,1,0.45}
184 \DefineNamedColor{named}{Sepia}         {cmyk}{0,0.83,1,0.70}
185 \DefineNamedColor{named}{Brown}         {cmyk}{0,0.81,1,0.60}
186 \DefineNamedColor{named}{Tan}           {cmyk}{0.14,0.42,0.56,0}
187 \DefineNamedColor{named}{Gray}          {cmyk}{0,0,0,0.50}
188 \DefineNamedColor{named}{Black}         {cmyk}{0,0,0,1}
189 \DefineNamedColor{named}{White}         {cmyk}{0,0,0,0}

190 ⟨/dvipsnames⟩

4 dvips

A L^{A}TEX 2ε graphics driver file for Tom Rokicki’s dvips driver; tested with version 5.518 of July 1993. Note that the rotation angle has to be negated.

191 ⟨∗dvips⟩

4.1 File inclusion

\Ginclude@eps #1 input file (or command)

192 \def\Ginclude@eps#1{%
193 \message{<#1>}%
194 \bgroup

dvips likes to work with its own pixel resolution, so mangle the sizes slightly.

195 \def\@tempa{!}%
196 \dimen@=10\Gin@req@width
197 \dimen@ii1bp%
198 \divide\dimen@\dimen@ii
199 \@tempdima=10\Gin@req@height
200 \divide\@tempdima\dimen@ii
201  \special{PSfile="#1"\space
202  llx=\Gin@llx\space
203  lly=\Gin@lly\space
204  urx=\Gin@urx\space
205  ury=\Gin@ury\space
206  \ifx\Gin@scalex\@tempa\else rwi=\number\dimen@\space\fi
207  \ifx\Gin@scaley\@tempa\else rhi=\number\@tempdima\space\fi
208  \ifGin@clip clip\fi}%
209 \egroup}

\Ginclude@bmp #1 input file; if zero size is requested, the graphic will come at ‘natural’ size.

210 \def\Ginclude@bmp#1{%
211 \message{<#1>}%
212 \dimen@\Gin@req@height
213 \advance\dimen@ by-\Gin@lly bp
214 \kern-\Gin@llx bp\raise\Gin@req@height\hbox{%
215 \ifdim\Gin@urx bp=\z@
216  \ifdim\Gin@ury bp=\z@
217  \special{em: graph #1}%
218  \else
219  \special{em: graph #1,\Gin@urx bp}%
220  \fi
221 \else
222  \special{em: graph #1,\Gin@urx bp,\Gin@ury bp}%
223 \fi

224 }% 225 }

4.2 Rotation

226 \def\Grot@start{%
227 \special{ps: gsave currentpoint
228 currentpoint translate \Grot@angle\space neg
229 rotate neg exch neg exch translate}}
230 \def\Grot@end{\special{ps: currentpoint grestore moveto}}

4.3 Scaling

231 \def\Gscale@start{\special{ps:  currentpoint currentpoint translate
232 \Gscale@x\space \Gscale@y\space scale neg exch neg exch translate}}
233 \def\Gscale@end{\special{ps:  currentpoint currentpoint translate
234 1 \Gscale@x\space div 1 \Gscale@y\space div scale
235 neg exch neg exch translate}}
236 \def\Gin@PS@raw#1{\special{ps: #1}}
237 \def\Gin@PS@restored#1{\special{" #1}}

238 ⟨/dvips⟩

5 OzTeX

A L^{A}TEX 2ε graphics driver file for OzTeX (versions 1.42 and later), by Andrew Trevorrow.

239 ⟨∗oztex⟩

5.1 Graphics inclusion

240 \def\Ginclude@eps{\Oztex@Include{epsf}}
241 \def\Ginclude@pntg{\Oztex@Include{pntg}}
242 \def\Ginclude@pict{\Oztex@Include{pict}}
243 \def\Oztex@Include#1#2{%
244 \ifGin@clip
245 \typeout{No clipping support in OzTeX}%
246 \fi
247 \divide\Gin@req@width by 65781% convert sp to bp
248 \divide\Gin@req@height by 65781%
249 \special{#1=#2\space
250 width=\number\Gin@req@width \space
251 height=\number\Gin@req@height

252 }% 253 } 254 ⟨/oztex⟩

6 Textures

A L^{A}TEX 2ε graphics driver file for Blue Sky’s Textures

WARNING! There is ongoing work to produce a new version of the textures support. Do not rely on anything in this file being in the next version!

255 ⟨∗textures⟩

6.1 Graphics inclusion

256 \PackageInfo{graphics/color}
257 {This file uses the advanced color support\MessageBreak
258 available in textures1.7\MessageBreak
259 If you are using color with an earlier version\MessageBreak
260 of textures, edit graphics.ins where marked,\MessageBreak
261 and re-latex graphics.ins.\MessageBreak\MessageBreak
262 If you are using textures1.7\MessageBreak
263 you may want to delete this warning\MessageBreak
264 from textures.def.\MessageBreak\MessageBreak
265 The code for scaling/rotation and file inclusion\MessageBreak
266 in this file is still rudimentary, and does not\MessageBreak
267 use textures' full capabilities.\MessageBreak\MessageBreak
268 A new textures.def is currently being developed\@gobble}
269 \def\Ginclude@eps{\Textures@Include{illustration}}
270 \def\Ginclude@pict{\Textures@Include{pictfile}}
271 \def\Textures@Include#1#2{%
272 \def\@tempa{!}%
273 \ifx\Gin@scaley\@tempa
274  \let\Gin@scaley\Gin@scalex
275 \else
276  \ifx\Gin@scalex\@tempa\let\Gin@scalex\Gin@scaley\fi
277 \fi
278 \setlength\@tempdima{\Gin@scalex pt}%
279 \setlength\@tempdimb{\Gin@scaley pt}%
280 \ifdim\@tempdima>\@tempdimb
281  \let\Gin@scalex\Gin@scaley
282 \fi
283 \ifGin@clip
284 \typeout{no clipping support in Textures}%
285 \fi
286 \@tempdimb=1000sp%
287 \setlength\@tempdima{\Gin@scalex\@tempdimb}%
288 \special{#1 #2\space scaled \number\@tempdima}%

289 }

6.2 Rotation

This code was written when no unprotected postscript code was allowed; it could almost certainly be rewritten now with ‘rawpostscript’.

290 \def\Grot@start{\special{postscript
291 0 0 transform

292 grestore
293 matrix currentmatrix
294 3 1 roll
295 itransform
296 dup 3 -1 roll
297 dup 4 1 roll exch
298 translate
299 \Grot@angle\space neg rotate
300 neg exch neg exch translate
301 gsave}}
302 \def\Grot@end{\special{postscript grestore  setmatrix  gsave}}

6.3 Colour

This will only work for versions 1.6 and Version 1.7 uses ‘color2’.

303 ⟨color3⟩\def\Gin@PS@raw#1{\special{rawpostscript #1}}

304 ⟨/textures⟩

7 dvialw

A L^{A}TEX 2ε graphics driver file for dvialw, by Nelson Beebe

305 ⟨∗dvialw⟩

7.1 Rotation

306 \def\Ginclude@eps#1{%
307 \def\@tempa{!}%
308 \ifx\Gin@scaley\@tempa
309  \let\Gin@scaley\Gin@scalex
310 \else
311  \ifx\Gin@scalex\@tempa\let\Gin@scalex\Gin@scaley\fi
312 \fi
313 \ifGin@clip
314  \typeout{no clipping support in dvialw}%
315 \fi
316 \special{language "PS",
317  literal "\Gin@scalex\space
318  \Gin@scaley\space scale",
319  position = "bottom left",
320  include "#1\space"}%

321 } 322 ⟨/dvialw⟩

8 emtex

A L^{A}TEX 2ε graphics driver file for Eberhard Mattes’ emTeX

323 ⟨∗emtex⟩

8.1 Graphics file inclusion

324 \def\Ginclude@bmp#1{%
325 \raise\Gin@req@height\hbox{\special{em:graph #1}}%
326 \typeout{WARNING: emtex does not permit graphics to be scaled}%

327 } 328 ⟨/emtex⟩

9 dvilaser/ps

A L^{A}TEX 2ε graphics driver file for Arbortext’s dvilaser/ps

329 ⟨∗dvilaser⟩

9.1 Graphic file inclusion

330 \def\Ginclude@eps#1{%
331 \ifGin@clip
332 \typeout{no clipping support in dvilaser/ps}%
333 \fi
334 \special{ps: epsfile #1\space \the\Gin@req@width}%

335 } 336 ⟨/dvilaser⟩

10 psprint

A L^{A}TEX 2ε graphics driver file for Trevorrow’s psprint

337 ⟨∗psprint⟩

10.1 Graphic file inclusion

338 \def\Ginclude@eps#1{%
339 \def\@tempa{!}%
340 \ifx\Gin@scaley\@tempa
341  \let\Gin@scaley\Gin@scalex
342 \else
343  \ifx\Gin@scalex\@tempa\let\Gin@scalex\Gin@scaley\fi
344 \fi
345 \ifGin@clip
346  \typeout{no clipping support in psprint}%
347 \fi
348 \special{#1\space
349  \Gin@scalex\space \Gin@scaley\space scale
350  \Gin@llx\space neg
351  \Gin@lly \space neg translate

352 }% 353 } 354 ⟨/psprint⟩

11 dvipsone

A L^{A}TEX 2ε graphics driver file for Y&Y’s dvipsone

355 ⟨∗dvipsone⟩

11.1 Graphic file inclusion

356 \def\Ginclude@eps#1{%
357 \message{<#1>}%
358 \dimen@\Gin@llx bp
359 \dimen@ii\Gin@lly bp
360 \dimen4 \Gin@urx bp
361 \dimen6 \Gin@ury bp
362 \raise\Gin@req@height\hbox{%
363  \special{ps::[begin]
364  \number\Gin@req@width\space
365  \number\Gin@req@height\space
366  \number\dimen@\space
367  \number\dimen@ii\space
368  \number\dimen4 \space
369  \number\dimen6 \space
370  startTexFig}%
371  \ifGin@clip\special{ps:: doclip}\fi
372  \special{ps: plotfile #1}%
373  \special{ps::[end] endTexFig}%

374 }% 375 }

376 \def\Ginclude@tiff#1{%
377 \message{<#1>}%
378 \special{insertimage: #1 \number\Gin@req@width\space
379  \number\Gin@req@height}}
380 \def\Gin@PS@raw#1{\special{ps: #1}}
381 \def\Grot@start{%
382 \special{ps: gsave currentpoint
383 currentpoint translate \Grot@angle\space
384 rotate neg exch neg exch translate}}
385 \def\Grot@end{\special{ps: currentpoint grestore moveto}}
386 \def\Gscale@start{\special{ps:  currentpoint currentpoint translate
387 \Gscale@x\space \Gscale@y\space scale neg exch neg exch translate}}
388 \def\Gscale@end{\special{ps:  currentpoint currentpoint translate
389 1 \Gscale@x\space div 1 \Gscale@y\space div scale
390 neg exch neg exch translate}}

391 ⟨/dvipsone⟩

12 dviwindo

A L^{A}TEX 2ε graphics driver file for Y&Y’s dviwindo. This driver now uses the same file as dvipsone.

13 dvitops

A L^{A}TEX 2ε graphics driver file for James Clark’s dvitops

392 ⟨∗dvitops⟩

13.1 Rotation

393 \newcount\Grot@count
394 \Grot@count=\@ne
395 \def\Grot@start{\special{dvitops: origin
396  rot\the\@tempdima}%
397 \special{dvitops: begin rot\the\Grot@count}}%
398 \def\Grot@end{\special{dvitops: end}%
399 \special{dvitops: rotate rot\the\Grot@count \space
400  \Grot@angle}%
401 \global\advance\Grot@count by\@ne}%

13.2 Graphic file inclusion

402 \def\Ginclude@eps#1{%
403 % These cause an arithmetic overflow, so I've commented them
404 % out. Presumably they were there for some reason.
405 % Any dvitops users out there??
406 % \multiply\Gin@req@width by \@m
407 % \multiply\Gin@req@height by \@m
408 \ifGin@clip
409 \typeout{no clipping support in dvitops}%
410 \fi
411 \special{import #1\space \the\Gin@req@width\space
412  \the\Gin@req@height\space fill}}

413 ⟨/dvitops⟩

14 dvi2ps

A L^{A}TEX 2ε graphics driver file for original dvi2ps

414 ⟨∗dvi2ps⟩

14.1 Graphic file inclusion

415 \def\Ginclude@eps#1{%
416 \def\@tempa{!}%
417 \ifx\Gin@scaley\@tempa
418  \let\Gin@scaley\Gin@scalex
419 \else
420  \ifx\Gin@scalex\@tempa\let\Gin@scalex\Gin@scaley\fi
421 \fi
422 \ifGin@clip
423  \typeout{no clipping support in dvi2ps}%

424 \fi
425 \special{psfile=#1\space
426  hscale=\Gin@scalex\space 1000 mul
427  vscale=\Gin@scaley\space 1000 mul}%

428 } 429 ⟨/dvi2ps⟩

15 pctexps

A L^{A}TEX 2ε graphics driver file for Personal TeX’s PTI Laser/PS; from information supplied by Lance Carnes and Tao Wang <pti@crl.com>.

430 ⟨∗pctexps⟩

15.1 Graphic file inclusion

431 \def\Ginclude@eps#1{%
432 \message{<#1>}%
433 \ifGin@clip
434  \typeout{no clipping support in pctexps}%
435 \fi
436 \Gin@req@width.03515\Gin@req@width
437 \Gin@req@height.03515\Gin@req@height
438 \special{ps:#1\space x=\strip@pt\Gin@req@width cm,
439  y=\strip@pt\Gin@req@height cm}}

440

441 \def\Ginclude@ps#1{%
442 \message{<#1>}%
443 \ifGin@clip
444  \typeout{no clipping support in pctexps}%
445 \fi
446 \hbox{\kern-\Gin@llx bp\raise-\Gin@lly bp\hbox{\special{ps:#1}}}%
447 \typeout{^^J%
448 ---------------------------------------------------------^^J%
449 .ps graphics without bounding box information cannot be^^J%
450 scaled.  If the file actually contains the information,^^J%
451 please rename the file to .eps file extension.^^J%
452 ---------------------------------------------------------^^J}}

453

454 \def\Gin@extensions{.eps,.ps}
455 \@namedef{Gin@rule@.ps}#1{{ps}{.ps}{#1}}
456 \@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}

457

458 \def\Gin@PS@raw#1{\special{ps::#1}}
459 \def\Grot@start{%
460 \special{ps::gsave currentpoint
461 currentpoint translate \Grot@angle\space
462 rotate neg exch neg exch translate}}
463 \def\Grot@end{\special{ps:: currentpoint grestore moveto}}

464 \def\Gscale@start{\special{ps:: currentpoint currentpoint translate
465 \Gscale@x\space \Gscale@y\space scale neg exch neg exch translate}}
466 \def\Gscale@end{\special{ps::  currentpoint currentpoint translate
467 1 \Gscale@x\space div 1 \Gscale@y\space div scale
468 neg exch neg exch translate}}

469 ⟨/pctexps⟩

16 pctexwin

A L^{A}TEX 2ε graphics driver file for Personal TeX’s PC TeX for Windows; from information supplied by Lance Carnes and Tao Wang <pti@crl.com>.

470 ⟨∗pctexwin⟩

16.1 Graphic file inclusion

471 \def\Ginclude@eps#1{%
472 \message{<#1>}%
473 \ifGin@clip
474  \typeout{no clipping support in pctexwin}%
475 \fi
476 \Gin@req@width.03515\Gin@req@width
477 \Gin@req@height.03515\Gin@req@height
478 \special{eps:#1\space x=\strip@pt\Gin@req@width cm,
479  y=\strip@pt\Gin@req@height cm}}

480

481 \def\Ginclude@ps#1{%
482 \message{<#1>}%
483 \ifGin@clip
484  \typeout{no clipping support in pctexwin}%
485 \fi
486 \hbox{\kern-\Gin@llx bp\raise-\Gin@lly bp\hbox{\special{ps:#1}}}%
487 \typeout{^^J%
488 ---------------------------------------------------------^^J%
489 .ps graphics without bounding box information cannot be^^J%
490 scaled.  If the file actually contains the information,^^J%
491 please rename the file to .eps file extension.^^J%
492 ---------------------------------------------------------^^J%

493 }}

494

495 \def\Ginclude@bmp#1{%
496 \message{<#1>}%
497 \ifGin@clip
498  \typeout{no clipping support in pctexwin}%
499 \fi
500 \Gin@req@width.03515\Gin@req@width
501 \Gin@req@height.03515\Gin@req@height
502 \special{bmp:#1\space x=\strip@pt\Gin@req@width cm,
503  y=\strip@pt\Gin@req@height cm}}

505 \def\Ginclude@wmf#1{%
506 \message{<#1>}%
507 \ifGin@clip
508  \typeout{no clipping support in pctexwin}%
509 \fi
510 \Gin@req@width.03515\Gin@req@width
511 \Gin@req@height.03515\Gin@req@height
512 \special{wmf:#1\space x=\strip@pt\Gin@req@width cm,
513  y=\strip@pt\Gin@req@height cm}}

514

515 \def\Gin@extensions{.eps,.ps,.wmf,.bmp}
516 \@namedef{Gin@rule@.bmp}#1{{bmp}{}{#1}}
517 \@namedef{Gin@rule@.wmf}#1{{wmf}{}{#1}}
518 \@namedef{Gin@rule@.ps}#1{{ps}{.ps}{#1}}
519 \@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}

520 ⟨/pctexwin⟩

17 pctexhp

A L^{A}TEX 2ε graphics driver file for Personal TeX’s PTI Laser/HP; from information supplied by Lance Carnes and Tao Wang <pti@crl.com>.

521 ⟨∗pctexhp⟩

17.1 Graphic file inclusion

522 \def\Ginclude@pcl#1{%
523 \message{<#1>}%
524 \ifGin@clip
525  \typeout{no clipping support in pctexhp}%
526 \fi
527 \hbox{\kern-\Gin@llx bp\raise-\Gin@lly bp\hbox{\special{pcl:#1}}}%
528 \typeout{WARNING: pctexhp does not permit graphics to be scaled}}
529 \@namedef{Gin@rule@.pcl}#1{{pcl}{}{#1}}
530 \def\Gin@extensions{.pcl}

531 ⟨/pctexhp⟩

18 pubps

A L^{A}TEX 2ε graphics driver file for Arbortext’s PUBps; information from Peter R

 Wilson pwilson@rdrc.rpi.edu.

532 ⟨∗pubps⟩

18.1 Rotation

533 \def\Grot@start{\special{ps: gsave currentpoint
534  currentpoint translate \Grot@angle\space

535  rotate  neg exch neg exch translate}}
536 \def\Grot@end{\special{ps: currentpoint grestore moveto}}

537 ⟨/pubps⟩

19 dviwin

A L^{A}TEX 2ε graphics driver file for Hippocrates Sendoukas’ dviwin

538 ⟨∗dviwin⟩

19.1 Graphic file inclusion

Dviwin sorts out the graphics type itself based on extension They all use the same \special, so as far as graphics.sty is concerned they are all the same ‘type’. Use ‘bmp’ for the type as that is as good a name as any. Make this the default.

539 \@namedef{Gin@rule@*}#1{{bmp}{}{#1}}
540 \def\Ginclude@bmp#1{%
541 \raise\Gin@req@height\hbox{%
542 \special{anisoscale #1,
543 \the\Gin@req@width\space \the\Gin@req@height}}}

The only exception is EPS files, as they may be read for BoundingBox

544 \@namedef{Gin@rule@.ps}#1{{eps}{.ps}{#1}}
545 \@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}
546 \let\Ginclude@eps\Ginclude@bmp

Add a few default extensions so \includegraphics{a} will pick up a.eps or

 a.wmf. Thus list can be reset with \DeclareGraphicsExtensions
547 \def\Gin@extensions{.eps,.ps,.wmf,.tif}

548 ⟨/dviwin⟩

20 ln

A L^{A}TEX 2ε graphics driver file for B Hamilton Kelly’s ln03 driver. Untested, but based on the graphics macros distributed with the driver.

549 ⟨∗ln⟩

20.1 Graphic file inclusion

550 \def\Ginclude@sixel#1{\special{ln03:sixel #1}}

551 ⟨/ln⟩

21 Grahics Inclusion Rules

552 ⟨∗psrules⟩

553 \def\Gin@extensions{.eps,.ps}

554 \@namedef{Gin@rule@.ps}#1{{eps}{.ps}{#1}}
555 \@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}
556 \@namedef{Gin@rule@*}#1{{eps}{\Gin@ext}{#1}}

557 ⟨/psrules⟩ 558 ⟨∗psrulesZ⟩

559 \def\Gin@extensions{.eps,.ps,.eps.gz,.ps.gz,.eps.Z}
560 \@namedef{Gin@rule@.ps}#1{{eps}{.ps}{#1}}
561 \@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}
562 \@namedef{Gin@rule@.pz}#1{{eps}{.bb}{`gunzip -c #1}}
563 \@namedef{Gin@rule@.eps.Z}#1{{eps}{.eps.bb}{`gunzip -c #1}}
564 \@namedef{Gin@rule@.ps.Z}#1{{eps}{.ps.bb}{`gunzip -c #1}}
565 \@namedef{Gin@rule@.ps.gz}#1{{eps}{.ps.bb}{`gunzip -c #1}}
566 \@namedef{Gin@rule@.eps.gz}#1{{eps}{.eps.bb}{`gunzip -c #1}}
567 \@namedef{Gin@rule@*}#1{{eps}{\Gin@ext}{#1}}

568 ⟨/psrulesZ⟩ 569 ⟨∗dosrules⟩

570 ⟨!psrulesZ⟩\def\Gin@extensions{.eps,.ps,.pcx,.bmp}
571 \@namedef{Gin@rule@.pcx}#1{{bmp}{}{#1}}
572 \@namedef{Gin@rule@.bmp}#1{{bmp}{}{#1}}
573 \@namedef{Gin@rule@.msp}#1{{bmp}{}{#1}}

574 ⟨/dosrules⟩ 575 ⟨∗macrules⟩

576 \def\Gin@extensions{{},.ps,.eps,.pict}
577 \@namedef{Gin@rule@.ps}#1{{eps}{.ps}{#1}}
578 \@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}
579 \@namedef{Gin@rule@.pict}#1{{pict}{}{#1}}
580 \@namedef{Gin@rule@.pntg}#1{{pntg}{}{#1}}
581 \@namedef{Gin@rule@}#1{{pict}{\relax}{#1}}

582 ⟨/macrules⟩ 583 ⟨∗tiffrules⟩

584 \@namedef{Gin@rule@.tif}#1{{tiff}{}{#1}}

585 ⟨/tiffrules⟩