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

한 가지 옵션은 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

draw 명령에서 out 값을 조작하여 대부분의 공백을 제거할 수 있었습니다. -90에서 -180으로 변경하여 원하는 간격을 얻었습니다.

관련 정보