次のような画像を設定します。
次のforest
コードでほぼ実現できます。
\documentclass{article}
\usepackage{forest}
\begin{document}
\begin{forest}
for tree={fit=band,parent anchor=south,child anchor=north}
[ForceP
[]
[Force$'$
[Force$^0$]
[TopP
[]
[Top$'$
[Top$^0$]
[FocP
[]
[Foc$'$
[Foc$^0$]
[TopP
[]
[Top$'$
[Top$^0$]
[FinP
[]
[Fin$'$
[Fin$^0$]
[IP/AgrSP]]]]]]]]]]]
\end{forest}
\end{document}
ただし、左に向かう円弧は直角ではありません。
さて、質問は、\strut
すべての s に sを追加する必要があるのか、それともs が右側の姉妹品と同じ高さであるempty node
ことを示すより適切な方法があるかということです。empty node
答え1
sn edges
ツリーにスタイルも追加すると、より見栄えが良くなる別の方法があります。を にnice empty nodes
設定するというトリックを使用するのではなく、空のノードにファントム コンテンツ ( のみ) を作成し、ツリー内のすべてのノードに標準のテキストの高さを使用して位置合わせを維持します。shape
coordinate
X
\documentclass[tikz,border=5pt]{standalone}
\usepackage{forest,calc}
\begin{document}
\newlength\mytextheight
\settototalheight{\mytextheight}{XpX$^0$X$'$}
\begin{forest}
delay={
where content={}{
content={\phantom{X}}
}{},
},
for tree={
text height=\mytextheight,
fit=band,
parent anchor=south,
child anchor=north,
}
[ForceP
[]
[Force$'$
[Force$^0$]
[TopP
[]
[Top$'$
[Top$^0$]
[FocP
[]
[Foc$'$
[Foc$^0$]
[TopP
[]
[Top$'$
[Top$^0$]
[FinP
[]
[Fin$'$
[Fin$^0$]
[IP/AgrSP]
]
]
]
]
]
]
]
]
]
]
\end{forest}
\end{document}
答え2
nice empty nodes
マニュアルの 52 ページのようにスタイルを定義できますforest
。
\documentclass{article}
\usepackage{forest}
\forestset{
nice empty nodes/.style={
for tree={calign=fixed edge angles},
delay={where content={}{for parent={for children={anchor=north}}}{}}
}}
\begin{document}
\begin{forest}
for tree={fit=band}
[ForceP, nice empty nodes
[]
[Force$'$
[Force$^0$]
[TopP
[]
[Top$'$
[Top$^0$]
[FocP
[]
[Foc$'$
[Foc$^0$]
[TopP
[]
[Top$'$
[Top$^0$]
[FinP
[]
[Fin$'$
[Fin$^0$]
[IP/AgrSP]]]]]]]]]]]
\end{forest}
\end{document}