2

I have a table of the form Screenshot of the table

where the associated code is

    \begin{table}
        \centering
    \begin{tabular}{ll*{4}{S}}
        \toprule
        STD     &  Working point [V]   & 9680(5)  & 9973(26)    &  10304(49)    \\
        October & Maximum efficiency [\%]  & 96.6(0.1)  & 90.8(0.5)    &  85.1(0.9)   \\
        \bottomrule
    \end{tabular}
    \end{table}

with the package siunitx and with the option \sisetup{separate-uncertainty,table-align-uncertainty,table-format = 4.1(2)} in the preamble. What I would like to do is to align only the \pm of the uncertainties and to remove the default setting of alignment of the decimal separators. Is there a way to do so with siunitx package?

I have seen a similar question, but no proper answers have been made there.

1
  • I'd not align the \pm symbols, as those uncertainties are not related to one another.
    – egreg
    Commented Feb 22, 2022 at 22:43

2 Answers 2

2

The straight forward option is not to use siuntix for this requirement. (second table). c

\documentclass[12pt]{article}
\usepackage{booktabs}
\usepackage{siunitx}    

\sisetup{separate-uncertainty,table-align-uncertainty,table-format = 5.1(2)}

\begin{document}
    
    \begin{table}
    \centering
    \begin{tabular}{ll*{4}{S}}
        \toprule
        STD     &  Working point [V]   & 9680(5)  & 9973(26)    &  10304(49)    \\
        October & Maximum efficiency [\%]  & 96.6(0.1)  & 90.8(0.5)    &  85.1(0.9)   \\
        \bottomrule
    \end{tabular}
\end{table}

  \begin{table}[ht!]
    \centering
    \begin{tabular}{ll *{3}{r@{\,}c@{\,}l}}
        \toprule
        STD     &  Working point [V]        & 9680  &$\pm$  &5  & 9973  &$\pm$  & 26& \num{10304}   &$\pm$  &49    \\
        October & Maximum efficiency [\%]   & 96.6  &$\pm$  &0.1& 90.8  &$\pm$  &0.5& 85.1          &$\pm$  &0.9 \\
        \bottomrule
    \end{tabular}
\end{table} 
    
\end{document}
0

I'm not sure you gain in clarity by aligning the \pm symbols, which refer to non homogeneous data.

My vote would go to centering the entries.

\documentclass[12pt]{article}
\usepackage{booktabs}
\usepackage{siunitx}

\sisetup{
  separate-uncertainty,
}

\begin{document}
    
\begin{table}
\centering

\begin{tabular}{
  @{}
  l
  l
  *{3}{S[table-alignment-mode=none]}
  @{}
}
  \toprule
  STD     & Working point (V)       & 9680(5)   & 9973(26)  & 10304(49) \\
  October & Maximum efficiency (\%) & 96.6(0.1) & 90.8(0.5) & 85.1(0.9) \\
  \bottomrule
\end{tabular}

\end{table}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .