Tables

NUMB3RS shared this question 3 years ago
Answered

Is it possible to create a table with two columns in the first row and three columns in the second row?

Comments (7)

photo
1

It might be possible using \multicolumn LaTeX. I've adapted this example to work in GeoGebra:

http://tex.stackexchange.co...


  1. \begin{tabular}{|l|l|l|l|l|l|l|}
  2. \hline
  3. DataSet &
  4. \multicolumn{2}{c}{A} &
  5. \multicolumn{2}{c}{B} &
  6. \multicolumn{2}{c|}{C} \\
  7. \hline
  8. D1 & 2.1\% & 2.1\% & 2.1\% & 2.1\% & 2.1\% & 2.1\% \\
  9. \hline
  10. D2 & 11.6\% & 11.6\% & 11.6\% & 11.6\% & 11.6\% & 11.6\% \\
  11. \hline
  12. D3 & 5.5\% & 5.5\% & 5.5\% & 5.5\% & 5.5\% & 5.5\% \\
  13. \hline
  14. \end{tabular}

photo
1

Thank Michael,

It's not what I want but I really appreciate your help.

Jose

photo
1

then


  1. It's not what I want

what do you want?

an image or screenshoot or GGB can help

photo
1

I would like to create a table like the two in the attachment.

photo
1

So why is \multicolumn not what you want?


  1. \begin{array}{|c|c|}
  2. \hline
  3. \multicolumn{2}{|c|}{\text{Title}} \\
  4. \hline
  5. x & y\\ \hline
  6. a & b\\
  7. c & c\\
  8. d & e\\ \hline
  9. \end{array}

photo
photo
1

hello

perhaps you need a \multirow , if it is not possible I think that a more elaborate table can be usefull

  1. \rotatebox{90} { \begin{array}{|c|c|}

    \hline

    \multicolumn{2}{|c|}{\text{Title}} \\

    \hline

    \rotatebox{-90} x & \rotatebox{-90}y\\ \hline

    \rotatebox{-90}a & \rotatebox{-90}b\\

    \rotatebox{-90}c & \rotatebox{-90}c\\

    \rotatebox{-90}d & \rotatebox{-90}e\\ \hline

    \end{array}}

saludos

photo
1

Thanks mathmagic.....it's very clever!...I would like to be able to have more flexibility when creating tables....perhaps something to consider in future releases.

Thanks again

photo
© 2020 International GeoGebra Institute