本文共 1285 字,大约阅读时间需要 4 分钟。
The easiest way is (for Simplified Chinese document only):
% UTF-8 encoding% Compile with latex+dvipdfmx, pdflatex, xelatex or lualatex% XeLaTeX is recommanded\documentclass[UTF8]{ctexart}\begin{document}文章内容。\end{document}
or
\documentclass{article}\usepackage[UTF8]{ctex}...
It is designed for Chinese typesetting. Font sizes, indentation, name translation, line spacing, … everything is set.
For latest version of ctex bundle (v2.x), XeLaTeX is well tested and supports Windows/Mac/Linux. The proper fonts preinstalled in the OS should be selected automatically.
If you just want to typeset only a few Chinese charecter, you can use CJK with pdfLaTeX or xeCJK with XeLaTeX.
% Compile with xelatex% UTF-8 encoding\documentclass{article}\usepackage{xeCJK}\setCJKmainfont{SimSun}\begin{document}文章内容\end{document}
or
% UTF-8 encoding, pdflatex or latex+dvipdfmx% Simplified Chinese fonts should be installed\documentclass{article}\usepackage{CJKutf8}\AtBeginDvi{\input{zhwinfonts}}\begin{document}\begin{CJK*}{UTF8}{zhsong}文章内容。\clearpage\end{CJK*}\end{document}
or
% UTF-8 encoding% bad-looking fonts (CJKfonts package)% latex+dvips, latex+dvipdfm(x) or pdflatex\documentclass{article}\usepackage{CJKutf8}\begin{document}\begin{CJK*}{UTF8}{gbsn}文章内容。\clearpage\end{CJK*}\end{document}
转载地址:http://jrgmb.baihongyu.com/