%% $Id: xy.sty,v 3.3 1996/12/19 03:31:56 krisrose Exp $
%%
%% ``Xy-pic as LaTeX 2.09 style option and LaTeX 2e package''.
%% Copyright (c) 1993-1996      Kristoffer H. Rose      <krisrose@brics.dk>
%%
%% 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.

% Load Xy-pic with catcode of @ set as it will be in user text:
\count255=\the\catcode`\@ {\catcode`\@=11 \xdef\xystycatcode{\the\count255}}
\makeatletter

% REPAIR bug of the 2e version of AMS-LaTeX where \makeatother is broken...
\ifx\@ifpackageloaded\undefined \makeatother
\else \@ifpackageloaded{amstex}{\catcode`\@=\active}{\makeatother}\fi

\input xy

% That is all unless this is called as a LaTeX2e `native mode' package.  Is
% there an official way to check this?  Anyway, this seems to work:
\makeatletter
\ifx\if@compatibility\undefined \catcode`\@=\xystycatcode \endinput \fi

% Ensure that we are *really* running LaTeX2e...!
\NeedsTeXFormat{LaTeX2e}

% This file provides the current version of Xy-pic!
\edef\next{%
 \noexpand\ProvidesPackage{xy}[\xydate\space Xy-pic version \xyversion]}\next

% Recognise some standard LaTeX2e class options (cf. `LaTeX Companion' p.317):
\DeclareOption{cmactex}{\xyoption{cmactex}}
\DeclareOption{dvips}{\xyoption{dvips}\xyoption{ps}}
\DeclareOption{dvitops}{\xyoption{dvitops}\xyoption{ps}}
\DeclareOption{emtex}{\xyoption{emtex}}
\DeclareOption{ln}{\xywarning@{`ln' DVI driver not yet fully supported}}
\DeclareOption{oztex}{\xyoption{oztex}}
\DeclareOption{textures}{\xyoption{textures}}
\DeclareOption{xdvi}{\xyoption{xdvi}}

% This is special:
\DeclareOption{colour}{\xyoption{color}} % :-)

% This (obsolete) cmtip style option should be activated after loading:
\DeclareOption{cmtip}{\xyoption{cmtip}\UseComputerModernTips}

% Pass the desired tip size if defined
\DeclareOption{10pt}{\xywithoption{tips}{\def\tipsize@@{10}}}
\DeclareOption{11pt}{\xywithoption{tips}{\def\tipsize@@{11}}}
\DeclareOption{12pt}{\xywithoption{tips}{\def\tipsize@@{12}}}

% Other options are just loaded.
\DeclareOption*{\edef\next{\noexpand\xyoption{\CurrentOption}}\next}

% Reinstall catcode of @...
\catcode`\@=\xystycatcode

% ... process the options, and that is all.
\ProcessOptions

\endinput

% $Log: xy.sty,v $
% Revision 3.3  1996/12/19 03:31:56  krisrose
% Maintenance release
%
% Revision 3.1  1995/09/05  20:31:32  kris
% Releasing!
%
% Revision 3.0  1995/07/07  20:14:21  kris
% Major release w/new User's Guide!
%
% Revision 2.13  1995/07/04  15:11:17  kris
% Ready to release v3?
%
% Revision 2.12  1994/10/25  11:34:25  kris
% Interim release just before v3 [works with AMS-LaTeX 1.2]...
%
% Revision 2.9  1994/06/09  14:59:19  kris
% Release 3beta.
%
% Revision 2.8  1994/04/08  04:30:00  kris
% Second (bug fix) 3alpha release.
%
% Revision 2.7  1994/03/08  02:06:01  kris
% Release 3alpha.
%
% New for version 2.7.
