I'm working on a mathematical problem (too much detail will be a spoiler) which involves getting data via a third-party program (there's a complicated algorithm involved that I do not understand, but the guy who wrote the program did).
The program produced data in the form of a LaTeX table (ampersand delimited) with, among other things, extremely many columns (it started at more than 30, and went up from there).

I have already searched on various ways of fitting the result into a page (landscape orientation, small font, shrinking the whole thing, etc). They worked well enough in the simple cases (up to around 150 columns).
However, I've encountered a bigger problem.

My latest table is about 300 columns wide (301 or 302, I think), but when I put it in my MiKTeX (and add the header, and shrink, and landscape-orient, etc) I can only see the data in the last several dozen columns. Most of the rest is empty.
The number of surviving columns is close to 300-256, so I suppose it could be a byte overflow. No idea what it is really.

As such: is there any reasonable way (package, environment, ...) to make the table work so that all the 300 columns are visible? (Assuming that if the text is there, however small, it counts as visible; since it's a vector format, I can always just crank up the PDF magnification.) If yes, would it mesh well with the usual shrinking methods (shrinking the table object, in particular)?

Bonus: is there a (reasonably easy) way to make the document sheet itself large enough to fit the table? I'd rather not need too much magnification, because on some models of PDF viewers, it only goes up so far (in some cases, IIRC, as low as 8x).

  • 4
    How is anyone meant to read this? It sounds like a data dump which is not meant for human consumption (and thus not for typesetting).
    – Joseph Wright
    Jan 25, 2016 at 16:44
  • 1
    just \resizebox{\textwidth}{!}{\begin{tabular}.... will scale it arbitrarily to fit the specified text width or you can split up the table and print so many columns per page, for which there are answers on site Jan 25, 2016 at 16:44
  • 1
    If your cells contain something, at least half a centimeter must be allocated (probably more); for 300 columns, this makes for 150 cm, that is, very wide sheets are needed.
    – egreg
    Jan 25, 2016 at 16:46
  • 2
    If you are not limited to a phhysical page size, package geometry will allow you to easily define a page of 150cm by 50cm (or whatever values are needed).
    – Johannes_B
    Jan 25, 2016 at 16:54
  • 2

2 Answers 2


Not an answer to the question asked, but maybe helpful and too long for a comment.

Excel can be told to read an ampersand delimited file. Perhaps browsing the data there (scrolling, hiding columns) will be useful. You can save (parts of the file) as a pdf from Excel

And Excel is likely to be the right place to "do something to that data later".


It looks like you are hitting some hard coded limit or stack limit. This cannot be a problem with space because in principle you can use a larger page or \scalebox{0.1}{...}.

Two possible ways to overcome this:

1) Try using lualatex, which has higher memory limits.

2) Divide the table into 4 (2x2) smaller tables and put them together (vertical and horizontal spacing can be adjusted to have a smooth join).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .