[XeTeX] xdCJK [-->xeCJK] how to mix occasional Japanese with Chinese and English

Simon Cozens simon at simon-cozens.org
Tue Apr 24 04:38:46 CEST 2012


On 24/04/2012 11:32, jon wrote:
> Appears to be a handy way to temporarily disable a package in order to get
> something to work.

It is, but I've realised that it would obviously also turn off some of the 
more useful CJK things that xeCJK provides such as line-break handling. So if 
your little string of Japanese appears at the end of a line, it'll all go 
horribly wrong. I don't use xeCJK but when I'm mixing English and Japanese I 
use a macro like this:

\newfontinstance\japanesefont{Hiragino Mincho Pro}
\def\japanese{\XeTeXlinebreaklocale "jp"
\XeTeXlinebreakskip0pt plus 1pt
\japanesefont\small}

But since you are using xeCJK, (which is obviously much easier than marking up 
every single bit of Chinese!) Honda-san's suggestion is best.


More information about the XeTeX mailing list