Some TeX Developments

Coding in the TeX world

siunitx version two: Snapshot 1 (SVN 22)

with 7 comments

As promised a while ago, I’ve been working to get a snapshot of my work on siunitx version 2 ready. I’ve now got something that works “as far as it goes”, so I’m making a first snapshot available. This is version control (SVN) repository revision 22, which you can see on BerliOS. As this is a very earlier version of what I’m looking at, I’m just posting three files here:

Currently, only the \num macro works at all, and even then only for single numbers. However, there are several points to note for testers and interested users:

  1. The package understands complex numbers.
  2. The options use pgfkeys, although this may change.
  3. Input and output of numbers are much more clearly separated, which makes extension much easier.
  4. A number of subtle bugs in version one are fixed here. (No-one else seems to have noticed them, so for the moment I’ve not fixed them in the release version!)
  5. Currently, only the new options are implemented, although before release the full set of version one options will be implemented.

Although the snapshot is not functional enough for general use, I’d appreciate any feedback people can give. There are probably some bugs in the number code, which obviously I’d like to hear about. The new option arrangement is something I’d like to get opinions on. I feel it is much more logical (and easier to extend as new ideas arrive), but I’m obviously keen to see how others see it.

Written by Joseph Wright

February 7th, 2009 at 8:02 pm

Posted in LaTeX,siunitx

7 Responses to 'siunitx version two: Snapshot 1 (SVN 22)'

Subscribe to comments with RSS or TrackBack to 'siunitx version two: Snapshot 1 (SVN 22)'.

  1. Looks interesting. In the manual, on bottom of page 3,

    \num{-e10} gives $- \times 10^{10}$

    Shouldn’t that be $-1 \times 10^{10}$?

    Aditya Mahajan

    8 Feb 09 at 1:43 am

  2. Hmm, well the \times is clearly wrong. On the other issue, \num{e10} gives $10^{10}$, which is logical, and I think mathematically \num{-e10} giving $-10^{10}$ is also okay. I need to think about that one. (Note that version 1 acts as I’ve described: no “1 \times” is added.)

    Joseph Wright

    8 Feb 09 at 10:51 am

  3. Ah, $-10^{10}$ is also perfectly alright. I saw the $- \times$ and thought that the 1 was missing :)

    Aditya Mahajan

    9 Feb 09 at 3:29 pm

  4. This is fixed in the SVN, so will be okay in the next snapshot (hopefully in March).

    Joseph Wright

    9 Feb 09 at 7:21 pm

  5. Hi Joseph,
    in the docu I found a few things:
    - the \SI command only gives the \num output, because you wrote, that until now just the \num is working, right?
    - on page 9 there is a wrong \ref giving ??
    - when you use a comma in output, a thin space is added after it

    Best regards,
    Stefan

    Stefan Pinnow

    7 Mar 09 at 10:43 am

  6. Hello Stefan,

    Taking your questions in order:

    - Yes, the only user macro that works is currently \num. I hope to have a second snap shot toward the end of this month which does the basics for \SI, although it will take a little longer to get everything together!

    - This is deliberate: I’ve not written what it is going to point at, but I know I need to!

    - Yes, I’d noticed that: I need to think about it (should happen before snap shot 2).

    Thanks,

    Joseph

    Joseph Wright

    7 Mar 09 at 2:01 pm

  7. On the comma issue, this points up an odd “feature” of pgfkeys. It removes one more set of braces than it should. I’ll work on that at some point (I’m not sure how I’m going to do the keyval support for release at the moment).

    Joseph Wright

    7 Mar 09 at 8:09 pm

Leave a Reply