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