[XeTeX] Xelatex, TL2007 not working on Mac

Joachim Trinkwitz jtr at uni-bonn.de
Mon Nov 5 16:30:11 CET 2007


Am 04.11.2007 um 16:25 schrieb rhino64 at freesurf.ch:

> For some strange reason, a very
> simple test file does not compile on Mac
[…]
> This is certainly a font problem and probably a misconfiguration on  
> the mac.

It's a font problem, but no misconfiguration …

> --------------------------------- 
> TestFile---------------------------------
> \documentclass{article}
> \XeTeXdefaultencoding utf-8

To quote the homepage of XeTeX:
»a typesetting system based on a merger of Donald Knuth's TeX system  
with Unicode and modern font technologies«

Thus, the default encoding *is* utf-8. \XeTeXdefaultencoding is  
definitely not needed here, and it's actually only used in very rare  
cases (legacy files with non-unicode encoding), but somehow the  
command has made it into many examples found on the internet.

> \usepackage{fontspec}
> \defaultfontfeatures{Mapping=tex-text}

However, you didn't set a default font. Use something like:
\setmainfont{Hoefler Text}
or whichever font you have installed in Mac OS X. Most suitable are  
otf fonts, but in principle you can use every font that works in  
other applications (it doesn't make much sense to use Computer Modern  
with XeTeX). – Also recommended:
\usepackage{xunicode}
which sets the proper unicode characters for some TeX-specific  
commands like \$ etc., and:
\usepackage{xltxtra}
which provides the XeTeX logos and loads some recommended packages.

> \begin{document}
> Typeset with XeLaTex
(thus you could use \XeLaTeX here with xltxtra)
> \end{document}

Regards,
joachim

-- 
Dr. Joachim Trinkwitz     E-Mail: jtr at uni-bonn.de
Institut für Germanistik, Tel.: 0228-737565
Vergleichende Literatur-  Fax: 0228-737479
und Kulturwissenschaft    www.germanistik.uni-bonn.de
der Universität Bonn      53012 Bonn




More information about the XeTeX mailing list