xeCJK is the Chinese typesetting engine for XeLaTeX. It is not a standalone system but a character spacing and font control layer built on top of the XeTeX interchar token primitive.
Its primary responsibilities include:
- Using different fonts for CJK (Chinese, Japanese, Korean) and Western characters.
- Automatically ignoring source code spaces between CJK characters.
- Managing compression and squeezing styles for full-width punctuation.
- Automatically inserting appropriate spacing between CJK and Western characters.
In the CTeX ecosystem, ctex serves as the unified user interface, while xeCJK acts as the XeTeX backend implementation.