Following the siunitx documentation in regards to '7.13 Creating a column with numbers and units' and '7.14 Tables with heading rows' I have tried to make a table a table with currency as unit. The problem arises when I use \rowcolor
.
I can patch up the problem by setting table-format=7.1
but this creates unwanted space or deleting \rowcolor[gray]{0.92}
, but I want the alternating rowcolors.
\documentclass[a4paper, 12pt]{article}
\usepackage{siunitx,booktabs,colortbl}
\begin{document}
\begin{table}[h]
\centering
\begin{tabular}
{lSS[table-format=7.0]@{\,}s[table-unit-alignment = left]} \toprule
Company name &{Employees}&\multicolumn{2}{c}{Turnover} \\\midrule \rowcolor[gray]{0.92}
JOHNSON CONTROLS APS &616 &1293896 & \si{USD} \\
SKOV A/S GLYNGOERE &304 &682921 & \si{USD} \\\rowcolor[gray]{0.92}
EXHAUSTO A/S &262 &410914 & \si{USD} \\
SONDEX A/S &116 &616943 & \si{USD} \\\rowcolor[gray]{0.92}
NILAN A/S &114 &137 & \si{USD} \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
EDIT:
I found a crude solution by setting table-format=7.1
and adding \hspace{-0.7em}
before every unit/currency.