I am using the S-column type from the siunitx package to align numbers horizontally in a table, which works fine when typing numbers only. However, when I use math, I get the error
Missing $ inserted
even though the output is displayed correctly (presumably because LaTeX adds begin-math/end-math automatically - I am using Overleaf). Unfortunately, inserting $-signs around the expression does not solve the problem. Does anyone have an idea as to how I solve this problem?
Working example:
\documentclass{article}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{adjustbox}
\begin{document}
\begin{table}[h]
\centering
\begin{adjustbox}{max width=\textwidth}
\begin{tabular}{lSS}
\toprule
\textbf{Parameter} & \textbf{Column1} &
\multicolumn{1}{c}{\textbf{Column2}}
\\
\midrule
a & 0.613 & 2.92\cdot 10^{-40}\\
b & 110.6 & $23.1\cdot 10^3$ \\
\bottomrule
\end{tabular}
\end{adjustbox}
% \caption{faulty table}
\label{tab:}
\end{table}
\end{document}
Many thanks in advance!