Original author(s) | Jonathan Kew |
---|---|
Stable release | 0.99999
/ February 4, 2018 |
Repository | |
Written in | Pascal (WEB), C and C++ |
Operating system | Cross-platform |
Type | Typesetting |
License | MIT License |
Website | xetex |
XeTeX (/ˈziːtɛx/ ZEE-tekh[1] or /ˈziːtɛk/; see also Pronouncing and writing "TeX") 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.[2]
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.
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.[3]
XeTeX works well with both LaTeX and ConTeXt macro packages. Its LaTeX counterpart is invoked as xelatex
. 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.[4]
XeTeX is bundled with TeX Live, MacTeX, MiKTeX and Lyx (see the History below for dates and versions).[5]
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
.
\documentclass[11pt]{article}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Linux Libertine O}
\begin{document}
\section{Unicode support}
\subsection{English}
All human beings are born free and equal in dignity and rights.
\subsection{Íslenska}
Hver maður er borinn frjáls og jafn öðrum að virðingu og réttindum.
\subsection{Русский}
Все люди рождаются свободными и равными в своем достоинстве и
правах.
\subsection{Tiếng Việt}
Tất cả mọi người sinh ra đều được tự do và bình đẳng về nhân phẩm và
quyền lợi.
\subsection{Ελληνικά}
Ὅλοι οἱ ἄνθρωποι γεννιοῦνται ἐλεύθεροι καὶ ἴσοι στὴν ἀξιοπρέπεια
καὶ τὰ δικαιώματα.
\section{Legacy syntax}
When he goes---``Hello World!''\\
She replies---“Hello dear!”
\section{Ligatures}
\fontspec[Ligatures={Common, Historic}]{Linux Libertine O Italic}
Questo è strano assai!
\section{Numerals}
\fontspec[Numbers={OldStyle}]{Linux Libertine O}Old style: 1234567\\
\fontspec[Numbers={Lining}]{Linux Libertine O}Lining: 1234567
\end{document}
|
|
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:
\begin{arab}[utf]
.
.
.
\end{arab}
The following code illustrates this:
\documentclass[12pt,fleqn,titlepage,twoside,a4paper]{book}
\usepackage{etex}
\usepackage{amsfonts,amsmath,amssymb,graphicx}
\usepackage{txfonts}
\usepackage[centering,includeheadfoot,margin=1in]{geometry}
\usepackage{tabvar}
\usepackage{arabxetex}
%\newfontfamily{\arabicfont}[Script=Arabic,Scale=1.5]{Traditional Arabic}
\parindent = 0pt
\begin{document}
\begin{arab}[utf]
\chapter*{\textarab[utf]{ حِكَم من تَجمـيعي }}
\section*{\textarab[utf]{ شِعر }}
أديـن بدين الحـــب أنـى تــوجـهت ركـائبه \qquad فالحـــب دينــي و إيماني\\
لنا أسوة في بشر هند و اختها و قيس و ليلى \qquad ثـــــم مـــــي و غـــيــــلان
\end{arab}
\end{document}
|
|
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.
% Encoding: UTF8
@ARTICLE(Ekstrom,
AUTHOR = "Author w",
TITLE = "{Ekstrøm title}",
JOURNAL = "Ekstr{\o}m Journal",
YEAR = 1965,
note = {Working with pdflatex}
)
@ARTICLE(Ekstrøm,
AUTHOR = "Author Ekstr{\o}m",
TITLE = "{Ekstrøm title}",
JOURNAL = "Ekstrøm Journal",
YEAR = "1965",
note = {Not working with pdflatex but with xelatex}
)
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[6] 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.
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
- ↑ Kew, Jonathan (April 3, 2007). "Jonathan Kew". TUG (Interview). Interviewed by Dave Walden. Retrieved November 20, 2009.
- ↑ "XeTeX COPYING file". Retrieved March 18, 2013.
- ↑ Hosny, Khaled (March 12, 2013). "Future of xdv2pdf driver on Mac". Retrieved June 7, 2013.
- ↑ Robertson, Will (August 9, 2008). "The fontspec package" (PDF). Retrieved January 8, 2009.
- ↑ "LyX wiki | LyX / XeTeX". wiki.lyx.org. Retrieved August 25, 2017.
- ↑ "LyX wiki | LyX / New in LyX 2.0". wiki.lyx.org. Retrieved August 25, 2017.
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.