# How to reduce space between a text line and differents \hline in a table - trying to use negative \vspace value

On the following figure, I try to make decrease the space betwen the line "Nombre de bins : (Y1) :5 ..." and the two \hlines above.

More over, you can see that line "Nombre de bins : (Y1) :5 ..." is not very well filled since a slight vertical shift in upward direction.

Here's the code snippet :

\begin{table}[H]
\small
\centering
\vspace{0.3cm}
\label{tab:lsst-specifications}
\begin{tabular}{lll}
\hline
\rowcolor{jonquil} & Param\etre  & Valeur \\
\hline\hline \\
Surface du Survey dans le ciel & $A_{\rm survey}$  & $20,000\,\deg^2$ \\
Erreur sur le redshift Weak Lensing (Y1 et Y10) : & $\sigma_{z}$ & $0.05(1+z)$ \\
Erreur sur le redshift GC photom\'etrique (Y1 et Y10) : & $\sigma_{z}$ & $0.03(1+z)$ \\
Redshift minimal et maximal des \'echantillons (Y1 et Y10) : & $[z_{\rm min},z_{\rm max}]$  & $[0.2,1.2]$ \\
\hline\hline \\
\vspace{-0.5cm} \\
\rowcolor{jonquil}Nombre de bins : (Y1) : 5 ($\Delta z = 0.2$) ; (Y10) : 10 ($\Delta z = 0.1$) & & \\
\hline
\end{tabular}
\captionof{table}{Sp\'ecifications pour le survey LSST.}
\label{specLSST}
\end{table}


1) As you can see, I tried to use a \vspace{-0.5cm} to get the bottom text to the upward direction but without success.

2) I also tried to use the option : \setlength{\extrarowheight}{-0.05cm} but it doesn't seem to have an effect expected.

• you should not have \\  after \hline that is causing a spurious empty row. – David Carlisle Jun 30 at 23:40
• Unrelated, do not use \rm in latex, you can use \min to get a min operator in roman. – David Carlisle Jun 30 at 23:42

• As @DavidCarlisle has already pointed out in a comment, there should be no \\ (double backslash) directives after the \hline\hline directives. If you want to give the table a more open "look", load the array package and issue an instruction such as \setlength{\extrarowheight}{2pt}.

• Since you're using color to create visual offset, you shouldn't mix-and-mismatch visual metaphors by using horizontal black lines as well. (Either use colored rows or horizontal lines, but not both.) I suggest you omit the \hline directives entirely.

• Since your document's language appears to be french, you can make life easy (or easier) on yourself by loading the babel language with the option french. E.g., spacing around characters such as : and ; will be handled automatically.

• If you load the fontenc package with the option T1, you can enter accented characters such as à, ç, é, è, ê and ù directly -- really no need to create them via escape-character sequences.

• To typeset scientific units and their associated quantities, do load the siunitx package and use the macros \SI and \si. That way, you also don't have to worry about excess whitespace after the , (comma) characters that function as thousands separators. (I noticed the gap between 20, and 000 right away when I looked at the screenshot you posted. Really!)

• Since you use a table environment, it makes little to no sense to use a \captionof directive. Simply use \caption. And don't use two \label directives in a table. There should only be one \label statement -- the one after the \caption directive.

• Don't use A_{\rm survey} -- \rm has been deprecated and no longer works in some LaTeX document classes. Instead, write A_{\mathrm{survey}}. Or, z_{\min},z_{\max} to get upright lettering.

The following example implements these suggestions. (I used yellow since I don't know how the color "jonquil" is defined.)

\documentclass{article} % or some other suitable document class
\usepackage[a4paper,margin=2.5cm]{geometry} % set page parameters suitably

\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\usepackage{colortbl} % for \rowcolor macro
\usepackage{array}
\setlength\extrarowheight{2pt} % for a more open "look"
\usepackage[skip=0.5\baselineskip]{caption}
\usepackage[locale=FR,group-separator={,}]{siunitx} % for \SI and \si macros

\begin{document}
\begin{table}[ht!]
\small % is it needed?
\centering
%\vspace{0.3cm} % why?
%%\label{tab:lsst-specifications} % don't provide 2 \label statements
\begin{tabular}{lll}
%\hline
\rowcolor{yellow} & Paramètre  & Valeur \\
%\hline\hline
Surface du Survey dans le ciel
& $A_{\mathrm{survey}}$  & \SI{20000}{\deg\squared} \\
Erreur sur le redshift Weak Lensing (Y1 et Y10):
& $\sigma_{z}$ & $0.05(1+z)$ \\
Erreur sur le redshift GC photométrique (Y1 et Y10):
& $\sigma_{z}$ & $0.03(1+z)$ \\
Redshift minimal et maximal des échantillons (Y1 et Y10):
& $[z_{\min},z_{\max}]$  & $[0.2,1.2]$ \\
%\hline\hline
\rowcolor{yellow}
\multicolumn{3}{l}{Nombre de bins: (Y1): 5 ($\Delta z = 0.2$);
(Y10): 10 ($\Delta z = 0.1$)} \\
%\hline
\end{tabular}
\caption{Spécifications pour le survey LSST.}
\label{specLSST}
\end{table}
\end{document}
`