# change to xeCJK under TeXLive 2012, since 2011?

Beginning in the late Spring of 2011, I have been using a few lines of code regularly in all my documents, making it possible to produce documents with regular Roman text, IPA, and all (or nearly all) of the Unicode CJK planes. The MWE below illustrates the xeCJK code block I have been using:

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass{article}

\usepackage[fallback]{xeCJK}[2011/05/01] % ver 2.3.19
\setromanfont{TeX Gyre Termes}
\setsansfont[Scale=MatchLowercase]{Doulos SIL}
\setCJKmainfont{HAN NOM A}
\setCJKfallbackfamilyfont{rm}{HAN NOM B}

\begin{document}
Plain Roman script is here.

And some IPA: [\textsf{ɕy̆an₃₄ ʈʂʅ₄₄ jɵu̯₅₂ ɕy̆an₃₄}]

\end{document}


The last character of the Chinese text (𤣥) is in the HAN NOM B font and not in HAN NOM A, and the \setCJKfallbackfamilyfont command works splendidly to make it appear as needed. In TeXShop, on TeXLive 2011, this code block has worked perfectly, but since upgrading to TeXLive 2012 I get a persistent error Missing number, treated as zero if more than a single Chinese character appears in a line. Is there something I have to do to my xeCJK code block to fix this?

A little experiment shows that the problem arises when two CJK characters appear consecutively. If separated on the same line by Roman characters, the error is not reported and the document appears to compile correctly.

I am currently on Mac OS 10.6.8 with TeXLive 2011 and Mac OS 10.8.2 with TeXLive 2012. But I have tried pairing the TeXLive and OS X versions the other way and the problem persists where TeXLive 2012 is in use. Current package versions:

TeXLive 2011:
xeCJK.sty    2011/05/01 2.3.19
fontspec.sty    2011/02/26 v2.1f
fontspec-patches.sty    2011/02/26 v2.1f
expl3.sty    2011/04/09 v2222

TeXLive 2012:
xeCJK    2012/10/27 v3.0.10
fontspec    2012/05/06 v2.2b
fontspec-patches    2012/05/06 v2.2b
expl3    2012/11/21 v4332

-

It seems that you use the latest version (SVN 4332) of expl3. So please update your TeX Live 2012 online to use the lastest version (3.1.0) of xeCJK. If there is no updates available, put the following code in your preamble.
\xeCJKsetup{CJKglue=\hspace{0pt plus .08 \baselineskip }}

That is all my failure. I used \c_zero_skip in a wrong way in previous version of xeCJK. But at the same time, \c_zero_skip is a dim register actually in the old version of expl3 rather than a skip register which it should be. The latest expl3 have corrected it. So an error will be raised.
Yes, indeed, both solve the problem. I hadn't seen that a new revision of xeCJK had just come up. Many thanks! xeCJK has opened many possibilities for me. –  brannerchinese Nov 25 '12 at 19:19