206

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?

6
  • 6
    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
  • 1
    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
  • 1
    This piece does a great job of explaining the differences between LaTeX, pdfTeX, XeLaTeX, LuaTeX, and ConTeXt: sharelatex.com/blog/2012/12/01/… – Joe Mornin Jul 15 '13 at 1:29
  • 4
    One of the many problems with the Stack Exchange network is that even though it's been 10 years since this question was asked, and I'd like to know what the current answer to the question would be, to ask it as a separate question would be considered duplication. – Hashim Aziz Mar 23 '20 at 20:20
128

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.

8
  • 14
    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
  • @AlanMunn But is pdfLaTeX still preferred for less popular languages which are supported by babel but not polyglossia? People talk as though XeLaTeX/LuaLaTeX is a linguist's dream and I'm sure that's true for some languages (especially those written in non-Latin alphabets) but I can't figure out any solution for hyphenation in polyglossia for some languages. Or can you continue to use babel with XeLaTeX/LuaLaTeX? (I had the impression not but its only an impression.) EDIT: Isee the next ans. says babel works but is not recommended. Why not? – cfr Jan 15 '14 at 23:38
  • 2
    @AlanMunn Thanks. Do you happen to know: Is the plan for polyglossia to eventually replace babel? If so, will languages currently supported by babel get support in polyglossia or will support for them disappear (or is this just unknown)? – cfr Jan 16 '14 at 0:12
  • 1
    @cfr Plan? You think there's a plan? :) This is open source software... But seriously, I think that both packages will develop independently and the invisible hand of the market will decide. (And I can't believe I just said that!) – Alan Munn Jan 16 '14 at 17:03
  • 1
    @AlanMunn Open source doesn't mean there's no plan. Indeed, their proliferation is sometimes a challenge in itself. Whether any of them get carried out is a different question. ;) I guess I am just worried that languages supported by babel will disappear and TeX without hyphenation patterns is not much use. So I was really just wondering if anybody had thought much about this since polyglossia currently focuses support on a popular subset of languages supported by babel, as far as I can tell. But thanks for the insight. If babel continues to develop, that's much more hopeful. – cfr Jan 16 '14 at 19:40
33

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.

3
  • 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
  • 4
    "ligatures such as old style figures"… text figures and ligatures are different things, no? – mk12 May 26 '13 at 20:20
15

Here is a point that is implicit in the thorough comments and linked answers referenced above, but possibly not obvious.

Installing and managing fonts in traditional TeX systems can be daunting. For me, given that I want to focus on writing rather than software management, messing around with fonts was often not worth the trouble. XeTeX allows me to use lots of fonts easily while remaining ignorant (i.e. while allowing me to keep my time free for learning those things that are most important for me). On a Mac, at least, it's trivially easy to install fonts using a program like OS X's Font Book, and then XeTeX lets me pull those fonts into my LaTeX documents. Sounds like something similar is true for other popular operating systems.

0

With XeLaTeX you can just write texts of different languages together, as simple and natural as you do in Notepad, HTML, Microsoft Word and any other modern ones. You don't need to learn and write babel or CJK just to get the things done as they should be.

I don't use many fonts so not familiar to XeLaTeX's advantages on fonts.

1
  • 6
    Sadly, without babel, words in languages other than English won't be hyphenated correctly, so XeTeX all by itself isn't much help. – barbara beeton Apr 4 '20 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.
https://tex.stackexchange.com/questions/3393/what-is-xetex-exactly-and-why-should-i-use-it
tex.stackexchange.com
crawl=CC-MAIN-2021-10
202201
application/http; msgtype=response
sha1:CAKWL2TS3PIFEMHHCB4UKKRCXXOKUD2Z
<urn:uuid:12c402b5-e621-4b19-86ff-e0e5d7645ad1>
2021-03-02T22:50:30Z
151.101.1.69
text/html
sha1:IVDDVCWM2P3GOZIBDCR2YMS2Q4JQEVWF
<urn:uuid:b2efa9ff-bd02-4530-b4d4-a9b613d5f16d>
https://tex.stackexchange.com/questions/3393/what-is-xetex-exactly-and-why-should-i-use-it
response
<urn:uuid:c979a760-7ea1-4832-9770-8b51fe7dacbe>
isPartOf: CC-MAIN-2021-10
publisher: Common Crawl
description: Wide crawl of the web for February/March 2021
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-233.ec2.internal
software: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/