![多部分节点分隔符锚点](https://linux22.com/image/250686/%E5%A4%9A%E9%83%A8%E5%88%86%E8%8A%82%E7%82%B9%E5%88%86%E9%9A%94%E7%AC%A6%E9%94%9A%E7%82%B9.png)
如何使用相对定位将节点定位在多部分节点中某一部分的中心/边缘?
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.multipart}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\node[align=center,draw,shape=rectangle split,rectangle split horizontal,rectangle split parts=3, text width=2cm] (A) at (1.5,3)
{one\nodepart{two}two\nodepart{three}three};
\node[draw,shape=circle] (E) at (2.7,1) {$E$};
\node[draw,shape=circle] (C) at (3.7,1) {$C$};
\end{tikzpicture}
\end{document}
这是期望的结果:
答案1
你的意思是像这样吗?
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.multipart}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\node[align=center,draw,shape=rectangle split,rectangle split horizontal,rectangle split parts=3, text width=2cm] (A) at (1.5,3)
{$m$\nodepart{two}$0 \ldots 0$\nodepart{three}$r$};
\node[draw,shape=circle] (E) [below=of A.two split south] {$E$};
\node[draw,shape=circle] (C) [below=of A.three south] {$C$};
\end{tikzpicture}
\end{document}
TikZ 手册版本 2.10,第 453 页显示了垂直的锚点split rectangle
。您必须重新解释水平版本。