lvjr / tabularray

Typeset tabulars and arrays with LaTeX3
https://ctan.org/pkg/tabularray
247 stars 22 forks source link

siunitx but keep the period #458

Closed Zeta611 closed 6 months ago

Zeta611 commented 6 months ago

If I use the siunitx library, the periods go away after the alignment is done. But is there a way keep periods?

\newcommand*{\degree}{\unit{\degree}}
%...
  \begin{tblr}{
    colspec={cS[table-format=2.0]S[table-format=2.0]S[table-format=2.0]S[table-format=1.1]},
    row{1} = {guard}
    }
    \toprule
    trial & $\theta_1$ [\degree] & $\theta_{1,\textrm{exp}}'$ [\degree] & $\theta_{1,\textrm{theo}}'$ [\degree] & error [\%] \\
    \midrule
    1 & 0. & 0. & 0. & 0. \\
    2 & 10. & 10. & 10. & 0.0 \\
    3 & 20. & 20. & 20. & 0.0 \\
    4 & 30. & 30. & 30. & 0.0 \\
    5 & 40. & 40. & 40. & 0.0 \\
    6 & 50. & 50. & 50. & 0.0 \\
    \bottomrule
  \end{tblr}

For instance, 0.s becomes just 0s in the table, but I want it to be kepts 0.