[XeTeX] Em-dash

José Carlos Santos jcsantos at fc.up.pt
Fri Apr 30 17:41:51 CEST 2010


On 30-04-2010 15:29, Alan Munn wrote:

>> If I compile this file:
>>
>> \documentclass{article}
>> \pagestyle{empty}
>> \usepackage{fontspec}
>> \usepackage{xunicode}
>> \usepackage{xltxtra}
>> \begin{document}
>> ---
>> \end{document}
>>
>> with XeLaTeX, then I get a PDF file which contains a single character,
>> namely an em-dash. But if I add, say, \setmainfont{Arial} before
>> \begin{document}, then what I get is ---. Why? Do I have to use
>> \textemdash instead?
>
> No. When you specify the main font, just specify the Mapping:
>
> \setmainfont[Mapping=tex-text]{Arial}
>
> This tells xelatex to convert the latex conventions (such as --- ) (and
> other things) to the proper unicode versions.

Thanks a lot.

Best regards,

Jose Carlos Santos


More information about the XeTeX mailing list