[Tex/LaTex] Table with multicolumn!

multicolumntables

I would like your help to build the following table: My question is on the first line where the cells containing the BIAS and RMSE names are bigger than the cells of the lines below. Summing up the first line with 3 columns with the following lines are 5 columns. Thank you very much.enter image description here

Best Answer

To create these columns simply use

\multicolumn{2}{c}{<content of cell>}

This cell will span 2 columns and be centred horizontally.

Then proceed as usual.

Here's a complete example, based on the content which Wayne Tsai typed for you.

The code follows recommended guidelines, which eschew the use of vertical lines in tables; use heavier rules for top and bottom; minimise additional rules within the table body; increase spacing around rules; and align numerical values appropriately.

I use booktabs for the improved rules and spacing. Please read the documentation for advice on typesetting tables.

I use siunitx to align the content of the cells on the , which I assume to be the decimal marker.

These recommendations are intended to make tabular material easier to read and to produce publication-quality results.

\documentclass{article}
\usepackage{booktabs,siunitx}
\sisetup{%
  output-decimal-marker={,},
}
\begin{document}
\begin{tabular}{c*{4}{S}}
  \toprule
  \bfseries Index &  \multicolumn{2}{c}{\bfseries BIAS}  &  \multicolumn{2}{c}{\bfseries RMSE} \\
  \cmidrule(lr){1-5}
  \bfseries Models &  \multicolumn{1}{c}{\bfseries AGCM} & \multicolumn{1}{c}{\bfseries CGCM} & \multicolumn{1}{c}{\bfseries AGCM} & \multicolumn{1}{c}{\bfseries CGCM} \\
  \midrule
  SACZ-2005 & -1,7 & -2,0 & 7,0  & 5,9 \\
  SACZ-2006 & -0,6 & -0,7 & 4,3  & 4,1 \\
  SACZ-2007 & 1,6  & 2,0  & 5,4  & 5,6 \\
  SACZ-2008 & -1,4 & -2,8 & 10,7 & 9,2 \\
  \bottomrule
\end{tabular}
\end{document}

complete example

Related Question