I can't find a way to fix this annoying corner case.
In this example, spreadtab gives the value for cell(foo)+cell(bar) correctly, but siunitx does not do its thing if \bfseries is being used in that cell, because to make the example compile with spreadtab, I'm forced to hide the calculation from siunitx (apparently).
The value shown, 20.687 should be 20.69 instead. and the number is misaligned. The decimal point is in the wrong place.
How can I placate both spreadtab or siunitx?
Aligning number with siunitx in spreadtab including calculated numbers appears to be the same question, but the sole answer does not describe a satisfactory solution.
Can anyone suggest a workaround, please?
\documentclass[12pt]{standalone}
\usepackage{siunitx}
\usepackage{spreadtab}
\RequirePackage{unicode-math}
\setmainfont[Scale=0.93]{TeX Gyre Schola}
\setmathfont[Scale=0.93]{TeX Gyre Schola Math}
\begin{document}
\begin{spreadtab}{{tabular}{S[table-format=6.2, round-mode=places, round-precision=2, detect-weight=true]}}
tag(foo) 10.343\
tag(bar) 10.344\
cell(foo)+cell(bar)\
\bfseries :={cell(foo)+cell(bar)}\
\end{spreadtab}
\end{document}

mode=text, see the siunitx documentation, – Ulrike Fischer Sep 07 '21 at 21:27siunitxthat you are using? That seems like the most likely possibility. The version of siunitx that is reported in the logs is "Package: siunitx 2020/02/25 v2.8b". What version are you using? The version ofspreadtabI'm using is 0.5, but I don't think that has changed. I also tried on Overleaf with TeX Live 2020, and it shows the issue there too. – Faheem Mitha Sep 08 '21 at 09:54siunitx(assuming thatsiunitxwas what changed) to make this work correctly. Would this be suitable for a separate question? – Faheem Mitha Sep 09 '21 at 09:34mode=textoption. The two bolds look quite different. I think I prefer the text one. Also, even if the bolding does not work, the column is correctly aligned in any case, by the TL2021 version. – Faheem Mitha Sep 09 '21 at 09:43