John Bowman has just announced version 2.05 of Asymptote, a 3D programmatic drawing package that uses TeX for typesetting its labels. Asymptote is unique in its ability to generate 3D graphics that can be rotated and zoomed within Adobe Reader, allowing far more interactive graphics for scientific documents.
John has written several TUG papers on Asymptote over the last few years; the latest was for the TUG 2010 conference held earlier this year in San Francisco (the video of John’s presentation is available on River Valley TV). I had the great pleasure of meeting John at the conference; amongst other things we discussed some improvements I had in mind for the LaTeX package for including Asymptote graphics within a document.
After the conference I foolishly went over the package and re-wrote much of it in the DocStrip format to better document the internal behaviour of the code. Unfortunately—hence the ‘foolishly’—many bugs were introduced in the process when my new code smoothed over edge cases that it shouldn’t have—but it’s now finally working and included in the main Asymptote distribution. The package source is now more modern and better documented (available in the file
doc/asy-latex.dtx in the Asymptote distribution), which should help with maintenance in the long run.
The main reason for the re-write was to add the feature to be able to include graphics defined in external files; before, graphics had to be included inline in the form
asy graphics code
The new version of
asymptote.sty allows you to write
where the asy graphics code is now placed in the file myfig.asy. This can be useful when you wish to re-use an Asymptote graphic between multiple files or if you just like to keep your document source as minimal as possible.
Thanks to John for his patience in testing the packages as bugs were fixed and yet more bugs were discovered. It’s been great to work together.