
ツリー内のすべての単語をベース レベルで揃えるために宣言を指定しましたwhere
。私の本には、このデフォルトに適合しないツリーが 1 つ含まれている可能性があります。Specifier と Adjunct がベースラインに押し下げられないように、デフォルトを削除するにはどうすればよいでしょうか。
\documentclass{minimal}
\usepackage{forest}
\forestset{
sn edges/.style={for tree={parent anchor=south, child anchor=north,align=center,base=bottom,where n children=0{tier=word}{}}},
background tree/.style={for tree={text opacity=0.2,draw opacity=0.2,edge={draw opacity=0.2}}}
}
\begin{document}
\begin{forest}
sn edges
[XP
[Specifier]
[X'
[Adjunct]
[X'
[Complement] [X] ] ] ]
\end{forest}
\end{document}
答え1
ローカルで を空に設定できますtier
。
\documentclass{article}
\usepackage{forest}
\forestset{
sn edges/.style={for tree={parent anchor=south, child anchor=north,align=center,base=bottom,where n children=0{tier=word}{}}},
background tree/.style={for tree={text opacity=0.2,draw opacity=0.2,edge={draw opacity=0.2}}}
}
\begin{document}
\begin{forest}
sn edges,
where n children=0{tier=}{}
[X
[Specifier]
[X'
[Adjunct]
[X'
[Complement] [X] ] ] ]
\end{forest}
\end{document}