%% xyvtex.tex from $Id: xyvtex.doc,v 3.3 1996/12/18 09:13:14 ross Exp $
%%
%% Xy-pic ``vtex-driver'' option.
%% Copyright (c) 1995-1996 Ross Moore <ross@mpce.mq.edu.au>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% See the companion README and INSTALL files for further information.
%% Copyright (c) 1991-1996 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, write to the Free Software Foundation, Inc.,
%% 675 Mass Ave, Cambridge, MA 02139, USA.
%%
\ifx\xyloaded\undefined \input xy \fi
\xyprovide{vtex}{VTEX driver}{\stripRCS$Revision: 3.3 $}%
 {Ross Moore}{ross@mpce.mq.edu.au}%
 {Mathematics Department, Macquarie University, NSW~2109, Australia}
\xydef@\vtex@@#1{\dvimessage@{vtex}{#1}}
\newdriver{%
 \xyaddsupport{color}\vtexColor@@
 \xyaddsupport{crayon}\vtexCrayola@@
 \xyaddsupport{ps}\vtexPS@@
 \xyaddsupport{rotate}\vtexRotate@@
 \xyaddsupport{line}\vtexLine@@
 \xyaddsupport{frame}\vtexFrames@@
 \xyaddsupport{tile}\vtexTiles@@
 \xyaddsupport{tpic}\vtexTPIC@
 \xyaddsupport{emtex}\vtexEM@
 \xyaddsupport{cmtip}\relax
}
\xydef@\vtex@Color@{\vtexPStypes@
 \let\xylocalColor@=\xystackcolor@
 \let\xycolor@push\xycolor@push@@
 \def\xycolor@{\xycolor@@}\let\xycolorwarning@=\relax
 \expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{%
 \xyinputorelse@{xyps-c}{\xydrivernoload@{ps-c}}\installPScolor@ }%
 \else\DN@{}\fi \next@
 \ifx\xycolor@@\xyNoColor@ \let\xycolor@@=\xycolor@raw@@\fi
 \ifx\xycrayolaloaded\empty \DN@{\xystandardcolors@\vtexCrayola@{}}%
 \else \DN@{\xystandardcolors@}\fi \next@
 \let\vtexColor@@=\relax
 \let\UnloadColor@@=\NoVTEXcolor@
 }%
\xydef@\vtexColor@@{\vtex@Color@}
\xydef@\NoVTEXcolor@{%
 \def\xycolor@{\xycolor@@}%
 \let\xycolor@@=\xyNoColor@
 \let\xylocalColor@=\xyNoColor@@
 \let\xycolorwarning@=\xycolorwarning@@
 \let\vtexColor@@=\vtex@Color@
 \let\UnloadColor@@=\UnloadColor@
 }
\xydef@\NoVTEXcolordvi@{\xywarning@{%
 Neither colordvi.tex nor colordvi.sty could be found.}%
 \xyBEcolorcheck@}%
\xydef@\vtexCrayola@@{\vtexColor@@\vtexCrayola@}
\xydef@\vtexCrayola@{%
 \let\prevxycolor@=\newxycolor@
 \def\newxyVTEXcolor@##1##2##3{\prevxycolor@{##1}{}{##1}}%
 \let\newxycolor@=\newxyVTEXcolor@ \vtexInclude@{color.pro}%
 \installCrayolaColors@
 \let\newxycolor@=\prevxycolor@ }%
\xydef@\vtexPS@@{\vtexPS@}
\xydef@\vtexPS@unload{\UnloadPS@
 \let\UnloadPS@@=\UnloadPS@
 \let\vtexPS@@=\vtexPS@ }
\xydef@\vtexPStypes@{%
 \xyinputorelse@{xyps-ps}{\xydrivernoload@{ps-ps}}%
 \ifx\PSspecial@@\vtexSpecial@\else
 \let\PSspecial@@=\vtexSpecial@
 \let\PSmacro@@=\vtexMacro@
 \let\PSdict@@=\vtexDict@
 \let\PSspecialdict@@=\vtexDict@
 \let\PSraw@@=\vtexRaw@
 \let\PSinclude@@=\vtexInclude@
 \let\xyPSobeylines@@=\obeyVTEXlines@
 \let\xyPScurrpt@@=\vtexCurrpt@@
 \vtex@@{PostScript}%
 \fi
 \XYpredict@ }
