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

John Smith latexpst at gmail.com
Sat Nov 1 04:45:34 CET 2008


Thanks Herbert.

On Fri, Oct 31, 2008 at 7:52 PM, Herbert Voss <Herbert.Voss at fu-berlin.de>wrote:

> John Smith schrieb:
> > I tried to use this in plain Tex. The code is
>
> % not really a PSTricks question, insn't it ;-)


True - I hope this is ok since you wrote math-mode.

>
> \newdimen\@tempdima
> \newdimen\@tempdimb


What's \@tempdimb for?

>
>  > \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?
>
> try it out ... should be no problem.


At large fonts and using the star version with square brackets, the right
hand border numbers are too close to the bracket. What determines this
spacing?

>
>
> Herbert
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20081101/95b56227/attachment.html 


More information about the PSTricks mailing list