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.

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 currently creating a figure which is filled by longtable inside, why I do this is because I need the caption to be figure, while on the other hand, I need the table environment.

The thing is, the reason I use longtable is I will create a big table, but putting it inside a figure has made it unseparated. Is there a way to do this actually?

So what I already have are: 1.

% Long content

This is ok, but I dont have the Figure caption (if it's possible to put this caption somewhere, maybe this will be an easier solution)


  % Long content

With this, I will have the caption, but the table will always be in a page (they don't want to be separated).

share|improve this question
See also Label and caption without float. – Martin Scharrer May 12 '11 at 22:41
up vote 6 down vote accepted

Do not use a float for longtable, but rather the capt-of or caption package and then \captionof{figure}{...} to create the Figure caption. Because longtable does increment the table counter by one you need to reduce it again to ensure proper numbering for following tables.




% Document
      a \\
  % Long content
  \captionof{figure}{Caption text}%

share|improve this answer
I think you also have to substract 1 from the table counter. I think longtable advances it automatically but I am not a 100% sure. – Martin H May 12 '11 at 22:29
@MartinH: Thanks. Yes, this is the case. I added it to my answer. – Martin Scharrer May 12 '11 at 22:34

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.