ctex document compiled with pdfLaTeX, Font unisong30 at 632 not found means pdfTeX could not load the Chinese font unisong30. Compile it with XeLaTeX instead — the document itself does not need to change.
pdflatex.log
unisong30 at 632 above) vary with the document and its font size.
Why pdfLaTeX fails
ctex loads its Chinese fonts from a font set. In TeX Live 2026 on Linux, its default Fandol font set requires XeLaTeX or LuaLaTeX. Under pdfLaTeX, the Fandol diagnostic (CTeX fontset `fandol' is unavailable in current mode) identifies an unsupported font set, and a nonstop run can also report a missing unisong font from CJK. TeX Live includes .tfm font-metric files for unisong (and cyberb), but does not ship the usable outline or bitmap glyph fonts, so pdfTeX stops with a fatal error and produces no PDF. (Passing fontset=none lets a minimal ctexart document compile under pdfLaTeX, but leaves you without configured Chinese fonts.)
Minimal failing example
ctex-pdflatex.tex
Fix: compile with XeLaTeX
Change the compiler, not the document. The same source compiles cleanly with XeLaTeX:
ctex-xelatex.tex
Ready to use this syntax? Continue in the browser editor when you want to adapt the example in a real project.Open LaTeX Cloud Studio
On the command line, run xelatex main.tex or latexmk -xelatex main.tex instead of pdflatex main.tex. LuaLaTeX (lualatex main.tex) also compiles this document.
If you must stay on pdfLaTeX
Some journal or university templates only build with pdfLaTeX. In that case, do not load ctex. Use CJKutf8 with a font that TeX Live ships, such as gbsn (Simplified Chinese, Song style), gkai (Simplified Chinese, Kai style), or bsmi (Traditional Chinese):
cjkutf8-pdflatex.tex
ctex features such as localized Chinese captions (目录, 参考文献) and \zihao are unavailable under CJKutf8, so prefer XeLaTeX whenever your template allows it.
The same error with the CJK package
\begin{CJK}{UTF8}{song} fails under pdfLaTeX in the same way with a different missing font name:
pdflatex.log
song with gbsn, or switch to XeLaTeX and ctex.
In LaTeX Cloud Studio
- For these errors, LaTeX Cloud Studio keeps an explicit PDFLaTeX choice. The Problems panel can show one or both of two messages: a missing Chinese font (such as
Chinese font unisong30 is not available for pdfLaTeX, naming the failing font) andCTeX font set 'fandol' is unavailable with the selected engine. Open Settings -> General and set LaTeX Engine to Auto (Recommended) or XeLaTeX. - Auto (Recommended) is the default and initially selects XeLaTeX when it finds an indicator for
ctex, thectexclasses,xeCJK,fontspec,polyglossia, or\setCJKmainfont, unless it finds a higher-priority LuaTeX-ja package or class indicator, which selects LuaLaTeX. - If a template requests a commercial or local Chinese font that is unavailable in the compiler image, upload the
.ttfor.otffont files to your project and load them by their uploaded path withxeCJKorfontspec.
ctexart project that compiles out of the box? Start from the Chinese Article (ctex) template in LaTeX Cloud Studio.
Related pages
- LaTeX in Chinese: set up a Chinese document with XeLaTeX and xeCJK
- Compiler and engine errors:
fontspecand other engine mismatches - Choosing a compiler: pdfLaTeX, XeLaTeX, and LuaLaTeX compared
- LaTeX in Japanese
- Emergency stop: when the compile stops before
\end{document} - Troubleshooting center