\xywarnifdefined\vtexSpecial@
\xywarnifdefined\vtexMacro@
\xywarnifdefined\vtexDict@
\xywarnifdefined\vtexInclude@
\xywarnifdefined\vtexRaw@
{\catcode`\"=11 \catcode`\!=11 \catcode`\:=11
 \gdef\vtexSpecial@#1{\special{pS:: SDict begin #1 end}}
 \gdef\vtexMacro@#1{\firstPS@@\special{pS: GS}\special{pS: {#1}xy}\special{pS: GR}}
%\gdef\vtexMacro@#1{\firstPS@@\special{pS: {#1}xy}}
% \gdef\vtexDict@#1{\special{! #1}}
 \gdef\vtexDict@#1{\special{pS: #1}}
 \gdef\vtexInclude@#1{\special{header=#1}}
 \gdef\vtexRaw@#1{\special{pS: SDict begin #1 end}}
%\gdef\vtexRaw@#1{\special{pS: GS}\special{pS: SDict begin #1 end}\special{pS: GR }}
\catcode`\^^M=\active
 \gdef\next{\catcode`\^^M=\active \let^^M=\space }}%
\xylet@\obeyVTEXlines@=\next
\xydef@\vtexCurrpt@{\let\xyPScurrpt@@=\vtexCurrpt@@}%
\xydef@\vtexCurrpt@@{\PSraw@@{xyp}}
\xydef@\vtexPS@{\vtexPStypes@
 \let\vtexPS@@=\PSspecials@true
 \let\UnloadPS@@=\vtexPS@unload
 \let\installxyps@@=\relax \installxyps@ }
\xydef@\vtexRotate@@{\vtexRotate@}
\xydef@\vtexRotate@{\vtexPStypes@
 \expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{%
 \xyinputorelse@{xyps-r}{\xydrivernoload@{ps-r}}%
 \vtexCurrpt@ \vtexRotScale@
 \installPSrotscale@ }%
 \else\DN@{\xydriverfail@{rotations are}UnloadRotate@\relax}\fi
 \next@ }
\xydef@\vtexRotScale@{%
 \def\xyrot@start(##1){{xyct ##1\space xyrs }}%
 \def\xyrot@end{}%
 \def\xyscale@start(##1,##2){{xyct ##1\space##2\space xyss }}%
 \def\xyscale@end{}}
\xydef@\vtexLine@@{\vtexLine@}
\xydef@\vtexLine@{\vtexPStypes@
 \expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{%
 \xyinputorelse@{xyps-l}{\xydrivernoload@{ps-l}}\installPSline@ }%
 \else\DN@{\xydriverfail@{line-widths are}\UnloadLine@\relax}\fi
 \next@ }
\xydef@\vtexFrames@@{\vtexFrames@}
\xydef@\vtexFrames@{\vtexPStypes@
 \expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{%
 \xyinputorelse@{xyps-f}{\xydrivernoload@{ps-f}}\installPSframes@ }%
 \else\DN@{\xydriverfail@{frames are}\UnloadFrames@\relax}\fi
 \next@ }
\xydef@\vtexTiles@@{\vtexTiles@}
\xydef@\vtexTiles@{\vtexPStypes@
 \expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{%
 \xyinputorelse@{xyps-t}{\xydrivernoload@{ps-t}}\installPSpatterns@ }%
 \else\DN@{\xydriverfail@{Patterns are}\UnloadPSpatterns@\relax}\fi
 \next@ }
\xydef@\vtexTPIC@@{\vtexTPIC@}
\xydef@\vtexTPIC@{\setupxyTPIC@}
\xydef@\vtexEM@@{\vtexEM@}
\xydef@\vtexEM@{\setupxyEMTeX@}
\xyendinput
