[pstricks] Problem placing boxes and undwanted space

Ulrik Stervbo ulriks at ruc.dk
Fri May 27 09:49:39 CEST 2005


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?

Ulrik

Quoting Herbert Voss <LaTeX at zedat.fu-berlin.de>:

> Ulrik Stervbo wrote:
>
> >I'm working on making it easier (for me) to make posters with latex. To
> comply
> >with the CVI of Novo Nordisk, I need a box with rounded corners and on the
> top
> >of that a heading:
> >
> >+-- Abstract ---------+
> >| text text text text |
> >| text text text text |
> >+---------------------+
> >
> >
> sorry, the example was not correct cut and pasted ...
>
> Herbert
>
> \documentclass{article}
> \usepackage{calc,pstricks}
>
> \newlength\postercolwidth
> \newlength\postercolsep
> \def\roundedness{0.2}
>
> \newcount\postercolnum \postercolnum=2
> \setlength\postercolsep{0.5cm}
> \setlength\postercolwidth{(\textwidth - \postercolsep) / \postercolnum}
>
>
>
\newpsstyle{boxstyle}{framearc=\roundedness,fillstyle=solid,fillcolor=lightgray,framesep=4mm}
> \newsavebox\PBox
> \def\myBox#1#2#3{%
>   \sbox\PBox{\psframebox[style=boxstyle]{\parbox{#1}{#3}}}
>   \begin{pspicture}(\wd\PBox,2.2\ht\PBox)%\psgrid
>     \rput[lb](0,0){\usebox\PBox}
>     \rput[l](5\fboxsep,1.9\ht\PBox){\colorbox{yellow}{#2\hspace{\fboxsep}}}
>   \end{pspicture}%
> }
>
> \begin{document}
>
>          What it really should look like
>
> \hspace{10mm}\myBox{\postercolwidth}{\Large Abstract}{%
>     Lorem ipsum dolor sit amet, urna augue. Luctus sollicitudin,
>     accusantium nostrum. Scelerisque duis eget nonummy, rhoncus}
>
> \hspace{10mm}\myBox{\postercolwidth}{\Large Abstract}{%
>     Lorem ipsum dolor sit amet, urna augue. Luctus sollicitudin,
>     accusantium nostrum. Scelerisque duis eget nonummy, rhoncus
>     Lorem ipsum dolor sit amet, urna augue. Luctus sollicitudin,
>     accusantium nostrum. Scelerisque duis eget nonummy, rhoncus}
>
> \end{document}
>
> _______________________________________________
> pstricks mailing list
> pstricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
>






More information about the PSTricks mailing list