Chinaunix首页 | 论坛 | 博客
  • 博客访问: 399105
  • 博文数量: 76
  • 博客积分: 3016
  • 博客等级: 中校
  • 技术积分: 782
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-27 12:05
文章分类

全部博文(76)

文章存档

2017年(1)

2015年(1)

2009年(2)

2008年(28)

2007年(44)

我的朋友

分类: LINUX

2017-01-11 11:14:13

我最近一直在用 XeTeX 写自己的东西,使用起来有点小体会,记录如下
使用 LaTeX 有好多方法。我用过的有两个,一个是直接安装 CTeX,另一个是安装 TeXLive2016 。

win10

windows 下有两种选择,一个是 CTeX,另一个是 TeXLive2016。
  • CTeX
直接安装 ctex 可以直接在 win 下使用你想用的任何东西。为避免麻烦,最好直接安装 CTeX 的 full 版本。
  • TeXLive2016
直接下载 TeXLive2016 的 iso 文件,然后挂载为光盘,安装就是了。


Linux

Linux 下的选择其实也有两种。一种是直接安装对应发行版中包含的 texlive 包。另一种是像我一样,手工安装 TeXLive2016
  • 直接安装
debian (或 ubuntu) 下直接以 apt-get install 来安装。其它发行版差不多的
  • TeXLive2016
直接下载 TeXLive2016 的 iso 文件,这个文件不分 win 和 linux,通用的。然后挂载,最后用里面的安装脚本安装就是了。
安装时,以 root 身份安装至 /usr/local 下。可以用 sudo 或者直接 su 转成 root。
安装时,我是以文本模式安装的,不要图形模式,因为不同的 linux 发行版不一定能满足那个图形模式的要求。
  • 安装后的一些操作(以 ubuntu 为例)
    • 复制字体配置文件

点击(此处)折叠或打开

  1. sudo cp /usr/local/texlive/2016/texmf-var/fonts/conf/texlive-fontconfig.conf /etc/fonts/conf.d/09-texlive.conf
    • 刷新系统字体缓存

点击(此处)折叠或打开

  1. sudo fc-cache -fsv
我目前使用 ubuntu 系统,为了更方便得安装一些 texlive 相关的包,就要手工加入一个 texlive dummy 包。
参考: http://blog.csdn.net/matricer/article/details/52253658


XeTeX 的使用

win 下使用比较简单,直接写好 tex 文件,然后用 xetex 处理即可。

linux 下的使用有一点需要特别注意,文件必须是 UTF-8 编码,否则无法得到正确的中文。
写 tex 文件时,为了使用中文必须带上一个与中文有关的包,比如 xeCJK。

下面给个小例子

点击(此处)折叠或打开

  1. \documentclass{article}
  2. \usepackage{xeCJK}
  3. \begin{document}
  4. 中文测试
  5. \end{document}
如果出不来中文,请 一定检查你的文件编码是否是 UTF-8!这一点非常重要!

