TeXworks ‘magic comments’

The new TeXworks release adds a new ‘magic comment’ to the set that the program knows. So I thought it might be useful to have a list of those that currently work, and a typical setting for each one.

% !TeX program = LuaLaTeX

The name of the typesetting engine to use for the current file, which should be one of the engines that is set up for use with TeXworks. This is useful if you normally use one engine (for example pdfLaTeX), but have a few files that need an alternative engine. In my example, the file would automatically use LuaLaTeX as the engine.

% !TeX encoding = UTF-8

Sets the file encoding for the current file. The usual default is UTF-8, but this setting is handy if you need to collaborate with other people using non-UTF-8 editors.

% !TeX root = somefile.tex

Indicates that the current file is not the main file for typesetting: when you choose to typeset, TeXworks will save the current file then typeset the master file. Using this setting, you need the full name of the master file including the extension. This is clearly a handy setting for larger projects, where you might have a lot of files which are to be included in one master document.

% !TeX spellcheck = de_DE

Specify the spell check language for the current file. This is a new setting in v0.4.0 (it was not present in the 0.2 stable release). The language of course needs to be one you have installed! One point to notice with the

root setting is how it interacts with program. Let’s imagine that the master file needs to be typeset using LuaLaTeX, and that your default engine is pdfLaTeX. You then need to include the program in each subsidiary file to get everything to work properly:

% !TeX root    = master.tex
% !TeX program = LuaLaTeX

If you don’t do that, when you try to typeset from one of the subfiles then TeXworks will use the currently-selected engine (probably pdfLaTeX) and

not LuaLaTeX for the typesetting. Once you know, this is not so surprising, but at first it caught me out!

New TeXworks build for Mac OS X (64-bit Intel)

I posted yesterday that v0.4.0 of TeXworks has been released: this marks a new stable branch in the code. I also pointed out that there are official Windows and Ubuntu builds. I’m now pleased to see that there is also an unofficial build for the Mac, at least for 64-bit Intel systems (like mine!). Thanks to Jjgod Jiang for doing this: I’ve posted before about the issues building TeXworks on the Mac. So I’m now happily using the first new Mac build for over a year.
TeXworks v0.4.0 on MacOS

TeXworks v0.4.0

Stefan Löffler has posted to the TeXworks mailing list the following:

Windows binaries and a source code bundle have been uploaded to GC, and Ubuntu packages are currently building (see https://launchpad.net/~texworks/+archive/stable/+packages). The web page (http://www.tug.org/texworks/) will be updated soon (just waiting for a routine pull from the GC repository). For a quick overview over the most important changes, please have a look at http://code.google.com/p/texworks/source/browse/tags/release-0.4.0/NEWS

This is very much evolution in TeXworks development: I’ve been using the unstable builds for some time with no serious issues, and doubt that will change much with the release of v0.4.0. I’ve quickly tested the Windows builds, and have also done a quick build on Ubuntu (see the screenshots). You will see that Mac OS X builds are currently missing: getting them working is currently proving to be something of a difficult task. So for the moment, on the Mac you have to stay with older (but quite usable) builds.


LaTeX in comments

A quick post which follows on from my earlier mention of QuickLaTeX. What I did not say was that as well as letting me use LaTeX in my posts, it also lets everyone use it in their comments. All you need to do is to put ![latexpage] at the start of your comment, and QuickLaTeX will then parse it and insert the relevant graphics. See for example my own use of this feature in a comment earlier today.

Sorting issues for consideration for siunitx v2.2

I’ve been leaving siunitx alone for a while, concentrating on bug fixes in the v2.1 branch. The  list of issues has continued to grow, and I’m now getting some organisation done before starting on items for v2.2. Some of these are more likely to get tackled, some rather less likely, but it’s best to get everything logged! If you look at the closed issues, you’ll see that part of getting organised is closing some bugs where I don’t feel that it is appropriate to take action. What I would say is that if you’ve got something you’d like considering, put it into the database. I do try to keep up with ideas by e-mail or from forums, but do forget some.

On particular thing I want to think about is the naming is some options and macros. I’ve had some discussion with Marcus Foster from CSIRO Information Management & Technology about siunitx, and he’s pointed out various errors on my part. Some of those, in the documentation, have been fixed. At the code level, he pointed out that what \SI prints are properly called quantities, and that units are separated by products. So I’m thinking of some reasonably radical renaming of macros and options (with the old ones retained, of course!). Feedback on these ideas would be welcome. At the same time, he’s not at all keen on the ‘qualifiers’ concept, but on that I think users would not be happy if I removed it!

Physical science styles for biblatex: improvements underway

As regular readers will know, I’m a big fan of the biblatex approach to producing bibliographies, particularly now that we have Biber ‘on tap’. There was a question on the {TeX} site a while ago about an IEEE style, and so I wrote the biblatex-ieee style as a partial answer. Doing that, I realised that my other biblatex styles need a bit of work. I’ve now revised both biblatex-nature and biblatex-science to make them more flexible, and also to improve their documentation. Next on the list is the biblatex-chem bundle: there are four styles in it, so it will take a little while. Once all of that is done, then I will take a look at the requirements for physics, which I’m going to call biblatex-phys.

Biber now in TeX Live 2010

Many readers will be familiar with the Biber program, a replacement for BibTeX which works with the biblatex package. Binaries for common platforms have been available from TLcontrib for a while, but have now been added to the main TeX Live 2010 system. So you can install Biber on the ‘common’ platforms using the TeX Live Manager (or tlmgr from the command line). Yet another reason to move on from BibTeX and switch to biblatex, if you’ve not already!