I'd like to create a multicolumn table (up to 8 columns) to insert my code via \lstinputlisting{source.c}. But it seems to me that more then 6 columns aren't possibile even tough space is available. How can I get my 8 columns table?

My minimal example is:






But I get this error message:

! Dimension too large. \set@mult@vsize ...dima \vsize \col@number \vsize \advance \vsize -\@tempdim... l.47 \lstinputlisting

  • 1
    Welcome to TeX-SX! You may have a look at our starter page for a quick intro if you wish to familiarize yourself with our format. Commented May 8, 2013 at 9:26

1 Answer 1


multicols collects all the columns together in one vertical internal columns so that it can balance the column breaking. 8 times the height of A0 is too big for TeX.

Your example runs if you change a0 to a2 (or smaller) so one possibility is to set the poster for that size and then scale the pdf afterwards.

Alternatively if the multicols is only for listing a different technique could be used. There is typically no vertical flexibility in a listing anyway so you could just break after every n lines without having to collect the whole page first.

enter image description here

The above is an 8 column listing of a 3613 line file of the first 3613 integers one per line, set on a2paper. You just need to scale to a0 while printing (ie double its size)




  • Splitting the call into something like \lstinputlistings[lastline=500]{source.c} and \lstinputlistings[firstline=501]{source.c} (at the expense of speed) might work.
    – egreg
    Commented May 8, 2013 at 10:34
  • I tried to compile it with lualatex --shell-escape latex.tex in order to avoid tex memory issues, but I cannot get more then 5 columns now on a0paper. I think now it's an issue between the count of columns and the paper size (which it wasn't in the before with a2paper and 9 columns). I have 3613 lines of code which I'd like to print out as poster.
    – Til Hund
    Commented May 8, 2013 at 12:48
  • @TilHund It's not a memory issue it's the size of the datatype 8 * height of a0 is bigger than \maximen so multicolumn can not do any arithmetic on these values. Is there a problem with using a4paper (and a very small font) and then just printing that scaled to A0? Commented May 8, 2013 at 13:23
  • I'd like to print out all 3613 lines of code as poster. I think it's not possibile to create a couple of a4paper in order to print them all together as a0/a1paper!?
    – Til Hund
    Commented May 8, 2013 at 13:48
  • @TilHund No I mean print it all on a single a4 with small fonts (or a2 if you prefer) any mechanism that can print A4 at all can scale a4 to a0 at the printing stage Commented May 8, 2013 at 13:49

You must log in to answer this question.

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