[XeTeX] Problem with Mapping=tex-text

Herbert Schulz herbs at wideopenwest.com
Thu Oct 18 18:17:07 CEST 2007


On Oct 18, 2007, at 10:54 AM, Chaiwat Jidogang wrote:

> Hi,
>
> I think I have some problem with text mapping.
> I want to use the default Computer Modern fonts and I want the usual
> TeX code produce `single-quote', ``double-quote'', en-dash (--), and
> em-dash (---),
> so I put \defaultfontfeatures{Mapping=tex-text} in, as shown below.
> However, xelatex the following code didn't produce the quotes and
> dashes as I want.
>
> Could anyone tell me what I'm missing. The following are my code.
>
> %----------------------------------------------------
> \documentclass[11pt,a4paper,twoside,openright]{report}
> \usepackage{fontspec}
> \defaultfontfeatures{Mapping=tex-text}
>
> \begin{document}
> ``quote''
>
> en-dash (--)
>
> em-dash (---)
> \end{document}
> %----------------------------------------------------
>
>
> Thank you,
> --
> Chaiwat
> _______________________________________________
>

Howdy,

I've run into that too and it appears to be because you are trying to  
use the CM (or LM) fonts rather than defining a font. If you add the  
line

\setmainfont{Hoefler Text} % or whatever font you like

just after the

\defaultfontfeatures{Mapping=tex-text}

line the Mapping will be applied to that font.

Good Luck,

Herb Schulz
(herbs at wideopenwest.com)




More information about the XeTeX mailing list