I need to generate a latex table using data from a csv file. The table has only two columns with about 500 rows. I would like to make best use of the space and continue the table on the same page, before moving onto the next page. Any directions please?

Thanks, Sam

  • 5
    Maybe print on a roll of papyrus :o) You won't be limited. Seriously, how do you want a single sheet of paper to contain 500 lines? – Bernard Jun 7 '16 at 12:28
  • Question is not so clear. Do you want directions on how to make a basic table? use csv for your table? Or just to make an extra, extra long page for your table to be placed? If you have made any concrete attempts thus far, please share your code in your answer using the code block tools to highlight them in gray. No judgment here as to why you might want to do this ;) – A Feldman Jun 7 '16 at 17:22

There are examples of how to split a long narrow table into two (Automatic way to break narrow tables into two columns?), but I don't know if that would work so well in your case.

Depending on exactly what you need in terms of layout, you could possibly use a simple itemize list in a multicols environment, in combination with e.g. datatool.

For example:

\DTLforeach{data}{\a=a,\b=b}{\item[\a]\quad \b}

where 500.txt goes like


and so on for 500 lines.

enter image description here

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.