# Coloring table row ruins \pm symbol

If I use \rowcolor the \pm symbol that I have in the row gets cropped, it seems.

MWE:

\documentclass{article}
\usepackage{dcolumn}
\usepackage{xcolor,colortbl}

\definecolor{lightgray}{HTML}{EEEEEE}

\begin{document}
\begin{tabular}{lcD{.}{.}{3}p{0cm}D{.}{.}{3}}
\toprule
\textbf{Model} & \textbf{MAPE} & \multicolumn{3}{c}{\textbf{Time (s)}}\\
\midrule
\rowcolor{lightgray} \texttt{snaive} & 29.28\% & 0.003 & $\pm$ &
0.001\\
\texttt{ARIMA} & 34.02\% & 22.480 & $\pm$ & 13.210\\
\rowcolor{lightgray} \texttt{GAM} & 15.32\% & 18.481 & $\pm$ &
0.854\\
\rowcolor{lightgray} \texttt{GAMM[p = 1]} & 11.06\% & 447.861 &
$\pm$ & 191.182\\
\bottomrule
\end{tabular}
\end{document}


This is the resulting output:

The problem is really visible, but here it is the zoomed-in version:

They appear cropped to the right. I don't know what would cause this and how I could fix it.

• p{0cm} is too small change to p{5mm} for example – flav Sep 26 '17 at 12:00

You need to give some value in para mode definition instead of zero, i.e., \begin{tabular}{lcD{.}{.}{3}p{**1cm**}D{.}{.}{3}}
• You're right, it works now. I wonder why it a width of 0 is enough when \rowcolor is not used. – rubik Sep 26 '17 at 12:04