14

I would like to format the space reserved for a number shown in a table with separated uncertainty. It seems that when I use the table-format option the brackets around the mantissa disappear. This is illustrated in the example below:

\documentclass{article}    
\usepackage{siunitx}

\begin{document}    
\begin{table}
  \begin{tabular}{
                  S[separate-uncertainty = true]
                  S[table-format=1.1(1)e1,
                  separate-uncertainty = true]
                  }
    {Header} & {Header}\\
    1.0(2)e2 & 1.0(2)e2\\
  \end{tabular}
\end{table}    
\end{document}

enter image description here

I have also tried to use the bracket-numbers and multi-part-units = brackets without solving this issue. Is there any workaround to center the number and keep the brackets like in the first column of the example?

David Carlisle
  • 757,742
gypaetus
  • 3,162

1 Answers1

6

Using your example: By using the table-figures-XXX assignments independently, rather than using the table-format shortcut, I was able to make Header 1 and 2 appear identical.

\documentclass{article}

\usepackage{siunitx}

\begin{document}

    \begin{table}
        \begin{tabular}{
                S[separate-uncertainty = true]
                S[%table-format=1.1(1)e1,
                table-figures-integer=1,
                table-figures-decimal=1,
                table-figures-exponent=1,
                table-figures-uncertainty=1,
                separate-uncertainty = true]
            }
            {Header} & {Header}\\
            1.0(2)e2 & 1.0(2)e2\\
        \end{tabular}
    \end{table}

\end{document}

%retain-unity-mantissa=true,    % probably unnecessary
%table-sign-mantissa=true,      % probably unnecessary

screenshot

EngBIRD
  • 3,985
  • Why the second number in the last example does not have brackets? – gypaetus Jan 04 '15 at 23:36
  • @MigueldeVal-Borro Apologies, I completely missed it. I believe it's expected that the boolean switches for the table-align-exponent, table-align-uncertainty, table-align-comparator etc options are expected to control a formatted table alignment when more complex aspects of the number are used. Let me know if this doesn't help, I will remove my answer as my answer doesn't solve the centering part of the question. I am not aware of a command that will take precedence over mantissa and center environment. – EngBIRD Jan 05 '15 at 02:41
  • 1
    Thanks @EngBIRD. There is a bug report about this issue that the author of the package will consider https://github.com/josephwright/siunitx/issues/244 – gypaetus Jan 06 '15 at 14:47
  • 1
    Thank you for your answer! Even if it does not solve the problem completely (at least not with this version of siunitx, wink wink ), it is illuminating and hopefully brings some attention to this bug. Bounty for you – Peater de Xel Jan 10 '15 at 22:39