Options in \tablenum

Remember that \tablenum is more-or-less \num but with alignment: it is not a macro version of the S column. As such, the argument has to be a number. There are various ways to do what you want

\documentclass[margin=3mm, preview]{standalone}
\usepackage[T1]{fontenc}
\usepackage{siunitx}
\begin{document}
\begin{table}
\sisetup{input-comparators = , table-format = 1.2}
\begin{tabular}{|c|}
  \hline
  \hphantom{<}\tablenum{1.23}  \\
  \tablenum[table-space-text-pre=<]{1.23} \\
  <\tablenum{1.23} \\
  \hline
\end{tabular}
\end{table}
\end{document}

\tablenum has an optional argument for option settings. However, input-comparators does not seem to work, but the important table-format does. The following example uses a workaround for the less than symbol:

\documentclass[margin=3mm, preview]{standalone}
\usepackage[T1]{fontenc}
\usepackage{booktabs}
\usepackage{siunitx}
\newcommand*{\mytablenum}{}

\begin{document}

\renewcommand*{\mytablenum}{\tablenum[table-format=1.2]}
\begin{tabular}{S[input-comparators,
                  table-space-text-pre=<,
                  table-format = 1.2]
                c}
\toprule
  1.23  &  \hphantom{<}\mytablenum{1.23}  \\
< 1.23  &             <\mytablenum{1.23}  \\
\bottomrule
\end{tabular}

\end{document}

Result

Tags:

Siunitx