| 1 |
%% xypicture.tex from $Id: xypicture.doc,v 3.6 2011/03/14 20:14:00 krisrose Exp $ |
| 2 |
%% |
| 3 |
%% Xy-pic ``LaTeX Picture Mode'' option. |
| 4 |
%% Copyright (c) 199802011 Kristoffer H. Rose <[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-1998 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{picture}{LaTeX Picture extension}{\stripRCS$Revision: 3.6 $}% |
| 25 |
{Kristoffer H.~Rose}{[email protected]}% |
| 26 |
{IBM T.J.Watson Research Center, P.O.Box 704, Yorktown Heights, NY 10598, USA} |
| 27 |
\xynew@{dimen}\xyp@xsize |
| 28 |
\xynew@{dimen}\xyp@ysize |
| 29 |
\xylet@\xyp@arrow=\relax |
| 30 |
{\xyuncatcodes\makeatletter |
| 31 |
\gdef\xyp@tail{} |
| 32 |
\gdef\xyp@mid{-} |
| 33 |
\gdef\xyp@head{>} |
| 34 |
} |
| 35 |
\xydef@\xyvector(#1,#2)#3{% |
| 36 |
\xyp@xsize#3\relax |
| 37 |
\ifnum#1<\z@\multiply\xyp@xsize\m@ne\fi |
| 38 |
\xyp@ysize\xyp@xsize\relax |
| 39 |
\ifnum#1=\z@ |
| 40 |
\xyp@xsize\z@ |
| 41 |
\ifnum#2<\z@\multiply\xyp@ysize\m@ne\fi |
| 42 |
\else |
| 43 |
\multiply\xyp@ysize#2\relax\divide\xyp@ysize#1\relax |
| 44 |
\fi |
| 45 |
\edef\xyp@arrow{\noexpand\arAT{\xyp@tail\xyp@mid\xyp@head}}% |
| 46 |
\ifnum#1<\z@ |
| 47 |
\makebox(\xyp@xsize,\xyp@ysize){% |
| 48 |
\begin{xy} 0;<\unitlength,\z@>:% |
| 49 |
\xyp@arrow(\xyp@xsize,\xyp@ysize) |
| 50 |
\end{xy}}% |
| 51 |
\else |
| 52 |
\xyp@arrow(\xyp@xsize,\xyp@ysize)\relax |
| 53 |
\fi |
| 54 |
} |
| 55 |
\xyendinput |