0

I am trying to create a table in LaTex, which has different a number of columns on some rows, this is what I am trying to achieve:

           Title1             Title2
Row1   1    2     3       1     2    3

Row2

Row3

The only tables I have created previously have the dame amount of columns on each row, this one needs three columns on the top row and then 7 on the next three rows, just not sure how to achieve this.

1
\begin{tabular}{lcccccc} %say
 &\multicolumn{3}{c}{Title1}&\multicolumn{3}{c}{Title2}\\
Row1 & 1&2&3&1&2&3\\
%and so on
\end{tabular}

Version with lines:

\begin{tabular}{|l|c|c|c|c|c|c|} %say
\hline
&\multicolumn{3}{c|}{Title1}&\multicolumn{3}{c|}{Title2}\\
\hline
Row1 & 1&2&3&1&2&3\\
%and so on
\end{tabular}
  • How can I place grids around every item using this approach? – user28462 May 13 '13 at 23:16
  • @user28462 The second version has got some lines. – Przemysław Scherwentke May 13 '13 at 23:20
  • 2
    @user28462 Don't use vertical rules in your tables. Their quality will instantly improve. – egreg May 13 '13 at 23:20
  • This will only supply vertical lines and not horizontal lines – user28462 May 13 '13 at 23:28
  • @user28462 Vertical lines are from |, horizontal lines --- from \hline. If you need horizontal lines underlining only specific columns, you have \cline{col_begin-col_end}, e.g. \cline{2-4}. – Przemysław Scherwentke May 13 '13 at 23:32

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.