Searching through tex.stackexchange.com, I've come to understand that xetex is currently the preferred engine for documents that include Chinese characters. In xetex, one simply uses the xeCJK or ctex packages and start including the characters in the body of the document. But it appears these two packages don't work with luatex.

So is it possible to include Chinese characters in a document using luatex? I cannot find a single example of this.

  • You can include Chinese characters, but for a full fledged support of Chinese, I don't think there are good tools with LuaLaTeX. – egreg Jan 13 '15 at 18:54

Just use luatexja. The Chinese TeX community decide not to develop a new package but use luatexja, because the tools designed for Chinese and Japanese usually work the same.

The developer version of our ctex package will provide a Chinese customized interface for luatexja. Now you can use luatexja directly.

Here is an example:

enter image description here

% !TEX encoding = UTF-8
% !TEX program = lualatex

在 Lua\TeX{} 中正常地使用中文。获得自动的\textbf{字体选择},标点“压缩”,以及正确的断行处理等特性。


Note: fontspec alone is insufficient. You need proper line breaking, punctuation kerning and font switching features provided by luatexja.


very basic use would be

enter image description here

\setmainfont{MS PGothic}
  • 1
    Maybe, for short Chinese inserts, \newfontfamily is better. – egreg Jan 13 '15 at 18:56
  • Thanks. I understand there is a setCJKmainfont in xeCJK. Does this command exist in lualatex? I'd like to use separate fonts for English and Chinese if possible. – ana Jan 13 '15 at 19:33
  • I understand I can use \newfontfamily but that would mean I have to explicitly indicate when to switch to a Chinese font. With setCJKmainfont it switches automatically. – ana Jan 13 '15 at 19:39
  • @ana sorry I don't know too much about available CJK packages, I just wanted to demonstrate that basic typesetting of text was easy enough with fontspec package an luatex. – David Carlisle Jan 13 '15 at 19:57
  • 1
    It won't work if you type more characters. The line break algorithm designed for western languages doesn't work for East Asian languages. – Leo Liu Jan 24 '15 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.