XeTeX

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 70.243.80.149 (talk) at 21:17, 12 September 2008. 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 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 and AAT 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. XeTeX also supports typesetting mathematics using Unicode fonts that contain special mathematical features, such as Cambria Math as an alternative to the traditional mathematical typesetting based on TeX font metrics.

Mode of operation

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

XeTeX processes input in two stages. In 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 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.

There are two backend drivers available:

  • xdv2pdf, which uses AAT, and only works on Mac OS X.
  • xdvipdfmx, a modified version of dvipdfmx, which in turn uses a modified version of ICU on top of standard FreeType and fontconfig. This driver works on all platforms.

Starting from version 0.997, the default driver is xdvipdfmx on all platforms.

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.

XeTeX is bundled with the TeX Live 2007, MacTeX and MiKTeX 2.7 distributions. As of August 12, 2008, the preview version of TeXLive 2008 includes XeTeX 0.999.6.

Example

The following is an example of XeTeX source and rendered output. Fonts used are Lucida Sans Unicode and Hoefler Text.

\documentclass{article}
\usepackage{fontspec} 
\usepackage{xunicode}
\usepackage{xltxtra}
\setmainfont[Mapping=tex-text]{Lucida Sans Unicode}
\begin{document}
\section{Unicode}

\subsection{Ελληνικά}
Το εδώ βασανίζουν χρειάζονται. Μια ώς τέτοιο ανεπιθύμητη. 
Ώς τέτοιο διορθώσει ώρα, σας βιαστικά συνεντεύξεις μεταγλωτίσει 
κι, μη την πάρα επενδυτής. Μου οι πάντα ελέγχου, ναι τελευταία 
εκφράσουν ας. Σε θέμα αλφα διαχειριστής από, αν εντολές 
τελευταία ροή.

\subsection{Русский}
Нас обеда быстрее проверить он, ещё за всех царь. Именно действий 
сохранение но вот. Вы зону большого над, языке английском лет их. 
Работе почему доверять ты тем. Хочу осуществлять нее от. Весьма 
письмо примерно бог ну, зону джоель ажиотажа до не, давать 
английски лет об.

\section{Legacy syntax}
When he goes---``Hello World!''\\
She replies—“Hello dear!”

\section{Ligatures}
\fontspec[Ligatures={Common, Rare}]{Hoefler Text Italic}
\fontsize{12pt}{18pt}\selectfont Questo è strano assai! 

\section{Numerals}
\fontspec[Numbers={OldStyle}]{Hoefler Text}Old style: 1234567\\
\fontspec[Numbers={Lining}]{Hoefler Text}Lining: 1234567

\end{document}

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 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. As of 2007,[2] future directions in XeTeX development include:

The upcoming 0.998 version announced at BachoTeX 2008 will support Unicode normalization via the \XeTeXinputnormalization command.

See also

References

  1. ^ "XeTeX downloads". Retrieved 2007-04-02.
  2. ^ Kew, Jonathan (2007-07-20). "XeTeX Live". TUG 2007: The 28th Annual Meeting of the TeX Users Group. San Diego, California. Retrieved 2008-07-25. {{cite conference}}: Check date values in: |date= (help); Unknown parameter |booktitle= ignored (|book-title= suggested) (help)

External links