# xcolor: setting/removing the space around the table columns throws an error

The following code works well:

\documentclass{article}
\usepackage[table]{xcolor}
\begin{document}
\rowcolors{2}{gray!25}{white}
\begin{tabular}{cc}
\rowcolor{gray!50}
Some values & Some values\\
Some values & Some values\\
\end{tabular}
\end{document}


However, when trying to remove the space before/after the first/last column or set it to different length, I get this error:

Use of @startpbox doesn't match its definition. \begin{tabular}{@{}cc@{1mm}}

for

\documentclass{article}
\usepackage[table]{xcolor}
\begin{document}
\rowcolors{2}{gray!25}{white}
\begin{tabular}{@{}cc@{1mm}}
\rowcolor{gray!50}
Some values & Some values\\
Some values & Some values\\
\end{tabular}
\end{document}


Knowing that I have updated all the packages before running this test.

• Your example compiles without error for me. Show your log-file. – Ulrike Fischer Mar 31 at 20:01
• @UlrikeFischer You can find it here – Diaa Mar 31 at 20:37
• Your colortbl is outdated. Check for updates in user mode. – Ulrike Fischer Mar 31 at 20:40
• @UlrikeFischer You got it. However, I wonder why updating in Admin mode doesn't make it right. – Diaa Mar 31 at 20:57
• the admin mode can't update your user packages. So always check for updates in both modes. – Ulrike Fischer Mar 31 at 21:00

With the correct code for the final spacing, it works:

\documentclass{article}
\usepackage[table]{xcolor}

\begin{document}
{\setlength{\tabcolsep}{0pt}%
\rowcolors{2}{gray!25}{white}
\begin{tabular}{c<{\hspace{12pt}}c<{\hspace{1mm}}}

• By calculations: the default value of \tabcolsep is 6pt, and there are two of them between two columns (with the vertical rule, if any, in the middle). – Bernard Mar 31 at 21:03