最后附上我自定义的宏,以下文件中关于字体的选择,一定改成你自己系统中有的。Linux 下改成 Fandol 系列就行了。
个人感觉,Fandol 系列的字体不错的。英文的话,Linux 下个人喜欢 bookman 那个,字宽也比较好看,阅读不累。
反正挑个自己喜欢的衬线字体(serif)就好,不要选无衬线的(sans serif)。
mypack.sty
点击(此处)折叠或打开
  1. \ProvidesPackage{mypack}
  2. %\usepackage{syntonly}
  3. %\syntaxonly
  4. %\usepackage{ctex}
  5. \usepackage{fontspec,xunicode,xltxtra}
  6. %\usepackage{indentfirst} % 紧跟章节命令后的第一行缩进。无需缩进时要手工指定\noindent
  7. %\usepackage{titlesec}
  8. %\usepackage{ifthen}
  9. %\newcommand{\ISchinese}[1]
  10. %{
  11. % \ifthenelse{\equal{#1}{yes}}
  12. % {
  13. % \setmainfont[BoldFont=Franklin Gothic Demi]{STSong}
  14. %中国学生用
  15. % }
  16. % {
  17. % \setmainfont[BoldFont=Franklin Gothic Demi]{Palatino Linotype}
  18. %中德班学生用
  19. % }
  20. %}
  21. %\newcommand{\IStemp}[1]{
  22. % \ifthenelse{\equal{#1}{yes}}
  23. % {
  24. %%%%
  25. % }
  26. % {
  27. % }
  28. %}
  29. \usepackage{amsmath,amssymb}
  30. %\usepackage[margin=4cm]{geometry}
  31. \usepackage{hyperref}
  32. \hypersetup{colorlinks,%
  33. linkcolor=red,%
  34. anchorcolor=red,%
  35. citecolor=green,%
  36. urlcolor=cyan,%
  37. filecolor=magenta}
  38. % for picture
  39. \usepackage{graphicx,caption3}
  40. \captionsetup{font={scriptsize}}
  41. %\usepackage{gensymb} % physical symbol and unit
  42. \usepackage{xeCJK}
  43. \setmainfont[BoldFont=Franklin Gothic Demi]{Palatino Linotype}
  44. \setCJKmainfont[BoldFont={黑体}, ItalicFont={楷体}]{宋体}
  45. \setCJKsansfont{黑体} % font used in \textsf{} and \sffamily
  46. \setCJKmonofont{仿宋} % font used in \texttt{} and \ttfamily
  47. \newCJKfontfamily[yahei]\yh{微软雅黑}
  48. %\setCJKfamilyfont{yahei}{微软雅黑}
  49. %\newcommand{\yh}{\CJKfamily{yahei}}
  50. \newCJKfontfamily[stsong]\sts{STSong}
  51. %\setCJKfamilyfont{stsong}{STSong} % 华文中宋
  52. %\newcommand{\sts}{\CJKfamily{stsong}}
  53. \newCJKfontfamily[song]\st{宋体}
  54. %\setCJKfamilyfont{song}{宋体}
  55. %\newcommand{\st}{\CJKfamily{song}}
  56. \newCJKfontfamily[heiti]\heit{黑体}
  57. %\setCJKfamilyfont{heiti}{黑体}
  58. %\newcommand{\heit}{\CJKfamily{heiti}}
  59. \newCJKfontfamily[kai]\kait{楷体}
  60. %\setCJKfamilyfont{kai}{楷体}
  61. %\newcommand{\kait}{\CJKfamily{kai}}
  62. %%%%%%%%%%%%%% %默认长4cm 的填空横线
  63. \makeatletter
  64. \newcommand\dlmu[2][4cm]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt}
  65. \makeatother
  66. %%%%%%%%%%%%%%
  67. % 用 \tk可以产生默认长 2.5cm的横线。\tk[3] 产生3cm 的横线
  68. \newcommand{\tk}[1][2.5]{\,\underline{\mbox{\hspace{#1 cm}}}\,}
  69. %%%%%%%%%%%%%%%%%
  70. %以下带圈数字必须在 \ISchines{yes} 时才有效
  71. \newcommand{\ysone}{{\setmainfont{宋体} ①}}
  72. \newcommand{\ystwo}{{\setmainfont{宋体} ②}}
  73. \newcommand{\ysthree}{{\setmainfont{宋体} ③}}
  74. \newcommand{\ysfour}{{\setmainfont{宋体} ④}}
  75. \newcommand{\ysfive}{{\setmainfont{宋体} ⑤}}
  76. \newcommand{\yssix}{{\setmainfont{宋体} ⑥}}
  77. \newcommand{\ysseven}{{\setmainfont{宋体} ⑦}}
  78. \newcommand{\yseight}{{\setmainfont{宋体} ⑧}}
  79. \newcommand{\ysnine}{{\setmainfont{宋体} ⑨}}
  80. \newcommand{\ysten}{{\setmainfont{宋体} ⑩}}


diapack.sty

点击(此处)折叠或打开

  1. \ProvidesPackage{diapack}
  2. % for chemistry
  3. \usepackage[version=4,arrows=pgf-filled]{mhchem}
  4. \usepackage{chemmacros}
  5. \chemsetup{ modules = all}
  6. \chemsetup{
  7. redox/roman=false,
  8. redox/explicit-sign=true,
  9. redox/pos=top,
  10. }
  11. \usepackage{chemformula}
  12. \usepackage{pgfplots}
  13. %%%%%%%%%%%%%%%%%%%%%
  14. % 以下定义需要用 \usepackage{extarrows}
  15. \usepackage{extarrows}
  16. \newcommand{\high}{
  17. $\xlongequal{\textrm{高温}}$
  18. }
  19. \newcommand{\heatcata}{
  20. $\xlongequal[\Delta]{\textrm{催化剂}}$
  21. }
  22. \newcommand{\heat}{
  23. $\xlongequal{\Delta}$
  24. }
  25. \newcommand{\hnu}{
  26. $\xlongequal{\textrm{光照}}$
  27. }
  28. \newcommand{\light}{
  29. $\xlongequal{\textrm{点燃}}$
  30. }
  31. \newcommand{\myeq}{
  32. $\xlongequal{}$
  33. }
  34. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  35. %%% \upjt 和 \downjt 用于气体和沉淀符号
  36. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  37. \newcommand{\dbe}{
  38. \begin{tikzpicture}
  39. \draw[double distance=1pt,thick,](0,0.4) -- (0.4,0.4);
  40. \end{tikzpicture}
  41. }
  42. \newcommand{\upjt}{
  43. \begin{tikzpicture}
  44. \draw[-stealth](0,0) -> (0,0.3);
  45. \end{tikzpicture}
  46. }
  47. \newcommand{\downjt}{
  48. \begin{tikzpicture}
  49. \draw[-stealth](0,0.3) -> (0,0);
  50. \end{tikzpicture}
  51. }
  52. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  53. %以下全是电子式的定义,电子式中点大小和点与元素符号的距离
  54. \setchemformula{radical-radius=.7pt, lewis-distance=.75ex}
  55. % NaF, NaCl, KF, KCl, KBr, NaBr
  56. \newcommand{\diachloride}{[\;\!\chlewis{0,90,180,270}{Cl}\;\!]$^-$}
  57. \newcommand{\diafluoride}{[\;\!\chlewis{0,90,180,270}{F}\;\!]$^-$}
  58. \newcommand{\diabromide}{[\;\!\chlewis{0,90,180,270}{Br}\;\!]$^-$}
  59. \newcommand{\diaiodide}{[\;\!\chlewis{0,90,180,270}{I}\;\!]$^-$}
  60. \newcommand{\diasodiumfluoride}{\ch{Na+}\diafluoride}
  61. \newcommand{\diasodiumchloride}{\ch{Na+}\diachloride}
  62. \newcommand{\diapotassiumfluoride}{\ch{K+}\diafluoride}
  63. \newcommand{\diapotassiumchloride}{\ch{K+}\diachloride}
  64. \newcommand{\diapotassiumbromide}{\ch{K+}\diabromide}
  65. \newcommand{\diasodiumbromide}{\ch{Na+}\diabromide}
  66. % NaOH, KOH, Ca(OH)2, Ba(OH)2, Mg(OH)2, NaClO
  67. \newcommand{\diahydroxide}{[\;\!\chlewis{0,90,180,270}{O}\,H\;\!]$^-$}
  68. \newcommand{\diahypochlorite}{[\;\!\chlewis{0,90,180,270}{O}
  69. \chlewis{0,90,270}{Cl}\;\!]$^-$}
  70. \newcommand{\diasodiumhydroxide}{\ch{Na+}\diahydroxide}
  71. \newcommand{\diapotassiumhydroxide}{\ch{K+}\diahydroxide}
  72. \newcommand{\diacalciumhydroxide}{\diahydroxide\ch{Ca^2+}\diahydroxide}
  73. \newcommand{\diabariumhydroxide}{\diahydroxide\ch{Ba^2+}\diahydroxide}
  74. \newcommand{\diamagnesiumhydroxide}{\diahydroxide\ch{Mg^2+}\diahydroxide}
  75. \newcommand{\diasodiumhypochlorite}{\ch{Na+}\diahypochlorite}
  76. % MgCl2, CaCl2, CaF2, MgF2, BaCl2, BaF2
  77. \newcommand{\diamagnesiumchloride}{\diachloride\ch{Mg^2+}\diachloride}
  78. \newcommand{\diacalciumchloride}{\diachloride\ch{Ca^2+}\diachloride}
  79. \newcommand{\diacalciumfluoride}{\diafluoride\ch{Ca^2+}\diafluoride}
  80. \newcommand{\diamagnesiumfluoride}{\diafluoride\ch{Mg^2+}\diafluoride}
  81. \newcommand{\diabariumchloride}{\diachloride\ch{Ba^2+}\diafluoride}
  82. \newcommand{\diabariumfluoride}{\diafluoride\ch{Ba^2+}\diafluoride}
  83. % MgO, CaO, MgS, CaS
  84. \newcommand{\diaoxide}{[\;\!\chlewis{0,90,180,270}{O}\;\!]$^{2-}$}
  85. \newcommand{\diasulfide}{[\;\!\chlewis{0,90,180,270}{S}\;\!]$^{2-}$}
  86. \newcommand{\diamagnesiumoxide}{\ch{Mg^2+}\diaoxide}
  87. \newcommand{\diacalciumoxide}{\ch{Ca^2+}\diaoxide}
  88. \newcommand{\diamagnesiumsulfide}{\ch{Mg^2+}\diasulfide}
  89. \newcommand{\diacalciumsulfide}{\ch{Ca^2+}\diasulfide}
  90. % Na2O, Na2S, K2O, K2S
  91. \newcommand{\diasodiumoxide}{\ch{Na+}\diaoxide\ch{Na+}}
  92. \newcommand{\diasodiumsulfide}{\ch{Na+}\diasulfide\ch{Na+}}
  93. \newcommand{\diapotassiumoxide}{\ch{K+}\diaoxide\ch{K+}}
  94. \newcommand{\diapotassiumsulfide}{\ch{K+}\diasulfide\ch{K+}}
  95. % K2O2, Na2O2
  96. \newcommand{\diaperoxide}{[\;\!\chlewis{0,90,180,270}{O}
  97. \chlewis{0,90,270}{O}\;\!]$^{2-}$}
  98. \newcommand{\diapotassiumperoxide}{\ch{K+}\diaperoxide\ch{K+}}
  99. \newcommand{\diasodiumperoxide}{\ch{Na+}\diaperoxide\ch{Na+}}
  100. % NH4Cl
  101. \newcommand{\diaammonium}{
  102. $\left[
  103. \begin{array}{ccc}
  104. ~ & \textrm{H} & ~ \\
  105. \textrm{H} \!\!\!\!\!\! & \chlewis{0,90,180,270}{N} &\!\!\!\!\! \textrm{H} \\
  106. ~ & \textrm{H} & ~
  107. \end{array}
  108. \right]^+
  109. $
  110. }
  111. \newcommand{\diavarchloride}{$\left[\chlewis{0,90,180,270}{Cl}\right]^-$}
  112. \newcommand{\diaammoniumchloride}{\diaammonium\diavarchloride}
  113. % N2, H2, Cl2, F2, Br2, I2, H2O, H2O2, HF, HCl, HBr, HI, HClO, CO2
  114. \newcommand{\diatridots}{
  115. \begin{tikzpicture}[scale=0.3]
  116. \fill (0.1,0.1) circle (0.1);
  117. \fill (0.1,0.4) circle (0.1);
  118. \fill (0.1,0.7) circle (0.1);
  119. \fill (0.6,0.1) circle (0.1);
  120. \fill (0.6,0.4) circle (0.1);
  121. \fill (0.6,0.7) circle (0.1);
  122. \end{tikzpicture}
  123. }
  124. \newcommand{\dianitrogen}{\chlewis{180}{N}\diatridots\chlewis{0}{N}}
  125. \newcommand{\diahydrogen}{\chlewis{0,}{H}\,H}
  126. \newcommand{\diachlorine}{\chlewis{0,90,180,270}{Cl}\,\chlewis{0,90,270}{Cl}}
  127. \newcommand{\diafluorine}{\chlewis{0,90,180,270}{F}\,\chlewis{0,90,270}{F}}
  128. \newcommand{\diabromine}{\chlewis{0,90,180,270}{Br}\,\chlewis{0,90,270}{Br}}
  129. \newcommand{\diaiodine}{\chlewis{0,90,180,270}{I}\,\chlewis{0,90,270}{I}}
  130. \newcommand{\diawater}{H\,\chlewis{0,90,180,270}{O}\,H}
  131. \newcommand{\diahydrogensulfide}{H\,\chlewis{0,90,180,270}{S}\,H}
  132. \newcommand{\diahydrogenperoxide}{H\,\chlewis{0,90,180,270}{O}
  133. \chlewis{0,90,270}{O}\,H}
  134. \newcommand{\diahydrogenfluoride}{H\,\chlewis{0,90,180,270}{F}}
  135. \newcommand{\diahydrogenchloride}{H\,\chlewis{0,90,180,270}{Cl}}
  136. \newcommand{\diahydrogenbromide}{H\,\chlewis{0,90,180,270}{Br}}
  137. \newcommand{\diahydrogeniodide}{H\,\chlewis{0,90,180,270}{I}}
  138. \newcommand{\diahypochlorousacid}{H\,\chlewis{0,90,180,270}{O}
  139. \chlewis{0,90,270}{Cl}}
  140. \newcommand{\diacarbondioxide}{\chlewis{0,90,180}{O}
  141. \chlewis{0,180}{C}
  142. \chlewis{0,90,180}{O}
  143. }
  144. % NH3, PH3, CH4, SiH4, CCl4, CF4, SiF4, PCl3, NCl3, PF3, NF3
  145. \newcommand{\diaammonia}{
  146. \begin{math}
  147. \begin{array}{ccc}
  148. ~ & \textrm{H} & ~ \\
  149. \textrm{H} \!\!\!\!\!\! & \chlewis{0,90,180,270}{N} &\!\!\!\!\! \textrm{H}
  150. \end{array}
  151. \end{math}
  152. }
  153. \newcommand{\diaphosphorustrihydroride}{
  154. \begin{math}
  155. \begin{array}{ccc}
  156. ~ & \textrm{H} & ~ \\
  157. \textrm{H} \!\!\!\!\!\! & \chlewis{0,90,180,270}{P} &\!\!\!\!\! \textrm{H}
  158. \end{array}
  159. \end{math}
  160. }
  161. \newcommand{\diamethane}{
  162. \begin{math}
  163. \begin{array}{ccc}
  164. ~ & \textrm{H} & ~ \\
  165. \textrm{H} \!\!\!\!\!\! & \chlewis{0,90,180,270}{C} &\!\!\!\!\! \textrm{H}\\
  166. ~ & \textrm{H} & ~
  167. \end{array}
  168. \end{math}
  169. }
  170. \newcommand{\diasilicontetrahydroride}{
  171. \begin{math}
  172. \begin{array}{ccc}
  173. ~ & \textrm{H} & ~ \\
  174. \textrm{H} \!\!\!\!\!\! & \chlewis{0,90,180,270}{Si} &\!\!\!\!\! \textrm{H}\\
  175. ~ & \textrm{H} & ~
  176. \end{array}
  177. \end{math}
  178. }
  179. \newcommand{\diasilicontetrachloride}{
  180. \begin{math}
  181. \begin{array}{ccc}
  182. ~ & \chlewis{0,90,180}{Cl} & ~ \\
  183. \chlewis{90,180,270}{Cl} \!\!\!\!\! & \chlewis{0,90,180,270}{Si} & \!\!\!\! \chlewis{0,90,270}{Cl}\\
  184. ~ & \chlewis{0,180,270}{Cl} & ~
  185. \end{array}
  186. \end{math}
  187. }
  188. \newcommand{\diacarbontetrachloride}{
  189. \begin{math}
  190. \begin{array}{ccc}
  191. ~ & \chlewis{0,90,180}{Cl} & ~ \\
  192. \chlewis{90,180,270}{Cl} \!\!\!\!\! & \chlewis{0,90,180,270}{C} & \!\!\!\! \chlewis{0,90,270}{Cl}\\
  193. ~ & \chlewis{0,180,270}{Cl} & ~
  194. \end{array}
  195. \end{math}
  196. }
  197. \newcommand{\diacarbontetrafluoride}{
  198. \begin{math}
  199. \begin{array}{ccc}
  200. ~ & \chlewis{0,90,180}{F} & ~ \\
  201. \chlewis{90,180,270}{F} \!\!\!\!\! & \chlewis{0,90,180,270}{C} & \!\!\!\! \chlewis{0,90,270}{F}\\
  202. ~ & \chlewis{0,180,270}{F} & ~
  203. \end{array}
  204. \end{math}
  205. }
  206. \newcommand{\diasilicontetrafluoride}{
  207. \begin{math}
  208. \begin{array}{ccc}
  209. ~ & \chlewis{0,90,180}{F} & ~ \\
  210. \chlewis{90,180,270}{F} \!\!\!\!\! & \chlewis{0,90,180,270}{Si} & \!\!\!\! \chlewis{0,90,270}{F}\\
  211. ~ & \chlewis{0,180,270}{F} & ~
  212. \end{array}
  213. \end{math}
  214. }
  215. \newcommand{\diaphosphorustrichloride}{
  216. \begin{math}
  217. \begin{array}{ccc}
  218. \chlewis{90,180,270}{Cl} \!\!\!\!\! & \chlewis{0,90,180,270}{P} & \!\!\!\! \chlewis{0,90,270}{Cl}\\
  219. ~ & \chlewis{0,180,270}{Cl} & ~
  220. \end{array}
  221. \end{math}
  222. }
  223. \newcommand{\dianitrogentrichloride}{
  224. \begin{math}
  225. \begin{array}{ccc}
  226. \chlewis{90,180,270}{Cl} \!\!\!\!\! & \chlewis{0,90,180,270}{N} & \!\!\!\! \chlewis{0,90,270}{Cl}\\
  227. ~ & \chlewis{0,180,270}{Cl} & ~
  228. \end{array}
  229. \end{math}
  230. }
  231. \newcommand{\diaphosphorustrifluoride}{
  232. \begin{math}
  233. \begin{array}{ccc}
  234. \chlewis{90,180,270}{F} \!\!\!\!\! & \chlewis{0,90,180,270}{P} & \!\!\!\! \chlewis{0,90,270}{F}\\
  235. ~ & \chlewis{0,180,270}{F} & ~
  236. \end{array}
  237. \end{math}
  238. }
  239. \newcommand{\dianitrogentrifluoride}{
  240. \begin{math}
  241. \begin{array}{ccc}
  242. \chlewis{90,180,270}{F} \!\!\!\!\! & \chlewis{0,90,180,270}{N} & \!\!\!\! \chlewis{0,90,270}{F}\\
  243. ~ & \chlewis{0,180,270}{F} & ~
  244. \end{array}
  245. \end{math}
  246. }
  247. % N2H4, C2H6, C2H4, C2H2,
  248. %TODO: CH3COOH, CH3CHO, C2H5OH
  249. \newcommand{\diadinitrogentetrahydroride}{
  250. \begin{math}
  251. \begin{array}{cccc}
  252. ~ & \textrm{H} & \!\!\!\!\!\!\textrm{H} & ~ \\
  253. \textrm{H} \!\!\!\!\!\! & \chlewis{0,90,180,270}{N} &\!\!\!\! \chlewis{0,90,270}{N}&\!\!\!\!\! \textrm{H} \\
  254. \end{array}
  255. \end{math}
  256. }
  257. \newcommand{\diaethane}{
  258. \begin{math}
  259. \begin{array}{cccc}
  260. ~ & \textrm{H} & \!\!\!\!\!\!\textrm{H} & ~ \\
  261. \textrm{H} \!\!\!\!\!\! & \chlewis{0,90,180,270}{C} &\!\!\!\! \chlewis{0,90,270}{C}&\!\!\!\!\! \textrm{H} \\
  262. ~ & \textrm{H} & \!\!\!\!\!\textrm{H} & ~
  263. \end{array}
  264. \end{math}
  265. }
  266. \newcommand{\diaethene}{
  267. \begin{math}
  268. \begin{array}{cccc}
  269. ~ & \textrm{H} & \!\!\!\! \textrm{H} & ~ \\
  270. \textrm{H}\!\!\!\! & \chlewis{0,90,180}{C} &\!\!\!\! \chlewis{0,90,180}{C} &\!\!\!\! \textrm{H}
  271. \end{array}
  272. \end{math}
  273. }
  274. \newcommand{\diaethyne}{H\;\!\chlewis{180}{C}\diatridots\chlewis{0}{C}\;\!H}
  275. \newcommand{\diaacetylene}{\diaethyne}
  276. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  277. %%% 电子式定义到此为止
  278. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%


mybeamer.sty (此包与 mypack.sty 无差别,只是去掉了 geometry 包,加入了 beamer 的一些主题类的东西)

点击(此处)折叠或打开

  1. \ProvidesPackage{mybeamer}
  2. %\usepackage{syntonly}
  3. %\syntaxonly
  4. %\usepackage{ctex}
  5. \usepackage{fontspec,xunicode,xltxtra}
  6. %\usepackage{titlesec}
  7. %\usepackage{ifthen}
  8. %\newcommand{\ISchinese}[1]
  9. %{
  10. % \ifthenelse{\equal{#1}{yes}}
  11. % {
  12. % \setmainfont[BoldFont=Franklin Gothic Demi]{STSong}
  13. %中国学生用
  14. % }
  15. % {
  16. % \setmainfont[BoldFont=Franklin Gothic Demi]{Palatino Linotype}
  17. %中德班学生用
  18. % }
  19. %}
  20. %\newcommand{\IStemp}[1]{
  21. % \ifthenelse{\equal{#1}{yes}}
  22. % {
  23. %%%%
  24. % }
  25. % {
  26. % }
  27. %}
  28. \usepackage{amsmath,amssymb}
  29. %\usepackage[margin=4cm]{geometry}
  30. %\usepackage{hyperref}
  31. %\hypersetup{colorlinks,%
  32. % linkcolor=red,%
  33. % anchorcolor=red,%
  34. % citecolor=green,%
  35. % urlcolor=cyan,%
  36. % filecolor=magenta}
  37. % for picture
  38. \usepackage{graphicx,caption3}
  39. \captionsetup{font={scriptsize}}
  40. %\usepackage{gensymb} % physical symbol and unit
  41. \usepackage{xeCJK}
  42. \setmainfont[BoldFont=Franklin Gothic Demi]{Palatino Linotype}
  43. \setCJKmainfont[BoldFont={黑体}, ItalicFont={楷体}]{宋体}
  44. \setCJKsansfont{黑体} % font used in \textsf{} and \sffamily
  45. \setCJKmonofont{仿宋} % font used in \texttt{} and \ttfamily
  46. \newCJKfontfamily[yahei]\yh{微软雅黑}
  47. %\setCJKfamilyfont{yahei}{微软雅黑}
  48. %\newcommand{\yh}{\CJKfamily{yahei}}
  49. \newCJKfontfamily[stsong]\sts{STSong}
  50. %\setCJKfamilyfont{stsong}{STSong} % 华文中宋
  51. %\newcommand{\sts}{\CJKfamily{stsong}}
  52. \newCJKfontfamily[song]\st{宋体}
  53. %\setCJKfamilyfont{song}{宋体}
  54. %\newcommand{\st}{\CJKfamily{song}}
  55. \newCJKfontfamily[heiti]\heit{黑体}
  56. %\setCJKfamilyfont{heiti}{黑体}
  57. %\newcommand{\heit}{\CJKfamily{heiti}}
  58. \newCJKfontfamily[kai]\kait{楷体}
  59. %\setCJKfamilyfont{kai}{楷体}
  60. %\newcommand{\kait}{\CJKfamily{kai}}
  61. %%%%%%%%%%%%%% %默认长4cm 的填空横线
  62. \makeatletter
  63. \newcommand\dlmu[2][4cm]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt}
  64. \makeatother
  65. %%%%%%%%%%%%%%
  66. % 用 \tk可以产生默认长 2.5cm的横线。\tk[3] 产生3cm 的横线
  67. \newcommand{\tk}[1][2.5]{\,\underline{\mbox{\hspace{#1 cm}}}\,}
  68. %%%%%%%%%%%%%%%%%
  69. %以下带圈数字必须在 \ISchines{yes} 时才有效
  70. \newcommand{\ysone}{{\setmainfont{宋体} ①}}
  71. \newcommand{\ystwo}{{\setmainfont{宋体} ②}}
  72. \newcommand{\ysthree}{{\setmainfont{宋体} ③}}
  73. \newcommand{\ysfour}{{\setmainfont{宋体} ④}}
  74. \newcommand{\ysfive}{{\setmainfont{宋体} ⑤}}
  75. \newcommand{\yssix}{{\setmainfont{宋体} ⑥}}
  76. \newcommand{\ysseven}{{\setmainfont{宋体} ⑦}}
  77. \newcommand{\yseight}{{\setmainfont{宋体} ⑧}}
  78. \newcommand{\ysnine}{{\setmainfont{宋体} ⑨}}
  79. \newcommand{\ysten}{{\setmainfont{宋体} ⑩}}



阅读(5557) | 评论(0) | 转发(0) |
0

上一篇:Persistent Device

下一篇:没有了

给主人留下些什么吧!~~