3

I have to compile my dissertation on two machines with two different TeX Live versions (TeX Live 2009 on Ubuntu 12.04 and now TeX Live 2013 on Ubuntu 14.04). Unfortunately, the siunitx maintainer decided to drop the alsoload=binary package option (TeX Live 2009) in favor of the binary-units=true option (TeX Live 2013). This means I cannot compile it on both machines without manually removing one or the other option.

How can I load such packages in a future-proof manner?

  • This doesn't answer your question, but it may solve your problem: tex.stackexchange.com/questions/73016/… You can install the newer version of siunitx on the older Ubuntu and use it with your document. If you install it locally to your account, it should not affect any other users of the computer, if it is a shared computer. – darthbith Apr 18 '14 at 17:14
  • Yes, I actually thought about installing siunitx locally if there is no other way to do it. – matthias Apr 18 '14 at 18:20
6

The alsoload option is for various reasons one that I couldn't add simple 'switch to the v2 approach' code for. As such, you'll need to do a version check. The change to v2 happened on 2010-05-23, so

\documentclass{article}
\usepackage[alsoload=binary]{siunitx}
\makeatletter
\@ifpackagelater{siunitx}{2010/05/23}
  {\sisetup{binary-units = true}}
  {}
\makeatother
\begin{document}

\SI{10}{\byte}

\end{document}

will do the job. (LaTeX2e's \@ifpackagelater is a bit odd as it means 'this date or later'. For more on checking versions in general see Which package version am I using?)

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.