使用以下代码:
\documentclass{article}
\usepackage{tikz}
\usepackage{tikz-qtree}
\usepackage{forest}
\begin{document}
\begin{figure}[ht]
\centering
\begin{adjustbox}{width=1\textwidth}
\begin{forest}
for tree={
font=\normalfont,
minimum height=0.8cm,
l sep+=15pt,
inner sep=2pt,
draw=none,
fill=none,
edge={draw=black, line width=0.5pt},
anchor=north,
child anchor=north,
parent anchor=south,
align=center,
edge path={
\noexpand\path[\forestoption{edge}]
(!u.parent anchor) -- +(0,-8pt) -| (.child anchor)\forestoption{edge label};
},
}
[\textsc{central-semitic}
[\textsc{arabic}
[Classical\\ /r/]
[Levantine\\ /r/ /r\textsuperscript{ʕ}/]
[Egyptian\\ /r/ /r\textsuperscript{ʕ}/]
]
[\textsc{northwest-semitic}
[\textsc{aramaic}
[Biblical\\ /ɾ/]
[Targumic\\ /ɾ/]
[Syriac\\ /ɾ/]
[{Jewish Babylonian}\\ /ɾ/]
[\textsc{nena}\\ /ɾ/ /r/ /r\textsuperscript{ʕ}/ /ɻ/]
[Neo-Mandaic\\ /r/ /ɹ/]
[\d{T}uroyo-Mla\d{h}so\\ /r/]
[\textsc{wna}\\ /r/]
]
[\textsc{canaanite}
[Phoenician\\ /r/]
[{Samaritan Hebrew}\\ /r/]
]
]
]
\end{forest}
\end{adjustbox}
\caption{Central-Semitic phylogeny with rhotics}
\label{fig:semitic_tree}
\end{figure}
\end{document}
我希望标有“阿拉伯语”的节点不要位于“亚拉姆语”分支上方,而是位于其左侧,并且其尖端与亚拉姆语和迦南语的尖端处于同一水平(基本上,树应该是超度量的)。我该如何实现?
答案1
您可以用值注释节点,tier
以强制它们在树中处于同一级别。在这里,我向节点和节点添加了tier=aramaic
(名称是任意的),以实现您想要的配置。(我还从序言中删除了它,因为它没有被使用,并添加了和 。)aramaic
arabic
tikz-qtree
adjustbox
libertine
\documentclass{article}
\usepackage{tikz}
\usepackage{forest}
\usepackage{adjustbox}
\usepackage{libertine}
\begin{document}
\begin{figure}[ht]
\centering
\begin{adjustbox}{width=1\textwidth}
\begin{forest}
for tree={
font=\normalfont,
minimum height=0.8cm,
l sep+=15pt,
inner sep=2pt,
draw=none,
fill=none,
edge={draw=black, line width=0.5pt},
anchor=north,
child anchor=north,
parent anchor=south,
align=center,
edge path={
\noexpand\path[\forestoption{edge}]
(!u.parent anchor) -- +(0,-8pt) -| (.child anchor)\forestoption{edge label};
},
}
[\textsc{central-semitic}
[\textsc{arabic},tier=aramaic
[Classical\\ /r/]
[Levantine\\ /r/ /r\textsuperscript{ʕ}/]
[Egyptian\\ /r/ /r\textsuperscript{ʕ}/]
]
[\textsc{northwest-semitic}
[\textsc{aramaic},tier=aramaic
[Biblical\\ /ɾ/]
[Targumic\\ /ɾ/]
[Syriac\\ /ɾ/]
[{Jewish Babylonian}\\ /ɾ/]
[\textsc{nena}\\ /ɾ/ /r/ /r\textsuperscript{ʕ}/ /ɻ/]
[Neo-Mandaic\\ /r/ /ɹ/]
[\d{T}uroyo-Mla\d{h}so\\ /r/]
[\textsc{wna}\\ /r/]
]
[\textsc{canaanite}
[Phoenician\\ /r/]
[{Samaritan Hebrew}\\ /r/]
]
]
]
\end{forest}
\end{adjustbox}
\caption{Central-Semitic phylogeny with rhotics}
\label{fig:semitic_tree}
\end{figure}
\end{document}