cumcmthesis.cls 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  1. \NeedsTeXFormat{LaTeX2e}[1995/12/01]
  2. \ProvidesClass{cumcmthesis}
  3. [2017/09/16 v2.6 Standard LaTeX Template for CUMCM]
  4. %% Inital Code
  5. \newif\if@mcm@bwprint\@mcm@bwprintfalse
  6. \newif\if@mcm@preface\@mcm@prefacetrue
  7. % tokens definition
  8. %%%% 承诺书
  9. \newcommand\mcm@tokens@keywords{}
  10. \newcommand*\mcm@tokens@tihao{}
  11. \newcommand*\mcm@tokens@baominghao{}
  12. \newcommand*\mcm@tokens@schoolname{}
  13. \newcommand*\mcm@tokens@membera{}
  14. \newcommand*\mcm@tokens@memberb{}
  15. \newcommand*\mcm@tokens@memberc{}
  16. \newcommand*\mcm@tokens@supervisor{}
  17. \newcommand*\mcm@tokens@yearinput{}
  18. \newcommand*\mcm@tokens@monthinput{}
  19. \newcommand*\mcm@tokens@dayinput{}
  20. %%%% 编号专用页
  21. % 没有
  22. %% Declaration of Options
  23. \DeclareOption{colorprint}{\@mcm@bwprintfalse}
  24. \DeclareOption{bwprint}{\@mcm@bwprinttrue}
  25. \DeclareOption{withoutpreface}{\@mcm@prefacefalse}
  26. \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
  27. %% Executing of Options
  28. \ExecuteOptions{colorprint}
  29. \ProcessOptions\relax
  30. %% Loading Class
  31. \LoadClass[a4paper,12pt]{article}
  32. %% Loading Package
  33. \RequirePackage{ifxetex}
  34. \RequireXeTeX
  35. \ifxetex\else
  36. \ClassError{mcmthesis}{You must use the `xelatex' driver\MessageBreak Please choose `xelatex'}{%
  37. Just choose `xelatex', no `pdflatex' or `latex' and so on.}
  38. \fi
  39. % 支持中文的 ctex 宏包
  40. \RequirePackage{ctex}
  41. % 页面布局
  42. \RequirePackage{geometry}
  43. % 数学宏包
  44. \RequirePackage{amsmath}
  45. \RequirePackage{amsfonts}
  46. \RequirePackage{amssymb}
  47. \RequirePackage{bm}
  48. %\RequirePackage{titletoc}
  49. % 设置颜色
  50. \RequirePackage{xcolor}
  51. % 插入图片
  52. \RequirePackage{graphicx}
  53. \RequirePackage{float}
  54. % 表格
  55. \RequirePackage{array}
  56. %% 长表格
  57. \RequirePackage{longtable}
  58. %% booktabs 提供了\toprule 等命令.
  59. \RequirePackage{booktabs,tabularx}
  60. %% multirow 支持在表格中跨行
  61. \RequirePackage{multirow}
  62. %% 调整间隔, 让表格更好看些
  63. \RequirePackage{bigstrut}
  64. %% 在跨行表格中输入定界符
  65. \RequirePackage{bigdelim}
  66. % 保护脆落命令
  67. \RequirePackage{cprotect}
  68. % 设置代码环境
  69. \RequirePackage{listings}
  70. \RequirePackage{xcolor}
  71. % 插入链接
  72. \RequirePackage{url}
  73. % 绘图的包
  74. %\RequirePackage{tikz}
  75. %\usetikzlibrary{snakes}
  76. % 字图与子标题
  77. \RequirePackage{subcaption}
  78. \RequirePackage[titles]{tocloft}
  79. %\renewcommand{\cftdot}{$\cdot$}
  80. %\renewcommand{\cftsecdotsep}{1.5}
  81. \renewcommand{\cftsecdotsep}{4.5}
  82. \setlength{\cftbeforesecskip}{7pt}
  83. \setlength{\cftbeforesubsecskip}{3pt}
  84. %\setlength{\cftbeforesubsecskip}{5pt}
  85. \renewcommand{\cftsecfont}{\bfseries\zihao{-4}\heiti}
  86. \renewcommand{\cftsecleader}{\cftdotfill{\cftsecdotsep}}
  87. \renewcommand{\cftsecaftersnumb}{\hskip.4em}
  88. \definecolor{dkgreen}{rgb}{0,0.6,0}
  89. \definecolor{gray}{rgb}{0.5,0.5,0.5}
  90. \definecolor{mauve}{rgb}{0.58,0,0.82}
  91. \lstset{
  92. frame=tb,
  93. aboveskip=3mm,
  94. belowskip=3mm,
  95. showstringspaces=false,
  96. columns=flexible,
  97. framerule=1pt,
  98. rulecolor=\color{gray!35},
  99. backgroundcolor=\color{gray!5},
  100. basicstyle={\small\ttfamily},
  101. numbers=none,
  102. numberstyle=\tiny\color{gray},
  103. keywordstyle=\color{blue},
  104. commentstyle=\color{dkgreen},
  105. stringstyle=\color{mauve},
  106. breaklines=true,
  107. breakatwhitespace=true,
  108. tabsize=3,
  109. }
  110. % 首行缩进
  111. \RequirePackage{indentfirst}
  112. % 设置浮动体的标题
  113. \RequirePackage{caption}
  114. % 定制列表环境
  115. \RequirePackage{enumitem}
  116. % 下划线
  117. \RequirePackage{ulem}
  118. % 尺寸计算
  119. \RequirePackage{calc}
  120. \RequirePackage[titletoc,title]{appendix}
  121. %\RequirePackage[title,toc,titletoc]{appendix}
  122. \RequirePackage{etoolbox}
  123. \AtBeginEnvironment{thebibliography}{%
  124. \phantomsection
  125. \addcontentsline{toc}{section}{\refname}
  126. }
  127. % 超链接 hyperref 的设置
  128. \RequirePackage{hyperref}
  129. % 智能自动化交叉引用
  130. \RequirePackage{cleveref}
  131. %% Document Layout
  132. % 页面布局
  133. \geometry{top=25mm,bottom=25mm,left=25mm,right=25mm}
  134. \renewcommand*{\baselinestretch}{1.38}
  135. % 修改tabular 环境, 设置表格中的行间距为正文行间距.
  136. \let\mcm@oldtabular\tabular
  137. \let\mcm@endoldtabular\endtabular
  138. \renewenvironment{tabular}%
  139. {\bgroup%
  140. \renewcommand{\arraystretch}{1.38}%
  141. \mcm@oldtabular}%
  142. {\mcm@endoldtabular\egroup}
  143. % 每行缩进两个汉字
  144. \setlength\parindent{2em}
  145. % 设置字体
  146. \setmainfont{Times New Roman}
  147. %\setmonofont{Courier New}
  148. \setsansfont{Arial}
  149. \setCJKfamilyfont{kai}[AutoFakeBold]{simkai.ttf}
  150. \newcommand*{\kai}{\CJKfamily{kai}}
  151. \setCJKfamilyfont{song}[AutoFakeBold]{SimSun}
  152. \newcommand*{\song}{\CJKfamily{song}}
  153. \renewcommand\normalsize{%
  154. \@setfontsize\normalsize{12.05}{14.45}%
  155. \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
  156. \abovedisplayshortskip \z@ \@plus3\p@
  157. \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@}
  158. % 数学环境, 定理等设置
  159. \newtheorem{definition}{\mcm@cap@definition}
  160. \newtheorem{theorem}{\mcm@cap@theorem}
  161. \newtheorem{lemma}{\mcm@cap@lemma}
  162. \newtheorem{corollary}{\mcm@cap@corollary}
  163. \newtheorem{assumption}{\mcm@cap@assumption}
  164. \newtheorem{conjecture}{\mcm@cap@conjecture}
  165. \newtheorem{axiom}{\mcm@cap@axiom}
  166. \newtheorem{principle}{\mcm@cap@principle}
  167. \newtheorem{problem}{\mcm@cap@problem}
  168. \newtheorem{example}{\mcm@cap@example}
  169. \newtheorem{proof}{\mcm@cap@proof}
  170. \newtheorem{solution}{\mcm@cap@solution}
  171. % 浮动环境设置
  172. % 默认情况下, \LaTeX{} 要求每页的文字至少占据 20%,否则该页就只单独放置一个浮动环境,
  173. % 而这通常不是我们想要的, 我们将这个要求降低到 5%.
  174. \renewcommand*{\textfraction}{0.05}
  175. % 有时如果多个浮动环境连续放在一起, \LaTeX{}
  176. % 会将它们分在几个不同页,即使它们可在同一页放
  177. % 得下. 我们可以通过修改 |\topfraction| 和 |\bottomfraction| 分别设置顶端和底端的浮
  178. % 动环境的最大比例.
  179. \renewcommand*{\topfraction}{0.9}
  180. \renewcommand*{\bottomfraction}{0.8}
  181. % 有时\LaTeX{}会把一个浮动环境单独放在一页,
  182. % 我们要求这个环境至少要占据 85% 才能单独放在一页.
  183. % 注意: |\floatpagefraction| 的数值必须小于 |\topfraction|.
  184. \renewcommand*{\floatpagefraction}{0.85}
  185. % 关于图片 graphicx
  186. % 如果图片没有指定后缀, 依次按下列顺序搜索
  187. \DeclareGraphicsExtensions{.pdf,.eps,.jpg,.png}
  188. % 设置图表搜索路径, 可以给图表文件夹取如下名字
  189. \graphicspath{{figures/}{figure/}{pictures/}%
  190. {picture/}{pic/}{pics/}{image/}{images/}}
  191. % 图表标题
  192. \DeclareCaptionFont{song}{\songti}
  193. \DeclareCaptionFont{minusfour}{\zihao{-4}}
  194. \captionsetup[figure]{%
  195. format=hang, % 标题从第二行开始都有缩进, 应该和 justification=raggedright 的效果一样.
  196. labelsep=quad, % 分隔符是一个空格
  197. font={song,minusfour,bf}, % 图的字体, 宋体小四
  198. position=bottom % position=bottom, 不代表标题放在下面, 标题仍放在你放\caption的位置.
  199. }
  200. \captionsetup[table]{%
  201. format=hang, % 标题从第二行开始都有缩进, 应该和 justification=raggedright 的效果一样.
  202. labelsep=quad, % 分隔符是一个空格
  203. font={song,minusfour,bf}, % 表的字体, 宋体小四
  204. position=top % position=bottom, 不代表标题放在下面, 标题仍放在你放\caption的位置.
  205. }
  206. % 列表环境设置
  207. \setlist{%
  208. topsep=0.3em, % 列表顶端的垂直空白
  209. partopsep=0pt, % 列表环境前面紧接着一个空白行时其顶端的额外垂直空白
  210. itemsep=0ex plus 0.1ex, % 列表项之间的额外垂直空白
  211. parsep=0pt, % 列表项内的段落之间的垂直空白
  212. leftmargin=1.5em, % 环境的左边界和列表之间的水平距离
  213. rightmargin=0em, % 环境的右边界和列表之间的水平距离
  214. labelsep=0.5em, % 包含标签的盒子与列表项的第一行文本之间的间隔
  215. labelwidth=2em % 包含标签的盒子的正常宽度;若实际宽度更宽,则使用实际宽度。
  216. }
  217. % 超链接
  218. \hypersetup{%
  219. % xetex,
  220. % unicode=false, % hyperref 和 xetex 同时使用时不能开启 Unicode 选项.
  221. pdfstartview=FitH,
  222. CJKbookmarks=true,
  223. bookmarksnumbered=true,
  224. bookmarksopen=true,
  225. colorlinks, %注释掉此项则交叉引用为彩色边框(将colorlinks和pdfborder同时注释掉)
  226. pdfborder=001, %注释掉此项则交叉引用为彩色边框
  227. allcolors=black,
  228. breaklinks=true}%
  229. % \if@mcm@bwprint
  230. % \AtBeginDocument{\hypersetup{hidelinks}}
  231. % \else\relax\fi
  232. \pdfstringdefDisableCommands{%
  233. \def\cftdotfill{ }%
  234. }
  235. \lstnewenvironment{tcode}
  236. {
  237. \lstset{basicstyle = \small\ttfamily,
  238. language=TeX,
  239. tabsize = 4,
  240. frame = single,
  241. escapechar = `,
  242. breaklines = true,
  243. breakatwhitespace = true,
  244. frameround = tttt,
  245. }
  246. }
  247. {}
  248. %%% crefformat settings
  249. \crefformat{figure}{#2图~#1#3}
  250. \crefrangeformat{figure}{图~(#3#1#4)\;\~{}\;(#5#2#6)}
  251. \crefmultiformat{figure}{图~(#2#1#3)}{和~(#2#1#3)}{,(#2#1#3)}{和~(#2#1#3)}
  252. \crefformat{table}{#2表#1#3}
  253. \crefrangeformat{table}{表(#3#1#4)\;\~{}\;(#5#2#6)}
  254. \crefmultiformat{table}{表~(#2#1#3)}{和~(#2#1#3)}{,(#2#1#3)}{和~(#2#1#3)}
  255. \crefformat{equation}{#2~(#1#3)}
  256. \crefrangeformat{equation}{~(#3#1#4)\;\~{}\;(#5#2#6)}
  257. \crefmultiformat{equation}{~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)}
  258. \crefformat{definition}{#2\mcm@cap@definition~#1#3}
  259. \crefrangeformat{definition}{\mcm@cap@definition~(#3#1#4)\;\~{}\;(#5#2#6)}
  260. \crefmultiformat{definition}{\mcm@cap@definition~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)}
  261. \crefformat{theorem}{#2\mcm@cap@theorem~#1#3}
  262. \crefrangeformat{theorem}{\mcm@cap@theorem~(#3#1#4)\;\~{}\;(#5#2#6)}
  263. \crefmultiformat{theorem}{\mcm@cap@theorem~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)}
  264. \crefformat{lemma}{#2\mcm@cap@lemma~#1#3}
  265. \crefrangeformat{lemma}{\mcm@cap@lemma~(#3#1#4)\;\~{}\;(#5#2#6)}
  266. \crefmultiformat{lemma}{\mcm@cap@lemma~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)}
  267. \crefformat{corollary}{#2\mcm@cap@corollary~#1#3}
  268. \crefrangeformat{corollary}{\mcm@cap@corollary~(#3#1#4)\;\~{}\;(#5#2#6)}
  269. \crefmultiformat{corollary}{\mcm@cap@corollary~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)}
  270. \crefformat{assumption}{#2\mcm@cap@assumption~#1#3}
  271. \crefrangeformat{assumption}{\mcm@cap@assumption~(#3#1#4)\;\~{}\;(#5#2#6)}
  272. \crefmultiformat{assumption}{\mcm@cap@assumption~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)}
  273. \crefformat{conjecture}{#2\mcm@cap@conjecture~#1#3}
  274. \crefrangeformat{conjecture}{\mcm@cap@conjecture~(#3#1#4)\;\~{}\;(#5#2#6)}
  275. \crefmultiformat{conjecture}{\mcm@cap@conjecture~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)}
  276. \crefformat{axiom}{#2\mcm@cap@axiom~#1#3}
  277. \crefrangeformat{axiom}{\mcm@cap@axiom~(#3#1#4)\;\~{}\;(#5#2#6)}
  278. \crefmultiformat{axiom}{\mcm@cap@axiom~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)}
  279. \crefformat{principle}{#2\mcm@cap@principle~#1#3}
  280. \crefrangeformat{principle}{\mcm@cap@principle~(#3#1#4)\;\~{}\;(#5#2#6)}
  281. \crefmultiformat{principle}{\mcm@cap@principle~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)}
  282. \crefformat{problem}{#2\mcm@cap@problem~#1#3}
  283. \crefrangeformat{problem}{\mcm@cap@problem~(#3#1#4)\;\~{}\;(#5#2#6)}
  284. \crefmultiformat{problem}{\mcm@cap@problem~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)}
  285. \crefformat{example}{#2\mcm@cap@example~#1#3}
  286. \crefrangeformat{example}{\mcm@cap@example~(#3#1#4)\;\~{}\;(#5#2#6)}
  287. \crefmultiformat{example}{\mcm@cap@example~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)}
  288. \crefformat{proof}{#2\mcm@cap@proof~#1#3}
  289. \crefrangeformat{proof}{\mcm@cap@proof~(#3#1#4)\;\~{}\;(#5#2#6)}
  290. \crefmultiformat{proof}{\mcm@cap@proof~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)}
  291. \crefformat{solution}{#2\mcm@cap@solution~#1#3}
  292. \crefrangeformat{solution}{\mcm@cap@solution~(#3#1#4)\;\~{}\;(#5#2#6)}
  293. \crefmultiformat{solution}{\mcm@cap@solution~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)}
  294. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  295. %% Document Markup
  296. % 生成封面, 使用\maketitle
  297. \renewcommand{\maketitle}{\par
  298. \begingroup
  299. \newpage
  300. \global\@topnum\z@ % Prevents figures from going at top of page.
  301. \@maketitle
  302. \endgroup
  303. \global\let\thanks\relax
  304. \global\let\maketitle\relax
  305. \global\let\@maketitle\relax
  306. \global\let\@thanks\@empty
  307. \global\let\@author\@empty
  308. \global\let\@date\@empty
  309. \global\let\@title\@empty
  310. \global\let\title\relax
  311. \global\let\author\relax
  312. \global\let\date\relax
  313. \global\let\and\relax
  314. }
  315. \def\@maketitle{%
  316. \newpage
  317. \if@mcm@preface
  318. \null
  319. % 承诺书
  320. \vskip2ex
  321. \thispagestyle{empty}
  322. {\zihao{4}\noindent\mcm@commit@string@headname\\[-8pt]
  323. \noindent\rule[5pt]{\textwidth-1.34em}{.5pt}\par}
  324. \begin{center}%
  325. {\zihao{-3}\bfseries\heiti \mcm@commit@string@titlea \par}%
  326. {\vskip1ex\zihao{3}\bfseries\songti \mcm@commit@string@titleb \par}
  327. \end{center}
  328. {\zihao{-4} \mcm@commit@string@contents \par}
  329. {\vskip1ex\zihao{-4}
  330. \renewcommand{\ULthickness}{0.4pt}\setlength{\ULdepth}{2pt}
  331. \hspace*{2em}\mcm@commit@string@problemnum\uline{\mbox{\kern1em}\mcm@tokens@tihao\hfill}\makebox[0.66em]{}\par
  332. \mcm@commit@string@signupnum\uline{\mbox{\kern1em}\mcm@tokens@baominghao\hfill}\makebox[0.66em]{}\par
  333. \mcm@commit@string@schoolname\uline{\hfill\mcm@tokens@schoolname\hfill}\makebox[0.66em]{}\par
  334. \newlength{\mcm@lenB}
  335. \settowidth{\mcm@lenB}{\mcm@commit@string@membername\mbox{\hspace{1em}}1.}
  336. \setlength{\mcm@lenB}{\textwidth-\mcm@lenB}
  337. % 不这样做右边难以对齐!
  338. \mcm@commit@string@membername
  339. \begin{minipage}[t]{\mcm@lenB}
  340. 1.\uline{\mbox{\kern1em}\mcm@tokens@membera\hfill} \makebox[0.46em]{}\par
  341. 2.\uline{\mbox{\kern1em}\mcm@tokens@memberb\hfill} \makebox[0.46em]{}\par
  342. 3.\uline{\mbox{\kern1em}\mcm@tokens@memberc\hfill} \makebox[0.46em]{}\par
  343. \end{minipage}\par\vskip1ex
  344. \mcm@commit@string@supervisorname\uline{\mbox{\hspace{1em}}\mcm@tokens@supervisor\hfill}\makebox[0.66em]{}\par
  345. \hspace{0.1cm} ({\kaishu 指导教师签名意味着对参赛队的行为和论文的真实性负责})
  346. %{\kaishu\mcm@commit@string@inform\par}
  347. \vskip2ex
  348. \newlength{\mcm@lenA}
  349. \settowidth{\mcm@lenA}{请仔细核对,提交后将不再允许做任何修改。如}% 虽然"日期"刚好在"错误"下面, 但注意"日期"还会缩进, 所以要省去"填写""两字
  350. \hspace*{\mcm@lenA}\mcm@commit@string@date\hspace{0.5em}\uline{\hfill\mbox{\kern1em}\mcm@tokens@yearinput\mbox{\kern1em}\hfill}%
  351. \mcm@commit@string@year\uline{\hfill\mcm@tokens@monthinput\hfill}\mcm@commit@string@month%
  352. \uline{\hfill\mcm@tokens@dayinput\hfill}\mcm@commit@string@day\makebox[1em]{}\par}
  353. \vskip1ex
  354. {\kaishu\bfseries\mcm@commit@string@inform\par}
  355. \vfill
  356. \null
  357. % 编号专用页
  358. \else
  359. \fi
  360. \makeothertitle
  361. }
  362. %% 定义 编号专用页
  363. \def\makeothertitle{%
  364. \if@mcm@preface
  365. \par
  366. \newpage
  367. \null
  368. \thispagestyle{empty}
  369. {\zihao{4}\noindent\begin{tabularx}{\textwidth}{cXcX@{}}
  370. \mcm@numberpage@string@headname & & \mcm@numberpage@string@allcountrynum&\\[-5pt]
  371. \mcm@numberpage@string@headnameb & &\mcm@numberpage@string@allcountrynumb&\\
  372. \cline{2-2}\cline{4-4}
  373. \end{tabularx}
  374. \vspace*{1.2em}
  375. \noindent\rule{\textwidth}{1pt}\par}
  376. \begin{center}
  377. {\zihao{4}\bfseries\heiti \mcm@numberpage@string@titlea\par}
  378. {\vskip1ex\zihao{3}\songti \bfseries\mcm@numberpage@string@titleb\par}
  379. \end{center}\par
  380. {%
  381. \zihao{4}
  382. \vskip3em
  383. \hspace*{2em}\mcm@numberpage@string@appraiselog
  384. \par
  385. \newlength{\mcm@lenC}
  386. \setlength{\mcm@lenC}{\textwidth-8.72em}
  387. \setlength{\mcm@lenC}{\mcm@lenC/6}
  388. \newlength{\mcm@lenD}
  389. \settoheight{\mcm@lenD}{\mcm@numberpage@string@reviewer}
  390. \setlength{\mcm@lenD}{\mcm@lenD+2em}
  391. \newlength{\mcm@lenF}
  392. \settoheight{\mcm@lenF}{\mcm@numberpage@string@remarks}
  393. \setlength{\mcm@lenF}{\mcm@lenF+2em}
  394. \newcolumntype{P}{@{}p{\mcm@lenC}@{}}
  395. \hspace*{1.5em}\begin{tabular}{|!{\hspace{4pt}}c!{\hspace{4pt}}|*{6}{P|}}
  396. \hline
  397. \rule{0pt}{\mcm@lenD}\raisebox{0.6em}[0pt][0pt]{\mcm@numberpage@string@reviewer} & & & & & & \\\cline{1-7}
  398. \rule{0pt}{\mcm@lenF}\raisebox{0.6em}[0pt][0pt]{\mcm@numberpage@string@remarks} & & & & & & \\
  399. \hline
  400. \end{tabular}\par
  401. \vskip5em
  402. \hspace*{2em}\mcm@numberpage@string@countrynum}
  403. \vfill
  404. {\zihao{-4}\kaishu\bfseries\mcm@numberpage@string@inform\par}
  405. \null
  406. \newpage
  407. \null
  408. \setcounter{page}{1}
  409. {\centering \zihao{3}\bfseries \@title\par}
  410. \vskip1ex
  411. \else
  412. \setcounter{page}{1}
  413. {\centering \zihao{3}\bfseries \@title\par}
  414. \vskip1ex
  415. \fi
  416. }
  417. % 中文标题名称设置
  418. \renewcommand\contentsname{\mcm@cap@contentsname}
  419. \renewcommand\listfigurename{\mcm@cap@listfigurename}
  420. \renewcommand\listtablename{\mcm@cap@listtablename}
  421. \renewcommand\refname{\mcm@cap@refname}
  422. \renewcommand\indexname{\mcm@cap@indexname}
  423. \renewcommand\figurename{\mcm@cap@figurename}
  424. \renewcommand\tablename{\mcm@cap@tablename}
  425. \renewcommand\appendixname{\mcm@cap@appendixname}
  426. \renewcommand\abstractname{\mcm@cap@abstractname}
  427. % 中文标题格式设置
  428. % 目录深度
  429. \setcounter{secnumdepth}{3}
  430. % 节标题格式, 居中, 使用\chinese命令修改计数器
  431. \def\@seccntformat#1{\csname the#1\endcsname\ }
  432. \renewcommand\thesection{\chinese{section}、}
  433. \renewcommand\thesubsection{\arabic{section}\thinspace.\thinspace\arabic{subsection}}
  434. \renewcommand\thesubsubsection{\thesubsection\thinspace.\thinspace\arabic{subsubsection}}
  435. \renewcommand\section{\@startsection{section}{1}{\z@}%
  436. {-3.5ex \@plus -1ex \@minus -.2ex}%
  437. {2.3ex \@plus.2ex}%
  438. {\centering\normalfont\Large\bfseries}}
  439. \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
  440. {-3.25ex\@plus -1ex \@minus -.2ex}%
  441. {1.5ex \@plus .2ex}%
  442. {\normalfont\large\bfseries}}
  443. \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
  444. {-3.25ex\@plus -1ex \@minus -.2ex}%
  445. {1.5ex \@plus .2ex}%
  446. {\normalfont\normalsize\bfseries}}
  447. \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
  448. {3.25ex \@plus1ex \@minus.2ex}%
  449. {-1em}%
  450. {\normalfont\normalsize\bfseries}}
  451. \renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
  452. {3.25ex \@plus1ex \@minus .2ex}%
  453. {-1em}%
  454. {\normalfont\normalsize\bfseries}}
  455. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  456. %% Define new environment and command
  457. %% 摘要两个字设置为 4 号.
  458. %% 定义摘要环境
  459. \renewenvironment{abstract}{%
  460. \if@twocolumn
  461. \section*{\abstractname}%
  462. \else
  463. \begin{center}%
  464. {\zihao{4}\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
  465. \end{center}%
  466. \quotation
  467. \fi}
  468. {\if@twocolumn\else\endquotation\newpage\null\fi}
  469. \renewenvironment{quotation}
  470. {\list{}{\listparindent 2em%
  471. \itemindent \listparindent
  472. \rightmargin\z@
  473. \leftmargin\z@
  474. \parsep \z@ \@plus\p@}%
  475. \item\relax}
  476. {\endlist}
  477. \newcommand\keywords[1]{%
  478. \renewcommand{\mcm@tokens@keywords}{#1}
  479. \par
  480. \vskip1ex
  481. {\noindent\zihao{-4}\heiti\mcm@cap@keywordsname:}~{\mcm@tokens@keywords}
  482. }
  483. % 定义附录
  484. % \renewcommand{\setthesection}{\appendixname\Alph{section}}
  485. % \renewcommand\appendix{\par
  486. % \setcounter{section}{0}%
  487. % \setcounter{subsection}{0}%
  488. % \gdef\thesection{\appendixname\@Alph\c@section}}
  489. % 重定义参考文献环境
  490. \renewenvironment{thebibliography}[1]
  491. {\section*{\refname}%
  492. \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
  493. \list{\@biblabel{\@arabic\c@enumiv}}%
  494. {\settowidth\labelwidth{\@biblabel{#1}}%
  495. \leftmargin\labelwidth
  496. \advance\leftmargin\labelsep
  497. \@openbib@code
  498. \usecounter{enumiv}%
  499. \let\p@enumiv\@empty
  500. \renewcommand\theenumiv{\@arabic\c@enumiv}}%
  501. \sloppy
  502. \clubpenalty4000
  503. \@clubpenalty \clubpenalty
  504. \widowpenalty4000%
  505. \sfcode`\.\@m}
  506. {\def\@noitemerr
  507. {\@latex@warning{Empty `thebibliography' environment}}%
  508. \endlist}
  509. \newcommand*\tihao[1]{%
  510. \renewcommand{\mcm@tokens@tihao}{#1}}
  511. \newcommand*\baominghao[1]{%
  512. \renewcommand{\mcm@tokens@baominghao}{#1}}
  513. \newcommand*\schoolname[1]{%
  514. \renewcommand{\mcm@tokens@schoolname}{#1}}
  515. \newcommand*\membera[1]{%
  516. \renewcommand{\mcm@tokens@membera}{#1}}
  517. \newcommand*\memberb[1]{%
  518. \renewcommand{\mcm@tokens@memberb}{#1}}
  519. \newcommand*\memberc[1]{%
  520. \renewcommand{\mcm@tokens@memberc}{#1}}
  521. \newcommand*\supervisor[1]{%
  522. \renewcommand{\mcm@tokens@supervisor}{#1}}
  523. \newcommand*\yearinput[1]{%
  524. \renewcommand{\mcm@tokens@yearinput}{#1}}
  525. \newcommand*\monthinput[1]{%
  526. \renewcommand{\mcm@tokens@monthinput}{#1}}
  527. \newcommand*\dayinput[1]{%
  528. \renewcommand{\mcm@tokens@dayinput}{#1}}
  529. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  530. %% Initialization
  531. %%%数学定理相关的常量
  532. \newcommand*{\mcm@cap@definition}{定义}
  533. \newcommand*{\mcm@cap@theorem}{定理}
  534. \newcommand*{\mcm@cap@lemma}{引理}
  535. \newcommand*{\mcm@cap@corollary}{推论}
  536. \newcommand*{\mcm@cap@assumption}{假设}
  537. \newcommand*{\mcm@cap@conjecture}{猜想}
  538. \newcommand*{\mcm@cap@axiom}{公理}
  539. \newcommand*{\mcm@cap@principle}{定律}
  540. \newcommand*{\mcm@cap@problem}{问题}
  541. \newcommand*{\mcm@cap@example}{例}
  542. \newcommand*{\mcm@cap@proof}{证明}
  543. \newcommand*{\mcm@cap@solution}{解}
  544. %%% 中文标题名称
  545. \newcommand*{\mcm@cap@contentsname}{目录}
  546. \newcommand*{\mcm@cap@listfigurename}{插图清单}
  547. \newcommand*{\mcm@cap@listtablename}{附表清单}
  548. \newcommand*{\mcm@cap@refname}{参考文献}
  549. \newcommand*{\mcm@cap@indexname}{索引}
  550. \newcommand*{\mcm@cap@figurename}{图}
  551. \newcommand*{\mcm@cap@tablename}{表}
  552. \newcommand*{\mcm@cap@appendixname}{附录}
  553. \newcommand*{\mcm@cap@abstractname}{摘要}
  554. %%% 中文关键字
  555. \newcommand*{\mcm@cap@keywordsname}{关键字}
  556. %%% 承诺书中的常量
  557. \newcommand*\mcm@commit@string@headname{赛区评阅编号(由赛区组委会填写):}
  558. \newcommand*\mcm@commit@string@titlea{\the\year 高教社杯全国大学生数学建模竞赛}
  559. \newcommand*\mcm@commit@string@titleb{承\hspace{1em}诺\hspace{1em}书}
  560. \newcommand\mcm@commit@string@contents{\quotation
  561. 我们仔细阅读了《全国大学生数学建模竞赛章程》和《全国大学生数学建模竞赛参赛规则》(以下简称 “竞赛章程和参赛规则”,可从http://www.mcm.edu.cn下载)。
  562. 我们完全清楚,在竞赛开始后参赛队员不能以任何方式,包括电话、电子邮件、“贴吧”、QQ群、微信群等,与队外的任何人(包括指导教师)交流、讨论与赛题有关的问题;无论主动参与讨论还是被动接收讨论信息都是严重违反竞赛纪律的行为。
  563. 我们完全清楚,在竞赛中必须合法合规地使用文献资料和软件工具,不能有任何侵犯知识产权的行为。否则我们将失去评奖资格,并可能受到严肃处理。
  564. {\bfseries\song 我们以中国大学生名誉和诚信郑重承诺,严格遵守竞赛章程和参赛规则,以保证竞赛的公正、公平性。如有违反竞赛章程和参赛规则的行为,我们将受到严肃处理。}
  565. 我们授权全国大学生数学建模竞赛组委会,可将我们的论文以任何形式进行公开展示(包括进行网上公示,在书籍、期刊和其他媒体进行正式或非正式发表等)。
  566. \endquotation
  567. }
  568. \newcommand*\mcm@commit@string@problemnum{我们参赛选择的题号(从A/B/C/D/E中选择一项填写):}
  569. \newcommand*\mcm@commit@string@signupnum{我们的报名参赛队号(12位数字全国统一编号):}
  570. \newcommand*\mcm@commit@string@schoolname{参赛学校(完整的学校全称,不含院系名):}
  571. \newcommand*\mcm@commit@string@membername{参赛队员 (打印并签名) :}
  572. \newcommand*\mcm@commit@string@supervisorname{指导教师或指导教师组负责人 (打印并签名):}
  573. \newcommand\mcm@commit@string@inform{\quotation
  574. \noindent{(\bfseries\kai 请勿改动此页内容和格式。此承诺书打印签名后作为纸质论文的封面,注意电子版论文中不得出现此页。%
  575. 以上内容请仔细核对,如填写错误,论文可能被取消评奖资格。)}
  576. \endquotation
  577. }
  578. \newcommand*\mcm@commit@string@date{日期:}
  579. \newcommand*\mcm@commit@string@year{年}
  580. \newcommand*\mcm@commit@string@month{月}
  581. \newcommand*\mcm@commit@string@day{日}
  582. \newcommand*\mcm@commit@string@appraisenum{赛区评阅编号(由赛区组委会评阅前进行编号):}
  583. %%% 编号专用页中的常量
  584. \newcommand*\mcm@numberpage@string@headname{赛区评阅编号:}
  585. \newcommand*\mcm@numberpage@string@headnameb{(由赛区填写)}
  586. \newcommand*\mcm@numberpage@string@allcountrynum{全国评阅编号:}
  587. \newcommand*\mcm@numberpage@string@allcountrynumb{(全国组委会填写)}
  588. \newcommand*\mcm@numberpage@string@titlea{\the\year 高教社杯全国大学生数学建模竞赛}
  589. \newcommand*\mcm@numberpage@string@titleb{编\hspace{.5em}号\hspace{.5em}专\hspace{.5em}用\hspace{.5em}页}
  590. \newcommand*\mcm@numberpage@string@appraiselog{赛区评阅记录(可供赛区评阅时使用):}
  591. \newcommand\mcm@numberpage@string@reviewer{\shortstack{评\\ 阅\\ 人}}
  592. \newcommand\mcm@numberpage@string@remarks{\shortstack{备\\ 注}}
  593. \newcommand*\mcm@numberpage@string@countrynum{送全国评阅统一编号:\par \hspace*{2em}(赛区组委会填写)}
  594. \newcommand\mcm@numberpage@string@inform{\quotation
  595. \noindent({\bfseries\kai 请勿改动此页内容和格式。此编号专用页仅供赛区和全国评阅使用,参赛队打印后装订到纸质论文的第二页上。
  596. 注意电子版论文中不得出现此页。})
  597. \endquotation
  598. }
  599. %设置目录格式
  600. % 节的目录格式
  601. % \titlecontents{section}[0pt]{\vspace{2mm}\bfseries}
  602. % {\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage}
  603. % % 小节的目录格式
  604. % \titlecontents{subsection}[30pt]{\songti}
  605. % {\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage}
  606. % \titlecontents{subsubsection}[55pt]{\songti}
  607. % {\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage}
  608. % 上标文献
  609. \newcommand{\upcite}[1]{$^{\mbox{\scriptsize \cite{#1}}}$}
  610. \newcommand{\supercite}[1]{\textsuperscript{\textsuperscript{\cite{#1}}}}
  611. \endinput