2

In the following MWE we have a \num command in the first line. It is printed as it should. But when I add [scientific-notation=true] like I saw in the manual, but it gave me an error and replaced the number I typed for another that I'll put in bold. I'm looking for a workaround (while I'd like to keep using siunitx, if possible, but I'll accept other packages if they're compatible).

---------- MWE

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[brazil]{babel}

\usepackage{siunitx}
\begin{document}
    This is a big number \num{4000000000000}.

    In scientific notation... \num[scientific-notation=true]{4000000000000}
\end{document}

---------- ERROR

l.9 ...um[scientific-notation=true]{4000000000000}

I can only go up to 2147483647='17777777777="7FFFFFFF, so I'm using that number instead of yours.

! Number too big. 4000000000 000-10*\l__siunitx_tmp_int l.9 ...um[scientific-notation=true]{4000000000000}

I can only go up to 2147483647='17777777777="7FFFFFFF, so I'm using that number instead of yours.

  • Which version of the siunitx package do you have on your system? I have version 2016/01/19 v2.6p on mine, and I'm not able to replicate the error you're reporting. – Mico Feb 28 '16 at 21:15
  • I'm running Ubuntu 14.04 (GNOME). I don't know how I can check that information for you, but it is what it was available with a fresh install or with the package manager. I only did a manual installation of Texmaker 4.5. – Guilherme Vargas Feb 28 '16 at 21:31
  • You could look in the log file - search for the string Package: siunitx. – Mico Feb 28 '16 at 21:35
  • Package: siunitx 2013/07/31 v2.5s A comprehensive (SI) units package – Guilherme Vargas Feb 28 '16 at 23:07
  • 1
    Related: How to install “vanilla” TeXLive on Debian or Ubuntu? -- Linux distributions' TeX packages tend to be quite out of date, since a given release like 14.04 will only get security updates after a while (and most all TeX updates aren't security-related). Even a bleeding-edge distribution like Debian unstable will just get a snapshot of TeX packages periodically. – Mike Renfro Feb 28 '16 at 23:09
  • I'm afraid your copy of siunitx is badly out of date. Do try to (a) download the file siunitx.dtx from http://ctan.org/tex-archive/macros/latex/contrib/siunitx and (b) run LaTeX on the dtx file. Doing so should extract the file siunitx.sty and create the highly readable user guide, siunitx.pdf. – Mico Feb 28 '16 at 23:20
  • Downloaded it and extracted to a folder. Now whenever I try to compile it (tried LaTex/PDFLaTeX/...) it gives me errors. Usually "Log file not found". Is there another way to update my packages on Linux? Because I'd like to update everything that has an update available... – Guilherme Vargas Feb 28 '16 at 23:35
  • @GuilhermeVargas - Aah, I now recall that siunitx depends on the l3* packages, which of course have also been updated significantly since July 2013. I'm afraid I'm not an Ubuntu specialist, so I can't tell you how you may wish to proceed. Sorry. – Mico Feb 28 '16 at 23:46

1 Answers1

3

This issue has been solved in some version of siunitx between yours and the current version. Tested your MWE on Ubuntu 14.04, TeXLive 2015, siunitx 2.6p. No errors.

You just need to update your LaTeX installation.

My recommendation is to remove the Ubuntu LaTeX packages from your system completely. They are horribly outdated anyway and won't be updated. Something along the lines of:

apt-get remove texlive-base

Then download and install TeXLive and from there on use the utility tlmgr to update or add LaTeX packages on your system. Just follow the instructions from this SE answer. You should be up and running in no time (but note that downloading the full LaTeX repo may still take a while :-)