TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


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

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.

\fbox{ \begin{minipage}{0.45\textwidth}
Testing text
 \includegraphics[scale = 0.2]{images/40.jpg} 
 \caption{Example Output}
share|improve this answer

Your Answer


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.