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

redrubia
  • 269

1 Answers1

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}
redrubia
  • 269