[XeTeX] xdCJK how to mix occasional Japanese with Chinese and English
Atsuhito Kohda
kohda at pm.tokushima-u.ac.jp
Tue Apr 24 02:36:40 CEST 2012
Hi Jon,
On Mon, 23 Apr 2012 07:26:21 -0600, jon wrote:
> I'm trying to typeset a 300 page English book that includes a lot of
> Chinese and occasional short strings of Japanese. I've been able to
> mix Chinese and English okay, but cannot apply a Japanese font in
> those few places where it is needed.
> Here is the prologue, a pruned version of what I am using for the
> book:
>
> \documentclass[largecrownvopaper,11pt,onecolumn,twoside,showtrims]{memoir}
> \usepackage{fontspec}
> \usepackage{xltxtra}
> \usepackage[BoldFont,CJKnumbb] {xeCJK}
> \setmainfont[Mapping=tex-text,Numbers=OldStyle]{Linux Libertine O}
> \setsansfont[Mapping=tex-text]{Linux Biolinum O}
> \setCJKmainfont []{AR PL UKai TW}
> \newfontfamily \forjapanese{Ume Mincho}
> \begin{document}
> English
>
> Chinese 不怕慢只怕站。
>
> Japanese omiage, futon {\forjapanese お土産、布団}
> \end{document}
I'm not expert of xeCJK but it seems
\setCJKfamilyfont{ume}{Ume Mincho}
\newcommand{\jp}[1]{{\CJKfamily{ume}#1}}
Japanese omiage, futon \jp{お土産、布団}
works for me. Note in \setCJKfamilyfont, {ume} can be
any name you like but {Ume Mincho} should be real japanese
fonts name.
Further, I don't have every fonts you use so I tested
with another fonts on Debian.
I hope this helps you a bit.
Best regards, 2012-4-24(Tue)
--
Debian Developer - much more I18N of Debian
Atsuhito Kohda <kohda AT debian.org>
Department of Math., Univ. of Tokushima
More information about the XeTeX
mailing list