[pstricks] vertically centering table in \psframebox

Patrick Drechsler patrick.drechsler at gmx.net
Tue Jan 20 23:03:09 CET 2004


Hi,

I'm having trouble vertically centering a small table within a
\psframebox after giving the psframebox a fixed size by using
\rule{0pt}{xxpt}:


--8<------------------------schnipp------------------------->8---
\documentclass{article}
\usepackage{pstcol,pst-node}

\begin{document}

\begin{pspicture}(0,0)(14,10)
  \newcommand{\XX}[3][white]{%
    \rnode{#2}{%
      \psframebox[framearc=.5,fillstyle=solid,fillcolor=#1]{%
        \rule{0pt}{15mm}\begin{tabular}{c}#3\end{tabular}}}}

  \rput(7,9){\XY{A2}{\textbf{fooooooooooo} \\
      \rnode{aa1}{barr} \\[2ex] \rnode{aa2}{foooooo}}}
  \ncline{->}{aa1}{aa2}%

\end{pspicture}

\end{document}
--8<------------------------schnapp------------------------->8---

I included a bit more code to show what I'm trying to accomplish.

The text isn't centered vertically. I've already tried playing
with \vfill(*), \vspace(*) but to no avail. Any ideas?

BTW: The \ncline is a tick to close to the node aa1. Is there a
way of cutting the arrowlength just a bit?

TIA,

Patrick
-- 
"In the bathtub of history the truth is harder to hold than the soap,
 and much more difficult to find."  -- Terry Pratchett





More information about the PSTricks mailing list