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 have the following longtable :

    some text

    \includegraphics[width=10cm,keepaspectratio]{\basedir some.png} 

    some text\\

Is there a way to insert a caption and a label to a graphic inside a longtable?


How can I insert a figure into a longtable cell?

I have been searching for a while but couldn't find any solution. Thanks in advance.

share|improve this question
Please note that graphicx offers the \graphicspath macro, which does what you try with \basedir ;-) Furthermore always provide minimal working examples (MWE) illustration your problem – you may use the demo option of graphicx since no other have your image files. There’s also the mwe package, that comes with some example images … – Tobi Dec 7 '12 at 12:12
up vote 5 down vote accepted



Then you can use

\figcaption{my caption}

where you have some text

share|improve this answer
That's what I was looking for, it really helped. Thank you so much... – Alper Dec 7 '12 at 12:12

David's wise answer guided me to the solution. I am just improving his answer but I lack reputation points to add a comment.

First, it works also for longtabu.

Second, we can also add a table caption with:


Then use:

\tabcaption{my caption}

Third, I strongly believe that one has to use p{} columns to get it working. In longtabu, I was using X[] columns and it didn't work.

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.