ArticleslgStudy

computer science

XeTeX

XeTeX is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand XeTeX rather than just read about it. In short: XeTeX ( ZEE-tekh or ; see also TeX § Pronunciation and spelling), sometimes stylized as XeTeX, is a TeX typesetting engine using Unicode and supporting modern font technologies such as OpenType, Graphite and Apple Advanced Typography (AAT). It was originally written by Jonathan Kew and is distributed under the X11 free software license.

XeTeX — main illustration
XeTeX — illustration

Key takeaways

  • XeTeX belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect XeTeX to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of XeTeX from memory before moving on to harder problems.

Reference excerpt

XeTeX ( ZEE-tekh or ; see also TeX § Pronunciation and spelling), sometimes stylized as XeTeX, is a TeX typesetting engine using Unicode and supporting modern font technologies such as OpenType, Graphite and Apple Advanced Typography (AAT). It was originally written by Jonathan Kew and is distributed under the X11 free software license. Initially developed for Mac OS X only, it is now available for all major platforms. It natively supports Unicode and the input file is assumed to be in UTF-8 encoding by default. XeTeX can use any fonts installed in the operating system without configuring TeX font metrics, and can make direct use of advanced typographic features of OpenType, AAT and Graphite technologies such as alternative glyphs and swashes, optional or historic ligatures, and variable font weights. Support for OpenType local typographic conventions (locl tag) is also present. XeTeX even allows raw OpenType feature tags to be passed to the font. Microtypography is also supported. XeTeX also supports typesetting mathematics using Unicode fonts that contain special mathematical features, such as Cambria Math or Asana Math as an alternative to the traditional mathematical typesetting based on TeX font metrics. LaTeX developers have announced that they no longer support new LaTeX functionalities on the XeTeX engine, and encourage users to migrate to LuaTeX, another Unicode-supporting engine.

Mode of operation

XeTeX processes input in two stages. In the first stage XeTeX outputs an extended DVI (xdv) file, which is then converted to PDF by a driver. In the default operating mode the xdv output is piped directly to the driver without producing any user-visible intermediate files. It is possible to run just the first stage of XeTeX and save the xdv, although as of July 2008 there are no viewers capable of displaying the intermediate format. Two backend drivers are available to generate PDF from an xdv file:

xdv2pdf, which uses ATSUI and QuickTime frameworks, and only works on Mac OS X. xdvipdfmx, a modified version of dvipdfmx, which uses FreeType. This driver works on all platforms. Starting from version 0.997, the default driver is xdvipdfmx on all platforms. As of version 0.9999, xdv2pdf is no longer supported and its development has been discontinued. XeTeX works well with both LaTeX and ConTeXt macro packages. It is usually invoked through xelatex when using LaTeX. It is usually used with the fontspec package, which provides a configurable interface for font selection, and allows complex font choices to be named and later reused. XeTeX is bundled with TeX Live, MacTeX, MiKTeX and LyX (see the History below for dates and versions).

Example The following is an example of XeLaTeX source and rendered output. The typeface used is OFL-licensed font Linux Libertine. The text is to be processed by the command xelatex.

Arabic support XeTeX also supports right-to-left scripts, such as Arabic. One way of rendering Arabic in XeTeX is to use the package arabxetex. In order to do so, the Arabic is placed inside the following:

The following code illustrates this:

Features In bibliographic files (see below the BibTeX example) you can use Unicode entities and call them with their native scripting, for example \cite{Ekstrøm}, instead of a transliterated ASCII form like \cite{Ekstrom} which is mandatory using the pdfTeX engine.

History XeTeX was initially released for Mac OS X only in April 2004 with built-in AAT and Unicode support. In 2005 support for OpenType layout features was first introduced. During BachoTeX 2006 a version for Linux was announced, which was ported to Microsoft Windows by Akira Kakuto a few months later, and finally included into TeX Live 2007 for all major platforms. XeTeX is also supported by LyX since version 2.0 and shipped with MiKTeX since version 2.7. As of the inclusion in TeX Live, XeTeX supports most macro packages written for LaTeX, OpenType, TrueType and PostScript fonts without any specific setup procedure. Version 0.998 announced at BachoTeX 2008 supports Unicode normalization via the \XeTeXinputnormalization command. Version 0.9999, released in May 2013, switched from ICU Layout Engine to HarfBuzz for OpenType layout, and Graphite2 engine for Graphite layout, as well Core Text framework instead of ATSUI on Mac OS X. XeTeX's original SourceForge code repository has not seen changes since January 20, 2020. It's still included in the TeX Live repository and occasionally receives fixes, but there have been no major developments. LaTeX developers have stated that it won't be supported in their ongoing effort to produce tagged PDF, and one developer has considered it unmaintained.

See also

LuaTeX Omega (TeX) Typeface TeXworks – A multi-platform, Unicode editor designed for working with TeX files, written by the author of XeTeX. List of TeX extensions

References

Further reading M. Goossens (Ed.) (2008) The XeTeX Companion: TeX meets OpenType and Unicode.

External links

Official website The Beauty of LaTeX: illustrates XeTeX use with professional fonts. XeTeX Showcase at TUG.

Illustrations

XeTeX illustration
XeTeX: Rendering of ligatures and contextual alternates in XeTeX using an OpenType font (Hoefler Text)
Rendering of ligatures and contextual alternates in XeTeX using an OpenType font (Hoefler Text)
XeTeX: The rendered output.
The rendered output.
XeTeX: Arabic text using XeTeX
Arabic text using XeTeX

Worked examples

Example 1 — a first encounter with XeTeX

Start with the simplest possible case. Write down what XeTeX claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to XeTeX before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about XeTeX ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of XeTeX

In research
XeTeX appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses XeTeX in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
XeTeX is common in secondary-school and first-year university syllabi. It links to neighbouring topics 2007 software, Digital typography, Free PDF software, so understanding it makes those chapters shorter.
In everyday life
Look for XeTeX outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “XeTeX” →

How to study XeTeX in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what XeTeX means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain XeTeX out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is XeTeX in simple terms?

XeTeX ( ZEE-tekh or ; see also TeX § Pronunciation and spelling), sometimes stylized as XeTeX, is a TeX typesetting engine using Unicode and supporting modern font technologies such as OpenType, Graphite and Apple Advanced Typography (AAT). It was originally written by Jonathan Kew and is distribut…

Why does XeTeX matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study XeTeX?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on XeTeX.

Tags

  • 2007 software
  • Digital typography
  • Free PDF software
  • Free TeX software
  • Linux TeX software
  • Software using the MIT license
  • TeX
  • Unicode

Keep exploring