Debian Codegraph @

texmf-dist/tex/generic/xypic/xyoztex.tex

raw
1 %% xyoztex.tex from $Id: xyoztex.doc,v 3.7 2011/03/14 20:14:00 krisrose Exp $
2 %%
3 %% Xy-pic ``OzTeX'' driver interface 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{oztex}{OzTeX driver}{\stripRCS$Revision: 3.7 $}%
25 {Ross Moore}{[email protected]}%
26 {Mathematics Department, Macquarie University, NSW~2109, Australia}
27 \xydef@\OzTeX@@#1{\dvimessage@{OzTeX}{#1}}
28 \newdriver{%
29 \xyaddsupport{color}\oztexColor@@
30 \xyaddsupport{crayon}\oztexCrayon@@
31 \xyaddsupport{ps}\oztexPS@@
32 \xyaddsupport{rotate}\oztexRotate@@
33 \xyaddsupport{line}\oztexLine@@
34 \xyaddsupport{frame}\oztexFrames@@
35 \xyaddsupport{tile}\oztexTiles@@
36 \xyaddsupport{cmtip}\relax
37 }
38 \xydef@\oztexColor@@{\OzTeXColours@}
39 \xydef@\OzTeXColours@{\OzTeXPStypes@
40 \let\xylocalColor@=\xyNoColor@@ \def\xycolor@{\xycolor@@}%
41 \expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{%
42 \xyinputorelse@{xyps-c}{\xydrivernoload@{ps-c}}%
43 \installPScolor@ }\else\DN@{}\fi \next@
44 \ifx\xycrayolaloaded\empty \DN@{\xystandardcolors@\OzTeXCrayon@@{}}%
45 \else\let\next@=\xystandardcolors@\fi \next@
46 \let\xycolorwarning@=\relax
47 \let\oztexColor@@=\relax
48 \let\UnloadColor@@=\NoOzTeXColor@
49 }
50 \xydef@\NoOzTeXColor@{%
51 \let\xylocalColor@=\xyNoColor@@
52 \let\xycolor@=\xyNoColor@
53 \let\xycolorwarning@=\xycolorwarning@@
54 \let\oztexColor@@=\OzTeXColours@
55 \let\UnloadColor@@=\UnloadColor@
56 }
57 \xydef@\OzTeXCrayon@@{\installCrayolaColors@}
58 \xydef@\oztexPS@@{\oztexPS@}
59 \xydef@\oztexPSunload@{\UnloadPS@
60 \def\xyPSdictname{}\UsePSdict@@false
61 \let\installxyps@@=\relax
62 \let\UnloadPS@@=\UnloadPS@
63 \xyPSshapes@true
64 \let\oztexPS@@=\oztexPS@ }
65 \xydef@\OzTeXSpecial@#1{\special{empty.ps {#1}xy}}
66 \xydef@\OzTeXMacro@#1{\special{empty.ps {#1}xy}}
67 \xydef@\OzTeXDict@#1{\special{empty.ps @bxy{#1}stopped pop @exy}}
68 \xydef@\OzTeXinclude@#1{\special{#1}}
69 \xydef@\OzTeXraw@#1{\special{empty.ps @bxy #1 @exy}}%
70 \xydef@\OzTeXPStypes@{%
71 \xyinputorelse@{xyps-ps}{\xydrivernoload@{ps-ps}}%
72 \ifx\PSspecial@@\OzTeXSpecial@\else
73 \let\PSspecial@@=\OzTeXSpecial@
74 \let\PSmacro@@=\OzTeXMacro@
75 \let\PSdict@@=\OzTeXDict@
76 \let\PSraw@@=\OzTeXraw@
77 \let\PSinclude@@=\OzTeXinclude@
78 \let\xyPSobeylines@@=\obeyOzTeXlines@
79 \let\PSspecialdict@@=\OzTeXDict@
80 \OzTeX@@{PostScript}%
81 \fi
82 \OzTeXCurrpt@ }
83 {\catcode`\^^M=\active
84 \gdef\next{\catcode`\^^M=\active \let^^M=\space \obeyspaces}}
85 \xylet@\obeyOzTeXlines@=\next
86 \xydef@\OzTeXCurrpt@{\let\xyPScurrpt@@=\OzTeXCurrpt@@}%
87 \xydef@\OzTeXCurrpt@@{\PSraw@@{xyp}}
88 \xydef@\oztexPS@{\OzTeXPStypes@
89 \let\oztexPS@@=\relax
90 \let\UnloadPS@@=\oztexPSunload@
91 \let\installxyps@@=\@OzTeX@PS@
92 \installxyps@ }
93 \xydef@\@OzTeX@PS@{\UsePSdict@@true
94 \let\includePSmessage@=\xyOzTeXheader
95 \ifx\undefined\xyPSdictname\def\xyPSdictname{global.ps}\fi}
96 \xydef@\xyOzTeXheader#1#2#3{\UsePSdict@@true}
97 \xydef@\oztexLine@@{\oztexLine@}
98 \xydef@\oztexLine@{\OzTeXPStypes@
99 \expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{%
100 \xyinputorelse@{xyps-l}{\xydrivernoload@{ps-l}}\installPSline@ }%
101 \else\DN@{\xydriverfail@{line-styles are}\UnloadLine@\relax}\fi
102 \next@ }
103 \xydef@\oztexFrames@@{\OzTeXFrames@}
104 \xydef@\OzTeXFrames@{\OzTeXPStypes@
105 \expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{%
106 \xyinputorelse@{xyps-f}{\xydrivernoload@{ps-f}}\installPSframes@ }%
107 \else\DN@{\xydriverfail@{frames are}\UnloadPSFrames@\relax}\fi
108 \next@ }
109 \xydef@\oztexTiles@@{\OzTeXTiles@}
110 \xydef@\OzTeXTiles@{\OzTeXPStypes@
111 \expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{%
112 \xyinputorelse@{xyps-t}{\xydrivernoload@{ps-t}}\installPSpatterns@
113 \xystandardpatterns@ }%
114 \else\DN@{\xydriverfail@{Patterns are}\UnloadPSpatterns@\relax}\fi
115 \next@ }
116 \xydef@\oztexRotate@@{\OzTeXRotate@}
117 \xydef@\OzTeXRotate@{\OzTeXPStypes@
118 \expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{%
119 \xyinputorelse@{xyps-r}{\xydrivernoload@{ps-r}}%
120 \OzTeXRotScale@ \installPSrotscale@ \xyPSshapes@false }%
121 \else\DN@{\xydriverfail@{rotations are}\UnloadRotate@\relax}\fi
122 \next@ }
123 \xydef@\OzTeXRotScale@{%
124 \def\xyrot@start(##1){%
125 {xyp xyt ##1\space xyr}{OzXy begin gsave}}%
126 \def\xyscale@start(##1,##2){%
127 {xyp xyt ##1\space##2\space xys}{OzXy begin gsave}}%
128 \def\xyrot@end{grestore end}\def\xyscale@end{grestore end}}
129 \let\OzTeXRotScale@=\xyRotScale@@
130 \xyendinput