I can't create a MWE with this issue. Seems it's because of my whole document, as it works normally when I copy the table to a new file. I use these 2 rules:

  • For short (10 < rows) tables, I use normal tabular wrapped inside table, with [H] to keep it in place (I really don't know any other way; some suggest skipping table but then I have to use \\ to add some space).
  • For long tables, I use longtable.

I use booktabs on both.

This is the problematic longtable:

longtable is on the next page

This is the same table, but using tabular inside table without [H]. The table jumps to before/above the text We have the following table:

the same table inside tabular inside table without [H]

This is my current workaround, using tabular inside table with [H]. This is the intended output, though I have to use tabular, which is inconsistent with my above rule:

the same table inside tabular inside table with [H]

In all 3 cases above, there're 2 underfull warning on the \documentclass line.

In a comment to this answer about a seemingly similar problem, it is suggested that I use \raggedbottom, but the info about that command is sparse and I don't know where to start.

How can I fix this, and keep using longtable instead of the workaround?

  • I don't use tabular, and everything is ok. – Quaternion Oct 16 '20 at 12:49
  • 1
    Show the code not images. You cannot put a longtable inside a table it does not make sense as a float like table cannot contain page breaks – daleif Oct 16 '20 at 12:57
  • @daleif No I didn't. I only wrap tabular inside table, and I can't recreate a MWE. – Minh Nghĩa Oct 16 '20 at 13:00
  • 1
    That's why you should give more information about your code. Here we're just shooting in the dark – daleif Oct 16 '20 at 13:29
  • 2
    You can always create a MWE, although one showing the problem might be difficult.. I like to use \rule(1pt}{25\baselineskip} (for example) to start at a particular line. – John Kormylo Oct 16 '20 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.