![森林边缘库中的空白节点](https://linux22.com/image/403539/%E6%A3%AE%E6%9E%97%E8%BE%B9%E7%BC%98%E5%BA%93%E4%B8%AD%E7%9A%84%E7%A9%BA%E7%99%BD%E8%8A%82%E7%82%B9.png)
我正在用包制作一棵树forest
。这是我迄今为止从示例中尝试的文档-
\documentclass{standalone}
\usepackage[edges]{forest}
\begin{document}
\begin{forest}
for tree={grow=south,draw},
forked edges,
[[First node][Second node[Third node][Fourth node[Fifth node][Sixth node]]]]
\end{forest}
\end{document}
如果我们查看它的输出,第一个节点有一个框,里面什么都没有。我不想要那个框,但我想要框下面的线。如何实现这个?
答案1
您可以添加draw=none
到特定节点以推翻draw
适用于所有节点的(因为它是在中设置的for tree
)。
\documentclass{standalone}
\usepackage[edges]{forest}
\begin{document}
\begin{forest}
for tree={grow=south,draw},
forked edges,
[,draw=none
[First node]
[Second node
[Third node]
[Fourth node
[Fifth node]
[Sixth node]
]
]
]
\end{forest}
\end{document}