Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

My documents usually contain an equal amount of Chinese and English. Here is my preamble, which I found in a manual somewhere:

\documentclass{ctexbook}
\setmainfont{Minion Pro}
\setCJKmainfont[BoldFont=Adobe Heiti Std, ItalicFont=Adobe Kaiti Std, SmallCapsFont=*]{Adobe Song Std}
\begin{document}
    你好
    hello
\end{document}

This simple setup seems to give me the Minion Pro font when typing English, and the other fonts when typing Chinese.

When I type any zhuyin fuhao (注音符号), however, the 4 tone marks ("ˊ", "ˇ", "ˋ", and "˙") appear as square boxes. If I set \setmainfont{Adobe Song Std} (which means that the Minion Pro font is never used) the tone marks render fine. This suggests to me that it is trying using the Minion Pro font to render them (in the above document), but Minion Pro does not have these characters.

  • How can I make sure these four symbols are always rendered using the correct CJK fonts?
share|improve this question
add comment

1 Answer

up vote 2 down vote accepted
+150

Just use \xeCJKsetcharclass to set the characters as class 1:

\documentclass{ctexbook}
\xeCJKsetcharclass{`\ˊ}{`\ˊ}{1}
\xeCJKsetcharclass{`\ˇ}{`\ˇ}{1}
\xeCJKsetcharclass{`\ˋ}{`\ˋ}{1}
\xeCJKsetcharclass{`\˙}{`\˙}{1}
\begin{document}
山明水秀啊(ㄕㄢㄇㄧㄥˊㄕㄨㄟˇㄒㄧㄡˋㄚ˙)
\end{document}

Note that \xeCJKsetcharclass accepts two numbers as a character code range in the first two arguments. \xeCJKsetcharclass{`\ˊ}{`\ˊ}{1} is the same as \XeTeXcharclass`\ˊ=1.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.