# Comment in a box and reference abilities

I am aware in Latex you can box text, which is what I need to do. However can you also label this box for reference, and similarly give it a caption, like you would for a photo?

An example of boxing is here, but it does not include referencing and labelling abilities How to put a framed box around text + math enviroment

Thanks

-
Put the box inside of a figure environment. This will give you both the ability to have a label and a caption. –  R. Schumacher Sep 6 '12 at 19:01
ooh simple solution! Thanks will do asap –  redrubia Sep 6 '12 at 19:05

I figured out how to do this, using minipages as well as nesting within a figure environment to allow captions for the text itself. The following text has two mini pages, one for text and the other for an image. This places commentary alongside the image selected.

 \begin{figure}[h]
\fbox{ \begin{minipage}{0.45\textwidth}
Testing text
\end{minipage}
}
\begin{minipage}{0.45\textwidth}
\includegraphics[scale = 0.2]{images/40.jpg}
\end{minipage}
\caption{Example Output}
\label{fig:comment}
\end{figure}

-