[OS X TeX] XeLatex accents (revisited?)

Will Robertson will at guerilla.net.au
Sun Feb 6 19:48:47 EST 2005


On 7 Feb 2005, at 8:05 AM, Hans van Maanen wrote:

> \documentclass[12pt]{book}
> \usepackage{fontspec}
> \defaultfontfeatures{Mapping=tex-text}
> \usepackage[dutch]{babel}
> \usepackage[applemac]{inputenc}

This line is totally incorrect in an XeTeX document -- remove it 
entirely and save the file in unicode instead.

> \begin{document}
> Hell\"o world
> \end{document}

The problem is the fact that fontspec loads the utf8accents package, 
which redefines the legacy accent commands to correspond to unicode 
references. Since CM isn't unicode-encoded, it breaks.

So, the only way to fix it is to modify your copy of fontspec.sty and 
comment out the \usepackage{utf8accents} line, but this will mean that 
for any unicode fonts you load you'll need to use unicode characters 
for accents ø î ü etc.

Actually, I just though of another fix.
If you have the Latin Modern fonts converted to OpenType (i-Installer 
can do it, or you can download my custom set from 
<www.mecheng.adelaide.edu.au/~will/tex/>) then loading these instead of 
CM will give you access to accents while using the utf8accents package. 
Nice!

Regards,
Will
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list