TeX - LaTeX Asked on July 28, 2021
My desired out is:
I’ve tried as:
documentclass{book}
usepackage{tikz,tikz-qtree, tikz-qtree-compat}
usepackage{gb4e}%
begin{document}
begin{exe}
ex begin{tabular}[t]{l}%toprule%[-12pt]
begin{tikzpicture}label{bicycletree}
%tikzset{level distance = 25pt}
Tree[.DP [.D [.D ] [.Agr$^D$ $[+$m$+$h$+$pl$]$ ] ] [.NumP [.Num [.n$_j$ [.node(id3){$v_i$}; node(id2){$surd$BOY}; ] [.n $+m,+h$ ] ] [.Num $[+]$pl ] ] [.nP [.n$_j$ ] [.node(id1){v$_i$}; ] ] ] ]
draw[semithick,<->] (id2)..controls +(south west:5) and +(south:5)..(id1);
end{tikzpicture}
%vspace{-38pt}
end{tabular}
end{exe}
end{document}
Output
How can I meet the output as in first image? Please suggest….
The reason for the space is the position of the control points, +(south west:5) and +(south:5)
. Move them up, by reducing the distance in those polar coordinates, e.g. +(south west:2.5) and +(south:3)
.
One way of adding the additional arrow is to add a coordinate along the first arrow, and draw the second arrow from that. I used just trial and error to find an appropriate value for pos
.
Finally, for the vertical alignment, add baseline
to the options of the tikzpicture
.
documentclass{book}
usepackage{tikz,tikz-qtree, tikz-qtree-compat}
usepackage{gb4e}%
begin{document}
begin{exe}
ex begin{tabular}[t]{l}%toprule%[-12pt]
begin{tikzpicture}[baseline]
label{bicycletree}
%tikzset{level distance = 25pt}
Tree[.DP [.D [.D ] [.Agr$^D$ $[+$m$+$h$+$pl$]$ ] ] [.NumP [.Num [.n$_j$ [.node(id3){$v_i$}; node(id2){$surd$BOY}; ] [.n $+m,+h$ ] ] [.Num $[+]$pl ] ] [.nP [.n$_j$ ] [.node(id1){v$_i$}; ] ] ] ]
draw[semithick,<->] (id2)..controls +(south west:2.5) and +(south:3)..(id1) coordinate [pos=0.17] (tmp);
draw [->, semithick] ([xshift=-pgflinewidth]tmp) to[bend left=40] (id3);
end{tikzpicture}
%vspace{-38pt}
end{tabular}
end{exe}
end{document}
Correct answer by Torbjørn T. on July 28, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP