自定义的一个forest环境样式,forest scheme,创建大括号树状结构图
\documentclass{article}
\usepackage{forest}
\usetikzlibrary{decorations.pathreplacing}
\forestset{
forest scheme/.style={
for tree={
inner sep=0pt,
outer sep=0pt,
fit=band,
child anchor=west,
parent anchor=east,
grow'=0,
anchor=west,
align=left,
if n=1{
edge path'={(!u1.west) -- (!ul.west);}
}{no edge},
edge={decorate, decoration={brace,amplitude=1.5mm,mirror,raise=2mm}},
},
}
}
\begin{document}
\begin{forest}
forest scheme
[根据结合力性质的不同
[化学键
[离子键(ionic bond)]
[共价键(covalent bond)]
[金属键(metallic bond)]
]
[物理键
[范德华键(Van der Vaals bond)]
[氢键(hydrogen bond)]
]
]
\end{forest}
\end{document}