Is it possible to create a pdflatex document which

  • contains several pages with tables (one table per page)
  • and the page width for all pages of the pdf file is cropped to the width of the largest content (same for the height)?

I hope I was clear enough: e. g. the table on page 1 is 20 cm wide and 25 cm in height. All other pages contain tables of 19 cm width, but the table of page 10 has a height of 26 cm. So I'd like to be the page format of the whole document: 20 cm wide and 26 cm in height and all tables should be aligned in the top left corner of this page size )

  • Sounds for a job for preview together with some manual measuring which result is written to the .aux file. – Martin Scharrer Jul 2 '11 at 21:26
  • @Martin Scharrer: what does "preview" mean in this context? Is this a LaTeXpackage or a command line tool or do you mean the PDF viewer application in MacOS X? – MostlyHarmless Jul 2 '11 at 21:33

Prepare a file such as











The file tables.tex will contain your tables as

abc & def & ghi

pippo & pluto & paperino va al mare e fa il bagno dieci volte

The idea is to compile the file twice; the first time we gather the sizes, the second time we print the tables. Some more work is required if you need also captions.

| improve this answer | |

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.