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

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


%% xymatrix.tex from $Id: xymatrix.doc,v 3.3 1996/12/19 03:31:56 krisrose Exp $
%%
%% Xy-pic ``Matrix'' feature.
%% Copyright (c) 1991-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.
%%
\ifx\xyloaded\undefined \input xy \fi
\xyprovide{matrix}{Matrix feature}{\stripRCS$Revision: 3.3 $}%
 {Kristoffer H.~Rose}{krisrose@brics.dk}%
 {BRICS/Computer Science, University of Aarhus, Ny Munkegade, building 540,
 DK--8000 Aarhus~C}
\xynew@{count}\Row
\xynew@{count}\Col
\xydef@\maxrow@{0}
\xydef@\maxcol@{0}
\xydef@\maxcolrow@{0}
\xynew@{toks}\queue@
\xynew@{toks}\queue@@
\xynew@{count}\qcount@
\xynew@{count}\qcount@@
\xydef@\clearq@{%
 \global\queue@={}\global\qcount@=\@ne
 \global\queue@@={}\global\qcount@@=\z@}
\xydef@\addq@#1{\global\advance\matrixsize@\@ne
 \ifnum\qcount@@<\qcount@ \let\addq@@=\addq@i
 \else \let\addq@@=\addq@ii \fi
 \expandafter\addq@@\the\queue@@\addq@@{#1}}
\xylet@\addq@@=\relax
\xydef@\addq@i#1\addq@@#2{%
 \global\advance\qcount@@\@ne \global\queue@@={#1#2}}
\xydef@\addq@ii#1\addq@@#2{%
 \global\advance\qcount@\@ne \global\qcount@@=\z@ 
 \global\queue@=\expandafter{\the\queue@#1#2}\global\queue@@={}}
\xydef@\finishq@{\expandafter\addq@ii\the\queue@@\addq@@{}}
\xynew@{count}\matrixsize@
\xynew@{if}\ifnoisymatrices@ \noisymatrices@true
\xydef@\SilentMatrices{\noisymatrices@false}
\xydef@\NoisyMatrices{\noisymatrices@true}
\xydef@\xymatrixnocompile{\global\matrixsize@=\z@
 \ifnoisymatrices@\message{<xymatrix}\fi
 \if\inxy@
 \DN@{\nter@{}\xy@\xymatrix{\enter@{%
 \def\noexpand\xy@minX@@{\xy@minX@@}\def\noexpand\xy@maxX@@{\xy@maxX@@}%
 \def\noexpand\xy@minY@@{\xy@minY@@}\def\noexpand\xy@maxY@@{\xy@maxY@@}%
 \edef\noexpand\xymatrixprefix@@{\codeof\xymatrixprefix@@}}}}%
 \else \DN@{\xy \nter@\endxy \xy@\xymatrix{\nter@{}}}\fi \next@
 \xy@@{\save@ \edef\matrixorigin@{\X@c=\the\X@c \Y@c=\the\Y@c}%
 \edef\xy@minX@@{\the\X@c}\edef\xy@maxX@@{\the\X@c}%
 \edef\xy@minY@@{\the\Y@c}\edef\xy@maxY@@{\the\Y@c}}%
 \xdef\maxrow@{0}\xdef\maxcol@{0}\xdef\maxcolrow@{0}%
 \mkHWdefaults@ \xymatrix@prefix""}
\xylet@\xymatrix=\xymatrixnocompile
\xydef@\xymatrixprefix@@{}
\xydef@\xymatrix@prefix"#1"{\DN@{#1}\edef\xymatrixprefix@@{\codeof\next@}%
 \DNii@##1{\xy@{"#1"}{\edef\xymatrixprefix@@{##1}}}%
 \expandafter\nextii@\expandafter{\xymatrixprefix@@}%
 \xyFN@\xymatrix@setup}
\xydef@\xymatrix@setup{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\xymatrix@setup}%
 \else\ifx \bgroup\next \let\next@=\xymatrix@ii
 \else\addAT@\ifx\next \addAT@\DN@{\xy@{@}{}\xyFN@\xymatrix@at}%
 \else\ifx "\next \let\next@=\xymatrix@prefix
 \else \DN@{\xyerror@{\string\xymatrix<setup>{<rows>} expected}{}}%
 \fi\fi\fi\fi \next@}
\xydef@\xymatrix@ii#1{\xymatrix@pretypeset{#1}%
 \ifnum\maxcol@=\z@ \mkWcol@ \mkWmax@
 \xdef\maxcol@{\the\Col}\xdef\maxcolrow@{\the\Row}\fi
 \ifnoisymatrices@\message{\maxcol@ x\maxrow@}\fi
 \xymatrix@measureit@@ \the\queue@ \global\queue@={}%
 \xymatrix@typeset{#1}\restore\xymatrix@insert
 \xy@@\leave@ \leave@
 \ifnoisymatrices@\message{\the\matrixsize@>}\fi \ignorespaces}
\xydef@\xymatrixcompile#1#{\xymatrixcompile@{#1}}
\xydef@\xymatrixcompile@#1#2{\xycompile{\xymatrixnocompile#1{#2}}}
\xydef@\CompileMatrices{\let\xymatrix=\xymatrixcompile}
\xydef@\NoCompileMatrices{\let\xymatrix=\xymatrixnocompile}
\xydef@\xy@cossign@@{+}
\xydef@\xy@sinsign@@{+}
\xydef@\xy@cosabs@@{1}
\xydef@\xy@sinabs@@{0}
\xydef@\xy@tanabs@@{0}
\xydef@\xy@cotabs@@{100}
\xydef@\xymatrix@rotation{%
 \xy@@{%
 \edef\xy@cossign@@{\ifdim\cosDirection\p@<\z@-\else+\fi}%
 \edef\xy@sinsign@@{\ifdim\sinDirection\p@<\z@-\else+\fi}%
 \edef\xy@cosabs@@{%
 \if\xy@cossign@@\cosDirection\else\xy@cossign@@\cosDirection\fi}%
 \edef\xy@sinabs@@{%
 \if\xy@sinsign@@\sinDirection\else\xy@sinsign@@\sinDirection\fi}%
 \dimen@=\xy@cosabs@@\p@ \dimen@ii=\xy@sinabs@@\p@
 \ifdim\dimen@ii<.01\p@ \def\xy@cotabs@@{100}%
 \else \quotient@\xy@cotabs@@\dimen@\dimen@ii \fi
 \dimen@=\xy@cosabs@@\p@ \dimen@ii=\xy@sinabs@@\p@
 \ifdim\dimen@<.01\p@ \def\xy@tanabs@@{100}%
 \else \quotient@\xy@tanabs@@\dimen@ii\dimen@ \fi}}
\xylet@\xymatrixsavedCOORD@=\relax
\xydef@\xymatrix@pretypeset#1{%
 \global\Row=\z@ \xdef\maxcol@{0}\clearq@
 \setbox8=\vtop{%
 \ifx\xymatrixsavedCOORD@\relax \let\xymatrixsavedCOORD@=\COORD@ \fi
 \let\COORD@=\xymatrixCOORD@
 \everycr{}\let\\=\cr \tabskip=\z@ \offinterlineskip
 \halign{\prentry@ ##!@&&\xyFN@\prentry@@##!@\cr#1\crcr}%
 \prentry@@@}%
 \xdef\maxrow@{\the\Row}%
 \finishq@}
\xydef@\prentry@{\relax
 \ifnum\Row>\z@
 \ifnum\maxcol@<\Col\xdef\maxcol@{\the\Col}\xdef\maxcolrow@{\the\Row}\fi
 \expandafter\xdef\csname maxcol@\the\Row\endcsname{\the\Col}\fi
 \global\advance\Row\@ne \global\Col=\z@ \xyFN@\prentry@@}
\xylet@\lastprentry@@=\relax
\xydef@\xyeatall@{\let\xy@=\xyeat@ \change@oxy@\xyeat@ \let\xy@@ix@=\eat@}
\xydef@\prentry@@{\global\advance\Col\@ne
 \let\next@=\prentry@@norm
 \ifoldxymatrix@\else \ifx *\next \DN@*{\xyFN@\prentry@@star}\fi \fi
 \next@}
\xydef@\prentry@@star{\ifx *\next \DN@*{\xyFN@\prentry@@star@ii}%
 \else \DN@##1##{\prentry@@star@i{##1}}\fi \next@}
\xydef@\prentry@@star@i#1#2#3!@{\gdef\lastprentry@@{*#1{#2}#3}%
 \setbox\lastobjectbox@=\object#1{#2}%
 \prentry@@x}
\xydef@\prentry@@star@ii{%
 \ifx [\next
 \DN@[##1]{\DN@####1{\def\entrymodifiers@{[##1]####1}}%
 \expandafter\next@\expandafter{\entrymodifiers@}\prentry@@norm}%
 \else
 \DN@##1{\DN@####1{\def\entrymodifiers@{##1####1}}%
 \expandafter\next@\expandafter{\entrymodifiers@}\prentry@@norm}%
 \fi \next@}
\xydef@\prentry@@norm#1!@{\gdef\lastprentry@@{#1}%
 \DN@{\setbox\lastobjectbox@=\object}%
 \expandafter\next@\entrymodifiers@{\xyeatall@ \everyentry@ #1}%
 \prentry@@x}
\xydef@\prentry@@x{%
 \edef\next@{{\noexpand\pre@emit{\the\Row}{\Upness@}{\the\Col}{\Leftness@}%
 {\the\L@c}{\the\R@c}{\the\D@c}{\the\U@c}{\expandafter\noexpand\the\Edge@c}}}%
 \expandafter\addq@\next@ \box\lastobjectbox@}
\xynew@{if}\ifoldxymatrix@ \oldxymatrix@false
\xydef@\prentry@@@{\relax \let\next@=\prentry@@@i
 \ifoldxymatrix@ \ifnum\Col=\@ne \ifx\lastprentry@@\empty
 \global\advance\Row\m@ne \let\next@=\relax \fi\fi\fi
 \global\let\lastprentry@@=\relax \next@}
\xydef@\prentry@@@i{%
 \ifnum\maxcol@<\Col \xdef\maxcol@{\the\Col}\xdef\maxcolrow@{\the\Row}\fi
 \expandafter\xdef\csname maxcol@\the\Row\endcsname{\the\Col}}
\xydef@\xy@minX@@{\z@}
\xydef@\xy@maxX@@{\z@}
\xydef@\xy@minY@@{\z@}
\xydef@\xy@maxY@@{\z@}
\xydef@\pre@emit#1#2#3#4#5#6#7#8#9{%
 \global\Row=#1\global\Col=#3\relax
 \ifnum#3=\@ne
 \ifnum#1=\@ne \xy@@{\matrixorigin@}%
 \else \count@@=#1\advance\count@@\m@ne
 \edef\next@{\noexpand\xy@@{\noexpand\cfromid@
 {\xymatrixprefix@@\the\count@@,1}}}\next@
 \pre@emit@ \W@maxout\Hrow@c@@\W@maxin\Hrow@in\xy@tanabs@@
 \X@c\xy@sinsign@@\xy@sinabs@@\xymatrixrowsep@
 \pre@emit@ \Hrow@c@@\W@maxout\Hrow@in\W@maxin\xy@cotabs@@
 \Y@c{-\xy@cossign@@}\xy@cosabs@@\xymatrixrowsep@
 \fi
 \else \count@@=#3\advance\count@@\m@ne
 \pre@emit@ \Wcol@c@@\H@maxout\Wcol@in\H@maxin\xy@cotabs@@
 \X@c\xy@cossign@@\xy@cosabs@@\xymatrixcolsep@
 \pre@emit@ \H@maxout\Wcol@c@@\H@maxin\Wcol@in\xy@tanabs@@
 \Y@c\xy@sinsign@@\xy@sinabs@@\xymatrixcolsep@
 \fi
 \DN@##1{\xy@@{\L@c=#5\R@c=#6\D@c=#7\U@c=#8\Edge@c={#9}\idfromc@{##1#1,#3}}}%
 \expandafter\next@\expandafter{\xymatrixprefix@@}%
 \xy@@{%
 \dimen@=\X@c \advance\dimen@-\L@c
 \ifdim\dimen@<\xy@minX@@ \edef\xy@minX@@{\the\dimen@}\fi
 \dimen@=\X@c \advance\dimen@+\R@c
 \ifdim\dimen@>\xy@maxX@@ \edef\xy@maxX@@{\the\dimen@}\fi
 \dimen@=\Y@c \advance\dimen@-\D@c
 \ifdim\dimen@<\xy@minY@@ \edef\xy@minY@@{\the\dimen@}\fi
 \dimen@=\Y@c \advance\dimen@+\U@c
 \ifdim\dimen@>\xy@maxY@@ \edef\xy@maxY@@{\the\dimen@}\fi}}
\xydef@\pre@emit@#1#2#3#4{#1\A@ #2\B@ #3\R@ #4\dimen@
 \edef\next@{{\the\A@}{\the\B@}{\the\R@}{\the\dimen@}}%
 \expandafter\pre@emit@i\next@}
\xydef@\pre@emit@i#1#2#3#4#5{\xy@@{%
 \dimen@=#2\R@=#5\dimen@ \dimen@=#1\relax \ifdim\R@>\dimen@ \R@=\dimen@ \fi
 \dimen@=#4\B@=#5\dimen@ \dimen@=#3\relax \ifdim\B@>\dimen@ \B@=\dimen@ \fi
 \advance\R@\B@}%
 \pre@emit@ii}
