# Aligning gb4e examples with tikz-qtree

I would like to fit multiple tree structures onto one and the same page (preferably next to each other), while also numbering them with gb4e so I can refer to them later on. Although this seems to work, I have a problem with the alignment of the gb4e numbers; for some reason they do not align properly.

I have included working code below, together with an example.

I have tried working with multicols, inserting different kinds of skips, hline, hfill, text with phantom, but nothing seems to work properly.

Any recommendation whatsoever would be really helpful!

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz-qtree,tikz-qtree-compat}
\usepackage{gb4e}

\begin{document}
\begin{figure}[htbp]
\begin{exe}
\begin{minipage}{0.32\linewidth}
\ex SVO
\resizebox{\linewidth}{!}{
\begin{tikzpicture}
\Tree
[.AgrSP \node(subj){Subj};
[.AgrS\1
[.AgrSº \node{AgrSº};\node(verb){Vº}; ]
[.VP \node(subjtrace){$<$Subj$>$};
[.V\1 \node(verbtrace){$<$Vº$>$}; ]]]]]
\end{tikzpicture}}
\end{minipage}
\begin{minipage}{0.32\linewidth}
\ex VSO
\resizebox{\linewidth}{!}{
\begin{tikzpicture}
\Tree
[.CP
[.Cº
[.Cº ]
[.AgrSº \node(agrs){AgrSº};\node(verb){Vº}; ]]
[.AgrSP \node(subj){Subj};
[.AgrS\1 \node(agrstrace){$<$AgrSº$>$};
[.VP \node(subjtrace){$<$Subj$>$};
[.V\1 \node(verbtrace){$<$Vº$>$}; ]]]]]
\end{tikzpicture}}
\end{minipage}
\begin{minipage}{0.32\linewidth}
\ex CSOV
\resizebox{\linewidth}{!}{
\begin{tikzpicture}
\Tree
[.CP
[.Cº \node{Cº};\node{AgrSº}; ]
[.AgrSP \node{Subj};
[.AgrS\1 \node{<AgrSº>};
[.VP \node{<Subj>};
[.V\1 \node{Vº}; ]]]]]
\end{tikzpicture}}
\end{minipage}
\end{exe}
\end{figure}
\end{document}


Okay, so I solved it by using multicols together with something I found over here on centering trees with the help \hfil and on using [baseline] to keep the example numbers above the trees. This made my trees go into the margins, so I provided a \newline after each \ex and that seemed to solve that issue. I'm sure, however, that this is very rough-and-ready and that there are probably way better ways to solve this, so feel free to comment!

Updated code:

\begin{exe}
\begin{multicols}{3}
\ex SVO
\newline
\hfil
\resizebox{\linewidth}{!}{
\begin{tikzpicture}[baseline]
\Tree
[.AgrSP \node(subj){Subj};
[.AgrS\1
[.AgrSº \node{AgrSº};\node(verb){Vº}; ]
[.VP \node(subjtrace){$<$Subj$>$};
[.V\1 \node(verbtrace){$<$Vº$>$}; ]
]
]
]
\end{tikzpicture}\hfil}
\columnbreak
\ex VSO
\newline
\hfil
\resizebox{\linewidth}{!}{
\begin{tikzpicture}[baseline]
\Tree
[.CP
[.Cº
[.Cº ]
[.AgrSº \node(agrs){AgrSº};\node(verb){Vº}; ]
]
[.AgrSP \node(subj){Subj};
[.AgrS\1 \node(agrstrace){$<$AgrSº$>$};
[.VP \node(subjtrace){$<$Subj$>$};
[.V\1 \node(verbtrace){$<$Vº$>$}; ]
]
]
]
]
\end{tikzpicture}
\hfil}
\columnbreak
\ex CSOV
\newline
\hfil
\resizebox{\linewidth}{!}{
\begin{tikzpicture}[baseline]
\Tree
[.CP
[.Cº \node{Cº};\node{AgrSº}; ]
[.AgrSP \node{Subj};
[.AgrS\1 \node{<AgrSº>};
[.VP \node{<Subj>};
[.V\1 \node{Vº}; ]
]
]
]
]
\end{tikzpicture}
\hfil}
\end{multicols}
\end{exe}