LuaTeX: new primitives, new names

There has been quite a bit of dicussion recently on the LuaTeX mailing list about primitive names. The basic set of primitive names provided by TeX has already been extended by e-TeX, pdfTeX and XeTeX. While e-TeX primitives have names which express only the function (such as `\detokenize`), both pdfTeX and XeTeX have tended to add the engine name to all new primitives. So for example pdfTeX provides the `\pdfprimitive` function, which always carries out the orginial function of a name, even if it has later been redefined:

```\let\everypar\undefined
% \everypar{Some stuff} % Gives an error
\pdfprimitive\everypar{Some stuff}```

will, for example, add material to `\everypar` despite the redefinition.

In LuaTeX, the idea of adding an engine-specific prefix has been abandoned. The example above shows one reason why: `\pdfprimitive` makes more sense with the name `\primitive` (which is what LuaTeX calls it). The problem with this is that name clashes are marginally more likely without a prefix (for example, `\expanded` is used in ConTeXt as a macro, but this is planned as a primitive for pdfTeX 1.50).

On the other hand, LuaTeX is a fundamental break with previous engines, as the internal changes mean that it may give different line breaks and so on to earlier systems. Thus the argument for new, logical, primitive names is that moving to LuaTeX is not the same as moving from TeX to pdfTeX or pdfTeX to XeTeX. There will be changes, and the user (or package developer) will need to think about them before diving in.

Overall, I think the LuaTeX idea is the best in the long term. Primitives which have well specified names help everyone, and some times change is necessary. I’ll be interest to see if the `\directlua` primitive for actually using Lua ends up with a shorter name (just `\lua`, anyone?).

Stability is one thing, but don’t loose the source!

I’m currently doing a couple of maths courses with the Open University (OU), for which we get booklets containing the course material by post. In recent years, the OU have made the material available on-line as well, for current students. This is very handy if you need to access things while away from home. However, one of my current courses doesn’t have the material on-line at the moment.

What’s going on? The course has been presented for a number of years (the original copyright is 1993), and so there were originally no PDF files: everything was printed from film. This being a maths course, the original source was TeX-based. So you’d expect that the OU could just re-TeX the source using pdfTeX and all would be okay. That is, if they still had the source!

The moral: TeX may be stable, but you still need the source files.