\xydef@\pre@emit@ii#1#2#3#4{\xy@@{%
 \dimen@=#4\dimen@=#3\dimen@ \advance\R@\dimen@ \advance#1#2\R@}}
\xydef@\Wcol@in#1{#1=\csname Wcol@\the\Col\endcsname #1=.5#1}
\xydef@\Wcol@out#1{#1=\csname Wcol@\the\Col\endcsname #1=.5#1}
\xydef@\Wcol@c@@#1{#1=\csname Wcol@\the\count@@\endcsname #1=.5#1}
\xydef@\W@maxin#1{#1=\W@max #1=.5#1}
\xydef@\W@maxout#1{#1=\W@max #1=.5#1}
\xydef@\Hrow@in#1{#1=\csname Hrow@\the\Row\endcsname #1=.5#1}
\xydef@\Hrow@out#1{#1=\csname Hrow@\the\Row\endcsname #1=.5#1}
\xydef@\Hrow@c@@#1{#1=\csname Hrow@\the\count@@\endcsname #1=.5#1}
\xydef@\H@maxin#1{#1=\H@max #1=.5#1}
\xydef@\H@maxout#1{#1=\H@max #1=.5#1}
\xydef@\H@max{\z@}
\xydef@\W@max{\z@}
\xydef@\HW@max{\z@}
\xydef@\mkHrow@{}
\xydef@\mkWcol@{}
\xydef@\mkHmax@{}
\xydef@\mkWmax@{}
\xydef@\mkHWmax@{}
\xydef@\mkHWdefaults@{\let\xymatrix@measureit@@=\xymatrix@measureit
 \let\mkHrow@=\Hrow@R \let\mkWcol@=\Wcol@C
 \def\mkHmax@{\ifdim\dimen@>\H@max\relax \xdef\H@max{\the\dimen@}\fi}%
 \def\mkWmax@{\ifdim\dimen@>\W@max\relax \xdef\W@max{\the\dimen@}\fi}%
 \let\mkHWmax@=\HWmax@max}
