[pstricks] Border matrix macro from mathmode doc in plain Tex

John Smith latexpst at gmail.com
Fri Oct 31 05:04:43 CET 2008


I tried to use this in plain Tex. The code is
\newif\if at borderstar
\def\bordermatrix{\@ifnextchar*{%
\@borderstartrue\@bordermatrix at i}{\@borderstarfalse\@bordermatrix at i*}%
}
\def\@bordermatrix at i*{\@ifnextchar[{\@bordermatrix at ii}{\@bordermatrix at ii
[()]}}
\def\@bordermatrix at ii[#1]#2{%
\begingroup
\m at th\@tempdima8.75\p@\setbox\z@\vbox{%
 \def\cr{\crcr\noalign{\kern 2\p@\global\let\cr\endline }}%
 \ialign {$##$\hfil\kern 2\p@\kern\@tempdima & \thinspace %
 \hfil $##$\hfil && \quad\hfil $##$\hfil\crcr\omit\strut %
 \hfil\crcr\noalign{\kern -\baselineskip}#2\crcr\omit %
 \strut\cr}}%
 \setbox\tw@\vbox{\unvcopy\z@\global\setbox\@ne\lastbox}%
 \setbox\tw@\hbox{\unhbox\@ne\unskip\global\setbox\@ne\lastbox}%
 \setbox\tw@\hbox{%
 $\kern\wd\@ne\kern -\@tempdima\left\@firstoftwo#1%
 \if at borderstar\kern2pt\else\kern -\wd\@ne\fi%
 \global\setbox\@ne\vbox{\box\@ne\if at borderstar\else\kern 2\p@\fi}%
 \vcenter{\if at borderstar\else\kern -\ht\@ne\fi%
 \unvbox\z@\kern-\if at borderstar2\fi\baselineskip}%
 \if at borderstar\kern-2\@tempdima\kern2\p@\else\,\fi\right\@secondoftwo#1 $%
 }\null \;\vbox{\kern\ht\@ne\box\tw@}%
 \endgroup
 }

This gives an error because of undefined variable \@tempdima. How can I fix
it? Also what does the 8.75pt refer to on this line. What happens if I want
to use the code with a large font, say 20pt?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20081031/e298eb9b/attachment.html 


More information about the PSTricks mailing list