0

How can I align the small, large and user columns under every multicolumn. Alignment gets lost when using multicolumn. Code below:

\begin{table}[]
\centering
\resizebox{\columnwidth}{!}{
\begin{tabular}{l|c|c|c|c|cccccccccccccccccccccccc}
\toprule
\multirow{3}{*}{\color{red}{\textbf{SAD}}} & \multicolumn{4}{c}{} & \multicolumn{3}{c}{\textbf{Troll}} & \multicolumn{3}{c}{\textbf{Doll}} & \multicolumn{3}{c}{\textbf{Donkey}} & \multicolumn{3}{c}{\textbf{Elephant}} & \multicolumn{3}{c}{\textbf{Plant}} & \multicolumn{3}{c}{\textbf{Pineapple}} & \multicolumn{3}{c}{\textbf{Plastic bag}} & \multicolumn{3}{c}{\textbf{Net}} \\ 
& overall & avg. small & avg. large & avg. medium & \multicolumn{3}{c}{(Strongly Transparent)} & \multicolumn{3}{c}{(Strongly Transparent)} &      \multicolumn{3}{c}{(Medium Transparent)} & \multicolumn{3}{c}{(Medium Transparent)} & \multicolumn{3}{c}{(Little Transparent)} & \multicolumn{3}{c}{(Little Transparent)} & \multicolumn{3}{c}{(Highly Transparent)} & \multicolumn{3}{c}{(Highly Transparent)} \\ 
& rank & rank & rank & rank & small & large & user & small & large & user & small & large & user & small & large & user & small & large & user & small & large & user & small & large & user & small & large & user \\ 
\rowcolor{blue!10}
GAN & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ & $1.0_{\color{blue}1}$ \\ 
\bottomrule
\end{tabular}
}
\label{tab:my_label}
\end{table}
Kostas
  • 738
  • 1
    Do you really expect to be able to typeset a 29-column [!] table in portrait mode? – Mico Feb 22 '18 at 14:04
  • @Mico, if you run the code with a document class article, yes, it is possible. I have it already, just the numbers are a bit smaller. – Kostas Feb 22 '18 at 15:25

0 Answers0