[bug] table-format and input in e-notation
I have following code:
\begin{table}[!h]
\centering
\begin{tabularx}{1.0\linewidth}{S[table-format=1.3]}
\toprule
-1.040e+00 \\
-1.000e+00 \\
-9.600e-01 \\
-9.200e-01 \\
\bottomrule
\end{tabularx}
\end{table}
which prints numbers as follows:
−1.040
−1.000
−9.600
−9.200
The expected output would be:
−1.040
−1.000
−0.960
−0.920
If \begin{tabularx}{1.0\linewidth}{S[table-format=1.3,exponent-mode=fixed]} is used, then the output is:
−1.040
−1.000
−0.9600
−0.9200
which doesn't fits the requested table-format.
siunitx version: Package: siunitx 2025-05-22 v3.4.12 A comprehensive (SI) units package from Overleaf TeX Live version 2025.
In the first example, you have given no space for an exponent so siunitx is printing you input as-is but without any exponent - so you see misleading values. In the second case, you need to apply rounding to drop the precision of the values: this does not happen automatically. Basically, it's your task to ensure that the table-format is suitable for the input values you have.
Note in both cases there is a warning in the log that the tabular boxes are overfull.
Oh, my bad, I made assumption that if e.g. table-format=+1.3 then siunitx will convert to fixed point, but this works only if exponent-mode=fixed is used.
And second bad assumption on my side was that table-format=+2.3 works same like C's %+5.3f. But now I get that this is only for alignment purpose if I understand correctly and it is on my side to put specific number of digits in the input. And the trailing zeros should not be removed because they are some expression of precision.