tikz-qtree ツリーの下の空白を減らす

tikz-qtree ツリーの下の空白を減らす

私は論文に構文ツリーを含めています。各ツリーの下には膨大な量の空白があり、大学の編集部は悲鳴を上げ、怒鳴り、嘆き、そして最終的に、私がそれを修正するまで私の論文を拒否することになるでしょう。ツリーの下の余分な空白を削除するにはどうすればよいでしょうか?

MWE:

\documentclass{article}
\usepackage{tikz-qtree,tikz-qtree-compat}
\usepackage{gb4e}
\tikzset{every tree node/.style={align=center, anchor=north}}
\begin{document}
The relevant structure in \ref{tree:opt-marker-verb-move} shows the necessary movement for the verb to precede the suffix. XP refers to some unknown structure to which the verb is drawn.

\begin{exe}
\ex
\leavevmode\vadjust{\vspace{-\baselineskip}}\newline %this command makes the example number line up with the top of the tree, rather than the bottom
\begin{tikzpicture}
\tikzset{every tree node/.style={align=center,anchor=north}}
\Tree [.XP \node(XP){}; 
[.\textsc{FocusP} =em 
[.TP
[.vP {} 
[.VP {} 
[.V \node(VERB){puv}; ] 
] ] ] ] ]
\draw[->] (VERB) [in=-90,out=-90,looseness=1.5] to (XP);
\end{tikzpicture}\label{tree:opt-marker-verb-move}
\end{exe}

It is difficult to justify this verbal movement. First, we would have to identify a higher structure in a suitable relationship with the verb to motivate verbal movement. Then we would have to identify features to check that exist on both the new structure and the verb.
\end{document}

答え1

1 つのオプションは、曲線パスの境界ボックスを中断するために を使用することですpgfinterruptboundingbox。その場合、手動でいくらかの間隔を追加する必要があります (または、手動介入を回避するには以下を参照してください)。

\documentclass{article}
\usepackage{tikz-qtree,tikz-qtree-compat}
\usepackage{gb4e}
\tikzset{every tree node/.style={align=center, anchor=north}}
\begin{document}
The relevant structure in \ref{tree:opt-marker-verb-move} shows the necessary movement for the verb to precede the suffix. XP refers to some unknown structure to which the verb is drawn.


\begin{exe}
\ex
\leavevmode\vadjust{\vspace{-\baselineskip}}\newline %this command makes the example number line up with the top of the tree, rather than the bottom
\begin{tikzpicture}
\tikzset{every tree node/.style={align=center,anchor=north}}
\Tree [.XP \node(XP){}; 
[.\textsc{FocusP} =em 
[.TP
[.vP {} 
[.VP {} 
[.V \node(VERB){puv}; ] 
] ] ] ] ]
\begin{pgfinterruptboundingbox}
\draw[->] (VERB) [in=-90,out=-90,looseness=1.5] to (XP);
\end{pgfinterruptboundingbox}
\end{tikzpicture}\vspace{30pt}
\label{tree:opt-marker-verb-move}
\end{exe}

It is difficult to justify this verbal movement. First, we would have to identify a higher structure in a suitable relationship with the verb to motivate verbal movement. Then we would have to identify features to check that exist on both the new structure and the verb.

\end{document}

ここに画像の説明を入力してください

手動で間隔を追加する手間を省くには、境界ボックスが中断された後、最も低いノードの下に適切なもの (たとえば、空のノード) を配置するだけです。

\documentclass{article}
\usepackage{tikz-qtree,tikz-qtree-compat}
\usetikzlibrary{positioning}
\usepackage{gb4e}
\tikzset{every tree node/.style={align=center, anchor=north}}
\begin{document}
The relevant structure in \ref{tree:opt-marker-verb-move} shows the necessary movement for the verb to precede the suffix. XP refers to some unknown structure to which the verb is drawn.


\begin{exe}
\ex
\leavevmode\vadjust{\vspace{-\baselineskip}}\newline %this command makes the example number line up with the top of the tree, rather than the bottom
\begin{tikzpicture}
\tikzset{every tree node/.style={align=center,anchor=north}}
\Tree [.XP \node(XP){}; 
[.\textsc{FocusP} =em 
[.TP
[.vP {} 
[.VP {} 
[.V \node(VERB){puv}; ] 
] ] ] ] ]
\begin{pgfinterruptboundingbox}
\draw[->] (VERB) [in=-90,out=-90,looseness=1.5] to (XP);
\end{pgfinterruptboundingbox}
\node[below=of VERB] {};
\end{tikzpicture}
\label{tree:opt-marker-verb-move}
\end{exe}

It is difficult to justify this verbal movement. First, we would have to identify a higher structure in a suitable relationship with the verb to motivate verbal movement. Then we would have to identify features to check that exist on both the new structure and the verb.

\end{document}

答え2

\useasboundingboxコマンドの前にを使用すると\draw、境界ボックスに影響を与えないようにすることができます。矢印用に下に余分なスペースを追加する必要があるため、[yshift=-1.2cm](試行錯誤で発見) となります。

\documentclass{article}
\usepackage{tikz-qtree,tikz-qtree-compat}
\usepackage{gb4e}
\tikzset{every tree node/.style={align=center, anchor=north}}
\begin{document}
The relevant structure in \ref{tree:opt-marker-verb-move} shows the necessary movement for the verb to precede the suffix. XP refers to some unknown structure to which the verb is drawn.

\begin{exe}
\ex
\leavevmode\vadjust{\vspace{-\baselineskip}}\newline %this command makes the example number line up with the top of the tree, rather than the bottom
\begin{tikzpicture}
\tikzset{every tree node/.style={align=center,anchor=north}}
\Tree [.XP \node(XP){}; 
[.\textsc{FocusP} =em 
[.TP
[.vP {} 
[.VP {} 
[.V \node(VERB){puv}; ] 
] ] ] ] ]
\useasboundingbox (current bounding box.north west) rectangle ([yshift=-1.2cm]current bounding box.south east);

\draw[->] (VERB) [in=-90,out=-90,looseness=1.5] to (XP);
\end{tikzpicture}\label{tree:opt-marker-verb-move}
\end{exe}

It is difficult to justify this verbal movement. First, we would have to identify a higher structure in a suitable relationship with the verb to motivate verbal movement. Then we would have to identify features to check that exist on both the new structure and the verb.
\end{document}

ここに画像の説明を入力してください

答え3

描画コマンドの out 値をいじることで、空白のほとんどをなくすことができました。値を -90 から -180 に変更し、目的の間隔を実現しました。

関連情報