12

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?

5
+300

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

  • Why the second number in the last example does not have brackets? – Miguel de Val-Borro Jan 4 '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 5 '15 at 2:41
  • 1
    Thanks @EngBIRD. There is a bug report about this issue that the author of the package will consider github.com/josephwright/siunitx/issues/244 – Miguel de Val-Borro Jan 6 '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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.