\xydef@\Hrow@R{\expandafter\xdef\csname Hrow@\the\Row\endcsname{\the\dimen@}}
\xydef@\Wcol@C{\expandafter\xdef\csname Wcol@\the\Col\endcsname{\the\dimen@}}
\xydef@\Hrow@max{\expandafter\gdef\csname Hrow@\the\Row\endcsname{\H@max}}
\xydef@\Wcol@max{\expandafter\gdef\csname Wcol@\the\Col\endcsname{\W@max}}
\xydef@\Hrow@HWmax{\expandafter\gdef\csname Hrow@\the\Row\endcsname{\HW@max}}
\xydef@\Wcol@HWmax{\expandafter\gdef\csname Wcol@\the\Col\endcsname{\HW@max}}
\xydef@\HWmax@max{%
 \ifdim\H@max>\W@max\global\let\HW@max=\H@max\else\global\let\HW@max=\W@max\fi}
\xydef@\HWmax@set#1{\gdef\HW@max{#1}%
 \global\let\H@max=\HW@max \global\let\W@max=\HW@max}
\xydef@\xymatrix@measureit{%
 \xdef\H@max{\z@}\xdef\W@max{\z@}%
 \setbox6=\vbox{\unvbox8 \global\Row=\maxrow@
 \loop@ \dimen@ii=\lastskip\unskip \ifnum\z@<\Row
 \setbox4=\lastbox \dimen@=\dp4 \advance\dimen@\ht4 \mkHrow@ \mkHmax@
 \ifnum\Row=\maxcolrow@
 \setbox2=\hbox{\unhbox4
 \global\Col=\maxcol@
 \loop@ \dimen@ii=\lastskip\unskip \ifnum\z@<\Col
 \setbox\z@=\lastbox \dimen@=\wdz@ \mkWcol@ \mkWmax@
 \global\advance\Col\m@ne
 \repeat@}\fi
 \global\advance\Row\m@ne
 \repeat@}%
 \mkHWmax@}
\xylet@\xymatrix@measureit@@=\relax
\xydef@\xymatrix@typeset#1{%
 \clearq@
 \hbox{\vtop{\xyqall@
 \xy@@{\ifx\xymatrixsavedCOORD@\relax
 \enter@{\noexpand\let\noexpand\COORD@\noexpand\xymatrixsavedCOORD@}%
 \let\xymatrixsavedCOORD@=\COORD@ \let\COORD@=\xymatrixCOORD@
 \else \enter@{}\fi}%
 \ifx\xymatrixsavedCOORD@\relax \let\xymatrixsavedCOORD@=\COORD@ \fi
 \let\COORD@=\xymatrixCOORD@
 \kern\z@ \global\Row=\z@
 \everycr{}\let\\=\cr \tabskip=\z@ \offinterlineskip
 \halign{\entry@##!@&&\entry@@##!@\cr#1\crcr}%
 \xy@@{\leave@}}}%
 \finishq@ \expandafter\xy@@\expandafter{\the\queue@}\global\queue@={}}
\xydef@\entry@{\relax \global\advance\Row\@ne \global\Col=\z@ \entry@@}
\xydef@\entry@@{\global\advance\Col\@ne
 \DN@##1,##2,##3@{\xy@{ENTRY "##3##1,##2"}{\Row=##1 \Col=##2\relax
 \cfromid@{##3##1,##2}\pfromc@}}%
 \edef\nextii@{\the\Row,\the\Col,\xymatrixprefix@@ @}%
 \expandafter\next@\nextii@
 \xyFN@\entry@@i}
\xydef@\entry@@i{\let\next@=\entry@@norm
 \ifoldxymatrix@\else \ifx *\next \DN@*{\xyFN@\entry@@star}\fi \fi
 \next@}
\xydef@\entry@@star{\ifx *\next \DN@*{\xyFN@\entry@@star@ii}%
 \else \DN@##1##{\entry@@star@i{##1}}\fi \next@}
\xydef@\entry@@star@i#1#2#3!@{%
 \xy@@ix@{{#1}{#2}}\xy@@{\expandafter\dropentry@\the\toks9}%
 \setboxz@h{\xyqall@
 \ifx\xymatrixsavedCOORD@\relax \let\xymatrixsavedCOORD@=\COORD@ \fi
 \let\COORD@=\xymatrixCOORD@ \everyentry@ #3}%
 \setbox\z@=\copy\voidb@x}
\xydef@\entry@@star@ii{%
 \ifx [\next
 \DN@[##1]{\DN@####1{\def\entrymodifiers@{[##1]####1}}%
 \expandafter\next@\expandafter{\entrymodifiers@}\entry@@norm}%
 \else
 \DN@##1{\DN@####1{\def\entrymodifiers@{##1####1}}%
 \expandafter\next@\expandafter{\entrymodifiers@}\entry@@norm}%
 \fi \next@}
\xydef@\entry@@norm#1!@{%
 \DN@##1{\expandafter\xy@@ix@
 \expandafter{\expandafter{\entrymodifiers@}{##1}}}%
 \expandafter\next@\expandafter{\everyentry@#1}%
 \xy@@{\expandafter\dropentry@\the\toks9}%
 \setbox\z@=\expandafter\object\entrymodifiers@{\xyqall@
 \ifx\xymatrixsavedCOORD@\relax \let\xymatrixsavedCOORD@=\COORD@ \fi
 \let\COORD@=\xymatrixCOORD@ \everyentry@ #1}%
 \setbox\z@=\copy\voidb@x}
\xydef@\dropentry@#1#2{\drop@{#1}{\xyeatall@
 \ifx\xymatrixsavedCOORD@\relax \let\xymatrixsavedCOORD@=\COORD@ \fi
 \let\COORD@=\xymatrixCOORD@ #2}}
\xydef@\xyqall@{%
 \ifxysaving@ \let\xy@=\xyqs@ \let\xy@@ix@=\xysave@@toksix@
 \else \let\xy@=\xyq@ \let\xy@@ix@=\xyq@@toksix@ \fi
 \change@oxy@\xy@}
\xydef@\xyq@#1#2{\addq@{#2}}
\xydef@\xyq@@toksix@{\begingroup
 \xyuncatcodes \afterassignment\xyq@@toksix@i \global\toks9=}
\xydef@\xyq@@toksix@i{%
 \DN@##1{\endgroup \xy@@{\global\toks9={##1}}}%
 \expandafter\next@\expandafter{\the\toks9}}
\xydef@\xyqs@{\global\advance\matrixsize@\@ne \xysave@}
\xydef@\xymatrix@insert{%
 \xy@@{\edef\nextii@{{\xy@minX@@}{\xy@maxX@@}{\xy@minY@@}{\xy@maxY@@}}%
 \expandafter\xymatrix@insert@\nextii@}}
\xydef@\xymatrix@insert@#1#2#3#4{\matrixorigin@
 \L@c=+\X@c \advance\L@c-#1\relax
 \R@c=-\X@c \advance\R@c+#2\relax
 \D@c=+\Y@c \advance\D@c-#3\relax
 \U@c=-\Y@c \advance\U@c+#4\relax
 \Edge@c={\rectangleEdge}}
\xylet@\thematrixCOORD@@=\relax
\xylet@\thematrixprefix@@=\relax
\xydef@\xymatrixCOORD@{%
 \ifx [\next
 \DN@[##1]{\xy@{[##1]}{\def\thematrixCOORD@@{[##1]}}%
 \xyFN@\xymatrixCOORD@i##1]}%
 \else \let\next@=\xymatrixsavedCOORD@ \fi \next@}
\xydef@\xymatrixCOORD@i{\count@=\Row \count@@=\Col
 \let\thematrixprefix@@=\xymatrixprefix@@
 \ifcat A\noexpand\next
 \DN@##1{\expandafter\notrelaxorelse@\csname xymatrixCOORD@i@##1\endcsname
 \xymatrixCOORD@other}%
 \else\ifx ]\next \DN@]{\xymatrixCOORD@x}%
 \else\ifx "\next \DN@"##1"{\DN@{##1}\edef\thematrixprefix@@{\codeof\next@}%
 \xyFN@\xymatrixCOORD@ii}%
 \else \let\next@=\xymatrixCOORD@other \fi\fi\fi \next@}
\xydef@\xymatrixCOORD@i@u{\advance\count@ \m@ne\xyFN@\xymatrixCOORD@ii}
\xydef@\xymatrixCOORD@i@d{\advance\count@ \@ne \xyFN@\xymatrixCOORD@ii}
\xydef@\xymatrixCOORD@i@l{\advance\count@@\m@ne\xyFN@\xymatrixCOORD@ii}
\xydef@\xymatrixCOORD@i@r{\advance\count@@\@ne \xyFN@\xymatrixCOORD@ii}
\xydef@\xymatrixCOORD@ii{%
 \ifcat A\noexpand\next
 \DN@##1{\expandafter\notrelaxorelse@\csname xymatrixCOORD@i@##1\endcsname
 \xymatrixCOORD@error}%
 \else\ifx ]\next \DN@]{\xymatrixCOORD@x}%
 \else \let\next@=\xymatrixCOORD@xx \fi\fi \next@}
\xydef@\xymatrixCOORD@error#1{\DN@{#1}%
 \xyerror@{illegal <coord> (\codeof\next@): illegal [...] target form}{}%
 \xyFN@\xymatrixCOORD@ii}
