2

minimal (non)-working example:

\documentclass{article}
\usepackage{siunitx}
\usepackage{pgfplotstable}
\usepackage{filecontents}

\pgfplotstableset{
  header=true,
  trim cells=true,
  col sep=comma,
  secure header/.style={
    columns/#1/.append style={
      column name={\multicolumn{1}{c}{#1}},
    }
  },
  si column/.style={
    columns/#1/.append style={
      string type,
      column type={S[table-format=2.2e1]},
    }
  },
}

\begin{document}
number to print: 3433010912

\pgfmathparse{3433010912}
siunitx result:
\num[scientific-notation=engineering,round-mode=places,round-precision=2]{\pgfmathresult}

\begin{filecontents*}{data.csv}
works, doesn't work
147385274, 3433010912
\end{filecontents*}

this table is wrong:

\pgfplotstableread{data.csv}{\Data}
% this produces an error
\sisetup{scientific-notation = engineering, table-auto-round=true}
\pgfplotstabletypeset[%
  columns={works, doesn't work},
  secure header/.list={works, doesn't work},
  si column/.list={works, doesn't work},
]{\Data}

this table is right, but the alignment for the long header is not nice:

% this works
\pgfplotstabletypeset[%
  columns={works, doesn't work},
  columns/works/.style={sci,sci sep align},
  columns/{doesn't work}/.style={sci,sci sep align},
]{\Data}
\end{document}

resulting pdf

I get the numbers to print from pgfplotstable and therefore from a csv-file. All questions related to siunitx and "Number too big" I found are related to small numbers with to many digits, but not numbers that are actualy to big.

How do I get the value to siunitx so it is readable?

3
  • 1
    What version of siunitx do you have (it says in the .log file): this should be fixed in the current release.
    – Joseph Wright
    Sep 25, 2015 at 10:02
  • 2013/07/31 v2.5s - from texlive 2014 I will see if I can get the current version.
    – Garonenur
    Sep 26, 2015 at 12:01
  • thanks @JosephWright I got confused with texlive versions between my private pc and work - work is just slower with updates and I assumed I had the current version.
    – Garonenur
    Sep 26, 2015 at 12:30

1 Answer 1

1

This problem is fixed in siunitx version 2015/09/14 v2.6l as can be found in texlive 2015. The answer thus is: Use current software.

You must log in to answer this question.

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