diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/generic/diagrams/xypic/texinputs/xyimport.tex |
Initial commit
Diffstat (limited to 'macros/generic/diagrams/xypic/texinputs/xyimport.tex')
-rw-r--r-- | macros/generic/diagrams/xypic/texinputs/xyimport.tex | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/macros/generic/diagrams/xypic/texinputs/xyimport.tex b/macros/generic/diagrams/xypic/texinputs/xyimport.tex new file mode 100644 index 0000000000..6c5e340d4e --- /dev/null +++ b/macros/generic/diagrams/xypic/texinputs/xyimport.tex @@ -0,0 +1,68 @@ +%% xyimport.tex from $Id: xyimport.doc,v 3.13 2011/03/14 20:14:00 krisrose Exp $ +%% +%% Xy-pic ``Import feature'' option. +%% Copyright (c) 1993-1997 Ross Moore <ross.moore@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-2011 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{import}{Import graphics extension}{\stripRCS$Revision: 3.13 $}% + {Ross Moore}{ross.moore@mq.edu.au}% + {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\Y@max<\U@c \Y@max=\U@c \fi + \idfromc@{import}\POS } +\xyendinput |