[pstricks] vertically centering table in \psframebox
Patrick Drechsler
patrick.drechsler at gmx.net
Tue Jan 20 23:53:09 CET 2004
Herbert Voss wrote on 20 Jan 2004 23:30:02 MET:
> Patrick Drechsler wrote:
>
>> 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?
Thanks Herbert for the quick reply!
> -> documentation!
I got the idea from the graphics companion (p.129)...
The problem is that I have a couple of these frameboxes and the
should all have the same height. That's the reason I used \rule
in the first place (maybe there's a more elegant way of doing
this?).
If I have another framebox here it has a different size,
i.e. (your code enriched by one box):
--8<------------------------schnipp------------------------->8---
\documentclass[12pt]{article}
\usepackage{pstcol,pstricks,pst-node}
\newcommand*{\XY}[3][white]{%
\rnode{#2}{%
\psframebox[framearc=.5,fillstyle=solid,fillcolor=#1]{%
\begin{tabular}{c}#3\end{tabular}%
}%
}%
}
\begin{document}
\begin{pspicture}(0,0)(14,10)
\rput(7,9){\XY{A2}{\textbf{fooooooooooo} \\
\rnode{aa1}{barr} \\[2ex] \rnode{aa2}{foooooo}}%
}
\ncline[nodesepA=3pt]{->}{aa1}{aa2}%
%% Another box with different height:
\rput(2,9){\XY{A3}{\textbf{fooooooooooo} \\
barr}%
}
\end{pspicture}
\end{document}
--8<------------------------schnapp------------------------->8---
I'll keep trying...
> \ncline[nodesepA=3pt]{->}{aa1}{aa2}%
^^^^^^^^^^^^
Thanks!
Cheers
Patrick
--
"It's called a shovel... I've seen gardeners use them.
You stick the sharp end in the ground. Then it gets a bit technical."
Terry Pratchett, Reaper Man
More information about the PSTricks
mailing list