4

The longtable manual says:

By default longtable uses 20 rows per chunk, but this can be set by the user, with e.g., \setcounter{LTchunksize}{10}. These chunks do not affect page breaking, thus if you are using a TeX with a lot of memory, you can set LTchunksize to be several pages of the table. TeX will run faster with a large LTchunksize.

I understand that concerns about memory are considered less relevant nowadays than they were in olden times, when one might have needed to find a wizard to raise one's memory limits. Would any of the wizards here have insights on what a reasonable value would be for LTchunksize for modern pdfLaTeX configured in a default TeX Live manner, or on how to choose such a reasonable value if the answer depends on the individual document?

(This doesn't seem to have been asked before, as far as I see.)

5

It's been 20 forever, longtable 4.14 (about to appear) sets it to 200. tabu set it to 2000 or 10000 if tabularx style X columns are used. There are multiple issues reported with tabu but I never saw anyone say they ran out of memory as chunksize is too large. Basically you can set it to \maxdimen and if you have a 1000000 line table and run out, reduce it.

The reason I made a conservative increase just to 200 is to avoid breaking existing documents. If you just have text you can probably set it to several thousand without issues, but some people will have documents with tables including tikz pictures, pgfplots and the like and relying on the setting of 20 to clear these from memory every page or so. If you make chunksize very large then all the tikz pictures in the entire table have to be held in memory and that is a lot of nodes and you may run out.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.