4

Aware that old versions of longtable had trouble starting tables halfway down a page I have downloaded the latest longtable.sty, and it's in the same directory as my document; but there is still page break (and an approximately 75% blank page) before my table, which is particularly frustrating since the table runs to just over three pages.


Two questions:

  • Can I be sure that putting longtable.sty in the same directory as my document it will be picked up when I \usepackage{longtable} (yes, it turns out this is okay)

  • Is there anything I can do to force the table to start as soon as possible?


EDIT: my latex --version is:

pdfTeX using libpoppler 3.141592-1.40.3-2.2 (Web2C 7.5.6)
kpathsea version 3.5.6
...
Compiled with libpng 1.2.26; using libpng 1.2.26
Compiled with zlib 1.2.3; using zlib 1.2.3
Compiled with xpdf version 3.01

Though I can't easily change this as I'm working on a managed system.


EDIT again:
I've uploaded a cut down version of the document that reproduces the problem at:
http://codepad.org/zbCQtRg8 (main file)
http://codepad.org/Xv8lRABi (included file with longtable)

James
  • 24,676
  • 13
  • 84
  • 130
  • look at your log, make sure latex is loading the longtable.sty from your folder, and not from your tex distribution. what tex distribution are you using? – Mica Feb 16 '10 at 23:35
  • @Mica Ah, yes; the message when longtable is loaded is the same as the one in my directory, (and importantly includes +fix for tools/2796, which was the page break bug, I think) - so what else could be the problem? :S (I've added my latex --version to the question) – James Feb 17 '10 at 00:12
  • can you post your actual latex code? your version of pdftex looks pretty recent, i'm sure that's not the problem. Are you using texlive? have you tried updating with tlmgr? Generally speaking the only environment you should be using with longtable is the `center` environment, it won't work well if you're using a `figure` or `table` environment. But the actual latex code would help a lot! – Mica Feb 17 '10 at 16:20
  • I've added code that reproduces the problem. – James Feb 17 '10 at 22:14

1 Answers1

1

Change your \include{test-data} to \input{test-data} and the table appears right under the section header.

the \include{} command is equivalent to \clearpage \input{file} \clearpage which is why your table didn't start until the next page.

the \input{} command just inserts the content of the file, with no extra non-sense.

Mica
  • 18,501
  • 6
  • 46
  • 43