TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to write Chinese in LaTeX with MikTeX 2.9, and at the moment I am using fontspec, something like the below. However, I have heard good things about xeCJK, and I am considering switching to it instead (not least to improve the looks of punctuation), however, I can't get it to work.

This is a document that works right now




, however this document




gives an ! Undefined control sequence <argument> \tipaencoding error.

Can anyone help me figure out what I am doing wrong?

share|improve this question

\begin{CJK}{UTF8}{SimSun} \end{CJK} is CJK, which is not inherited by xeCJK(see bilingual documentation). More better way to handle Chinese is using ctex


% !TEX program = xelatex
% !Mode:: "TeX:UTF-8"
%Save as UTF-8, run xelatex.



Hello, 你好。

share|improve this answer
This returns the same error for me as the original code that was not working. – Carl Johan Jan 21 '12 at 1:58

Well, you should at first update xunicode package to avoid the error. I suggest you updating all packages if possible.

What's more, as Ma Ming pointed, you wrongly used xeCJK package. I have several answers on this topic. eg.
How does one type Chinese in LaTeX?

share|improve this answer

Your Answer


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.