我想让屋顶(三角形)比附近的树枝短。有什么办法吗?谢谢。
\documentclass{article}
\usepackage{tikz-qtree}
\usepackage{tikz-qtree-compat}
\begin{document}
\begin{tikzpicture}[level distance=50]
\Tree [.S [.NP\1 [.Det the ] [.N cat ] ]
[.VP [.V sat ]
[.PP [.P \edge[roof]; {on} ]
[.NP [.Det the ] [.N mat ] ] ] ] ]
\end{tikzpicture}
\end{document}
答案1
这有帮助吗?
\documentclass{article}
\usepackage{tikz-qtree}
\usepackage{tikz-qtree-compat}
\begin{document}
\begin{tikzpicture}[level distance=50]
\Tree [.S [.NP\1 [.Det the ] [.N cat ] ]
[.VP [.V sat ]
[.PP [.P \edge[roof]; \node[yshift=2em]{on}; ]
[.NP [.Det the ] [.N mat ] ] ] ] ];
\end{tikzpicture}
\end{document}