## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Row color problem

Information and discussion about graphics, figures & tables in LaTeX documents.
Saszalez
Posts: 2
Joined: Wed May 23, 2018 10:40 am

### Row color problem

Hello everyone.

I have a problem with the color of the rows and I have searched and tried several solutions and I have not been successful. I can set the color of the row without problem, but the colo does not occupy the entire row, leaving a margin up and down unpainted. How can I make it to paint everything?

I use MacTex with Texmaker.

Thank you very much.

1. \documentclass[12pt,a4paper,oneside]{report}
2. \usepackage[utf8]{inputenc}
3. \usepackage[spanish]{babel}
4. \usepackage[T1]{fontenc}
5. \usepackage[scaled]{helvet}
6. \normalfont
7. \usepackage{graphicx}
8. \usepackage{float}
9. \usepackage{booktabs}
10. \usepackage{colortbl}
11. \usepackage{caption}
12. \captionsetup{justification=centering,font={footnotesize},skip=0pt}
13. \usepackage{color}
14. \definecolor{verde}{RGB}{40,112,60}
15. \definecolor{blanco}{RGB}{254,254,254}
16.
17. \begin{document}
18.
19. \begin{table}[H]
20. \centering
21. \resizebox{\textwidth}{!}{
22. \begin{tabular}{cccccccccccccc}
23. \toprule[0.5mm]
24. \multicolumn{14}{>{\columncolor{verde}}c}{\textcolor{blanco}{\textbf{Parámetros climáticos promedio}}}\\
25. \midrule[0.3mm]
26. Mes & Ene & Feb & Mar & Abr & May & Jun & Jul & Ago & Sep & Oct & Nov & Dic & Anual\\
27. \midrule[0.1mm]
28. Máx. media ($^\circ$C) & 15 & 15 & 16 & 17 & 15 & 14 & 14 & 15 & 16 & 18 & 18 & 17 & 15,8\\
29. Media ($^\circ$C) & 9 & 9 & 9 & 8,5 & 6,5 & 5,5 & 5,5 & 5 & 6 & 6,5 & 9,5 & 10 & 10\\
30. Mín. Media ($^\circ$C) & 3 & 3 & 2 & 0 & -2 & -3 & -4 & -3 & -1 & 1 & 2 & 3 & 0,1\\
31. Precip. (mm) & 92 & 86 & 55 & 13 & 3 & 1 & 1 & 3 & 10 & 20 & 38 & 75 & 397\\
32. Días $\geq$ 1mm & 17 & 16 & 12 & 5 & 1 & 0 & 0 & 1 & 2 & 5 & 7 & 14 & 80\\
33. \bottomrule[0.5mm]
34. \end{tabular}
35. }
36. \caption{Datos climáticos promedio de San Cristóbal de Lípez}
37. \end{table}
38.
39. \end{document}

Stefan Kottwitz
Posts: 9104
Joined: Mon Mar 10, 2008 9:44 pm
Hi Saszalez,

welcome to the forum!

Here is a quick way:

1. \renewcommand{\aboverulesep}{0pt}
2. \renewcommand{\belowrulesep}{0pt}

Stefan

Saszalez
Posts: 2
Joined: Wed May 23, 2018 10:40 am
Hi Stefan.

Thank you very much for your help. I was crazy to find a solution, and the truth was that it was easy.

Stefan Kottwitz