xeCJK 使用教程精簡版(點擊下載):https://github.com/tsingke/xeCJK_demo/blob/master/xeCJK.pdf
xeCJK中可以直接使用系統字體,查看已安裝中文字體,命令行輸入fc-list :lang=zh-cn
tex 中中文字體引入到 CJKfamilyfont,具體設置命令如下:
\setmainfont{Times New Roman}<span> </span>%缺省英文字體 Times New Roman \setCJKmainfont[ItalicFont={楷體_GB2312}, BoldFont={黑體}]{宋體}<span> </span>%襯線字體 缺省中文字體為 \setCJKsansfont{黑體}<span> </span>%serif是有襯線字體sans serif無襯線字體。 \setCJKmonofont{仿宋_GB2312}<span> </span>%中文等寬字體 %-----------------------xeCJK下設置中文字體------------------------------% \setCJKfamilyfont{song}{SimSun} %宋體 song \newcommand{\song}{\CJKfamily{song}} % 宋體 (Windows自帶simsun.ttf) \setCJKfamilyfont{xs}{NSimSun} %新宋體 xs \newcommand{\xs}{\CJKfamily{xs}} \setCJKfamilyfont{fs}{FangSong_GB2312} %仿宋2312 fs \newcommand{\fs}{\CJKfamily{fs}} %仿宋體 (Windows自帶simfs.ttf) \setCJKfamilyfont{kai}{KaiTi_GB2312} %楷體2312 kai \newcommand{\kai}{\CJKfamily{kai}} \setCJKfamilyfont{yh}{Microsoft YaHei} %微軟雅黑 yh \newcommand{\yh}{\CJKfamily{yh}} \setCJKfamilyfont{hei}{SimHei} %黑體 hei \newcommand{\hei}{\CJKfamily{hei}} % 黑體 (Windows自帶simhei.ttf) \setCJKfamilyfont{msunicode}{Arial Unicode MS} %Arial Unicode MS: msunicode \newcommand{\msunicode}{\CJKfamily{msunicode}} \setCJKfamilyfont{li}{LiSu} %隸書 li \newcommand{\li}{\CJKfamily{li}} \setCJKfamilyfont{yy}{YouYuan} %幼圓 yy \newcommand{\yy}{\CJKfamily{yy}} \setCJKfamilyfont{xm}{MingLiU} %細明體 xm \newcommand{\xm}{\CJKfamily{xm}} \setCJKfamilyfont{xxm}{PMingLiU} %新細明體 xxm \newcommand{\xxm}{\CJKfamily{xxm}} \setCJKfamilyfont{hwsong}{STSong} %華文宋體 hwsong \newcommand{\hwsong}{\CJKfamily{hwsong}} \setCJKfamilyfont{hwzs}{STZhongsong} %華文中宋 hwzs \newcommand{\hwzs}{\CJKfamily{hwzs}} \setCJKfamilyfont{hwfs}{STFangsong} %華文仿宋 hwfs \newcommand{\hwfs}{\CJKfamily{hwfs}} \setCJKfamilyfont{hwxh}{STXihei} %華文細黑 hwxh \newcommand{\hwxh}{\CJKfamily{hwxh}} \setCJKfamilyfont{hwl}{STLiti} %華文隸書 hwl \newcommand{\hwl}{\CJKfamily{hwl}} \setCJKfamilyfont{hwxw}{STXinwei} %華文新魏 hwxw \newcommand{\hwxw}{\CJKfamily{hwxw}} \setCJKfamilyfont{hwk}{STKaiti} %華文楷體 hwk \newcommand{\hwk}{\CJKfamily{hwk}} \setCJKfamilyfont{hwxk}{STXingkai} %華文行楷 hwxk \newcommand{\hwxk}{\CJKfamily{hwxk}} \setCJKfamilyfont{hwcy}{STCaiyun} %華文彩雲 hwcy \newcommand{\hwcy}{\CJKfamily{hwcy}} \setCJKfamilyfont{hwhp}{STHupo} %華文琥珀 hwhp \newcommand{\hwhp}{\CJKfamily{hwhp}} \setCJKfamilyfont{fzsong}{Simsun (Founder Extended)} %方正宋體超大字符集 fzsong \newcommand{\fzsong}{\CJKfamily{fzsong}} \setCJKfamilyfont{fzyao}{FZYaoTi} %方正姚體 fzy \newcommand{\fzyao}{\CJKfamily{fzyao}} \setCJKfamilyfont{fzshu}{FZShuTi} %方正舒體 fzshu \newcommand{\fzshu}{\CJKfamily{fzshu}} \setCJKfamilyfont{asong}{Adobe Song Std} %Adobe 宋體 asong \newcommand{\asong}{\CJKfamily{asong}} \setCJKfamilyfont{ahei}{Adobe Heiti Std} %Adobe 黑體 ahei \newcommand{\ahei}{\CJKfamily{ahei}} \setCJKfamilyfont{akai}{Adobe Kaiti Std} %Adobe 楷體 akai \newcommand{\akai}{\CJKfamily{akai}}
%------------------------------設置字體大小------------------------% \newcommand{\chuhao}{\fontsize{42pt}{\baselineskip}\selectfont} %初號 \newcommand{\xiaochuhao}{\fontsize{36pt}{\baselineskip}\selectfont} %小初號 \newcommand{\yihao}{\fontsize{28pt}{\baselineskip}\selectfont} %一號 \newcommand{\erhao}{\fontsize{21pt}{\baselineskip}\selectfont} %二號 \newcommand{\xiaoerhao}{\fontsize{18pt}{\baselineskip}\selectfont} %小二號 \newcommand{\sanhao}{\fontsize{15.75pt}{\baselineskip}\selectfont} %三號 \newcommand{\sihao}{\fontsize{14pt}{\baselineskip}\selectfont}% 四號 \newcommand{\xiaosihao}{\fontsize{12pt}{\baselineskip}\selectfont} %小四號 \newcommand{\wuhao}{\fontsize{10.5pt}{\baselineskip}\selectfont} %五號 \newcommand{\xiaowuhao}{\fontsize{9pt}{\baselineskip}\selectfont} %小五號 \newcommand{\liuhao}{\fontsize{7.875pt}{\baselineskip}\selectfont} %六號 \newcommand{\qihao}{\fontsize{5.25pt}{\baselineskip}\selectfont} %七號
%------------------------------標題名稱中文化-----------------------------% \renewcommand\abstractname{\hei 摘\ 要} \renewcommand\refname{\hei 參考文獻} \renewcommand\figurename{\hei 圖} \renewcommand\tablename{\hei 表}
%------------------------------定理名稱中文化-----------------------------% \newtheorem{dingyi}{\hei 定義~}[section] \newtheorem{dingli}{\hei 定理~}[section] \newtheorem{yinli}[dingli]{\hei 引理~} \newtheorem{tuilun}[dingli]{\hei 推論~} \newtheorem{mingti}[dingli]{\hei 命題~} \newtheorem{lizi}{{例}}
詳細教程: