我正在使用森林环境绘制系统/树。这是我正在绘制的树。树中有五个括号。但是,我想将第一个方括号(包含 AGÊNCIA 和 TIPO DE PROCESSO 的方括号)变成花括号。可以吗?如何做?
\documentclass{article}
\usepackage{forest}
\begin{document}
\begin{forest}
for tree={
edge path={
\noexpand\path[\forestoption{edge}](!u.parent anchor) -- +(5pt,0) |- (.child anchor)\forestoption{edge label};},
grow=0,
reversed,
parent anchor=east,
child anchor=west,
anchor=west,
%if n children=0{tier=word}{}
}
[\textsc{oração}
[\textsc{agência}]
[\textsc{tipo de processo}
[material
[transformativo
[resultativo]
[não-resultativo]
]
[criativo]
]
[mental]
[relacional
[atributivo]
[identificador]
]
]
]
\end{forest}
\end{document}
答案1
像这样?
可能并不完美,但对我来说相当接近了 ;-)
\documentclass{article}
\usepackage[edges]{forest}
\begin{document}
\begin{forest}
for tree={
grow=0,
reversed,
parent anchor=east,
child anchor=west,
anchor=west,
if level=1{edge={rounded corners}}{},
edge path={
\noexpand\path[\forestoption{edge}](!u.parent anchor) -- +(5pt,0) |- (.child anchor)\forestoption{edge label};},
calign=edge midpoint,
}
[\textsc{oração}
[\textsc{agência},]
[\textsc{tipo de processo}
[material
[transformativo
[resultativo]
[não-resultativo]
]
[criativo]
]
[mental]
[relacional
[atributivo]
[identificador]
]
]
]
\end{forest}
\end{document}
附录: 或者您更喜欢使用书法支架?
\documentclass{article}
\usepackage[edges]{forest}
\usetikzlibrary{decorations.pathreplacing,%
calligraphy,% had to be after decorations.pathreplacing
}
\begin{document}
\begin{forest}
for tree={
grow=0,
reversed,
parent anchor=east,
child anchor=west,
anchor=west,
if level=1{no edge}{},
edge path={
\noexpand\path[\forestoption{edge}](!u.parent anchor) -- +(5pt,0) |- (.child anchor)\forestoption{edge label};},
s sep=4mm,
calign=edge midpoint,
%
/tikz/BC/.style = {decorate,
decoration={calligraphic brace, amplitude=2mm,
raise=#1},% for mirroring of brace
very thick,
pen colour=black},
}
[\textsc{oração}
[\textsc{agência}, name=A]
[\textsc{tipo de processo}, name=B
[material
[transformativo
[resultativo]
[não-resultativo]
]
[criativo]
]
[mental]
[relacional
[atributivo]
[identificador]
]
]
]
\draw[BC=1mm] (B.west) -- (A.west);
% \draw[BC=1mm] (B.south west) -- (A.north west);
\end{forest}
\end{document}