Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/lib/texmf/tex/generic/xypic/xyimport.tex

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


%% xyimport.tex from $Id: xyimport.doc,v 3.3 1996/12/18 09:19:22 ross Exp $
%%
%% Xy-pic ``Import feature'' option.
%% Copyright (c) 1993-1996 Ross Moore <[email protected]>
%%
%% 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 <[email protected]>
%%
%% 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{import}{Import graphics extension}{\stripRCS$Revision: 3.3 $}%
 {Ross Moore}{[email protected]}%
 {Mathematics Department, Macquarie University, NSW~2109, Australia}
\xydef@\xyimport#1#{\xyimport@{#1}}
\xydef@\xyimport@#1#2{\xydelayimport@{#1}{#2}}
\xydef@\xydelayimport@#1#2{\xy@@ix@{#1{#2}}%
 \xy@@{\expandafter\xyextern@\the\toks9}}
\xydef@\xyextern@(#1,#2){\hbox\bgroup\R@c=#1\p@ \U@c=#2\p@\xyextern@i}
\xydef@\xyextern@i#1#{\DN@{#1}%
 \ifx\next@\empty \L@c=\z@ \D@c=\z@ \DN@{\xyextern@x}%
 \else \DN@{\xyextern@ii#1}\fi \next@ }
\xydef@\xyextern@ii(#1,#2){\L@c=#1\p@ \D@c=#2\p@ 
 \advance\R@c-\L@c \advance\U@c-\D@c \xyextern@x}
\xydef@\xyimportdefault@{3}
\xydef@\xyexportwarning@#1#2#3{\xywarning@{%
 #1 for import has zero #2; using \xyimportdefault@#3 default}}
\xydef@\xyextern@x#1{\toks@={\egroup\L@c=}\setboxz@h{#1}%
 \dimen@ii=\L@c \advance\dimen@ii\R@c \dimen@=\wdz@ 
 \ifdim\dimen@=\z@ \xyexportwarning@{graphic}{width}{cm}%
 \dimen@=\xyimportdefault@ cm\fi
 \ifdim\dimen@ii=\z@ \xyexportwarning@{coords}{width}{unit}%
 \dimen@ii=\xyimportdefault@\p@\fi
 \quotient@\next@\dimen@\dimen@ii \dimen@=\next@\p@
 \edef\tmp@{\expandafter\removePT@\the\L@c}\L@c=\tmp@\dimen@
 \expandafter\addtotoks@\expandafter{\the\L@c\relax\R@c=}%
 \edef\tmp@{\expandafter\removePT@\the\R@c}\R@c=\tmp@\dimen@
 \expandafter\addtotoks@\expandafter{\the\R@c\relax\setbase@\z@\z@}%
 \expandafter\addtotoks@\expandafter{\expandafter{\the\dimen@}\z@\D@c=}%
 \dimen@ii=\U@c \advance\dimen@ii\D@c \dimen@=\ht\z@\advance\dimen@\dp\z@
 \ifdim\dimen@=\z@ \xyexportwarning@{graphic}{height}{cm}%
 \dimen@=\xyimportdefault@ cm\fi
 \ifdim\dimen@ii=\z@ \xyexportwarning@{coords}{height}{unit}%
 \dimen@ii=\xyimportdefault@\p@\fi
 \quotient@\next@\dimen@\dimen@ii \dimen@=\next@\p@
 \edef\tmp@{\expandafter\removePT@\the\D@c}\D@c=\tmp@\dimen@
 \expandafter\addtotoks@\expandafter{\the\D@c\relax\U@c=}%
 \edef\tmp@{\expandafter\removePT@\the\U@c}\U@c=\tmp@\dimen@
 \expandafter\addtotoks@\expandafter{\the\U@c\relax\setbase@@\z@}%
 \expandafter\addtotoks@\expandafter{\expandafter{\the\dimen@}}%
 \setboxz@h{\kern-\L@c\lower\D@c\boxz@\kern\L@c}%
 \wd\z@=\z@ \ht\z@=\z@ \dp\z@=\z@ \boxz@ \the\toks@ \X@c=\z@ \Y@c=\z@
 \ifdim\X@min>-\L@c \X@min=-\L@c \fi \ifdim\X@max<\R@c \X@max=\R@c \fi
 \ifdim\Y@min>-\D@c \Y@min=-\D@c \fi \ifdim\X@max<\U@c \Y@max=\U@c \fi
 \idfromc@{import}\POS }
\xyendinput

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].