xeCJK 使用教程

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

ewcommand{song}{CJKfamily{song}} % 宋体 (Windows自带simsun.ttf)
setCJKfamilyfont{xs}{NSimSun} %新宋体 xs

ewcommand{xs}{CJKfamily{xs}}
setCJKfamilyfont{fs}{FangSong_GB2312} %仿宋2312 fs

ewcommand{fs}{CJKfamily{fs}} %仿宋体 (Windows自带simfs.ttf)
setCJKfamilyfont{kai}{KaiTi_GB2312} %楷体2312 kai

ewcommand{kai}{CJKfamily{kai}} 
setCJKfamilyfont{yh}{Microsoft YaHei} %微软雅黑 yh

ewcommand{yh}{CJKfamily{yh}}
setCJKfamilyfont{hei}{SimHei} %黑体 hei

ewcommand{hei}{CJKfamily{hei}} % 黑体 (Windows自带simhei.ttf)
setCJKfamilyfont{msunicode}{Arial Unicode MS} %Arial Unicode MS: msunicode

ewcommand{msunicode}{CJKfamily{msunicode}}
setCJKfamilyfont{li}{LiSu} %隶书 li

ewcommand{li}{CJKfamily{li}}
setCJKfamilyfont{yy}{YouYuan} %幼圆 yy

ewcommand{yy}{CJKfamily{yy}}
setCJKfamilyfont{xm}{MingLiU} %细明体 xm

ewcommand{xm}{CJKfamily{xm}}
setCJKfamilyfont{xxm}{PMingLiU} %新细明体 xxm

ewcommand{xxm}{CJKfamily{xxm}}

setCJKfamilyfont{hwsong}{STSong} %华文宋体 hwsong

ewcommand{hwsong}{CJKfamily{hwsong}}
setCJKfamilyfont{hwzs}{STZhongsong} %华文中宋 hwzs

ewcommand{hwzs}{CJKfamily{hwzs}}
setCJKfamilyfont{hwfs}{STFangsong} %华文仿宋 hwfs

ewcommand{hwfs}{CJKfamily{hwfs}}
setCJKfamilyfont{hwxh}{STXihei} %华文细黑 hwxh

ewcommand{hwxh}{CJKfamily{hwxh}}
setCJKfamilyfont{hwl}{STLiti} %华文隶书 hwl

ewcommand{hwl}{CJKfamily{hwl}}
setCJKfamilyfont{hwxw}{STXinwei} %华文新魏 hwxw

ewcommand{hwxw}{CJKfamily{hwxw}}
setCJKfamilyfont{hwk}{STKaiti} %华文楷体 hwk

ewcommand{hwk}{CJKfamily{hwk}}
setCJKfamilyfont{hwxk}{STXingkai} %华文行楷 hwxk

ewcommand{hwxk}{CJKfamily{hwxk}}
setCJKfamilyfont{hwcy}{STCaiyun} %华文彩云 hwcy

ewcommand{hwcy}{CJKfamily{hwcy}}
setCJKfamilyfont{hwhp}{STHupo} %华文琥珀 hwhp

ewcommand{hwhp}{CJKfamily{hwhp}}

setCJKfamilyfont{fzsong}{Simsun (Founder Extended)} %方正宋体超大字符集 fzsong

ewcommand{fzsong}{CJKfamily{fzsong}}
setCJKfamilyfont{fzyao}{FZYaoTi} %方正姚体 fzy

ewcommand{fzyao}{CJKfamily{fzyao}}
setCJKfamilyfont{fzshu}{FZShuTi} %方正舒体 fzshu

ewcommand{fzshu}{CJKfamily{fzshu}}

setCJKfamilyfont{asong}{Adobe Song Std} %Adobe 宋体 asong

ewcommand{asong}{CJKfamily{asong}}
setCJKfamilyfont{ahei}{Adobe Heiti Std} %Adobe 黑体 ahei

ewcommand{ahei}{CJKfamily{ahei}}
setCJKfamilyfont{akai}{Adobe Kaiti Std} %Adobe 楷体 akai

ewcommand{akai}{CJKfamily{akai}}
%------------------------------设置字体大小------------------------%

ewcommand{chuhao}{fontsize{42pt}{aselineskip}selectfont} %初号

ewcommand{xiaochuhao}{fontsize{36pt}{aselineskip}selectfont} %小初号

ewcommand{yihao}{fontsize{28pt}{aselineskip}selectfont} %一号

ewcommand{erhao}{fontsize{21pt}{aselineskip}selectfont} %二号

ewcommand{xiaoerhao}{fontsize{18pt}{aselineskip}selectfont} %小二号

ewcommand{sanhao}{fontsize{15.75pt}{aselineskip}selectfont} %三号

ewcommand{sihao}{fontsize{14pt}{aselineskip}selectfont}% 四号

ewcommand{xiaosihao}{fontsize{12pt}{aselineskip}selectfont} %小四号

ewcommand{wuhao}{fontsize{10.5pt}{aselineskip}selectfont} %五号

ewcommand{xiaowuhao}{fontsize{9pt}{aselineskip}selectfont} %小五号

ewcommand{liuhao}{fontsize{7.875pt}{aselineskip}selectfont} %六号

ewcommand{qihao}{fontsize{5.25pt}{aselineskip}selectfont} %七号
%------------------------------标题名称中文化-----------------------------%

enewcommandabstractname{hei 摘 要}

enewcommand
efname{hei 参考文献}

enewcommandfigurename{hei 图}

enewcommand	ablename{hei 表}
%------------------------------定理名称中文化-----------------------------%

ewtheorem{dingyi}{hei 定义~}[section]

ewtheorem{dingli}{hei 定理~}[section]

ewtheorem{yinli}[dingli]{hei 引理~}

ewtheorem{tuilun}[dingli]{hei 推论~}

ewtheorem{mingti}[dingli]{hei 命题~}

ewtheorem{lizi}{{例}}

详细教程:

 
原文地址:https://www.cnblogs.com/tsingke/p/12371174.html