I've integrated dirtree package in my manuscript but having issues with the following.
- Framebox: I consistently frame all figures in my manuscript using
\framebox, however, applying this to dirtree output messes things up. How do I get past this? - Subfigure: I cannot seem to align 3 figures (Figure 2a, 2b & 2c) on the same horizontal line; I am basically trying to replicate this example. What am I doing wrong here?
Minimal Example
\documentclass[a4paper,10pt]{report}
\usepackage{dirtree}
\usepackage{caption}
\usepackage{subcaption}
\begin{document}
\begin{figure}
\centering
\framebox[\textwidth]{%
\dirtree{%
.1 \textbf{NDLTD}.
.2 \textbf{OCLC}.
.3 \vdots.
.3 x.xml.
.3 \vdots.
}
}
\caption{How do I frame dirtree-generated figures}
\label{fig:minimal-example:frame-dirtree}
\end{figure}
\begin{figure}
\centering
\begin{subfigure}[b]{0.1\textwidth}
\dirtree{%
.1 \textbf{NDLTD}.
.2 \textbf{OCLC}.
.3 \vdots.
.3 x.xml.
.3 \vdots.
}
\caption{dirtree1}
\label{fig:dirtree1}
\end{subfigure}
\begin{subfigure}[b]{0.1\textwidth}
\dirtree{%
.1 \textbf{NDLTD}.
.2 \textbf{OCLC}.
.3 \textbf{2010}.
.4 \vdots.
.4 x.xml.
.4 \vdots.
.3 \vdots.
}
\caption{dirtree2}
\label{fig:dirtree2}
\end{subfigure}
\begin{subfigure}[b]{0.1\textwidth}
\dirtree{%
.1 \textbf{NDLTD}.
.2 \textbf{OCLC}.
.3 \textbf{2010}.
.4 \textbf{z}.
.5 \vdots.
.5 x.xml.
.5 \vdots.
.3 \vdots.
}
\caption{dirtree3}
\label{fig:dirtree3}
\end{subfigure}
\caption{Combined dirtree structures}\label{fig:dirtrees}
\end{figure}
\end{document}


\centeringconfuses it, so it's best to typeset it in aminipage. – egreg Feb 18 at 10:31minipageenvironments --still no luck with placing them on one horizontal line. – phiri Feb 18 at 12:02subfigureenvironments. A width of 3cm seems good for the example. – egreg Feb 18 at 13:12