[pstricks] pBox macro

David Arnold dwarnold45 at suddenlink.net
Thu Jul 23 19:08:44 CEST 2009


All,

Herbert gave me this macro:

\documentclass{article}
\usepackage{pstricks}

\newpsstyle{bgCyan}{fillstyle=solid,fillcolor=cyan! 
10,linestyle=none,framesep=6pt}
\def\pBox#1{\psframebox[style=bgCyan]{{%
   \tabular{@{}c@{}}#1\endtabular}}}

\begin{document}

\begin{center}
\begin{tabular}{ccccc}
\pBox{Original\\Balance} & plus & \pBox{Student\\Deposit} & equals &  
\pBox{Current\\Balance}\\
$B$ & $+$ & \$120 & $=$ & $-\$75$
\end{tabular}
\end{center}

\end{document}

When I compile in Texshop on the mac, I get this result:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedGraphic.tiff
Type: image/tiff
Size: 12204 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20090723/93e45bdb/attachment-0002.tiff>
-------------- next part --------------


When I compile with ps4pdf, I get this result:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedGraphic.tiff
Type: image/tiff
Size: 12650 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20090723/93e45bdb/attachment-0003.tiff>
-------------- next part --------------


The bottom of each box is now on the baseline. Any way I can fix this?

Thanks.

David.


More information about the PSTricks mailing list