02.27.07

listings 1.4

Posted in Tex, LaTeX, and ConTeXt at 1:16 am by Brooks

I sent off the tarfile for the listings 1.4 distribution to CTAN this afternoon. It should be posted to the official mirrors within the next day or two.

This marks the first significant bugfix release in nearly three years; I took over the official maintenance of this package early last year, after the previous maintainer simply disappeared. It feels good to have this back in the realm of actively-maintained packages again, even if I am a little slow about replying to bug reports sometimes.

Also, although this doesn’t show in the release, I was for a few hours this afternoon completely caught up on listings-related email. (I got another bug report this evening, though.) One of the perks of having one’s email address at the top of the documentation is that one gets a lot of questions as well as things that are truly bugs in the package; cases where someone wants to do something like highlighting parentheses and brackets and numbers, which the package doesn’t directly support, and so I spend 15 minutes or so hacking up a workaround for them. Sometimes these questions result in new functionality, too — the old versions assumed that if \chapter was defined, the user wanted the listing-number counter to reset at each chapter, and the only way I could find to change that on the user side was to temporarily undefine \chapter around the \usepackage{listings} macro. Now, there’s a numberbychapter key that can be set to “true” or “false” in the preamble.

This release also has the usual selection of small fixes to handle newly-discovered and newly-created conflicts with other packages, and I particularly want to thank Markus Kohm for his bug reports, which always contain an insightful analysis of whatever is conflicting with his KOMAscript document classes this year, and a small piece of code that I can copy in to make things work right again.

There’s also a new \lstMakeShortInline macro, which defines a character as an equivalent to \lstinline with the appropriate user-specified options. This is a pleasant case of unintended consequences; a couple of years ago, I was corresponding with Frank Mittelbach (of the LaTeX3 project) about some suggestions I had for making the LaTeX Project Public License — which is essentially the TeX-world equivalent of the GPL, used by nearly everything on CTAN — more appropriate for cases where one’s borrowing a bit of code from one project to use in another rather than distributing a slightly-modified version of the original project, and I believe a few of those ideas made it into updated versions of the license. (At the least, Frank clarified that the intent of the original license allowed that sort of copying, even if the wording was arguably unclear.) And it turned out today that implementing this bit of functionality was almost trivial to do, because I could copy an equivalent implementation for inline verbatim environments from the LaTeX documentation classes.

This post also wouldn’t be complete without thanking Carsten Heinz, the original author of the package. Although the code is deeply arcane and complicated in places, in the way that only a general-purpose parser implemented in TeX could be — which is not to be confused with the way that a TeX output routine to handle three levels of cross-referential footnotes in scholarly editions of originally-footnoted books can be, and I am glad David Kastrup is writing that piece of code and I am not! — it has quite a significant amount of documentation, including several chapters on the high-level design and implementation which are almost completely useless to anyone who’s not working on the internals of the package. There’s a line at the beginning of them, saying, “First I must apologize for this developer’s guide since some parts are not explained as well as possible. But note that you are in a pretty good shape: this developer’s guide exists!” And every time I read it, I smile, because he’s right: I am, and it makes a tremendous difference.

11.21.06

Slides from the 2006 APS fluid dynamics meeting.

Posted in Computational Fluid Dynamics, Dissertation Research, Tex, LaTeX, and ConTeXt at 2:04 pm by Brooks

The 2006 annual conference of the American Physical Society’s Division of Fluid Dynamics just ended a few hours ago, here in Tampa. As usual, I’ve put the slides from my talk up on dpdx.net/research/papers. Direct links: abstract, Slides in PDF form, and ConTeXt source for the slides. It’s a fun conference; unlike most, the talks are only ten minutes long, so it’s pretty easy to hit information overload by the end.

I’ll post some more about these results once I get home. I’ve been working pretty hard on this for the last few months, and haven’t had time to post much about it here, but things should be a bit less hectic soon. My code is finally producing results (luckily just in time for the conference!), and the results are considerably more dramatic than I was expecting — a pleasant surprise!