# What is XeTeX exactly and why should I use it?

I have been using LaTeX for five years now and have been using PDFLaTeX ever since. I find it hard to monitor the progress of LaTeX development. Recently there is a lot of talk about XeTeX. What is that exactly? Does it make sense to switch to it?

-
Related questions: Differences between LuaTeX, ConTeXt and XeTeX really covers this, and Frequently loaded packages: Differences between pdfLaTeX and XeLaTeX has useful pointers on moving from Pdflatex to Xelatex. –  Charles Stewart Sep 23 '10 at 7:16
One feature that I don't like is: Neither `xetex` nor `xelatex` support clipping! See this warning message. –  xport Aug 3 '11 at 15:56
`xetex` cannot determine the correct dimension of imported JPG images. We must convert the JPG to PDF first then `xetex` can produce the correct output. See here for the details. –  xport Aug 3 '11 at 21:26
This piece does a great job of explaining the differences between LaTeX, pdfTeX, XeLaTeX, LuaTeX, and ConTeXt: sharelatex.com/blog/2012/12/01/… –  Joseph Mornin Jul 15 at 1:29

If you have trouble with fonts and character sets, it may be for you: lots of people have the experience that things just work with Xetex which require fiddling with Pdftex. Two capabilities:

1. Xetex assumes its input is Unicode. To use Unicode with Pdftex, you need Tex code that manipulates encoding tables, like the `{inputenc}` Latex package;
2. Xetex treats many system fonts, like TTF and OTF, on a par with Tex fonts. Using them is generally no harder than giving the path to the fonts. Pdftex needs to have the font metrics described to it for system fonts. Luatex can figure out this from system fonts, but it's not a perfectly troublefree matter yet.

If these aren't issues for you, then there's not much reason to consider moving to Xetex. Pdftex has more sophisticated microtypography.

Look at Joseph Wright's answer to the Differences between LuaTeX, ConTeXt and XeTeX question: Luatex is intended to be the successor project to Pdftex, and he is informative about what is ahead.

-
Thanks, that really makes it clear for me. –  Ingo Sep 23 '10 at 7:23
On point 1, if you use any non-European script, using XeTeX makes life simple, and should be your first choice. The `inputenc` package only covers a limited part of Unicode. –  Alan Munn Aug 3 '11 at 15:55

I've switched to XeLaTeX a couple of months ago in order to use Open Type Fonts. Although I find the system stable and easy to use with the excellent `fontspec` package, there a few issues that should be mentioned:

• If you are using ligatures such as old style figures you cannot copy & paste text from a PDF (see Small-caps, old-style numbers, and some ligatures produce odd symbols in PDF copy text?). Instead that text will be represented by missing symbols. That is an absolute killer if you want your documents do be indexed or want that others can copy and paste easily.

• Someone (not me) mentioned on tex.sx that development of XeTeX has been progressing very slowly as the developer is busy with other things (no rant or criticism intended!). That means that it might take very long for a particular feature to be implemented or bugs to be fixed.

• As mentioned before, microtypography is currently an issue with XeTeX.

• It is recommended not to use `babel` with XeTeX (although it works if you are just using "Latin" languages).

These four issues (particularly the first one!) have convinced me to use LuaTeX instead of XeTeX as all of them are resolved in LuaTeX. I have yet to find any issues with it (apart from that it is a little slow with my fairly complicated templates). So if you want to change from pdfLaTeX you could also consider LuaTeX.

-
Are any of these issues resolved with Lua(La)TeX? –  Ingo Mar 28 '12 at 10:21
Yes, that's what I wanted to say (obviously not clearly enough). 1) Copy and paste of ligatures is possible, just as it is in PdfLaTex. 2) AFAIK the development team is very active. 3) LuaTeX supports protrusion and font expansion directly. 4) Babel is supported, although polyglossia is not (yet). –  Jörg Mar 28 '12 at 10:55
"ligatures such as old style figures"… text figures and ligatures are different things, no? –  Mk12 May 26 at 20:20