\xydef@\xymatrixCOORD@other#1,#2]{%
 \advance\count@#1\advance\count@@#2\xymatrixCOORD@x}
\xydef@\xymatrixCOORD@x{%
 \DN@##1{\xy@@{%
 \expandafter\let\expandafter\next@\csname Q@##1\endcsname
 \ifx\next@\relax \xyerror@RC{##1}\else \next@ \fi}%
 \afterCOORD@}%
 \edef\nextii@{{\thematrixprefix@@\the\count@,\the\count@@}}%
 \expandafter\next@\nextii@}
\xydef@\xymatrixCOORD@xx{%
 \DN@##1{\xy@@{%
 \expandafter\let\expandafter\next@\csname Q@##1\endcsname
 \ifx\next@\relax \xyerror@RC{##1}\else \next@\no@@ \fi}%
 \afterPLACE\xymatrixCOORD@after}%
 \edef\nextii@{{\thematrixprefix@@\the\count@,\the\count@@}}%
 \expandafter\next@\nextii@}
\xydef@\xymatrixCOORD@after{%
 \ifx ]\next \DN@]{\afterCOORD@}%
 \else \let\next@=\xymatrixCOORD@error \fi \next@}
\xydef@\xyerror@RC#1{\xyerror@{in entry \string"\the\Row,\the\Col\string":
 No \codeof\thematrixCOORD@@\space(is \string"#1\string") from here}{}}
