考虑以下最小示例:
\documentclass{minimal}
\usepackage{tikz}
\usetikzlibrary{graphs,graphdrawing,shapes.multipart}
\usegdlibrary{trees}
\begin{document}
\tikz[every node/.style={rectangle split,rectangle split parts=2,draw}]{
\graph[tree layout,grow=0] {
a/a\nodepart{two}1;
b/b\nodepart{two}2;
c/c\nodepart{two}3;
a -- {b, c};
};
}
\end{document}
结果(使用 PGF 3.0.1)是:
存在不正确的边,即对应于的线a -- c
未在节点的边处停止a
。这是错误还是故意的?我该如何解决它?
答案1
似乎是,因为盒子是透明的。我试过这个:
\documentclass{minimal}
\usepackage{tikz}
\usetikzlibrary{graphs,graphdrawing,shapes.multipart}
\usegdlibrary{trees}
\begin{document}
\tikz[every node/.style={rectangle split,rectangle split parts=2,draw, fill=white}]{
\graph[tree layout,grow=0] {
a/a\nodepart{two}1;
b/b\nodepart{two}2;
c/c\nodepart{two}3;
a -- {b, c};
};
}
\end{document}