[OS X TeX] Unicode&XeLaTeX

Bruno Voisin bvoisin at mac.com
Sat Aug 13 17:56:47 CEST 2005


Le 13 août 05 à 17:20, delanoy at math.univ-lyon1.fr a écrit :

>  thanks to the many people who answered my mail about a week ago.  
> But I still
> can't solve my basic problem; if I compile the following file with  
> XeLaTeX,
>
> \documentclass{article}
> \begin{document}
>  This is the greek letter µ. (yes, this is $\mu$).
> \end{document}
>
>  the first "mu" does not appear on the PDF file. But XeLaTeX should  
> know
> Unicode,
> my Mac keyboard uses Unicode, so why doesn't it work ?

You have to specify a font that includes the letter µ, at the  
appropriate Unicode slot. This isn't the case of the default TeX  
fonts (i.e. the Computer Modern fonts). You need to use an AAT (the  
OS X font technology) font instead, or an OpenType font. For example,  
Hoefler Text.

Try downloading the xunicode and fontspec packages from:

<http://scripts.sil.org/cms/scripts/page.php? 
site_id=nrsi&item_id=xetex_related>
<http://www.ctan.org/tex-archive/macros/xetex/latex/fontspec/>

Then install them inside ~/Library/texmf/tex/xelatex/, and compile  
the following (the first two lines are for TeXShop, in case you're  
using it):

     %!TEX TS-program = xelatex
     %!TEX encoding = UTF-8 Unicode
     \documentclass{article}
     \usepackage{xunicode,fontspec}
     \setromanfont[Mapping=tex-tex]{Hoefler Text}
     \begin{document}
      This is the greek letter µ. (yes, this is $\mu$).
     \end{document}

Works here (you'll notice the difference between the two µ's, the one  
from Hoefler Text and the other from Computer Modern.

Bruno Voisin



--------------------- 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 macostex-archives mailing list