\xylet@\xymatrix@addop@@=\relax
\xydef@\xymatrix@at{\def\xymatrix@addop@@{\xymatrix@R\xymatrix@C}%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\xymatrix@at}%
 \else\ifx !\next \DN@!{\xyFN@\xymatrix@fix}%
 \else\addPLUS@\ifx \next \let\next@=\xymatrix@addop
 \else\addDASH@\ifx \next \let\next@=\xymatrix@addop
 \else\addEQ@\ifx \next \let\next@=\xymatrix@addop
 \else\ifx 1\next \DN@1{\def\everyentry@{\vphantom(}%
 \let\objectmargin@=\p@ \xyFN@\xymatrix@setup}%
 \else\ifx R\next \def\xymatrix@addop@@{\xymatrix@R}\DN@ R{\xymatrix@addop}%
 \else\ifx C\next \def\xymatrix@addop@@{\xymatrix@C}\DN@ C{\xymatrix@addop}%
 \else\ifx M\next \def\xymatrix@addop@@{\xymatrix@M}\DN@ M{\xymatrix@addop}%
 \else\ifx L\next \def\xymatrix@addop@@{\xymatrix@L}\DN@ L{\xymatrix@addop}%
 \else\ifx H\next \def\xymatrix@addop@@{\xymatrix@H}\DN@ H{\xymatrix@addop}%
 \else\ifx W\next \def\xymatrix@addop@@{\xymatrix@W}\DN@ W{\xymatrix@addop}%
 \else\ifx *\next \DN@*{\xyFN@\xymatrix@mods}%
 \else \DN@{\afterDIRECTIONorEMPTY
 {\xymatrix@rotation \xyFN@\xymatrix@setup}{%
 \xyerror@{<addop> or <direction> or one of RCMLHW*! expected}{}%
 \xyFN@\xymatrix@setup}}%
 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next@}
