I would like to control the spacing between the siunitx columns, however, the insertion of !{\hspace{1ex}} between the third and fourth columns results in the discontinuity of the gray color in the third row,
while <{\hspace{1ex}} doesn't have any effect on the output.
\documentclass[border=5mm]{standalone}
\usepackage{tabularx,siunitx,multicol,ragged2e}
\usepackage[table]{xcolor}
\newcolumntype{Y}{>{\Centering}X}
\newcolumntype{L}{>{\RaggedRight}X}
\newcolumntype{R}{>{\RaggedLeft}X}
\begin{document}
\setlength{\tabcolsep}{0pt}
\rowcolors{2}{gray!20}{}
\begin{tabularx}{1\linewidth}{
>{\hsize=1.3\hsize}L<{\hspace{1ex}}
>{\hsize=0.7\hsize}Y<{\hspace{1ex}}
S[table-format=3.1, round-precision=1, table-column-width = 0.2\linewidth, table-number-alignment=right]<{\hspace{1ex}}
s[table-unit-alignment = left, table-column-width = 0.2\linewidth]
}
Parameter & Symbol & \multicolumn{2}{c}{Value}\\
Inertia & $J_M$ & 0.6 & \kilogram\m\squared\\
Inertia & $J_M$ & 0.6 & \kilogram\m\squared\\
\end{tabularx}
\end{document}




|to the normal\tabcolsep, and the left and right colour overhangs in each column defaults to\tabcolsep. If you really need to use the!{...}syntax, I think it might done with!{\color{gray!10}\vrule width 1ex}and playing with\hhlineandarrayrulecolor. – Bernard Dec 21 '19 at 21:26\hspace{2ex}between the first and the second columns. It seems that<{\hspace{1ex}is not the proper way. – Diaa Dec 21 '19 at 21:41<{\hspace{1ex}}doesn't have any effect on the output. So, I need to globally set the separation to be0exwhile injecting some space of2exbetween the first and the second columns; is this possible? – Diaa Dec 21 '19 at 21:50:)– Diaa Dec 21 '19 at 23:22