Jump to content

XeTeX

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 129.13.72.153 (talk) at 08:40, 24 July 2008 (sample XeLaTex file). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

XeTeX
Developer(s)Jonathan Kew
Stable release
Repository
Operating systemCross-platform
TypeTypesetting
LicenseMIT License
Websitehttp://scripts.sil.org/xetex

XeTeX (Template:PronEng or /ˈziːtɛχ/, though English lacks /x/ or /χ/) is a TeX typesetting engine using Unicode and supporting modern font technologies such as OpenType or Apple Advanced Typography. It is written and maintained by Jonathan Kew and distributed under the X11 free software license.[1]

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 has simple font installation and can use any installed fonts in the operating system without configuring TeX font metrics. XeTeX uses AAT when working on Mac OS X using the xdv2pdf driver, or FreeType using dvipdfmx (which is the default on Windows or Linux). As a result, XeTeX can access font features such as alternative glyphs, special ligatures, swashes and variable font weights.

Examples of special alternate glyphs include the long s (ſ), as found in Hoefler Text font, and end-of-word swashes, which are normally inaccessible unless an application enables certain font options.

XeTeX works well with both LaTeX and ConTeXt. Its LaTeX counterpart is invoked as XeLaTeX. It is usually used with the xltxtra package. It is currently bundled with the TeX Live, MacTeX and MiKTeX distributions.

History

Rendering of ligatures in XeTeX using an OpenType font (Hoefler Text).

XeTeX was initially developed for Mac OS X only. 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 shipped with MiKTeX since version 2.7.

Example

A minimal XeLaTex file might look like the following:

\documentclass{article}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage{fontspec}
\defaultfontfeatures{Scale=MatchUppercase} % Adapt font sizes for main fonts
\setmainfont[Mapping=tex-text]{Garamond Premier Pro} % convert between legacy byte encodings and Unicod
\setsansfont[Mapping=tex-text]{Skia}
\setmonofont{Courier}
\begin{document}
Testing XeLaTeX! ``Hello World!''
{\sffamily This is in sans serif}

Greek: τεχ.

\texttt{Courier}
\end{document}


References

  1. ^ "XeTeX downloads". Retrieved 2007-04-02.

See also