Open main menu

Changes

783 bytes removed ,  15:43, 20 November 2012
{{Installation navbox}}
==XeTeX and ConTeXt==
XeTeX is a potential replacement for pdfeTeX in the ConTeXt workflow. It does not support all of the fancy PDF features found with pdfeTeX, but it supports most core features (see [[#Features|Features]] and [[#Issues|Issues]] on this page). Common consensus is that for text with non-heavy mathematics needs, XeTeX should be an interesting alternative.
 
Note that XeTeX uses [[Glossary#mkii|mkii]] and [[Glossary#LuaTeX|LuaTeX]] uses [[Glossary#mkiv|mkiv]] ;
in principle mkii is frozen so new features and improvements will only
happen in mkiv.
 
===Where to get XeTeX?===
* <b>Mac OS X</b>: The best and easiest way of installing XeTeX on MacOSX is by installing [http://www.tug.org/mactex/ MacTeX] (Gerben Wierda's [http://www.rna.nl/tex.html i-Installer] is no nore more supported).
* <b>Linux</b>: you can download the source or binaries from [http://scripts.sil.org/xetex_linux SIL] or use the [http://www.pragma-ade.com/download-1.htm Stand-alone distribution from Pragma] ([http://www.pragma-ade.com/context/install/linuxtex.zip linuxtex.zip])
* <b>Windows</b>: Not officially released yet, but available on [http://www.fsci.fuk.kindai.ac.jp/kakuto/win32-ptex/web2c75-e.html W32TeX] distribution and [http://miktex.org/ MiKTeX] distributions and can be used with stand-alone distr. See [[Windows Installation#XeTeX Installation|XeTeX Installation]] under Windows for detailed installation instructions.
Note:
===Document Encoding===
XeTeX is able to handle UTF-8 or UTF-16 documents natively, without any interference or configuration from ConTeXt. Actually, in XeTeX utf-8 already is the default and the only supported regime.
ConTeX+XeTeX currently simply ignores the <cmd>enableregime</cmd> command, assuming you are using utf-8(''addendum'': not entirely true now; see http://archive.contextgarden.net/message/20071123.134401.73a53235.en.html ss.). For what is concerning encoding, the best practice is to encode the tex file with utf-8(''addendum'' bis: '''this''' remains true!).
A planned feature is that ConTeXt allows you to use the regime of your choice (this is possible because of onTeXtConTeXt's use of named glyphs), so documents in latin-1 or even MacRoman encoding could be supported, given the proper <cmd>enableregime</cmd> command. For characters out of reach of the given regime, you can use accents (like <tt>\'e</tt>) and/or named glyphs (<tt>\eacute</tt>).
Although XeTeX would prefer that you key in documents in full Unicode, with things like '''&mdash;''' and '''&ldquo;''' in the place of <tt>---</tt> and <tt>``</tt>, respectively. This is not always so feasible, so it provides a mechanism for inserting these "TeXish" ligatures. In a font specification, you need to insert <tt>mapping=tex-text</tt> as one of the font features. This is already done for all existing typescripts in <tt>type-xtx</tt>, but you should be aware of this concern if designing your own documents.
(as of [[26 November]] [[2004]])
; Font metrics : XeTeX 0.88 is not yet able to retrieve character-specific font metrics from Apple's type API, so measurements based on character-specific units may fail or be unreliable.
; Grid typesetting : many fonts on the Mac report larger vertical metrics than their font size. Because ConTeXt sets <tt>\lineskiplimit</tt> to zero, grid dimensions are limited by these intrinsic (and seemingly arbitrary) font characteristics. As a result, grid typesetting, with some fonts, won't work below approximately 1.25 times the font size. Hoefler Text seems to work on a 12/12 grid, however.
; Paper size : XeTeX 0.88 is not yet able to support multiple paper sizes. The way <tt>texexec</tt> is arranged locks one in to the default paper size. Support will improve when XeTeX addresses the issue. If you need another paper size, you can re-run <tt>xdv2pdf</tt> with a paper size of your choice from the command line:
xdv2pdf -p a5:landscape file.xdv
(Alternatively, you can use
texexec --xtx --passon=-papersize=a5:landscape file
or something similar. [[User:ChristopherCreutzig|Christopher Creutzig]])
; Object reuse : Currently, the XeTeX specials are unable to use ConTeXt's object (or faked object) support. As a result, repeated external figures may be included into the PDF several times, resulting in an increase in file sizes. This has not been tested.
; Bookmarks : XeTeX uses dvipdfmx's specials for references, bookmarks, and the like. ConTeXt uses some of these specials "out of spec", and may result in some strangeness in certain documents.
; PDF Literals : Because XeTeX relies on Apple's APIs to create PDFs, it is unable to take advantage of certain specials and other types of features that use native (literal) PDF commands.
; Occasionally Explodes : Once in a while, XeTeX will fall into an infinite loop. I'm not entirely sure what circumstances trigger it (probably an overfull box), but it can be stopped with <tt>killall xetex</tt> in a terminal window. This has now been traced to a setting in [[texmf.cnf]], where <tt>extra_mem_bot.context</tt> or <tt>extra_mem_bot</tt> is set to a non-zero value. If you encounter the infinite loop, then check your texmf.cfg file(s) to eradicate this value. ('''''fixed in 0.90+''''')
; Hoefler Italic is too fancy : Hoefler Italic has swashes enabled by default. This is actually a product of Apple's implementation of the font. If this is unsuitable for you, add the feature: <tt>Smart Swashes=!Line Final Swashes</tt> to the HoeflerItalic font synonym in type-xtx.
 
{{Installation navbox}}
[[Category:TeX extensions]]