[TxMt] How to use XeLaTeX
Alan Schussman
alan at schussman.com
Fri Oct 20 17:46:05 UTC 2006
On Oct 20, 2006, at 10:35 AM, Alain Matthes wrote:
> hello:)
>
>
> In Typeset & View (PDF) i don't understand that :
>
> # Set up TeX compiler, fallback to xelatex if document indicates it
> if grep -Esq '\\usepackage{.*(xunicode|fontspec)|program=xelatex' "$M"
> then DEF_TEX=xelatex
> else DEF_TEX=pdflatex
>
> What is the exact syntax to use XeLaTeX ?
There are a number of ways to indicate that a document should be
typeset with xelatex instead of pdflatex, and that grep is meant to
pick up the methods that I have seen in various places. Both the
xunicode and fontspec[1] packages depend on xelatex, so calling on
them (\usepackage{fontspec}) in your preamble should set DEF_TEX to
xelatex. This is what I use to set it, because all my xetex documents
make use of fontspec for easy font manipulation. But, some documents
that I've seen have a line like the following:
%&program=xelatex
So the grep watches for that, as well.
-Alan
[1] http://www.ctan.org/tex-archive/help/Catalogue/entries/fontspec.html
More information about the textmate
mailing list