14 Mar 23:36
Base anchors do not work for nodes with text width
Bastian Sauert <bastian.sauert <at> gmx.net>
2010-03-14 22:36:18 GMT
2010-03-14 22:36:18 GMT
Hello,
I just discovered, that the base*-anchors of nodes with a text width set
do not behave the way they behave without a text width.
In the following example, all the texts should be on the same height
IMHO. However, they are not with an up-to-date TeXLive 2009.
Is this intended? Did I miss something? How can I convince a node with a
text width to have the correct baseline?
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw (0,0) -- (6,0);
\node at (0,0) [anchor=base west] {Test};
\node at (2,0) [anchor=base west,text width=2cm] {Test};
\node at (4,0) [anchor=base west] {%
\begingroup%
\begin{minipage}[t]{2cm}%
Test
\end{minipage}%
\endgroup};
\end{tikzpicture}
\end{document}
As far as I understand tikz.code.tex, setting text width "just" wraps
the content of the node in a minipage. However, the same minipage in a
node without text width has the correct baseline. Unfortunately, my
knowledge about TeX or tikz's internals does not seem to be sufficient
to solve this problem.
Thank you for your help.
Yours,
Bastian
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
RSS Feed