2 %% This is file `dvips.def
',
3 %% original generated with the docstrip utility.
5 %% The original source files were:
7 %% drivers.dtx (with options: `dvips,color1,psrulesZ,dosrules,macrules')
9 %% drivers.dtx
Copyright (C
) 1994 David Carlisle Sebastian Rahtz
10 %% Copyright (C
) 1995 1996 1997 1998 1999 David Carlisle
11 %% Copyright (C
) 2000--2016 David Carlisle
, LaTeX3 Project
13 %% This work may be distributed and
/or modified under the
14 %% conditions of the LaTeX Project Public License
, either version
1.3c
15 %% of this license
or (at your option
) any later version.
16 %% The latest version of this license is in
17 %% http
://www.latex
-project.org
/lppl.txt
18 %% and version
1.3c or later is part of all distributions of LaTeX
19 %% version
2005/12/01 or later.
21 %% This work has the LPPL maintenance status `maintained
'.
23 %% The Current Maintainer of this work is the LaTeX3 Project.
25 %% https://github.com/latex3/graphics-def/issues
27 \ProvidesFile{dvips.def}
28 [2016/07/10 v3.1a Driver-dependent file (DPC,SPQR)]
31 \ifdim\dimen@<\z@\dimen@\maxdimen\fi
33 \PackageError{color}{Argument `#1' not in range
[0,1]}\@ehd
39 \def\color@cmyk#
1#
2{\c@lor@@cmyk#
2\@@#
1}
40 \def\c@lor@@cmyk#
1,#
2,#
3,#
4\@@#
5{%
45 \edef#
5{cmyk #
1 #
2 #
3 #
4}%
47 \def\color@rgb#
1#
2{\c@lor@@rgb#
2\@@#
1}
48 \def\c@lor@@rgb#
1,#
2,#
3\@@#
4{%
52 \edef#
4{rgb #
1 #
2 #
3}%
54 \def\color@RGB#
1#
2{\c@lor@@RGB#
2\@@#
1}
55 \def\c@lor@@RGB#
1,#
2,#
3\@@#
4{%
56 \c@lor@RGB@rgb
{#
1}\@tempa
57 \c@lor@RGB@rgb
{#
2}\@tempb
58 \c@lor@RGB@rgb
{#
3}\@tempc
59 \c@lor@@rgb\@tempa
,\@tempb
,\@tempc\@@#
4%
61 \def\c@lor@RGB@rgb#
1#
2{%
64 \edef#
2{\strip@pt\dimen@
}}
65 \def\color@hsb#
1#
2{\c@lor@@hsb#
2\@@#
1}
66 \def\c@lor@@hsb#
1,#
2,#
3\@@#
4{%
70 \edef#
4{hsb #
1 #
2 #
3}%
72 \def\color@named#
1#
2{\c@lor@@named#
2,,\@@#
1}
73 \def\c@lor@@named#
1,#
2,#
3\@@#
4{%
74 \@ifundefined
{col@#
1}%
75 {\PackageError
{color
}{Undefined color `#
1'}\@ehd}%
78 \def\c@lor@to@ps#1 #2\@@{\csname c@lor@ps@#1\endcsname#2 \@@}
79 \def\c@lor@ps@#1 #2\@@{TeXDict begin #1 end}
80 \def\c@lor@ps@rgb#1\@@{#1 setrgbcolor}
81 \def\c@lor@ps@hsb#1\@@{#1 sethsbcolor}
82 \def\c@lor@ps@cmyk#1\@@{#1 setcmykcolor}
83 \def\c@lor@ps@gray#1\@@{#1 setgray}
84 \def\current@color{ Black}
86 \special{color push \current@color
87 }\aftergroup\reset@color}
88 \def\reset@color{\special{%
90 \def\set@page@color{\special{%
91 background \current@color}}
92 \def\define@color@named#1#2{%
93 \expandafter\let\csname col@#1\endcsname\@nnil}
94 \def\no@page@color{\special{background \string"newpath clip}}
101 \divide\dimen@\dimen@ii
102 \@tempdima\Gin@req@height
103 \divide\@tempdima\dimen@ii
104 \special{PSfile="#1"\space
109 \ifx\Gin@scalex\@tempa\else rwi=\number\dimen@\space\fi
110 \ifx\Gin@scaley\@tempa\else rhi=\number\@tempdima\space\fi
111 \ifGin@clip clip\fi}%
113 \def\Ginclude@bmp#1{%
115 \dimen@\Gin@req@height
116 \advance\dimen@ by-\Gin@lly bp
117 \kern-\Gin@llx bp\raise\Gin@req@height\hbox{%
118 \ifdim\Gin@urx bp=\z@
119 \ifdim\Gin@ury bp=\z@
120 \special{em: graph #1}%
122 \special{em: graph #1,\Gin@urx bp}%
125 \special{em: graph #1,\Gin@urx bp,\Gin@ury bp}%
129 \def\oztex@include#1#2{%
131 \divide\Gin@req@width\dimen@
132 \divide\Gin@req@height\dimen@
134 \@width=\number\Gin@req@width \space
135 \@height=\number\Gin@req@height}}
136 \def\Ginclude@pntg{\oztex@include{pntg}}
137 \def\Ginclude@pict{\oztex@include{pict}}
139 \special{ps: gsave currentpoint
140 currentpoint translate \Grot@angle\space neg
141 rotate neg exch neg exch translate}}
142 \def\Grot@end{\special{ps: currentpoint grestore moveto}}
143 \def\Gscale@start{\special{ps: currentpoint currentpoint translate
144 \Gscale@x\space \Gscale@y\space scale neg exch neg exch translate}}
145 \def\Gscale@end{\special{ps: currentpoint currentpoint translate
146 1 \Gscale@x\space div 1 \Gscale@y\space div scale
147 neg exch neg exch translate}}
148 \def\Gin@PS@raw#1{\special{ps: #1}}
149 \def\Gin@PS@restored#1{\special{" #1}}
150 \def\Gin@PS@literal@header#1{\AtBeginDvi{\special{! #1}}}
151 \def\Gin@PS@file@header#1{\AtBeginDvi{\special{header=#1}}}
152 \@ifundefined{ifGin@setpagesize}
153 {\expandafter\let\csname ifGin@setpagesize\expandafter\endcsname
154 \csname iftrue\endcsname}
157 \ifx\paperwidth\@undefined\else
159 % If a package has changed \mag, assume it knows what it is doing
160 % and leave page size alone
164 \ifx\stockwidth\@undefined\else
165 \paperwidth\stockwidth
166 \paperheight\stockheight
168 \ifdim\paperwidth>\z@
169 \ifdim\paperheight>\z@
170 \special{papersize=\the\paperwidth,\the\paperheight}%
178 \def\Gin@extensions{.eps,.ps,.eps.gz,.ps.gz,.eps.Z,.mps}
179 \@namedef{Gin@rule@.ps}#1{{eps}{.ps}{#1}}
180 \@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}
181 \@namedef{Gin@rule@.mps}#1{{eps}{.mps}{#1}}
182 \@namedef{Gin@rule@.pz}#1{{eps}{.bb}{#1}}
183 \@namedef{Gin@rule@.eps.Z}#1{{eps}{.eps.bb}{#1}}
184 \@namedef{Gin@rule@.ps.Z}#1{{eps}{.ps.bb}{#1}}
185 \@namedef{Gin@rule@.ps.gz}#1{{eps}{.ps.bb}{#1}}
186 \@namedef{Gin@rule@.eps.gz}#1{{eps}{.eps.bb}{#1}}
187 \@namedef{Gin@rule@*}#1{{eps}{\Gin@ext}{#1}}
188 \@namedef{Gin@rule@.pcx}#1{{bmp}{}{#1}}
189 \@namedef{Gin@rule@.bmp}#1{{bmp}{}{#1}}
190 \@namedef{Gin@rule@.msp}#1{{bmp}{}{#1}}
191 \@namedef{Gin@rule@.pict}#1{{pict}{}{#1}}
192 \@namedef{Gin@rule@.pntg}#1{{pntg}{}{#1}}
195 %% End of file `dvips.def'.