summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xypic/xypicture.tex
blob: d1d44c3f2ddaf636e215abe411f8a439572ab995 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
%% xypicture.tex from $Id: xypicture.doc,v 3.6 2011/03/14 20:14:00 krisrose Exp $
%%
%% Xy-pic ``LaTeX Picture Mode'' option.
%% Copyright (c) 199802011 Kristoffer H. Rose <krisrose@tug.org>
%%
%% 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-1998 Kristoffer H. Rose <krisrose@tug.org>
%%
%% 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, see http://www.gnu.org/licenses/.
%%
\ifx\xyloaded\undefined \input xy \fi
\xyprovide{picture}{LaTeX Picture extension}{\stripRCS$Revision: 3.6 $}%
 {Kristoffer H.~Rose}{krisrose@tug.org}%
 {IBM T.J.Watson Research Center, P.O.Box 704, Yorktown Heights, NY 10598, USA}
\xynew@{dimen}\xyp@xsize
\xynew@{dimen}\xyp@ysize
\xylet@\xyp@arrow=\relax
{\xyuncatcodes\makeatletter
 \gdef\xyp@tail{}
 \gdef\xyp@mid{-}
 \gdef\xyp@head{>}
}
\xydef@\xyvector(#1,#2)#3{%
 \xyp@xsize#3\relax
 \ifnum#1<\z@\multiply\xyp@xsize\m@ne\fi
 \xyp@ysize\xyp@xsize\relax
 \ifnum#1=\z@
 \xyp@xsize\z@
 \ifnum#2<\z@\multiply\xyp@ysize\m@ne\fi
 \else
 \multiply\xyp@ysize#2\relax\divide\xyp@ysize#1\relax
 \fi
 \edef\xyp@arrow{\noexpand\arAT{\xyp@tail\xyp@mid\xyp@head}}%
 \ifnum#1<\z@
 \makebox(\xyp@xsize,\xyp@ysize){%
 \begin{xy} 0;<\unitlength,\z@>:%
 \xyp@arrow(\xyp@xsize,\xyp@ysize)
 \end{xy}}%
 \else
 \xyp@arrow(\xyp@xsize,\xyp@ysize)\relax
 \fi
}
\xyendinput