[Tex/LaTex] How to use Chinese with lualatex

cjkluatex

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.

Best Answer

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
\documentclass{article}
\usepackage{luatexja-fontspec}
\setmainjfont{FandolSong}
\begin{document}

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

\end{document}

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