edition might be grateful since i don´t know how to name this problem.
English is not my native idioms. Also I don't know how to interpret this problem as well on so apologies in advance.
I am working on a table and i want it to look like this one:
After some time I made it to look like it with this code:
\documentclass{report}
\usepackage{float}
\usepackage{color}
\usepackage[spanish]{babel}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{colortbl}
\usepackage{chngpage}
\usepackage{colortbl}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{xcolor,colortbl}
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}
\begin{document}
\begin{table}[H]
\begin{adjustwidth}{-1in}{-1in}
\begin{footnotesize}
%\caption{Tabla comparativa de proyectos utilizados en la enseñanza de sistemas operativos.}
\label{Evaluacion economicae}
\vspace{10pt}
\begin{center}
\begin{tabular}{|C{3.4cm}|*{9}{C{0.8cm}|}}
\hline
\cellcolor{black} & \multicolumn{3}{|>{\columncolor{black}}m{4cm}} {\centering{\textbf{\color{white}El Mejor Escenario (Vehículo 1)}}} &
\multicolumn{3}{|>{\columncolor{black}}m{4cm}}{\centering\textbf{\color{white}El Mejor Escenario (Vehículo 2 a 5)}} &
\multicolumn{3}{|>{\columncolor{black}}m{4cm}|}{\centering\textbf{\color{white}El Peor Escenario (Todos los Vehículos)}} \\
\hline
\rowcolor[gray]{0.8}\multirow{-3}{*} {\cellcolor{black}\centering{\textbf{\color{white}Empresa}}}& Año 1 & Año 2 & Año 3 & Año 1 & Año 2 & Año 3 & Año 1 & Año 2 & Año 3\\ \hline
GRUPO DECA & 1.68 &1.35 & 0.68 & 0.94 & 0.76 & 0.38 & 5.44 & 4.38 & 2.19\\ \hline
\rowcolor[gray]{0.8}GPS TECNOLOGIAS & 1.62 &1.3 &0.65 &0.91 &0.73 & 0.36 & 5.25 & 4.21 & 2.11 \\ \hline
GPS RASTREO SATELITAL & 1.69 & 1.38 & 0.69 & 0.95 & 0.77 & 0.39 & 5.48 & 4.48 & 2.24 \\ \hline
\rowcolor[gray]{0.8}Localización Satelital Integral & 1.82 & 1.39 & 0.69 & 1.02 & 0.78 & 0.39 & 5.90 & 4.49 & 2.24 \\ \hline
GPS ADVANTAGE & 1.33 & 1.26 & 0.63 & 0.75 & 0.70 & 0.35 & 4.32 & 4.07 & 2.04 \\ \hline
\rowcolor[gray]{0.8}TISSA &1.38& 1.33 & 0.67 & 0.77 & 0.75 & 0.37 & 4.48 & 4.32 & 2.16 \\ \hline
GRUPO UDA & \multicolumn {9}{c|} {\centering No presento cotizaciones.}\\ \hline
\end{tabular}
\end{center}
\caption{Evaluaciónes Económicas}
\end{footnotesize}
\end{adjustwidth}
\end{table}
\end{document}
The result of the code looks like the image below and this where my problem comes out:
How do i remove the blank space right to each cell? I been searching over it on the code but i can't find where it is wrong.
Best Answer
I don't think that specifying the column width is the way to go; let LaTeX do the job.
If you want to have the exact size, you can do it in a second step: in the first step you typeset the table and find the widest header, in this case
(Todos los vehículos)
and add some padding, setting a length parameter; then you ensure that a box as wide as that length is in each header.