Tuesday, October 16, 2012

Make XeTeX show quotation marks properly

Because of some annoying CJK font problems, I've switched from traditional LaTeX to Unicode-capable XeTeX.

After several trials, I finally made it worked on my computer and got the result which fitted almost my expectation. I said ``almost'' because there was a little problem of the quotation marks. In stead of showing expected curly marks, XeTeX outputted the marks in original text mode.

The solution I found is to add a bit of setting as follows.
\defaultfontfeatures{Mapping=tex-text}
\setmainfont{YOUR_FONT_NAME}

or simply
\setmainfont[Mapping=tex-text]{YOUR_FONT_NAME}
Actually I have no idea about the difference between the two implements listed above. My own guess is: the first one provides global effect while the second one affects only on the main font?

---
ref:
http://tug.org/pipermail/xetex/2008-October/010929.html

No comments:

Post a Comment