XeTeX and LuaTeX: Directions

The XeTeX and LuaTeX engines both offer exciting ideas to the TeX user and the (La)TeX programmer. Using XeTeX, UTF-8 input is easy: no more awkward escape sequences. Font handling in XeTeX also makes it trivial to use any font installed on your system. On the other side of the equation, LuaTeX is going to bring a lot of useful programming tools to the TeX world. This should make some things a lot easier (handling floating point manipulation seems an obvious one), and make other things possible that are not currently.

The issue for me is the gaps between the two. XeTeX doesn’t have things like microtypography (try loading the microtype package and doing a XeLaTeX run), and it’s not clear to me how LuaTeX will work out with font handling. There’s also the DVI versus PDF issue: will we see a system where EPS, PNG, JPEG and PDF graphics can all be included without worrying about the engine in use? In many ways, I suppose these questions are more for the LuaTeX team to address: XeTeX has essentially delivered what it set out to do (a Unicode TeX which can use system fonts natively).

8 thoughts on “XeTeX and LuaTeX: Directions

  1. Hi,
    I use luaTeX from time to time (when writing in ConTeXt). What I think is that it might eventually replace XeTeX in most applications. It already has really advanced font handling (including otf), which, I have to admit, I can’t understand;). And Hans & Taco are going to implement more candy in the future…

  2. As I understand it, the key difference with fonts is that XeTeX extends the TeX primitives directly, so that font and so on can use system fonts. My understanding is that in LuaTeX you need to do some lua calls to load the fonts. So “out of the box” XeTeX makes things easier. This particularly applies to plain TeX users, where XeTeX makes system fonts available without extra work, in a way that just using the LuaTeX engine does not. Of course, if you are using ConTeXt Mark IV then the problem disappears. Currently, the fontspec package makes using XeTeX with LaTeX really easy, but there is not yet a similar package for LuaTeX.

  3. Perhaps XeTeX offers better “out of the box” experience but LuaTeX has so much more to offer. I’m just taking my first steps in Lua and there’s a lot to like. Tiny language with very few but powerful syntactic constructs and some syntactic sugar to make it sweeter. You can learn the basics in one afternoon and this is not just a slogan. I think that ConTeXt team made an excellent choice with Lua. It will definitely revolutionize TeX. I just wonder if LaTeX3 will be equally revolutionary.

    As for DVI vs. PDF issue – it is really PS vs. PDF issue. To get PS support in PDF mode one would need to integrate PS interpreter into the engine. Technically it should be possible to bolt GS on top of LuaTeX but Taco said [1] that GS is not stable enough for that (or maybe he just has enough of other things to do). So sadly, PS support in PDF mode won’t be coming any time soon.

    [1] http://media.river-valley.tv/conferences/tug2008/0401-Taco_Hoekwater.ogg

    • Don’t get me wrong: I’m also exciting by LuaTeX (particularly in the context of siunitx, and number processing). I’m just (slightly) surprised that there isn’t “out of the box” system font support there: surely we need one engine in the long term (there are not that many people supporting these things). As I said, this will probably hit plain users most, as LuaTeX will need them to learn Lua to use system fonts, in a way that XeTeX does not.

      Will LaTeX3 be revolutionary? If the team can deliver it, and do even half of what they are aiming at, then yes I’d say so.

      You are quite right that PS is the issue with output format. Lots of people depend on PS methods for their output, so the continued availability of this route is important. With something like auto-pst-pdf, the key thing is that the engine provides both routes, not necessarily that PS-in-PDF is available.

  4. Isn’t it possible to redefine TeX font primitives with macros calling Lua font system? I’m pretty sure that those things will get sorted out over time.

    As for LaTeX3, I have a real trouble to put my finger on what exactly they are aiming at. I understand that things will get better for package writers but what else will change? In my mind the most burning problem of LaTeX is not package writing. LaTeX desperately needs a stable file format (as in machine readable).

  5. I have been struggling with Mark IV for the past couple of days. The standard CMR fonts work properly. With the non-standard (i.e., for Tex while trivial for MS Word and InDesign) font handling, I think XeTex is light years ahead of LuaTex. For a starter, there is no coherent single place documentation for installing and running Mark IV. After following the instructions in the context wiki – there are multiple repetition and contradictions in the Context Standalone – I finally made it work.

    The real difficulty comes when making the Unicode Tamil (South Indian language) fonts work with Luatex. I was not able to get the right rendering and no clear documentation on using unicode fonts out of the box – you have to be installing, generating fonts etc., I did all of them…But, the rendering was not satisfactory = unreadable. Lua makes loading system fonts and making them work unnecessarily complex. The “simplefonts” module is a relief. I tried with that also. In the end, for system font handling out of the box Xetex is a clear winner for simple users.

    While Lua might bring power and configurability, XeTeX is beautifully simple to start with and I was able to create a working Tamil document in one hour or even less than that.

    Lua team should try to simplify things for normal users if Lua is to be adopted widespread.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.