基于schemata宏包不做任何微调的话:
\documentclass[border=5pt]{standalone}
\usepackage[fontset=fandol]{ctex}
\usepackage{schemata}
\begin{document}
\schema
{
\schemabox{1 一级标题}
}
{
\schema
{
\schemabox{1.1 二级标题}
}
{
\schema
{
\schemabox{1.1.1 三级标题}
}
{
\schemabox{1.1.1.1 四级标题}
\schemabox{1.1.1.2 四级标题}
}
\schema
{
\schemabox{1.1.2 三级标题}
}
{
\schemabox{1.1.2.1 四级标题}
\schemabox{1.1.2.2 四级标题}
}
}
\schema
{
\schemabox{1.2 二级标题}
}
{
\schema
{
\schemabox{1.1.1 三级标题}
}
{
\schemabox{1.1.1.1 四级标题}
\schemabox{1.1.1.2 四级标题}
}
\schema
{
\schemabox{1.1.2 三级标题}
}
{
\schemabox{1.1.2.1 四级标题}\smallskip
\schemabox{\parbox{8em}{\linespread{1.0}\selectfont 文字文字文字文字文字文字文字文字文字文字文字文字}}
}
}
}
\end{document}
Edit微调
修改\Schema[⟨type⟩]{⟨adjust⟩}{⟨size⟩}调整brace的位置:
\documentclass[border=5pt]{standalone}
\usepackage[fontset=fandol]{ctex}
\usepackage{schemata}
\begin{document}
\Schema{-2ex}{8ex}
{
\schemabox{1 一级标题}
}
{
\Schema{0ex}{4.5ex}
{
\schemabox{1.1 二级标题}
}
{
\schema
{
\schemabox{1.1.1 三级标题}
}
{
\schemabox{1.1.1.1 四级标题}
\schemabox{1.1.1.2 四级标题}
}
\schema
{
\schemabox{1.1.2 三级标题}
}
{
\schemabox{1.1.2.1 四级标题}
\schemabox{1.1.2.2 四级标题}
}
}
\Schema{-1.5ex}{5.5ex}
{
\schemabox{1.2 二级标题}
}
{
\schema
{
\schemabox{1.1.1 三级标题}
}
{
\schemabox{1.1.1.1 四级标题}
\schemabox{1.1.1.2 四级标题}
}
\schema
{
\schemabox{1.1.2 三级标题}
}
{
\schemabox{1.1.2.1 四级标题}\smallskip
\schemabox{\parbox{8em}{\linespread{1.1}\selectfont 文字文字文字文字文字文字文字文字文字文字文字文字}}
}
}
}
\end{document}
(OS.其实我感觉这个语法也并不优雅...不如forest...难用,不够自动化...)





















问 使用forest宏包排版树状结构图对于多行文本如何保持节点的对齐?