# How to scale a dirtree inside a figure?

I drew a tree structure with \dirtree. This tree is located in a {figure} environment. It is possible to adjust the size of the figure?

With \includegraphics one can do it with scale. Is there a similar attribute for figure?

My code looks like this (MWE):

\documentclass{article}
\usepackage{dirtree}
\begin{document}

\begin{figure}[H]
\label{fig:directory}
\fbox{%
\parbox{\textwidth}{%
\begin{center}
\begin{minipage}[t]{0.3\linewidth}
CSS3
\dirtree{%
.1 html.
.3 title.
.3 meta.
.3 style.
.2 body.
.3 div (square).
.4 div (card).
}
\end{minipage}
%
\begin{minipage}[t]{0.3\linewidth}
SVG
\dirtree{%
.1 html.
.3 title.
.3 meta.
.3 style.
.2 body.
.3 svg.
.4 image.
.5 animateTransform.
}
\end{minipage}
%
\begin{minipage}[t]{0.3\linewidth}
Canvas
\dirtree{%
.1 html.
.3 title.
.3 meta.
.2 body.
.3 canvas.
.4 script.
}
\end{minipage}
\end{center}
}%
}
\end{figure}

\end{document}


Screenshot:

-
There is \resizebox and \scalebox. –  Harish Kumar Mar 3 at 1:22
Take a look at the adjustbox package, which provides a nice key=value interface to all box-related LaTeX commands. With a single adjustbox environment, you could rplace the fbox, parbox and scale/resize the content. –  Daniel Mar 3 at 8:15
dirtree is just text, so you could use \scalebox and friends but it's usually better with text just to select a smaller fontsize as that gives more regular output. so \footnotesize or \small or whatever. –  David Carlisle Mar 3 at 11:51
@DavidCarlisle Perhaps write that up as an answer? –  Joseph Wright Aug 9 at 19:57