[OS X TeX] Re: using xeTex

Jonathan Kew jonathan_kew at sil.org
Mon Feb 12 10:39:45 CET 2007


On 12 Feb 2007, at 8:37 am, Manuel Souto Pico wrote:

> 1. I can't use other fonts, such as palatino, because the result is a
> very poorly typed sans-serif text.

I suspect you tried to use a palatino package that relies on virtual  
fonts, which are not supported in xetex with xdv2pdf. There will be  
error messages related to this in the texshop console.

It's possible to use such packages with the xdvipdfmx driver instead  
of xdv2pdf (see the list archives), but in general it makes more  
sense to use Unicode fonts directly rather than old-style virtual  
fonts (at least for normal text).

>
> 2. I can't use accents (such as for words in Romanic languages: á é  
> í ó ú).
>
> This is my document:
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> %!TEX TS-program = xelatex
> %!TEX encoding = UTF-8 Unicode
> \documentclass[a4paper,10pt,oneside]{book}
> \usepackage[utf8]{inputenc}    % more utf-8

Don't use inputenc, it gets in the way of xetex's native Unicode  
support.

> \usepackage[spanish,catalan,british]{babel}
> \usepackage[OT2,OT1,T1]{fontenc}

Don't use fontenc, use Unicode fonts instead. The easiest way is via  
the fontspec package.

>
> \begin{document}
>
> no tengo sarampión
>
> \end{document}

Putting this together, here's a version of your file that should work  
better:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[a4paper,10pt,oneside]{book}
\usepackage[spanish,catalan,british]{babel}
\usepackage{fontspec}
\setmainfont{Palatino} % assuming you have Palatino installed in your  
Fonts folder

\begin{document}

no tengo sarampión

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

JK


------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the macostex-archives mailing list