我的问题很简单:我想在树环境中绘制双边框节点,如下所示:
根据我目前获得的代码,我的输出如下:
我们可以看到 u 有双边框,但它非常小。我想找到一种方法让它变大,就像第一张图片一样。我编写的代码如下。
\documentclass[a4paper,12pt]{article}
\usepackage{forest}
\begin{document}
\begin{forest}
for tree = {draw,circle,edge={black,thick},inner sep=2pt, minimum width= .25cm,
font = \small, s sep = 1cm}
[,fill=black, label={w}
[,fill=red
[,fill=black]
[,fill=black]
]
[,fill=black,double,label = {u}]
]
\end{forest}
\end{document}
答案1
如果您想使用该double
选项,您可以尝试使用double distance
和line width
,例如像这样:
\documentclass[a4paper,12pt]{article}
\usepackage{forest}
\begin{document}
\begin{forest}
for tree = {draw,circle,edge={black,thick},inner sep=2pt, minimum width= .25cm,
font = \small, s sep = 1cm}
[,fill=black, label={w}
[,fill=red
[,fill=black]
[,fill=black]
]
[,fill=black,double,double distance=2pt,line width=1pt,label = {u}]
]
\end{forest}
\end{document}