我在 macOS 上使用最新的 mactex,即 xelatex 部分。我正在渲染此节点树结构:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\node (block_01) {foo};
\node (block_02) [below left= of block_01] {bar};
\node (block_03) [below right=of block_01] {baz};
\node (block_04) [below left=of block_02] {qux};
\node (block_05) [below right=of block_02] {qux};
\node (block_06) [below left=of block_03] {qux};
\node (block_07) [below right=of block_03] {qux};
\draw (block_01) -- (block_02);
\draw (block_01) -- (block_03);
\draw (block_02) -- (block_04);
\draw (block_02) -- (block_05);
\draw (block_03) -- (block_06);
\draw (block_03) -- (block_07);
\end{tikzpicture}
\end{document}
生成的 PDF 中的节点重叠:
是否有任何简单的方法可以自动布局节点以使其不重叠?