\xydef@\xymatrix@fix{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\xymatrix@fix}%
 \else\ifx R\next \let\mkHrow@=\Hrow@max \DN@ R{\xyFN@\xymatrix@fix@}%
 \else\ifx C\next \let\mkWcol@=\Wcol@max \DN@ C{\xyFN@\xymatrix@fix@}%
 \else \let\mkHrow@=\Hrow@HWmax \let\mkWcol@=\Wcol@HWmax
 \let\next@=\xymatrix@fix@
 \fi\fi\fi \next@}
\xydef@\xymatrix@fix@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\xymatrix@fix@}%
 \else\ifx 0\next \def\mkHWmax@{\HWmax@set\z@}\DN@ 0{\xyFN@\xymatrix@setup}%
 \else\addEQ@\ifx\next \addEQ@\DN@{\afterassignment\xymatrix@fix@x\dimen@ii=}%
 \else \let\mkHWmax@=\HWmax@max \let\next@=\xymatrix@setup \fi\fi\fi \next@}
\xydef@\xymatrix@fix@x{%
 \edef\mkHWmax@{\noexpand\HWmax@set{\the\dimen@ii}}\xyFN@\xymatrix@setup}
\xydef@\xymatrix@addop{\afterADDOP{\xyFN@\xymatrix@addop@}}
\xydef@\xymatrix@addop@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\xymatrix@addop@}%
 \else\ifx R\next \DN@ R{\xy@{R}{}\dimen@ii=\xymatrixrowsep@\xymatrix@addop@x}%
 \else\ifx C\next \DN@ C{\xy@{C}{}\dimen@ii=\xymatrixcolsep@\xymatrix@addop@x}%
 \else \DN@{\afterassignment\xymatrix@addop@x\dimen@ii=}\fi\fi\fi \next@}
\xydef@\xymatrix@addop@x{\expandafter\xy@\expandafter{\the\dimen@ii}{}%
 \xymatrix@addop@@ \xyFN@\xymatrix@setup}
\xydef@\xymatrix@R{\Addop@@\xymatrixrowsep@\dimen@ii}
\xydef@\xymatrix@C{\Addop@@\xymatrixcolsep@\dimen@ii}
\xydef@\xymatrix@M{\Addop@@\objectmargin@\dimen@ii}
\xydef@\xymatrix@L{\Addop@@\labelmargin@\dimen@ii}
\xydef@\xymatrix@H{\Addop@@\objectheight@\dimen@ii}
\xydef@\xymatrix@W{\Addop@@\objectwidth@\dimen@ii}
\xydef@\xymatrixrowsep@{2pc}
\xydef@\xymatrixcolsep@{2pc}
\xydef@\xymatrixrowsep{\afterADDOP{\Addop@@\xymatrixrowsep@}}
\xydef@\xymatrixcolsep{\afterADDOP{\Addop@@\xymatrixcolsep@}}
\xydef@\xymatrix@mods{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\xymatrix@mods}%
 \else\ifx [\next
 \DN@ [##1]{\xy@{[##1]}{}\DN@####1{\def\entrymodifiers@{[##1]####1}}%
 \expandafter\next@\expandafter{\entrymodifiers@}\xyFN@\xymatrix@setup}%
 \else\addPLUS@\ifx \next \DN@##1{\DNii@{##1}\xyFN@\xymatrix@change}%
 \else\addDASH@\ifx \next \DN@##1{\DNii@{##1}\xyFN@\xymatrix@change}%
 \else\addEQ@\ifx \next \DN@##1{\DNii@{##1}\xymatrix@set}%
 \else \let\next@=\xymatrix@mods@error \fi\fi\fi\fi\fi \next@}
