我最近一直在用 XeTeX 写自己的东西,使用起来有点小体会,记录如下
使用 LaTeX 有好多方法。我用过的有两个,一个是直接安装 CTeX,另一个是安装 TeXLive2016 。
win10
windows 下有两种选择,一个是 CTeX,另一个是 TeXLive2016。
直接安装 ctex 可以直接在 win 下使用你想用的任何东西。为避免麻烦,最好直接安装 CTeX 的 full 版本。
直接下载 TeXLive2016 的 iso 文件,然后挂载为光盘,安装就是了。
Linux
Linux 下的选择其实也有两种。一种是直接安装对应发行版中包含的 texlive 包。另一种是像我一样,手工安装 TeXLive2016
debian (或 ubuntu) 下直接以 apt-get install 来安装。其它发行版差不多的
直接下载 TeXLive2016 的 iso 文件,这个文件不分 win 和 linux,通用的。然后挂载,最后用里面的安装脚本安装就是了。
安装时,以 root 身份安装至 /usr/local 下。可以用 sudo 或者直接 su 转成 root。
安装时,我是以文本模式安装的,不要图形模式,因为不同的 linux 发行版不一定能满足那个图形模式的要求。
-
sudo cp /usr/local/texlive/2016/texmf-var/fonts/conf/texlive-fontconfig.conf /etc/fonts/conf.d/09-texlive.conf
我目前使用 ubuntu 系统,为了更方便得安装一些 texlive 相关的包,就要手工加入一个 texlive dummy 包。
参考: http://blog.csdn.net/matricer/article/details/52253658
XeTeX 的使用
win 下使用比较简单,直接写好 tex 文件,然后用 xetex 处理即可。
linux 下的使用有一点需要特别注意,文件必须是 UTF-8 编码,否则无法得到正确的中文。
写 tex 文件时,为了使用中文必须带上一个与中文有关的包,比如 xeCJK。
下面给个小例子
-
\documentclass{article}
-
\usepackage{xeCJK}
-
-
\begin{document}
-
中文测试
-
\end{document}
如果出不来中文,请
一定检查你的文件编码是否是 UTF-8!这一点非常重要!
最后附上我自定义的宏,以下文件中关于字体的选择,一定改成你自己系统中有的。Linux 下改成 Fandol 系列就行了。
个人感觉,Fandol 系列的字体不错的。英文的话,Linux 下个人喜欢 bookman 那个,字宽也比较好看,阅读不累。
反正挑个自己喜欢的衬线字体(serif)就好,不要选无衬线的(sans serif)。
mypack.sty
点击(此处)折叠或打开
-
\ProvidesPackage{mypack}
-
%\usepackage{syntonly}
-
%\syntaxonly
-
%\usepackage{ctex}
-
\usepackage{fontspec,xunicode,xltxtra}
-
%\usepackage{indentfirst} % 紧跟章节命令后的第一行缩进。无需缩进时要手工指定\noindent
-
%\usepackage{titlesec}
-
%\usepackage{ifthen}
-
%\newcommand{\ISchinese}[1]
-
%{
-
% \ifthenelse{\equal{#1}{yes}}
-
% {
-
% \setmainfont[BoldFont=Franklin Gothic Demi]{STSong}
-
%中国学生用
-
% }
-
% {
-
% \setmainfont[BoldFont=Franklin Gothic Demi]{Palatino Linotype}
-
%中德班学生用
-
% }
-
%}
-
%\newcommand{\IStemp}[1]{
-
% \ifthenelse{\equal{#1}{yes}}
-
% {
-
%%%%
-
% }
-
% {
-
% }
-
%}
-
\usepackage{amsmath,amssymb}
-
%\usepackage[margin=4cm]{geometry}
-
\usepackage{hyperref}
-
\hypersetup{colorlinks,%
-
linkcolor=red,%
-
anchorcolor=red,%
-
citecolor=green,%
-
urlcolor=cyan,%
-
filecolor=magenta}
-
% for picture
-
\usepackage{graphicx,caption3}
-
\captionsetup{font={scriptsize}}
-
%\usepackage{gensymb} % physical symbol and unit
-
\usepackage{xeCJK}
-
\setmainfont[BoldFont=Franklin Gothic Demi]{Palatino Linotype}
-
\setCJKmainfont[BoldFont={黑体}, ItalicFont={楷体}]{宋体}
-
\setCJKsansfont{黑体} % font used in \textsf{} and \sffamily
-
\setCJKmonofont{仿宋} % font used in \texttt{} and \ttfamily
-
\newCJKfontfamily[yahei]\yh{微软雅黑}
-
%\setCJKfamilyfont{yahei}{微软雅黑}
-
%\newcommand{\yh}{\CJKfamily{yahei}}
-
\newCJKfontfamily[stsong]\sts{STSong}
-
%\setCJKfamilyfont{stsong}{STSong} % 华文中宋
-
%\newcommand{\sts}{\CJKfamily{stsong}}
-
\newCJKfontfamily[song]\st{宋体}
-
%\setCJKfamilyfont{song}{宋体}
-
%\newcommand{\st}{\CJKfamily{song}}
-
\newCJKfontfamily[heiti]\heit{黑体}
-
%\setCJKfamilyfont{heiti}{黑体}
-
%\newcommand{\heit}{\CJKfamily{heiti}}
-
\newCJKfontfamily[kai]\kait{楷体}
-
%\setCJKfamilyfont{kai}{楷体}
-
%\newcommand{\kait}{\CJKfamily{kai}}
-
-
%%%%%%%%%%%%%% %默认长4cm 的填空横线
-
\makeatletter
-
\newcommand\dlmu[2][4cm]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt}
-
\makeatother
-
%%%%%%%%%%%%%%
-
% 用 \tk可以产生默认长 2.5cm的横线。\tk[3] 产生3cm 的横线
-
\newcommand{\tk}[1][2.5]{\,\underline{\mbox{\hspace{#1 cm}}}\,}
-
%%%%%%%%%%%%%%%%%
-
%以下带圈数字必须在 \ISchines{yes} 时才有效
-
\newcommand{\ysone}{{\setmainfont{宋体} ①}}
-
\newcommand{\ystwo}{{\setmainfont{宋体} ②}}
-
\newcommand{\ysthree}{{\setmainfont{宋体} ③}}
-
\newcommand{\ysfour}{{\setmainfont{宋体} ④}}
-
\newcommand{\ysfive}{{\setmainfont{宋体} ⑤}}
-
\newcommand{\yssix}{{\setmainfont{宋体} ⑥}}
-
\newcommand{\ysseven}{{\setmainfont{宋体} ⑦}}
-
\newcommand{\yseight}{{\setmainfont{宋体} ⑧}}
-
\newcommand{\ysnine}{{\setmainfont{宋体} ⑨}}
-
\newcommand{\ysten}{{\setmainfont{宋体} ⑩}}
diapack.sty
-
\ProvidesPackage{diapack}
-
% for chemistry
-
\usepackage[version=4,arrows=pgf-filled]{mhchem}
-
\usepackage{chemmacros}
-
\chemsetup{ modules = all}
-
\chemsetup{
-
redox/roman=false,
-
redox/explicit-sign=true,
-
redox/pos=top,
-
}
-
\usepackage{chemformula}
-
\usepackage{pgfplots}
-
%%%%%%%%%%%%%%%%%%%%%
-
% 以下定义需要用 \usepackage{extarrows}
-
\usepackage{extarrows}
-
\newcommand{\high}{
-
$\xlongequal{\textrm{高温}}$
-
}
-
\newcommand{\heatcata}{
-
$\xlongequal[\Delta]{\textrm{催化剂}}$
-
}
-
\newcommand{\heat}{
-
$\xlongequal{\Delta}$
-
}
-
\newcommand{\hnu}{
-
$\xlongequal{\textrm{光照}}$
-
}
-
\newcommand{\light}{
-
$\xlongequal{\textrm{点燃}}$
-
}
-
\newcommand{\myeq}{
-
$\xlongequal{}$
-
}
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
%%% \upjt 和 \downjt 用于气体和沉淀符号
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
\newcommand{\dbe}{
-
\begin{tikzpicture}
-
\draw[double distance=1pt,thick,](0,0.4) -- (0.4,0.4);
-
\end{tikzpicture}
-
}
-
\newcommand{\upjt}{
-
\begin{tikzpicture}
-
\draw[-stealth](0,0) -> (0,0.3);
-
\end{tikzpicture}
-
}
-
\newcommand{\downjt}{
-
\begin{tikzpicture}
-
\draw[-stealth](0,0.3) -> (0,0);
-
\end{tikzpicture}
-
}
-
-
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
%以下全是电子式的定义,电子式中点大小和点与元素符号的距离
-
\setchemformula{radical-radius=.7pt, lewis-distance=.75ex}
-
-
% NaF, NaCl, KF, KCl, KBr, NaBr
-
\newcommand{\diachloride}{[\;\!\chlewis{0,90,180,270}{Cl}\;\!]$^-$}
-
\newcommand{\diafluoride}{[\;\!\chlewis{0,90,180,270}{F}\;\!]$^-$}
-
\newcommand{\diabromide}{[\;\!\chlewis{0,90,180,270}{Br}\;\!]$^-$}
-
\newcommand{\diaiodide}{[\;\!\chlewis{0,90,180,270}{I}\;\!]$^-$}
-
\newcommand{\diasodiumfluoride}{\ch{Na+}\diafluoride}
-
\newcommand{\diasodiumchloride}{\ch{Na+}\diachloride}
-
\newcommand{\diapotassiumfluoride}{\ch{K+}\diafluoride}
-
\newcommand{\diapotassiumchloride}{\ch{K+}\diachloride}
-
\newcommand{\diapotassiumbromide}{\ch{K+}\diabromide}
-
\newcommand{\diasodiumbromide}{\ch{Na+}\diabromide}
-
% NaOH, KOH, Ca(OH)2, Ba(OH)2, Mg(OH)2, NaClO
-
\newcommand{\diahydroxide}{[\;\!\chlewis{0,90,180,270}{O}\,H\;\!]$^-$}
-
\newcommand{\diahypochlorite}{[\;\!\chlewis{0,90,180,270}{O}
-
\chlewis{0,90,270}{Cl}\;\!]$^-$}
-
\newcommand{\diasodiumhydroxide}{\ch{Na+}\diahydroxide}
-
\newcommand{\diapotassiumhydroxide}{\ch{K+}\diahydroxide}
-
\newcommand{\diacalciumhydroxide}{\diahydroxide\ch{Ca^2+}\diahydroxide}
-
\newcommand{\diabariumhydroxide}{\diahydroxide\ch{Ba^2+}\diahydroxide}
-
\newcommand{\diamagnesiumhydroxide}{\diahydroxide\ch{Mg^2+}\diahydroxide}
-
\newcommand{\diasodiumhypochlorite}{\ch{Na+}\diahypochlorite}
-
% MgCl2, CaCl2, CaF2, MgF2, BaCl2, BaF2
-
\newcommand{\diamagnesiumchloride}{\diachloride\ch{Mg^2+}\diachloride}
-
\newcommand{\diacalciumchloride}{\diachloride\ch{Ca^2+}\diachloride}
-
\newcommand{\diacalciumfluoride}{\diafluoride\ch{Ca^2+}\diafluoride}
-
\newcommand{\diamagnesiumfluoride}{\diafluoride\ch{Mg^2+}\diafluoride}
-
\newcommand{\diabariumchloride}{\diachloride\ch{Ba^2+}\diafluoride}
-
\newcommand{\diabariumfluoride}{\diafluoride\ch{Ba^2+}\diafluoride}
-
% MgO, CaO, MgS, CaS
-
\newcommand{\diaoxide}{[\;\!\chlewis{0,90,180,270}{O}\;\!]$^{2-}$}
-
\newcommand{\diasulfide}{[\;\!\chlewis{0,90,180,270}{S}\;\!]$^{2-}$}
-
\newcommand{\diamagnesiumoxide}{\ch{Mg^2+}\diaoxide}
-
\newcommand{\diacalciumoxide}{\ch{Ca^2+}\diaoxide}
-
\newcommand{\diamagnesiumsulfide}{\ch{Mg^2+}\diasulfide}
-
\newcommand{\diacalciumsulfide}{\ch{Ca^2+}\diasulfide}
-
% Na2O, Na2S, K2O, K2S
-
\newcommand{\diasodiumoxide}{\ch{Na+}\diaoxide\ch{Na+}}
-
\newcommand{\diasodiumsulfide}{\ch{Na+}\diasulfide\ch{Na+}}
-
\newcommand{\diapotassiumoxide}{\ch{K+}\diaoxide\ch{K+}}
-
\newcommand{\diapotassiumsulfide}{\ch{K+}\diasulfide\ch{K+}}
-
% K2O2, Na2O2
-
\newcommand{\diaperoxide}{[\;\!\chlewis{0,90,180,270}{O}
-
\chlewis{0,90,270}{O}\;\!]$^{2-}$}
-
\newcommand{\diapotassiumperoxide}{\ch{K+}\diaperoxide\ch{K+}}
-
\newcommand{\diasodiumperoxide}{\ch{Na+}\diaperoxide\ch{Na+}}
-
% NH4Cl
-
\newcommand{\diaammonium}{
-
$\left[
-
\begin{array}{ccc}
-
~ & \textrm{H} & ~ \\
-
\textrm{H} \!\!\!\!\!\! & \chlewis{0,90,180,270}{N} &\!\!\!\!\! \textrm{H} \\
-
~ & \textrm{H} & ~
-
\end{array}
-
\right]^+
-
$
-
}
-
\newcommand{\diavarchloride}{$\left[\chlewis{0,90,180,270}{Cl}\right]^-$}
-
\newcommand{\diaammoniumchloride}{\diaammonium\diavarchloride}
-
-
% N2, H2, Cl2, F2, Br2, I2, H2O, H2O2, HF, HCl, HBr, HI, HClO, CO2
-
\newcommand{\diatridots}{
-
\begin{tikzpicture}[scale=0.3]
-
\fill (0.1,0.1) circle (0.1);
-
\fill (0.1,0.4) circle (0.1);
-
\fill (0.1,0.7) circle (0.1);
-
\fill (0.6,0.1) circle (0.1);
-
\fill (0.6,0.4) circle (0.1);
-
\fill (0.6,0.7) circle (0.1);
-
\end{tikzpicture}
-
}
-
\newcommand{\dianitrogen}{\chlewis{180}{N}\diatridots\chlewis{0}{N}}
-
\newcommand{\diahydrogen}{\chlewis{0,}{H}\,H}
-
\newcommand{\diachlorine}{\chlewis{0,90,180,270}{Cl}\,\chlewis{0,90,270}{Cl}}
-
\newcommand{\diafluorine}{\chlewis{0,90,180,270}{F}\,\chlewis{0,90,270}{F}}
-
\newcommand{\diabromine}{\chlewis{0,90,180,270}{Br}\,\chlewis{0,90,270}{Br}}
-
\newcommand{\diaiodine}{\chlewis{0,90,180,270}{I}\,\chlewis{0,90,270}{I}}
-
\newcommand{\diawater}{H\,\chlewis{0,90,180,270}{O}\,H}
-
\newcommand{\diahydrogensulfide}{H\,\chlewis{0,90,180,270}{S}\,H}
-
\newcommand{\diahydrogenperoxide}{H\,\chlewis{0,90,180,270}{O}
-
\chlewis{0,90,270}{O}\,H}
-
\newcommand{\diahydrogenfluoride}{H\,\chlewis{0,90,180,270}{F}}
-
\newcommand{\diahydrogenchloride}{H\,\chlewis{0,90,180,270}{Cl}}
-
\newcommand{\diahydrogenbromide}{H\,\chlewis{0,90,180,270}{Br}}
-
\newcommand{\diahydrogeniodide}{H\,\chlewis{0,90,180,270}{I}}
-
\newcommand{\diahypochlorousacid}{H\,\chlewis{0,90,180,270}{O}
-
\chlewis{0,90,270}{Cl}}
-
\newcommand{\diacarbondioxide}{\chlewis{0,90,180}{O}
-
\chlewis{0,180}{C}
-
\chlewis{0,90,180}{O}
-
}
-
-
% NH3, PH3, CH4, SiH4, CCl4, CF4, SiF4, PCl3, NCl3, PF3, NF3
-
\newcommand{\diaammonia}{
-
\begin{math}
-
\begin{array}{ccc}
-
~ & \textrm{H} & ~ \\
-
\textrm{H} \!\!\!\!\!\! & \chlewis{0,90,180,270}{N} &\!\!\!\!\! \textrm{H}
-
\end{array}
-
\end{math}
-
}
-
\newcommand{\diaphosphorustrihydroride}{
-
\begin{math}
-
\begin{array}{ccc}
-
~ & \textrm{H} & ~ \\
-
\textrm{H} \!\!\!\!\!\! & \chlewis{0,90,180,270}{P} &\!\!\!\!\! \textrm{H}
-
\end{array}
-
\end{math}
-
}
-
\newcommand{\diamethane}{
-
\begin{math}
-
\begin{array}{ccc}
-
~ & \textrm{H} & ~ \\
-
\textrm{H} \!\!\!\!\!\! & \chlewis{0,90,180,270}{C} &\!\!\!\!\! \textrm{H}\\
-
~ & \textrm{H} & ~
-
\end{array}
-
\end{math}
-
}
-
\newcommand{\diasilicontetrahydroride}{
-
\begin{math}
-
\begin{array}{ccc}
-
~ & \textrm{H} & ~ \\
-
\textrm{H} \!\!\!\!\!\! & \chlewis{0,90,180,270}{Si} &\!\!\!\!\! \textrm{H}\\
-
~ & \textrm{H} & ~
-
\end{array}
-
\end{math}
-
}
-
\newcommand{\diasilicontetrachloride}{
-
\begin{math}
-
\begin{array}{ccc}
-
~ & \chlewis{0,90,180}{Cl} & ~ \\
-
\chlewis{90,180,270}{Cl} \!\!\!\!\! & \chlewis{0,90,180,270}{Si} & \!\!\!\! \chlewis{0,90,270}{Cl}\\
-
~ & \chlewis{0,180,270}{Cl} & ~
-
\end{array}
-
\end{math}
-
}
-
\newcommand{\diacarbontetrachloride}{
-
\begin{math}
-
\begin{array}{ccc}
-
~ & \chlewis{0,90,180}{Cl} & ~ \\
-
\chlewis{90,180,270}{Cl} \!\!\!\!\! & \chlewis{0,90,180,270}{C} & \!\!\!\! \chlewis{0,90,270}{Cl}\\
-
~ & \chlewis{0,180,270}{Cl} & ~
-
\end{array}
-
\end{math}
-
}
-
\newcommand{\diacarbontetrafluoride}{
-
\begin{math}
-
\begin{array}{ccc}
-
~ & \chlewis{0,90,180}{F} & ~ \\
-
\chlewis{90,180,270}{F} \!\!\!\!\! & \chlewis{0,90,180,270}{C} & \!\!\!\! \chlewis{0,90,270}{F}\\
-
~ & \chlewis{0,180,270}{F} & ~
-
\end{array}
-
\end{math}
-
}
-
\newcommand{\diasilicontetrafluoride}{
-
\begin{math}
-
\begin{array}{ccc}
-
~ & \chlewis{0,90,180}{F} & ~ \\
-
\chlewis{90,180,270}{F} \!\!\!\!\! & \chlewis{0,90,180,270}{Si} & \!\!\!\! \chlewis{0,90,270}{F}\\
-
~ & \chlewis{0,180,270}{F} & ~
-
\end{array}
-
\end{math}
-
}
-
\newcommand{\diaphosphorustrichloride}{
-
\begin{math}
-
\begin{array}{ccc}
-
\chlewis{90,180,270}{Cl} \!\!\!\!\! & \chlewis{0,90,180,270}{P} & \!\!\!\! \chlewis{0,90,270}{Cl}\\
-
~ & \chlewis{0,180,270}{Cl} & ~
-
\end{array}
-
\end{math}
-
}
-
\newcommand{\dianitrogentrichloride}{
-
\begin{math}
-
\begin{array}{ccc}
-
\chlewis{90,180,270}{Cl} \!\!\!\!\! & \chlewis{0,90,180,270}{N} & \!\!\!\! \chlewis{0,90,270}{Cl}\\
-
~ & \chlewis{0,180,270}{Cl} & ~
-
\end{array}
-
\end{math}
-
}
-
\newcommand{\diaphosphorustrifluoride}{
-
\begin{math}
-
\begin{array}{ccc}
-
\chlewis{90,180,270}{F} \!\!\!\!\! & \chlewis{0,90,180,270}{P} & \!\!\!\! \chlewis{0,90,270}{F}\\
-
~ & \chlewis{0,180,270}{F} & ~
-
\end{array}
-
\end{math}
-
}
-
\newcommand{\dianitrogentrifluoride}{
-
\begin{math}
-
\begin{array}{ccc}
-
\chlewis{90,180,270}{F} \!\!\!\!\! & \chlewis{0,90,180,270}{N} & \!\!\!\! \chlewis{0,90,270}{F}\\
-
~ & \chlewis{0,180,270}{F} & ~
-
\end{array}
-
\end{math}
-
}
-
% N2H4, C2H6, C2H4, C2H2,
-
%TODO: CH3COOH, CH3CHO, C2H5OH
-
\newcommand{\diadinitrogentetrahydroride}{
-
\begin{math}
-
\begin{array}{cccc}
-
~ & \textrm{H} & \!\!\!\!\!\!\textrm{H} & ~ \\
-
\textrm{H} \!\!\!\!\!\! & \chlewis{0,90,180,270}{N} &\!\!\!\! \chlewis{0,90,270}{N}&\!\!\!\!\! \textrm{H} \\
-
\end{array}
-
\end{math}
-
}
-
\newcommand{\diaethane}{
-
\begin{math}
-
\begin{array}{cccc}
-
~ & \textrm{H} & \!\!\!\!\!\!\textrm{H} & ~ \\
-
\textrm{H} \!\!\!\!\!\! & \chlewis{0,90,180,270}{C} &\!\!\!\! \chlewis{0,90,270}{C}&\!\!\!\!\! \textrm{H} \\
-
~ & \textrm{H} & \!\!\!\!\!\textrm{H} & ~
-
\end{array}
-
\end{math}
-
}
-
\newcommand{\diaethene}{
-
\begin{math}
-
\begin{array}{cccc}
-
~ & \textrm{H} & \!\!\!\! \textrm{H} & ~ \\
-
\textrm{H}\!\!\!\! & \chlewis{0,90,180}{C} &\!\!\!\! \chlewis{0,90,180}{C} &\!\!\!\! \textrm{H}
-
\end{array}
-
\end{math}
-
}
-
\newcommand{\diaethyne}{H\;\!\chlewis{180}{C}\diatridots\chlewis{0}{C}\;\!H}
-
\newcommand{\diaacetylene}{\diaethyne}
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
%%% 电子式定义到此为止
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
mybeamer.sty (此包与 mypack.sty 无差别,只是去掉了 geometry 包,加入了 beamer 的一些主题类的东西)
-
\ProvidesPackage{mybeamer}
-
%\usepackage{syntonly}
-
%\syntaxonly
-
%\usepackage{ctex}
-
\usepackage{fontspec,xunicode,xltxtra}
-
%\usepackage{titlesec}
-
%\usepackage{ifthen}
-
%\newcommand{\ISchinese}[1]
-
%{
-
% \ifthenelse{\equal{#1}{yes}}
-
% {
-
% \setmainfont[BoldFont=Franklin Gothic Demi]{STSong}
-
%中国学生用
-
% }
-
% {
-
% \setmainfont[BoldFont=Franklin Gothic Demi]{Palatino Linotype}
-
%中德班学生用
-
% }
-
%}
-
%\newcommand{\IStemp}[1]{
-
% \ifthenelse{\equal{#1}{yes}}
-
% {
-
%%%%
-
% }
-
% {
-
% }
-
%}
-
\usepackage{amsmath,amssymb}
-
%\usepackage[margin=4cm]{geometry}
-
%\usepackage{hyperref}
-
%\hypersetup{colorlinks,%
-
% linkcolor=red,%
-
% anchorcolor=red,%
-
% citecolor=green,%
-
% urlcolor=cyan,%
-
% filecolor=magenta}
-
% for picture
-
\usepackage{graphicx,caption3}
-
\captionsetup{font={scriptsize}}
-
%\usepackage{gensymb} % physical symbol and unit
-
\usepackage{xeCJK}
-
\setmainfont[BoldFont=Franklin Gothic Demi]{Palatino Linotype}
-
\setCJKmainfont[BoldFont={黑体}, ItalicFont={楷体}]{宋体}
-
\setCJKsansfont{黑体} % font used in \textsf{} and \sffamily
-
\setCJKmonofont{仿宋} % font used in \texttt{} and \ttfamily
-
\newCJKfontfamily[yahei]\yh{微软雅黑}
-
%\setCJKfamilyfont{yahei}{微软雅黑}
-
%\newcommand{\yh}{\CJKfamily{yahei}}
-
\newCJKfontfamily[stsong]\sts{STSong}
-
%\setCJKfamilyfont{stsong}{STSong} % 华文中宋
-
%\newcommand{\sts}{\CJKfamily{stsong}}
-
\newCJKfontfamily[song]\st{宋体}
-
%\setCJKfamilyfont{song}{宋体}
-
%\newcommand{\st}{\CJKfamily{song}}
-
\newCJKfontfamily[heiti]\heit{黑体}
-
%\setCJKfamilyfont{heiti}{黑体}
-
%\newcommand{\heit}{\CJKfamily{heiti}}
-
\newCJKfontfamily[kai]\kait{楷体}
-
%\setCJKfamilyfont{kai}{楷体}
-
%\newcommand{\kait}{\CJKfamily{kai}}
-
-
%%%%%%%%%%%%%% %默认长4cm 的填空横线
-
\makeatletter
-
\newcommand\dlmu[2][4cm]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt}
-
\makeatother
-
%%%%%%%%%%%%%%
-
% 用 \tk可以产生默认长 2.5cm的横线。\tk[3] 产生3cm 的横线
-
\newcommand{\tk}[1][2.5]{\,\underline{\mbox{\hspace{#1 cm}}}\,}
-
%%%%%%%%%%%%%%%%%
-
%以下带圈数字必须在 \ISchines{yes} 时才有效
-
\newcommand{\ysone}{{\setmainfont{宋体} ①}}
-
\newcommand{\ystwo}{{\setmainfont{宋体} ②}}
-
\newcommand{\ysthree}{{\setmainfont{宋体} ③}}
-
\newcommand{\ysfour}{{\setmainfont{宋体} ④}}
-
\newcommand{\ysfive}{{\setmainfont{宋体} ⑤}}
-
\newcommand{\yssix}{{\setmainfont{宋体} ⑥}}
-
\newcommand{\ysseven}{{\setmainfont{宋体} ⑦}}
-
\newcommand{\yseight}{{\setmainfont{宋体} ⑧}}
-
\newcommand{\ysnine}{{\setmainfont{宋体} ⑨}}
-
\newcommand{\ysten}{{\setmainfont{宋体} ⑩}}
阅读(5701) | 评论(0) | 转发(0) |