# [XeTeX] TeX example

Jonathan Kew jonathan_kew at sil.org
Sun Feb 4 19:24:04 CET 2007

On 4 Feb 2007, at 5:49 pm, Rene Borgella wrote:

> Hello all:
>
> *** I _thought_ I sent a response to this but haven't seen it on the
> list so I'll reply again -- my apologies if you did already see it.
>
>
> Robert Spence wrote:
>> Hi René,
>>
>> Jonathan Kew and Peter Dyballa were wondering out loud on the list
>> a few
>> minutes ago what your reasons were for wanting to use XeTeX.
>
> Mostly because I have read/heard on the MacTeX list that XeTeX allowed
> one to use fonts easier. I don't need multi-lingual support. Perhaps
> it's best I stick with LaTeX, but I would like to simply specify the
> name of the font I'd like to use.  From my examination of the XeTeX
> preambles, it looks like one can easily specify different fonts for
> headings, text, etc.  Is this correct?  Right now I am trying to
> understand the format for doing this correctly.

Typically, you can do this with a few extra lines in your preamble:

\documentclass{...whatever...}

% other packages, etc., as usual

\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setsansfont[Scale=MatchLowercase]{Optima}
\setmonofont[Scale=MatchLowercase]{Andale Mono}

\begin{document}

% ...etc...

Of course, you change the font names to whatever catches your eye