# One Diagram contain trees and caption

the situation is as follows: I have one diagram which contains six trees. I want to show the development of the trees. Within a empty line it is possible to adjust the trees paired (As we can see in the code). However at this point there is no caption for the particular tree. If I add the caption, the trees are ordered not pairwise they are ordered among each other.

What I want: I want to adjust the trees pairwise and add a caption to reference on it. "As we can see in at number one ..." The following code is one diagram which contain 6 trees but no caption.

...
\usepackage{qtree}
\usepackage{newfloat}
\begin{document}
\DeclareFloatingEnvironment[fileext=lod]{diagram}

\begin{diagram}[h]
\Tree[.- [.A ] ] %\caption{a}
\Tree[.- [.A ] ] %\caption{a}

\Tree[.- [.A ] [.B ]]  % \caption{e}
\Tree[.- [.A ] [.B ] ] % \caption{d2}\\

\Tree[.- [.A ] [.B ] [.C ] ] %\caption{d2}
\Tree[.- [.A ] [.B ] [.C ] ] %\caption{d2}

\caption{Development of the trees}
\end{diagram}

...
\end{document}


What I tried:

• Minimap containing the diagramm or more than one diagram, but it is not possible -> Keyword: floating environment

One option is to use the \subcaptionbox command from the subcaption package and a tabular to properly align the trees:

\documentclass {article}
\usepackage{qtree}
\usepackage{newfloat}
\usepackage{subcaption}

\DeclareFloatingEnvironment[fileext=lod]{diagram}

\begin{document}

\begin{diagram}[h]
\centering
\begin{tabular}{@{}cc@{}}
\subcaptionbox{First\label{dia:testa}}{\makebox[4cm][l]{\Tree[.- [.A ] ]]}}
& \subcaptionbox{Second\label{dia:testb}}{\makebox[4cm][l]{\Tree[.- [.A ] ]}} \\
\subcaptionbox{Third\label{dia:testc}}{\makebox[4cm][l]{\Tree[.- [.A ] [.B ]]}}
& \subcaptionbox{Fourth\label{dia:testd}}{\makebox[4cm][l]{\Tree[.- [.A ] [.B ] ]}} \\
\subcaptionbox{Fifth\label{dia:teste}}{\makebox[4cm][l]{\Tree[.- [.A ] [.B ] [.C ] ]}}
& \subcaptionbox{Sixth\label{dia:testf}}{\makebox[4cm][l]{\Tree[.- [.A ] [.B ] [.C ] ]}}
\end{tabular}
\caption{Development of the trees}
\end{diagram}

\end{document}


The result: