31

What are the things to know when moving from XeTeX to LuaTeX, particularly when it comes to TTF/OTF support and OpenType features?

5 Answers 5

20

The only difference is for Linux: OpenType or TrueType fonts from the TeX directory structure, e.g. the texgyre fonts, have to be assigned by its filename for XeTeX, e.g. \fontspec{texgyre-pagella.otf}. LuaTeX itself also searches the TeX font directories, the reason why LuaTeX finds such font defined by its family name, e.g. \fontspec{TexGyre-Pagella}. For MiKTeX it should make no difference, fonts should be found.

The package mathspec works only for XeTeX. And polyglossia doesn't work with LuaLaTeX yet.

11
  • In XeTeX on Linux, I currently use the font name, not the font filename. For example, I do \fontspec{Linux Libertine O} and it works. Does fontspec work with LuaLaTeX? I get an error when I run lualatex on a tex file using fontspec (using TL2009)...
    – raphink
    Commented Jul 20, 2011 at 14:47
  • Are you sure that font names don't work on TeXLive? The font database is generated by lualatex/luaotfload/mkluatexfontsdb and if a font is found at all why shouldn't the font name be in the database too? There is certainly no problem on miktex, lualatex accepts even a lot of name variants like \setmainfont{TeXGyrePagella}. Commented Jul 20, 2011 at 15:03
  • @Ulrike: I wrote, that XeTeX needs the file name!
    – user2478
    Commented Jul 20, 2011 at 15:34
  • Ah. Sorry I read it the other way round. Doesn't this here solve the problem: tug.org/texlive/doc/texlive-en/texlive-en.html#x1-350003.4.4? (But it can also lead to trouble if too much folders are searched and used by xetex. XeTeX doesn't like it very much if a font exists in two variants.) Commented Jul 20, 2011 at 16:01
  • 1
    @Ulrike, sure that's the problem but LuaTeX solved it in user friendly way, XeTeX not ... and of course, all fonts should go into one system and one local folder.
    – user2478
    Commented Jul 21, 2011 at 9:47
5

If you want to move from XeLaTeX to LuaLaTeX, you should read lualatex-doc. If you want to use from ConTeX MkII to MkIV, many things will change.

1
  • I'm interested in moving to a modern cutting-edge system, and mostly benefiting from font expansion while still keep an easy way to manage TTF/OTF fonts with OpenType features. I do not plan on using ConTeXt though, but rather keep with LaTeX for now (I'm using specific LaTeX packages such as bibleref).
    – raphink
    Commented Jul 20, 2011 at 21:12
5

There are some caveats with multilingual typesetting with OpenType shaping features; I'm not really the one to ask about it, though. XeTeX uses the ICU to do its OpenType magic, which as I understand things is a lot more comprehensive than what's currently done by LuaTeX and its supporting machinery. For example, unless things have changed recently, I don't believe that LuaTeX will be able to typeset Indic languages correctly.

XeTeX isn't a silver bullet here either, but I think its coverage is more comprehensive.

2
  • Most of my needs as far as OpenType features are concerned are ligatures, letter/word spacing, oldstyle/uppercase numbers, small caps, alternate forms. Nothing really fancy.
    – raphink
    Commented Jul 21, 2011 at 8:24
  • In that case no problem :) Commented Jul 25, 2011 at 9:24
5

As I actually ended up switching from XeTeX to LuaTeX, I've met a few other problems.

Most notably:

  • LetterSpace and WordSpace options in fontspec are not supported in LuaTeX, so you have to use textls from microtype like in PDFTeX in order to achieve tracking;
  • textls sometimes break with small caps (see textls breaks smallcaps with luatex).
0

My main motivation for moving from XeTeX to LuaTeX was movies. As it is said in my posts (Can XeLaTeX | LuaTeX import movies ?, Why \movieref does not work under XeLaTeX) XeTeX has troubles with importing movies. The latter one is still unresolved.

1
  • movie15 has been deprecated in favor of package media9, which does work under XeTeX.
    – 0 _
    Commented Aug 19, 2014 at 7:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .