[pstricks] Problem placing boxes and undwanted space

Herbert Voss LaTeX at zedat.fu-berlin.de
Fri May 27 12:06:11 CEST 2005


Ulrik Stervbo wrote:

>Thanks for the fast response!
>
>The result looks wonderful! However, I'm not too keen on multiplying the height
>of the \PBox.
>
>I found that by adding the depth of the \PBox I dont have to multiply with
>anything :-D Is this true or just a special case I hit upon?
>  
>
\def\myBox#1#2#3{%
 \sbox\PBox{\psframebox[style=boxstyle]{\parbox{#1}{#3}}}%
 \begin{pspicture}(0,-\ht\PBox)(\wd\PBox,1.2\ht\PBox)%\psgrid
   \rput[l](0,0){\usebox\PBox}
   \rput[l](5\fboxsep,\ht\PBox){\colorbox{yellow}{#2\hspace{\fboxsep}}}
 \end{pspicture}%
}


the box is symmetrical to the baseline, so it makes no difference to
multiply by 2 or using the depth, which is the same as \ht

Herbert





More information about the PSTricks mailing list