\xydef@\xymatrix@set{%
 \begingroup \plainxy@
 \afterVECTORorEMPTY\xymatrix@mods@x\xymatrix@mods@error}
\xydef@\xymatrix@change{%
 \addEQ@\ifx\next \DN@##1{\expandafter\DNii@\expandafter{\nextii@##1}%
 \expandafter\xy@\expandafter{\nextii@}{}\begingroup \plainxy@
 \afterVECTORorEMPTY\xymatrix@mods@x\xymatrix@mods@xx}%
 \else \DN@{\expandafter\xy@\expandafter{\nextii@}{}\begingroup \plainxy@
 \afterVECTORorEMPTY\xymatrix@mods@x\xymatrix@mods@xx}\fi
 \next@}
\xydef@\xymatrix@mods@x{\expandafter\xy@\expandafter{\nextii@}{}%
 \def\next@##1##2##3{\def\nextii@####1{##1##2####1##3}}%
 \addGT@{\addLT@{\expandafter\next@\expandafter{\nextii@}}}%
 \DN@##1{\gdef\tmp@@@{{##1}}}%
 \edef\nextiii@{{\the\X@c,\the\Y@c}}%
 \expandafter\expandafter\expandafter\next@
 \expandafter\expandafter\expandafter{\expandafter\nextii@\nextiii@}%
 \endgroup
 \DN@##1{\xy@{##1}{}\DN@####1{\def\entrymodifiers@{##1####1}}%
 \expandafter\next@\expandafter{\entrymodifiers@}\xyFN@\xymatrix@setup}%
 \expandafter\next@\tmp@@@}
\xydef@\xymatrix@mods@xx{\expandafter\xy@\expandafter{\nextii@}{}%
 \expandafter\gdef\expandafter\tmp@@@\expandafter{\expandafter{\nextii@}}%
 \endgroup
 \DN@##1{\xy@{##1}{}\DN@####1{\def\entrymodifiers@{##1####1}}%
 \expandafter\next@\expandafter{\entrymodifiers@}\xyFN@\xymatrix@setup}%
 \expandafter\next@\tmp@@@}
\xydef@\xymatrix@mods@error{\endgroup
 \xyerror@{Impossible @*<addop><size> <setup>.}{}\xyFN@\xymatrix@setup}
\xywarnifdefined\entrymodifiers
\expandafter\def\addEQ@\entrymodifiers#1{\def\entrymodifiers@{#1}\ignorespaces}
\xydef@\entrymodifiers@{\entrybox}
\xydef@\entrybox#1{\hbox{\setbox\z@=\objectbox{#1}%
 \L@p=\wdz@ \D@p=\ht\z@ \advance\D@p\dp\z@
 \dimen@=\objectwidth@ \advance\dimen@-\L@p
 \ifdim\dimen@>\z@ \advance\L@p\dimen@ \R@p=.5\dimen@ \else \R@p=\z@ \fi
 \dimen@=\objectheight@ \advance\dimen@-\D@p
 \ifdim\dimen@>\z@ \advance\D@p\dimen@ \fi
 \dimen@=\objectmargin@ \advance\L@p2\dimen@ \advance\D@p2\dimen@ 
 \U@p=-.5\ht\z@ \advance\U@p.5\dp\z@ \advance\R@p\objectmargin@
 \setboxz@h{\kern\R@p \raise\U@p\boxz@}%
 \wdz@=\L@p \ht\z@=.5\D@p \dp\z@=.5\D@p \boxz@}}
\xywarnifdefined\everyentry
\expandafter\def\addEQ@\everyentry#1{\def\everyentry@{#1}\ignorespaces}
\xylet@\everyentry@=\empty
\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 webmaster@9p.io.