siunitx version two: Snapshot 1 (SVN 22)

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.

Package support

I get a reasonable stream of e-mails about my LaTeX packages, mainly achemso and siunitx. As a rule, I try to answer queries within a day or two, especially if I can easily provide a solution. Minor bugs tend to get done in the same time frame, with bigger bugs and feature requests sometimes needing a couple of weeks. There is the occasional “big problem” that needs more work, such as the list of issues that siunitx version 2 will hopefully deal with; these don’t really have a timescale at all, except I let people know that! I tend to keep an eye out on comp.text.tex and the LaTeX Community for questions about my packages, although often other people manage to get in first with good answers.

All of this raises the question “why”: after all, this is a hobby for me. I guess that as I’ve put a lot of work into the packages I want them to work well. So bugs, unclear documentation and new ideas all drive me to improve.

siunitx update

Lars Løge has reported a couple of errors with the textmode option in siunitx. One was rather harder to spot than the other, but both should be fixed in v1.2e, which has just gone to CTAN. I’ve also had some questions about table formatting with footnotes, but this is a “hard problem” and I’m not likely to alter the current behaviour in version 1. It is on the list for version 2 (although I need to look again at pgfplotstable first, and see if it is worth the work).

Programming: Lua versus TeX

As LuaTeX progresses, the desire to use it in real documents increases. ConTeXt Mark IV is clearly the leading exponent of this, although it is still experimental and so perhaps not the best choice for day-to-day work. Karl Berry has said to me that he hopes that the inclusion of a “proper” programming language will bring new talent to (La)TeX. After all, some of the methods used to program TeX are complex to say the least.

This raises the question of how much to do in Lua and how much in TeX. Clearly, LuaTeX brings things to TeX that are impossible without it. So there it is simple: use Lua. However, what about things that can be done with either Lua or TeX? Part of this probably depends on the complexity of the different solutions (if it is easy in TeX, why do it in Lua, and vice versa). I’d also imagine that experiences TeX programmers will tend to stick to what they know, and favour TeX. On the other hand, new programmers coming to TeX because of Lua will favour the Lua route. I imagine that there will still be a lot more TeX than Lua code.

Babel woes

I’ve had a couple of babel-related bug reports for siunitx. The first was with the Spanish language option, where the \percent unit misbehaves as \% is redefined by babel. My fix for this has then caused a problem with the Italian language option, as it makes ” an active character. So the latest release (v1.2d) fixes this too: apologies for the problems.

All of this makes more more eager than ever that a general move to UTF-8 input happens. This should cut down on the need for babel. At the same time, an updated LaTeX kernel (LaTeX3) which includes more functionality would also help package authors know what to expect.