[OS X TeX] hyphens in different encodings

Bruno Voisin bvoisin at mac.com
Mon Oct 9 18:30:11 CEST 2006

Le 9 oct. 06 à 18:18, Alex Hamann a écrit :

> Ups, sorry for not filling in the subject. Second try:
> By comparing two different versions of the same paper I wrote (one  
> encoded in MacOSRoman and processed by latex, the other one in  
> utf-8 with Gentium fonts and processed with xelatex) that only in  
> the macosroman version typing --- would result in one long hyphen,  
> while in the utf-8 version I would get three separate adjacent  
> short hyphens. What is the reason for that and how do I get the  
> long hyphen in the second document as well?

Use ":mapping=tex-text" when loading the font, either directly as in

\DeclareFontShape{U}{gentium}{m}{n}{<-> "Gentium:mapping=tex-tex"}{}

or through the fontspec package as in


This will map TeX ligatures, like -- for an en-dash and --- for an em- 
dash, to the corresponding Unicode code points.

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 Archive: http://tug.org/pipermail/macostex-archives/

More information about the macostex-archives mailing list