1

I am struggling in figuring out how to create a 6 column table that fits in my latex file. Note that I do not want to increase the width of the margins. I just want a simple table with 6 columns and 13 rows. I am very new to Latex, my apologies for possibly a trivial answer.

1

1 Answer 1

2

There's a lot of documentation about tables. This is a really good starting point.

\documentclass[11pt,a4paper]{article}
\begin{document}
  \begin{tabular}{c c c c c c}
 cell & cell & cell & cell & cell & cell \\
 cell & cell & cell & cell & cell & cell \\
 cell & cell & cell & cell & cell & cell \\
 cell & cell & cell & cell & cell & cell \\
 cell & cell & cell & cell & cell & cell \\
 cell & cell & cell & cell & cell & cell \\
 cell & cell & cell & cell & cell & cell \\
 cell & cell & cell & cell & cell & cell \\
 cell & cell & cell & cell & cell & cell \\
 cell & cell & cell & cell & cell & cell \\
 cell & cell & cell & cell & cell & cell \\
 cell & cell & cell & cell & cell & cell \\
 cell & cell & cell & cell & cell & cell
  \end{tabular}
\end{document}

I you need a caption, place the tabular environment in a table environment.

6
  • You shouldn't use the last \\ unless you add a horizontal line.
    – Bernard
    Jun 27, 2016 at 19:11
  • You're right. That was a quick copy-paste. Fixed now Jun 27, 2016 at 19:14
  • @JefferyShivers This is exactly what I want however I think due to the slightly longer numbers in each row, the last column has a thick vertical line from the first row to the last row. I think it's because the table is slightly larger then the margin? Jun 27, 2016 at 21:03
  • @Teodorico I can't look into that without a MWE. There are many ways of reformatting a table, and I am happy to help you. If it is sensitive info, just replace the details with garbage text that still recreates the problem, and share that version. Jun 27, 2016 at 23:57
  • However, it may be best to ask for help with your new problem in a whole new question (but also search to see if the question/answer has been posted online previously - they often have!). Jun 28, 2016 at 0:01

You must log in to answer this question.

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