LaTeX绘制大括号树状结构图

自定义的一个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}

效果

效果图

参考:用 forest 宏包画“大括号”图

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容