[Tex/LaTex] Simplified and Traditional Chinese characters in CJK


I am using CJK package to create a tex file based on a traditional Chinese doc file. Sometimes other people may mistakenly type some simplified Chinese Characters in the doc file. I realize some simplified Chinese characters do not show in a traditional Chinese environment:


Is there a way to get simplified Chinese characters generated in a similar environment with CJK package?

For some limitations, I have to use pdflatex.

Best Answer

You could switch to a different engine, in this case xelatex, which I think makes it easier to handle fonts and also other languages. In the case of languages like Chinese, Japanese and Korean, you can load the appropriately named xeCJK package.

When using xelatex, you can load the fontspec package and then use \setmainfont{} to set the document font. By the same token, with the previously named package, you can also load the command \setCJKmainfont{} and load a font specifically for your language, for example I used Heiti TC, where the T stands for Traditional (there's also Heiti SC). But you could use any font that is designed for Traditional Chinese.

Here's what it looks like with a Chinese Lorem Ipsum, although I cannot post the body code with the Chinese part, because it's blocked and I cannot post it.

example image

And here's the code

\usepackage[a4paper, margin=2cm]{geometry}

\setCJKmainfont{Heiti TC}