![自动布局 \node 以使它们不重叠的最简单方法是什么?](https://linux22.com/image/475036/%E8%87%AA%E5%8A%A8%E5%B8%83%E5%B1%80%20%5Cnode%20%E4%BB%A5%E4%BD%BF%E5%AE%83%E4%BB%AC%E4%B8%8D%E9%87%8D%E5%8F%A0%E7%9A%84%E6%9C%80%E7%AE%80%E5%8D%95%E6%96%B9%E6%B3%95%E6%98%AF%E4%BB%80%E4%B9%88%EF%BC%9F.png)
我在 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 中的节点重叠:
是否有任何简单的方法可以自动布局节点以使其不重叠?