2

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 environment

Thanks

1
  • Put the box inside of a figure environment. This will give you both the ability to have a label and a caption. Sep 6, 2012 at 19:01

1 Answer 1

2

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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .