I want to include images in my tabularx such that they are vertically centered, so I used code from Issue with vertical align image in table cell
That works fine, except that when I add the siunitx package to that example it fails with Error:(7) Argument of \Gin@ii has an extra }.
MWE:
\documentclass{article}
\usepackage[export,demo]{adjustbox}
\usepackage{cellspace} % [Edit] This provides the S column type for extra vertical space
\usepackage{siunitx} % Also provides the S column type for aligning decimal digits
\begin{document}
\begin{tabular}{|Sc|}
\includegraphics[valign=c]{test} \\
\end{tabular}
\end{document}
Because the MWE itself is not my original problem, this is my full problem which should vertically center images, and which is exactly the answer I mentioned but with the siunitx package added (I need the siunitx package):
\documentclass{scrreprt}
\usepackage[export, demo]{adjustbox} % in real document delete option "demo"
% adjustbox call "graphicx"
% "adjustbox" call "graphicx" plus add many function
% for manipulating boxes, among them here is used "valign"
\usepackage{cellspace, % for adding vertical space around cells' contents
tabularx}
\setlength\cellspacetoplimit{4pt}
\setlength\cellspacebottomlimit{4pt}
\renewcommand\tabularxcolumn[1]{m{#1}} % for vertical centering of X cell contents
\usepackage{ragged2e}
\usepackage{siunitx}
\begin{document}
\begin{table}[htb]
\centering
\setkeys{Gin}{width=11mm,height=11mm} % with real images should be sufficient defined only image width
%
\begin{tabularx}{\linewidth}{|Sc|l|>{\RaggedRight}X|} % "S" add vertical space in column "c"
\hline
\textbf{Menu item} & \textbf{Caption} & \textbf{Description} \\
\hline
\includegraphics[valign=c]{security_unlock.png}% "valing=c" move baseline of the image to its middle
& Login & Show the login screen, where
the user should enter his
credentials to log on to the
system. \\
\hline
\includegraphics[valign=c]{security_lock.png}%
& Logoff & Log off the current user. A
prompt will be shown where
the user has to confirm the
log off procedure. \\
\hline
\includegraphics[valign=c]{employees-gear.png}%
& Manage & Opens a formular where the
user can manage the user
groups and users. \\
\hline
\end{tabularx}
\end{table}
\end{document}
Output:
main.tex:40: Argument of \Gin@ii has an extra }.
<inserted text>
\par
l.40 \end{tabularx}
Runaway argument?
val\bool_if:NT \l__siunitx_table_math_bool {\scan_stop: \c_math_toggle_token \E
TC.
MiKTeX 4.0.1, siunitx version 26-02-2020, adjustbox 30-08-2020, all packages up to date (and also happens on an up-to-date TeX Live).