3

I can't get the special table columns from the siunitx package to work. The numbers render in a normal l column but not in the special S coulmn. Here's my minimal example:

\documentclass[12pt,letterpaper]{article}
\usepackage{siunitx}
\begin{document}
    \num{1.445e12}
    \begin{tabular}{|l|S[tabformat=1.5e12,tabnumalign=left]|}
        \hline
        \num{1.445e12} & \num{1.445e12} \\
        \hline
        \num{95}       & \num{95}       \\
        \hline
    \end{tabular}
\end{document}

Result here

preview

Not only is exponentiation not working in the table cell, but the numbers aren't even left-aligned. The same result is produced with pdflatex and xelatex.

1
  • 6
    The content of an S column is 'automatically' inside \num, which should therefore not be used. Please try without it wrapping up each entry.
    – Joseph Wright
    Commented Jul 14, 2012 at 18:28

1 Answer 1

6

The column type S provided by siunitx sets the contents of the cell automatically as an argument of \num. So you definition is equal to:

\num{\num{95}}

which fails. If you want that the cell isn't interpreted by \num you can put the cell in extra curly brackets {TITLE}.

Please note that some names of options have been changed. The package produces an error like

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! siunitx error: "version-1-option"
! 
! Version 1 option 'tabnumalign' detected.
! 
! See the siunitx documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  

The documentation of siunitx lists all changes in an extra table. See section 8.1 Upgrading from version 1.

OLD          ==> NEW
tabformat    ==> table-format
tabnumalign  ==> table-number-alignment

By the way: Avoid vertical lines inside tables and be spare with horizontal.

1
  • siunitx documentation can be found here. Commented May 10, 2013 at 10:23

You must log in to answer this question.

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