There are already several threads that deal with this: they suggest having one figure and putting putting minipages inside, or using the subcaption
package and having subfigure
environments. However, I've tried both of these approaches and I'm still going wrong:
\begin{figure}[h]
\begin{minipage}[b]{0.2\linewidth}
\begin{tikzpicture}[sibling distance=0pt]
\Tree [.TP
[.DP \edge[roof]; {a 'we'} ]
[.T$'$
[.T \node(li){li 'eat$_i$'}; ]
[.VP
[.Spec t ]
[.V$'$
[.DP \edge[roof]; {saka 'rice'} ]
[.V \node(t){t$_i$}; ] ] ] ] ]
\draw [->] (t) .. controls +(south:3) and +(south:3) .. (li);
\end{tikzpicture}
\end{minipage}\hfill
\begin{minipage}[b]{0.2\linewidth}
\begin{tikzpicture}[sibling distance=0pt]
\Tree [.TP
[.DP \edge[roof]; {a 'we'} ]
[.T$'$
[.T \node(li){la 'have'}; ]
[.VP
[.Spec t ]
[.V$'$
[.DP \edge[roof]; {saka 'rice'} ]
[.V \node(t){li 'eaten'}; ] ] ] ] ]
\draw [red,->] (t) .. controls +(south:3) and +(south:3) .. (li);
\end{tikzpicture}
\end{minipage}
\end{figure}
Best Answer
Do not leave blank lines between the two objects; a blank line is just
\par
, so the second object starts a new paragraph:Notice that I increased the width for the
minipage
s and scaled down the trees so they fit side by side without producing overfull\hbox
es.The powerful
forest
package could be of interest for you; it's very versatile for building trees.