2

I try to create a table with color to look like the following table:

enter image description here

I treid to write the following latex:

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}

\makeatletter
\providecommand{\tabularnewline}{\\}

\makeatother

\usepackage{babel}
\begin{document}
\begin{table}
\caption{Test}
\centering{}%
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|}
\cline{3-12} 
\multicolumn{1}{c}{} &  & \multicolumn{2}{c|}{ System1} & \multicolumn{2}{c|}{System2} & \multicolumn{2}{c|}{System3} & \multicolumn{2}{c|}{System4} & \multicolumn{2}{c|}{System5}\tabularnewline
\cline{2-12} 
\multicolumn{1}{c|}{} & Weightage & Rating & Weighted Rating  & Rating & Weighted Rating & Rating & Weighted Rating & Rating & Weighted Rating & Rating & Weighted Rating\tabularnewline
\hline 
Volume Utilization & 0.3 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1\tabularnewline
\hline 
Complexity & 0.2 & 2 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1\tabularnewline
\hline 
Controllability & 0.2 & 2 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1\tabularnewline
\hline 
Thrust and Power & 0.3 & 3 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1\tabularnewline
\hline 
Bi-Direc. & 0.2 & 2 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1\tabularnewline
\hline 
Size  & 0.3 & 2 & 1 & \multicolumn{1}{c|}{1} & 1 & 1 & 1 & 1 & 1 & 1 & 1\tabularnewline
\hline 
\multicolumn{1}{c|}{} & \multicolumn{2}{c|}{Total Weighted Score} & 2 &  & 3 &  & 3 &  & 1 &  & 2\tabularnewline
\cline{2-4} \cline{6-6} \cline{8-8} \cline{10-10} \cline{12-12} 
\end{tabular}
\end{table}

\end{document}

Any help!! thanks

Bernard
  • 271,350
Ammar
  • 21
  • 3
    Did you google for latex color table cell? You'll find (1) https://tex.stackexchange.com/questions/94799, (2) https://texblog.org/2011/04/19/highlight-table-rowscolumns-with-color/ or (3) https://tex.stackexchange.com/questions/1405 for example. Basically, have a look at the colortbl package: http://www.ctan.org/tex-archive/macros/latex/contrib/colortbl/ – Dr. Manuel Kuehner Jun 09 '17 at 18:10
  • You can't fit such a table within letterpaper or a4paper format. I suggest you swap rows and columns – Bernard Jun 09 '17 at 18:14
  • @Bernard Or turn the table? – cfr Jun 10 '17 at 01:05
  • It's the easy way. However it's harder to read, so I tend to prefer swapping if it makes sense. – Bernard Jun 10 '17 at 01:20
  • @Bernard That table doesn't fit even if you swap rows and columns (I tried). In this case, I think to turn it is the only solution... – CarLaTeX Jun 12 '17 at 06:49

0 Answers0