| 1 |
%% xydvips.tex from $Id: xydvips.doc,v 3.9 2011/03/14 20:14:00 krisrose Exp $ |
| 2 |
%% |
| 3 |
%% Xy-pic ``dvips-driver'' option. |
| 4 |
%% Copyright (c) 1995-1996 Ross Moore <[email protected]> |
| 5 |
%% |
| 6 |
%% This file is part of the Xy-pic package for graphs and diagrams in TeX. |
| 7 |
%% See the companion README and INSTALL files for further information. |
| 8 |
%% Copyright (c) 1991-2011 Kristoffer H. Rose <[email protected]> |
| 9 |
%% |
| 10 |
%% The Xy-pic package is free software; you can redistribute it and/or modify |
| 11 |
%% it under the terms of the GNU General Public License as published by the |
| 12 |
%% Free Software Foundation; either version 2 of the License, or (at your |
| 13 |
%% option) any later version. |
| 14 |
%% |
| 15 |
%% The Xy-pic package is distributed in the hope that it will be useful, but |
| 16 |
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 17 |
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 18 |
%% for more details. |
| 19 |
%% |
| 20 |
%% You should have received a copy of the GNU General Public License along |
| 21 |
%% with this package; if not, see http://www.gnu.org/licenses/. |
| 22 |
%% |
| 23 |
\ifx\xyloaded\undefined \input xy \fi |
| 24 |
\xyprovide{dvips}{DVIPS driver}{\stripRCS$Revision: 3.9 $}% |
| 25 |
{Ross Moore}{[email protected]}% |
| 26 |
{Mathematics Department, Macquarie University, NSW~2109, Australia} |
| 27 |
\xydef@\dvips@@#1{\dvimessage@{dvips}{#1}} |
| 28 |
\newdriver{% |
| 29 |
\xyaddsupport{color}\dvipsColor@@ |
| 30 |
\xyaddsupport{crayon}\dvipsCrayola@@ |
| 31 |
\xyaddsupport{ps}\dvipsPS@@ |
| 32 |
\xyaddsupport{rotate}\dvipsRotate@@ |
| 33 |
\xyaddsupport{line}\dvipsLine@@ |
| 34 |
\xyaddsupport{frame}\dvipsFrames@@ |
| 35 |
\xyaddsupport{tile}\dvipsTiles@@ |
| 36 |
\xyaddsupport{tpic}\dvipsTPIC@ |
| 37 |
\xyaddsupport{emtex}\dvipsEM@ |
| 38 |
\xyaddsupport{tips}\dvipsTIPS@ |
| 39 |
} |
| 40 |
\xydef@\dvips@Color@{\dvipsPStypes@ |
| 41 |
\let\xylocalColor@=\xystackcolor@ |
| 42 |
\let\xycolor@push\xycolor@push@@ |
| 43 |
\def\xycolor@{\xycolor@@}\let\xycolorwarning@=\relax |
| 44 |
\expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{% |
| 45 |
\xyinputorelse@{xyps-c}{\xydrivernoload@{ps-c}}\installPScolor@ }% |
| 46 |
\else\DN@{}\fi \next@ |
| 47 |
\ifx\xycolor@@\xyNoColor@ \let\xycolor@@=\xycolor@raw@@\fi |
| 48 |
\ifx\xycrayolaloaded\empty \DN@{\xystandardcolors@\dvipsCrayola@{}}% |
| 49 |
\else \DN@{\xystandardcolors@}\fi \next@ |
| 50 |
\let\dvipsColor@@=\relax |
| 51 |
\let\UnloadColor@@=\NoDVIPScolor@ |
| 52 |
}% |
| 53 |
\xydef@\dvipsColor@@{\dvips@Color@} |
| 54 |
\xydef@\NoDVIPScolor@{% |
| 55 |
\def\xycolor@{\xycolor@@}% |
| 56 |
\let\xycolor@@=\xyNoColor@ |
| 57 |
\let\xylocalColor@=\xyNoColor@@ |
| 58 |
\let\xycolorwarning@=\xycolorwarning@@ |
| 59 |
\let\dvipsColor@@=\dvips@Color@ |
| 60 |
\let\UnloadColor@@=\UnloadColor@ |
| 61 |
} |
| 62 |
\xydef@\NoDVIPScolordvi@{\xywarning@{% |
| 63 |
Neither colordvi.tex nor colordvi.sty could be found.}% |
| 64 |
\xyBEcolorcheck@}% |
| 65 |
\xydef@\dvipsCrayola@@{\dvipsColor@@\dvipsCrayola@} |
| 66 |
\xydef@\dvipsCrayola@{% |
| 67 |
\let\prevxycolor@=\newxycolor@ |
| 68 |
\def\newxyDVIPScolor@##1##2##3{\prevxycolor@{##1}{}{##1}}% |
| 69 |
\let\newxycolor@=\newxyDVIPScolor@ \dvipsInclude@{color.pro}% |
| 70 |
\installCrayolaColors@ |
| 71 |
\let\newxycolor@=\prevxycolor@ }% |
| 72 |
\xydef@\dvipsPS@@{\dvipsPS@} |
| 73 |
\xydef@\dvipsPS@unload{\UnloadPS@ |
| 74 |
\let\UnloadPS@@=\UnloadPS@ |
| 75 |
\let\dvipsPS@@=\dvipsPS@ } |
| 76 |
\xydef@\dvipsPStypes@{% |
| 77 |
\xyinputorelse@{xyps-ps}{\xydrivernoload@{ps-ps}}% |
| 78 |
\ifx\PSspecial@@\dvipsSpecial@\else |
| 79 |
\let\PSspecial@@=\dvipsSpecial@ |
| 80 |
\let\PSmacro@@=\dvipsMacro@ |
| 81 |
\let\PSdict@@=\dvipsDict@ |
| 82 |
\let\PSspecialdict@@=\dvipsDict@ |
| 83 |
\let\PSraw@@=\dvipsRaw@ |
| 84 |
\let\PSinclude@@=\dvipsInclude@ |
| 85 |
\let\xyPSobeylines@@=\obeyDVIPSlines@ |
| 86 |
\let\xyPScurrpt@@=\dvipsCurrpt@@ |
| 87 |
\dvips@@{PostScript}% |
| 88 |
\fi |
| 89 |
\XYpredict@ } |
| 90 |
\xywarnifdefined\dvipsSpecial@ |
| 91 |
\xywarnifdefined\dvipsMacro@ |
| 92 |
\xywarnifdefined\dvipsDict@ |
| 93 |
\xywarnifdefined\dvipsInclude@ |
| 94 |
\xywarnifdefined\dvipsRaw@ |
| 95 |
{\catcode`\"=11 \catcode`\!=11 \catcode`\:=11 |
| 96 |
\gdef\dvipsSpecial@#1{\special{ps:: SDict begin #1 end}} |
| 97 |
\gdef\dvipsMacro@#1{\firstPS@@\special{" {#1}xy}} |
| 98 |
\gdef\dvipsDict@#1{\special{! #1}} |
| 99 |
\gdef\dvipsInclude@#1{\special{header=#1}} |
| 100 |
\gdef\dvipsRaw@#1{\special{ps: SDict begin #1 end}} |
| 101 |
\catcode`\^^M=\active |
| 102 |
\gdef\next{\catcode`\^^M=\active \let^^M=\space }}% |
| 103 |
\xylet@\obeyDVIPSlines@=\next |
| 104 |
\xydef@\dvipsCurrpt@{\let\xyPScurrpt@@=\dvipsCurrpt@@}% |
| 105 |
\xydef@\dvipsCurrpt@@{\PSraw@@{xyp}} |
| 106 |
\xydef@\dvipsPS@{\dvipsPStypes@ |
| 107 |
\let\dvipsPS@@=\PSspecials@true |
| 108 |
\let\UnloadPS@@=\dvipsPS@unload |
| 109 |
\let\installxyps@@=\relax \installxyps@ } |
| 110 |
\xydef@\dvipsRotate@@{\dvipsRotate@} |
| 111 |
\xydef@\dvipsRotate@{\dvipsPStypes@ |
| 112 |
\expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{% |
| 113 |
\xyinputorelse@{xyps-r}{\xydrivernoload@{ps-r}}% |
| 114 |
\dvipsCurrpt@ \dvipsRotScale@ \installPSrotscale@ }% |
| 115 |
\else\DN@{\xydriverfail@{rotations are}UnloadRotate@\relax}\fi |
| 116 |
\next@ } |
| 117 |
\xydef@\dvipsRotScale@{% |
| 118 |
\def\xyrot@start(##1){{xyct ##1\space xyrs }}% |
| 119 |
\def\xyrot@end{}% |
| 120 |
\def\xyscale@start(##1,##2){{xyct ##1\space##2\space xyss }}% |
| 121 |
\def\xyscale@end{}} |
| 122 |
\xydef@\dvipsLine@@{\dvipsLine@} |
| 123 |
\xydef@\dvipsLine@{\dvipsPStypes@ |
| 124 |
\expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{% |
| 125 |
\xyinputorelse@{xyps-l}{\xydrivernoload@{ps-l}}\installPSline@ }% |
| 126 |
\else\DN@{\xydriverfail@{line-widths are}\UnloadLine@\relax}\fi |
| 127 |
\next@ } |
| 128 |
\xydef@\dvipsFrames@@{\dvipsFrames@} |
| 129 |
\xydef@\dvipsFrames@{\dvipsPStypes@ |
| 130 |
\expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{% |
| 131 |
\xyinputorelse@{xyps-f}{\xydrivernoload@{ps-f}}\installPSframes@ }% |
| 132 |
\else\DN@{\xydriverfail@{frames are}\UnloadFrames@\relax}\fi |
| 133 |
\next@ } |
| 134 |
\xydef@\dvipsTiles@@{\dvipsTiles@} |
| 135 |
\xydef@\dvipsTiles@{\dvipsPStypes@ |
| 136 |
\expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{% |
| 137 |
\xyinputorelse@{xyps-t}{\xydrivernoload@{ps-t}}\installPSpatterns@ }% |
| 138 |
\else\DN@{\xydriverfail@{Patterns are}\UnloadPSpatterns@\relax}\fi |
| 139 |
\next@ } |
| 140 |
\xydef@\dvipsTPIC@@{\dvipsTPIC@} |
| 141 |
\xydef@\dvipsTPIC@{\setupxyTPIC@} |
| 142 |
\xydef@\dvipsEM@@{\dvipsEM@} |
| 143 |
\xydef@\dvipsEM@{\setupxyEMTeX@} |
| 144 |
\xydef@\dvipsTIPS@{ |
| 145 |
\PSdict@@{/XYdict where pop begin XYdict begin}% |
| 146 |
\PSdict@@{% |
| 147 |
/lu{0.04 0.0 -0.16 0.125 -0.11 0.0 |
| 148 |
1 1 6{pop xyfsize mul 6 1 roll}for |
| 149 |
lineto lineto lineto closepath fill |
| 150 |
0 0 0 0 0 0}def |
| 151 |
}% |
| 152 |
\PSdict@@{end end}% |
| 153 |
} |
| 154 |
\xyendinput |