Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
XeTeX
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|TeX typesetting engine}} {{Use mdy dates|date=June 2013}} {{more citations needed|date=March 2013}} {{Infobox software | name = XeTeX | logo = XeTeX Logo.svg | logo size = 200px | author = Jonathan Kew | developer = | latest release version = 0.999992 | latest release date = {{Start date and age|2020|01|20}} | programming language = [[Pascal (programming language)|Pascal]] ([[WEB]]), [[C (programming language)|C]] and [[C++]] | operating_system = [[Cross-platform]] | genre = [[Typesetting]] | license = [[MIT License]] | website = {{URL|https://xetex.sourceforge.net}} }} '''XeTeX''' ({{IPAc-en|ˈ|z|iː|t|ɛ|x}} {{respell|ZEE|tekh}}<ref>{{cite interview|last=Kew |first=Jonathan |url=http://tug.org/interviews/interview-files/jonathan-kew.html |interviewer=Dave Walden |title=Jonathan Kew |work=TUG |date=April 3, 2007 |access-date=2009-11-20}}</ref> or {{IPAc-en|ˈ|z|iː|t|ɛ|k}}; see also [[TeX#Pronunciation and spelling|Pronouncing and writing "TeX"]]) is a [[TeX]] [[typesetting|typesetting engine]] using [[Unicode]] and supporting modern font technologies such as [[OpenType]], [[Graphite (SIL)|Graphite]] and [[Apple Advanced Typography]] (AAT). It was originally written by Jonathan Kew and is distributed under the [[MIT License|X11 free software license]].<ref>{{Cite web| url=http://sourceforge.net/p/xetex/code/ci/master/tree/source/texk/web2c/xetexdir/COPYING | title=XeTeX COPYING file | access-date=2013-03-18}}</ref> The last change to the source code was made on January 20, 2020, and there has been no further development since then.<ref>{{cite web| url=https://sourceforge.net/projects/xetex/| title=XeTeX - Unicode-based TeX Code| work=SourceForge| date=May 21, 2024| access-date=2024-05-27| language=en}}</ref> Usage of XeLaTeX is now discouraged.<ref name="LuaLaTeX">[https://www.texdev.net/2024/11/05/engine-news-from-the-latex-project Engine news from the LaTeX Project]</ref> Initially developed for [[macOS|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 metric]]s, and can make direct use of advanced typographic features of [[OpenType]], [[Apple Advanced Typography|AAT]] and [[Graphite (SIL)|Graphite]] technologies such as alternative [[glyph]]s and [[swash (typography)|swashes]], optional or historic [[Typographical ligature|ligatures]], and variable font weights. Support for OpenType local typographic conventions (<code>locl</code> 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 (typeface)#Cambria Math|Cambria Math]] or [[Asana-Math|Asana Math]] as an alternative to the traditional mathematical typesetting based on TeX font metrics. ==Mode of operation== [[Image:Rare and ancient ligatures in XeTeX.svg|thumbnail|280px|Rendering of [[Typographical ligature|ligatures]] and [[List of typographic features#Ligation and alternate forms features intended for all scripts|contextual alternates]] in XeTeX using an [[OpenType]] font ([[Hoefler Text]]).]] XeTeX processes input in two stages. In the first stage XeTeX outputs an [[extended DVI]] (<code>xdv</code>) file, which is then converted to [[PDF]] by a driver. In the default operating mode the <code>xdv</code> 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 <code>xdv</code>, although {{As of|2008|7|lc=on}} there are no viewers capable of displaying the intermediate format. Two backend drivers are available to generate PDF from an <code>xdv</code> file: * xdv2pdf, which uses [[Apple Type Services for Unicode Imaging|ATSUI]] and [[QuickTime#QuickTime framework|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.<ref>{{Cite web | url=http://tug.org/pipermail/xetex/2013-March/024120.html | last=Hosny | first=Khaled | title=Future of xdv2pdf driver on Mac | date=March 12, 2013 | access-date=2013-06-07}}</ref> XeTeX works well with both [[LaTeX]] and [[ConTeXt]] macro packages. Its LaTeX counterpart is invoked as <code>xelatex</code>. It is usually used with the <code>fontspec</code> package, which provides a configurable interface for font selection, and allows complex font choices to be named and later reused.<ref>{{Cite web| url=http://www.ctan.org/tex-archive/macros/xetex/latex/fontspec/fontspec.pdf|last=Robertson|first=Will|date = August 9, 2008|title=The fontspec package | access-date=2009-01-08}}</ref> XeTeX is bundled with [[TeX Live]], [[MacTeX]], [[MiKTeX]] and [[Lyx]] (see the [[XeTeX#History|History]] below for dates and versions).<ref>{{Cite web|url=https://wiki.lyx.org/LyX/XeTeX|title=LyX wiki {{!}} LyX / XeTeX|website=wiki.lyx.org|access-date=2017-08-25}}</ref> ==Example== The following is an example of XeLaTeX source and rendered output. The typeface used is [[SIL Open Font License|OFL]]-licensed font [[Linux Libertine]]. The text is to be processed by the command <code>xelatex</code>. {{col-begin}} {{col-break}} <syntaxhighlight lang="latex"> \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} </syntaxhighlight> {{col-break}} [[Image:XeTeX sample.svg|500px|none|The rendered output.]] {{col-end}} ==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: <syntaxhighlight lang="latex"> \begin{arab}[utf] . . . \end{arab} </syntaxhighlight> The following code illustrates this: {{col-begin}} {{col-break}} <syntaxhighlight lang="latex"> \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} </syntaxhighlight> {{col-break}} [[File:Xetex arabic text.png|500px|none|Arabic text using XeTeX]] {{col-end}} == Features == In bibliographic files (see below the BibTeX example) you can use Unicode entities and call them with their native scripting, for example <nowiki>\cite{Ekstrøm}</nowiki>, instead of a transliterated ASCII form like <nowiki>\cite{Ekstrom}</nowiki> which is mandatory using the [[pdfTeX]] engine. <syntaxhighlight lang=bibtex> % 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} ) </syntaxhighlight> ==History== XeTeX was initially released for [[Mac OS X]] only in April 2004{{citation needed|date=December 2021}} with built-in [[Apple Advanced Typography|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<ref>{{Cite web|url=http://wiki.lyx.org/LyX/NewInLyX20#backends|title=LyX wiki {{!}} LyX / New in LyX 2.0|website=wiki.lyx.org|access-date=2017-08-25}}</ref> 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 <code>\XeTeXinputnormalization</code> command. Version 0.9999, released in May 2013, switched from [[International Components for Unicode|ICU]] Layout Engine to [[HarfBuzz]] for [[OpenType]] layout, and Graphite2 engine for [[Graphite (SIL)|Graphite]] layout, as well [[Core Text]] framework instead of [[ATSUI]] on Mac OS X. ==See also== {{Portal|Free and open-source software}} * [[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== {{Reflist|30em}} ==Further reading== * M. Goossens (Ed.) (2008) [http://xml.web.cern.ch/XML/lgc2/xetexmain.pdf The XeTeX Companion: TeX meets OpenType and Unicode]. ==External links== {{commons category}} * {{Official website}} * [http://nitens.org/taraborelli/latex The Beauty of LaTeX]: illustrates XeTeX use with professional fonts. * [https://www.tug.org/xetexshowcase/ XeTeX Showcase at TUG]. {{TeX navbox}} {{DEFAULTSORT:Xetex}} [[Category:2007 software]] [[Category:Digital typography]] [[Category:Free PDF software]] [[Category:Free TeX software]] [[Category:Linux TeX software]] [[Category:Software using the MIT license]] [[Category:TeX]] [[Category:Unicode]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:As of
(
edit
)
Template:Citation needed
(
edit
)
Template:Cite interview
(
edit
)
Template:Cite web
(
edit
)
Template:Col-begin
(
edit
)
Template:Col-break
(
edit
)
Template:Col-end
(
edit
)
Template:Commons category
(
edit
)
Template:IPAc-en
(
edit
)
Template:Infobox
(
edit
)
Template:Infobox software
(
edit
)
Template:Main other
(
edit
)
Template:More citations needed
(
edit
)
Template:Official website
(
edit
)
Template:Portal
(
edit
)
Template:Reflist
(
edit
)
Template:Respell
(
edit
)
Template:Short description
(
edit
)
Template:Sister project
(
edit
)
Template:TeX navbox
(
edit
)
Template:Template other
(
edit
)
Template:Use mdy dates
(
edit
)