Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
    
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
add comment

1 Answer

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}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.