Debian Codegraph @

texmf-dist/source/latex/hitszthesis/hitszthesis.dtx

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 2019-2021 by Jingxuan Yang <[email protected]>
4 %
5 % This work may be distributed and/or modified under the
6 % conditions of the LaTeX Project Public License, either version 1.3c
7 % of this license or (at your option) any later version.
8 % The latest version of this license is in
9 % http://www.latex-project.org/lppl.txt
10 % and version 1.3c or later is part of all distributions of LaTeX
11 % version 2008/05/04 or later.
12 %
13 % This work has the LPPL1.3c maintenance status `maintained'.
14 %
15 % \fi
16 %
17 % \iffalse
18 %<*driver>
19 \ProvidesFile{hitszthesis.dtx}[2021/11/15 3.2.1 Dissertation Template for Harbin Institute of Technology, ShenZhen (HITSZ)]
20 \documentclass{ltxdoc}
21 \usepackage{dtx-style}
22
23 \EnableCrossrefs
24 \CodelineIndex
25 \RecordChanges
26
27 \begin{document}
28 \DocInput{\jobname.dtx}
29 \end{document}
30 %</driver>
31 % \fi
32 %
33 % \CheckSum{0}
34 %
35 % \CharacterTable
36 % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
37 % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
38 % Digits \0\1\2\3\4\5\6\7\8\9
39 % Exclamation \! Double quote \" Hash (number) \#
40 % Dollar \$ Percent \% Ampersand \&
41 % Acute accent \' Left paren \( Right paren \)
42 % Asterisk \* Plus \+ Comma \,
43 % Minus \- Point \. Solidus \/
44 % Colon \: Semicolon \; Less than \<
45 % Equals \= Greater than \> Question mark \?
46 % Commercial at \@ Left bracket \[ Backslash \\
47 % Right bracket \] Circumflex \^ Underscore \_
48 % Grave accent \` Left brace \{ Vertical bar \|
49 % Right brace \} Tilde \~}
50 %
51 % \DoNotIndex{\newenvironment,\@bsphack,\@empty,\@esphack,\sfcode}
52 % \DoNotIndex{\addtocounter,\label,\let,\linewidth,\newcounter}
53 % \DoNotIndex{\noindent,\normalfont,\par,\parskip,\phantomsection}
54 % \DoNotIndex{\providecommand,\ProvidesPackage,\refstepcounter}
55 % \DoNotIndex{\RequirePackage,\setcounter,\setlength,\string,\strut}
56 % \DoNotIndex{\textbackslash,\texttt,\ttfamily,\usepackage}
57 % \DoNotIndex{\begin,\end,\begingroup,\endgroup,\par,\\}
58 % \DoNotIndex{\if,\ifx,\ifdim,\ifnum,\ifcase,\else,\or,\fi}
59 % \DoNotIndex{\let,\def,\xdef,\edef,\newcommand,\renewcommand}
60 % \DoNotIndex{\expandafter,\csname,\endcsname,\relax,\protect}
61 % \DoNotIndex{\Huge,\huge,\LARGE,\Large,\large,\normalsize}
62 % \DoNotIndex{\small,\footnotesize,\scriptsize,\tiny}
63 % \DoNotIndex{\centering,\raggedright,\ref}
64 % \DoNotIndex{\c@secnumdepth,\@startsection,\@setfontsize}
65 % \DoNotIndex{\ ,\@plus,\@minus,\p@,\z@,\@m,\@M,\@ne,\m@ne}
66 % \DoNotIndex{\@@par,\DeclareOperation,\RequirePackage,\LoadClass}
67 % \DoNotIndex{\AtBeginDocument,\AtEndDocument}
68 %
69 % \GetFileInfo{\jobname.dtx}
70 %
71 % \changes{v1.0}{2019/9/26}{Initial creation}
72 % \changes{v1.1}{2019/10/30}{Fix loading \pkg{mtpro2} bug, add \pkg{etex} package}
73 % \changes{v1.2}{2020/02/15}{Add two options: onerow or tworow, infoleft or infocenter, migrate settings file into cls file, initial commit on ctan}
74 % \changes{v2.0}{2020/02/18}{Format cls file to dtx file, regulate thesis template for HITSZ}
75 % \changes{v2.2}{2020/03/04}{Use \pkg{ctex} to set chinese titile and toc}
76 % \changes{v2.2}{2020/03/05}{Use \pkg{subeqnarray} rather than \pkg{cases} to write sub equations}
77 % \changes{v2.2}{2020/03/04}{Omit sections of appendix in toc}
78 % \changes{v2.3}{2020/03/05}{Add math font option XITS}
79 % \changes{v2.3}{2020/03/05}{Add boldcaption option to control the caption font}
80 % \changes{v3.0}{2020/03/10}{Add support to master and doctor dissertations}
81 %
82 % \def\indexname{索引}
83 % \def\glossaryname{修改记录}
84 % \IndexPrologue{\section{\indexname}}
85 % \GlossaryPrologue{\section{\glossaryname}}
86 %
87 % \definecolor{hitcolor}{RGB}{21,95,130}
88 % \title{\bfseries\color{hitcolor}\hitszthesis:哈尔滨工业大学(深圳)\\ 学位论文模板}
89 % \author{{\Large\fangsong 杨敬轩}\\[5pt]\texttt{[email protected]}\\[5pt]\texttt{[email protected]}}
90 % \date{v\fileversion\ (\filedate)}
91 % \maketitle\thispagestyle{empty}
92 %
93 % \vskip0.5cm
94 %
95 % \def\abstractname{\Large 摘\quad 要}
96 % \begin{abstract}\normalsize\vskip0.5cm
97 % \hitszthesis 宏包旨在建立一个{\bfseries 规格严格、功夫到家}的哈尔滨工业大学(深圳)学位论文模板,目前包含本硕博毕业设计(论文)模板。模板的构建基于 \pkg{hitszthesis.dtx} 与 \pkg{hitszthesis.ins},在使用本模板之前,请仔细阅读\file{hitszthesis.pdf}(本文件)、\file{main.tex}(撰写示例)及\file{hitszthesis-bachelor.pdf}、\file{hitszthesis-master.pdf} 与 \file{hitszthesis-doctor.pdf}(撰写效果)。
98 % \end{abstract}
99 %
100 % \vskip1.5cm
101 % \def\abstractname{\Large 免责声明}
102 % \begin{abstract}
103 % \normalsize\noindent
104 % \begin{enumerate}
105 % \item 本模板的发布遵守 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License 1.3c}以及其后的最新版本,使用前请认真阅读协议内
106 % 容。
107 % \item 本模板为作者根据\hitsz 教务处颁发的\UGR 与\PGR 编写而成,
108 % 旨在供\hitsz 毕业生撰写学位论文使用。
109 % \item 哈尔滨工业大学(深圳)教务处只提供毕业论文写作指南,不提供官方模板,也不会授
110 % 权第三方模板为官方模板,所以此模板仅为写作指南的参考实现,不保证格式审查老师
111 % 不提意见。任何由于使用本模板而引起的论文格式审查问题均与本模板作者无关。
112 % \item 任何个人或组织以本模板为基础进行修改、扩展而生成的新的专用模板,请严格遵
113 % 守 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License 1.3c} 协议以及其后的最新版本。由于违犯协议而引起的任何纠纷争端均与
114 % 本模板作者无关。
115 % \end{enumerate}
116 % \end{abstract}
117 %
118 %
119 % \clearpage
120 % \pagestyle{fancy}
121 % \begin{multicols}{2}[
122 % \setlength{\columnseprule}{.4pt}
123 % \setlength{\columnsep}{18pt}]
124 % \tableofcontents
125 % \end{multicols}
126 % \clearpage
127 %
128 % \section{模板介绍}
129 % \hitszthesis\ (\textbf{H}arbin \textbf{I}nstitute of \textbf{T}echnology,
130 % \textbf{S}hen\textbf{Z}hen \LaTeX\
131 % \textbf{Thesis} Template) 是为了帮助哈尔滨工业大学(深圳)毕业生撰写毕业论文而编写
132 % 的 \LaTeX\ 论文模板。
133 %
134 % 本文档将尽量完整的介绍模板的使用方法,如有不清楚之处可以参考示例文档或者根据
135 % 第~\ref{sec:howtoask} 节说明提问,有兴趣者可以联系作者参与完善此手册,非常欢迎窝工学子对本代码作出贡献。
136 %
137 % \note[注意:]{模板的作用在于减少论文写作过程中格式调整的时间。前提是遵守模板的
138 % 用法,否则即便用了 \textup{\hitszthesis}\ 也难以保证输出的论文符合学校规范。}
139 %
140 %
141 % \section{安装}
142 % \label{sec:installation}
143 %
144 % \hitszthesis\ 已经上传CTAN,已包含在TeXLive与MiKTeX发行版中。
145 % 安装方法:打开命令行,输入以下命令即可
146 % \begin{shell}
147 % $ tlmgr install hitszthesis
148 % \end{shell}
149 % 阅读本说明文档可以使用以下命令:
150 % \begin{shell}
151 % $ texdoc hitszthesis
152 % \end{shell}
153 %
154 % 如果要使用开发版,需自己下载,\hitszthesis\ 相关链接:
155 % \begin{itemize}
156 % \item 主页:\href{https://github.com/YangLaTeX/hitszthesis}{GitHub}
157 % \item 下载:\href{http://www.ctan.org/pkg/hitszthesis}{CTAN}
158 % \end{itemize}
159 %
160 % \subsection{模板的组成}
161 % 下表列出了 \hitszthesis\ 的主要文件及其功能介绍:
162 %
163 % \begin{longtable}{l|p{8cm}}
164 % \toprule
165 % {\heiti 文件(夹)} & {\heiti 功能描述}\\\midrule
166 % \endfirsthead
167 % \midrule
168 % {\heiti 文件(夹)} & {\heiti 功能描述}\\\midrule
169 % \endhead
170 % \endfoot
171 % \endlastfoot
172 % hitszthesis.ins & \textsc{DocStrip} 驱动文件(开发用) \\
173 % hitszthesis.dtx & \textsc{DocStrip} 源文件(开发用)\\\midrule
174 % hitszthesis.cls & 模板类文件\\
175 % hitszthesis.cfg & 模板配置文件\\
176 % hitszthesis.bst & 参考文献样式文件\\\midrule
177 % hitszthesis.ist & 索引样式文件\\\midrule
178 % reference.bib & 文档参考文献\\
179 % main.tex & 示例文档主文件\\
180 % front/ & 正文之前内容\\
181 % body/ & 正文内容\\
182 % body/ & 正文之后内容\\
183 % figures/ & 示例文档图片路径\\
184 % hitszthesis.sty & 为示例文档加载其它宏包\\\midrule
185 % Makefile & Makefile\\
186 % compile.bat & Windows 编译用脚本文件\\
187 % latexmkrc & latexmk 配置文件 \\
188 % README.md & Readme\\
189 % \textbf{hitszthesis.pdf} & 用户手册(本文档)\\\bottomrule
190 % \end{longtable}
191 %
192 % 几点说明:
193 % \begin{itemize}
194 % \item \file{hitszthesis.cls} 和 \file{hitszthesis.cfg} 可由 \file{hitszthesis.ins}
195 % 和 \file{hitszthesis.dtx} 生成,但为了降低同学们的使用难度,故
196 % 将 \file{hitszthesis.cls} 文件一起发布。
197 % \item 使用前请一定阅读文档:\file{hitszthesis.pdf}。
198 % \item 默认的生成的论文中含有丰富的格式示例,使用前请仔细阅读\file{main.pdf}。
199 % \end{itemize}
200 %
201 % \subsection{生成模板}
202 % \label{sec:generate-cls}
203 % \note[提示:]{若使用 \TeX 发行版自带的 \textup{\hitszthesis}\ 或 Github 上发布的版本,可忽
204 % 略此节,直接阅读第~\ref{sec:generate-thesis} 节。若下载 CTAN 包或者 Github 开发
205 % 代码,请阅读本节了解生成模板文件的步骤。}
206 %
207 % 模板解压缩后生成文件夹 \file{hitszthesis-vX.Y}\footnote{\texttt{vX.Y} 为版本
208 % 号。},其中包括:模板源文件(\file{hitszthesis.ins} 和 \file{hitszthesis.dtx}),示例文档
209 % (\file{main.tex},\file{spine.tex},\file{hitszthesis.sty}\footnote{可能用到的包
210 % 以及一些命令定义都放在这里,以免 \file{hitszthesis.cls} 过分臃
211 % 肿。},文件夹\file{figure/} 和 \file{front/} 。在使用之前需要先生成模
212 % 板文件和配置文件(具体命令细节请参考 \file{README.md} 和 \file{Makefile}):
213 %
214 % \begin{shell}
215 % $ cd hitszthesis-vX.Y
216 % # 生成 hitszthesis.cls 与 dtx-style.sty
217 % $ xetex hitszthesis.ins
218 %
219 % # 下面的命令用来生成用户手册,首先生成索引
220 % $ xelatex hitszthesis.dtx
221 % $ makeindex -s gind.ist -o hitszthesis.ind hitszthesis.idx
222 % $ makeindex -s gglo.ist -o hitszthesis.gls hitszthesis.glo
223 %
224 % # 最后两次编译生成说明文档 hitszthesis.pdf
225 % $ xelatex hitszthesis.dtx
226 % $ xelatex hitszthesis.dtx
227 % \end{shell}
228 %
229 % \subsection{生成论文}
230 % \label{sec:generate-thesis}
231 % 本节介绍几种常见的生成论文的方法。用户可根据自己的情况选择。
232 %
233 % \subsubsection{\XeLaTeX}
234 % \label{sec:xelatex}
235 % 很多用户对 \LaTeX\ 命令执行的次数不太清楚。一个基本的原则是多次运行 \LaTeX\ 命
236 % 令直至不再出现警告。下面给出生成示例文档的详细过程(\texttt{\#} 开头的行为注
237 % 释),首先来看推荐的 \texttt{xelatex} 方式:
238 % \begin{shell}
239 % # 1. 发现里面的引用关系,文件后缀 .tex 可以省略
240 % $ xelatex main
241 %
242 % # 2. 编译参考文件源文件,生成 bbl 文件
243 % $ bibtex main
244 %
245 % # 3. 下面解决引用
246 % $ xelatex main
247 % $ xelatex main # 如果不需要生成索引此时生成完整的 pdf 文件
248 % $ splitindex main -- -s hitszthesis.ist # 自动生成索引
249 % $ xelatex main.tex # 此时生成完整的 pdf 文件
250 % \end{shell}
251 %
252 % \subsubsection{latexmk}
253 % \label{sec:latexmk}
254 % \texttt{latexmk} 命令支持全自动生成 \LaTeX\ 编写的文档,并且支持使用不同的工具
255 % 链来进行生成,它会自动运行多次工具直到交叉引用都被解决。下面给出了一个用
256 % \texttt{latexmk} 调用 \texttt{xelatex} 生成最终文档的示例:
257 % \begin{shell}
258 % $ latexmk -xelatex main.tex # 生成论文 main.pdf
259 % $ latexmk -xelatex hitszthesis.dtx # 生成说明文档 hitszthesis.pdf
260 % $ latexmk -c # 清理编译生成的辅助文件
261 % \end{shell}
262 %
263 % \subsubsection{GNU make}
264 % \label{sec:make}
265 % \note[提示:]{若要使用 \texttt{make} 编译,需自行下载模板。因为 \TeX\ 发行版中
266 % 的 \file{Makefile} 不在当前目录。}
267 % 上面的方法虽然不困难,但是每次都输入还是非常麻烦,所以 \hitszthesis\ 提供了一
268 % 个 \file{Makefile}。如果可以使用 GNU make 工具,
269 % 则使用 \texttt{make} 生成文件是最方便的办法。
270 %
271 % \begin{shell}
272 % $ make cls # 生成 hitszthesis.cls
273 % $ make doc # 生成说明文档 hitszthesis.pdf
274 % $ make thesis # 生成示例文档 main.pdf
275 % $ make spine # 生成书脊 spine.pdf
276 % $ make all # 生成示例文档 main.pdf 以及书脊 spine.pdf
277 % $ make wordcount # 统计论文字数
278 % $ make clean # 清理辅助文件
279 % $ make cleanall # 删除所有 pdf 文件和所有辅助文件
280 % \end{shell}
281 %
282 % \hitszthesis\ 的 \file{Makefile} 默认用 \texttt{latexmk} 调用\texttt{xelatex} 编
283 % 译。如有需要可修
284 % 改 \file{Makefile} 开头的参数或通过命令行传递参数(请参看 \file{README.md}),
285 % 进一步还可以修改 \file{latexmkrc} 进行定制。
286 %
287 % \subsubsection{compile.bat}
288 % \label{sec:bat}
289 % \changes{v2.1}{2020/02/23}{Add \file{compile.bat}, add wordcount function, regulate writing style of \file{main.tex} to use \file{input}}
290 % 针对windows系统,本模板提供了 \file{compile.bat} 脚本文件,
291 % 可以双击直接编译,也可以在命令提示符窗口中使用脚本提供的额外功能:
292 % \begin{shell}
293 % $ compile.bat cls # 生成 hitszthesis.cls
294 % $ compile.bat doc # 生成说明文档 hitszthesis.pdf
295 % $ compile.bat thesis # 生成示例文档 main.pdf
296 % $ compile.bat spine # 生成书脊 spine.pdf
297 % $ compile.bat all # 生成示例文档 main.pdf 以及书脊 spine.pdf
298 % $ compile.bat wordcount # 统计论文字数
299 % $ compile.bat clean # 删除编译所产生的辅助文件
300 % $ compile.bat cleanall # 删除所有 pdf 文件和所有辅助文件
301 % \end{shell}
302 %
303 % \subsection{升级}
304 % \label{sec:updgrade}
305 % \hitszthesis\ 升级非常简单,可以通过 \TeX\ 发行版的包管理工具自动更新发行版,
306 % \begin{shell}
307 % # 更新 hitszthesis 宏包
308 % $ tlmgr update hitszthesis
309 % # 或者直接更新全部宏包至最新版
310 % $ tlmgr update --all
311 % \end{shell}
312 %
313 % 也可以下载最新的开发版,将 \file{hitszthesis.ins},\file{hitszthesis.dtx},拷贝至工作目录覆盖相应的文件,然后运行:
314 % \begin{shell}
315 % $ xetex hitszthesis.ins
316 % \end{shell}
317 % 生成新的类文件和配置文件即可。
318 %
319 % 也可以直接拷
320 % 贝 \file{hitszthesis.cls},\file{hitszthesis.cfg} 和
321 % \file{hitszthesis.ist},免去上面命令的执行。
322 %
323 % \section{使用说明}
324 % \label{sec:usage}
325 % 本手册假定用户已经能处理一般的 \LaTeX\ 文档,并对 \BibTeX\ 有一定了解。如果
326 % 从来没有接触过 \TeX\ 和 \LaTeX,建议先学习相关的基础知识。
327 %
328 % \subsection{关于提问}
329 % \label{sec:howtoask}
330 % 按照优先级推荐提问的位置如下:
331 %
332 % \begin{itemize}
333 % \item QQ group: 1039392552
334 % \item Github Issues: \href{http://github.com/YangLaTeX/hitszthesis/issues}{http://github.com/YangLaTeX/hitszthesis/issues}
335 % \item Email: \href{mailto:[email protected]}{[email protected]}, \href{mailto:[email protected]}{[email protected]}
336 % \end{itemize}
337 %
338 % \subsection{示例文件}
339 % \label{sec:userguide}
340 % 模板核心文件有三
341 % 个:\file{hitszthesis.cls},\file{hitszthesis.cfg} 和\file{hitszthesis.bst},但是如果
342 % 没有示例文档用户会发现很难下手。所以推荐新用户从模板自带的示例文档入手,里面包
343 % 括了论文写作用到的所有命令及其使用方法,只需要用自己的内容进行相应替换就可以。
344 % 对于不清楚的命令可以查阅本手册。下面的例子描述了模板中章节的组织形式,来自于示
345 % 例文档,具体内容可以参考模板附带的 \file{main.tex}。
346 %
347 % \lstinputlisting[style=lstStyleLaTeX]{main.tex}
348 %
349 % \subsection{论文选项}
350 % \label{sec:option}
351 %
352 % 论文选项在\file{main.tex}文件的开头描述,此处不赘述。
353 %
354 % \subsection{中文字体}
355 % \label{sec:chinese-fonts}
356 % 正确配置中文字体是使用模板的第一步。模板调用 \CTeX\ 宏包,只提供基于
357 % \pkg{xeCJK} 包,使用 \XeLaTeX\ 编译的方式。
358 % 关于如何使用字体命令、字号等等,属于模板格式范畴,在实现细节中讨论。
359 % 关于中文字体安装、配置的所有问题不在本模板讨论范围。
360 %
361 % \myentry{字体}
362 % \DescribeMacro{\songti}
363 % \DescribeMacro{\fangsong}
364 % \DescribeMacro{\heiti}
365 % \DescribeMacro{\kaishu}
366 % 宋体、仿宋、黑体、楷体四种基本字体命令:
367 %
368 % \begin{latex}
369 % {\songti 乾:元,亨,利贞}
370 % {\fangsong 初九,潜龙勿用}
371 % {\heiti 九二,见龙在田,利见大人}
372 % {\kaishu 九三,君子终日乾乾,夕惕若,厉,无咎}
373 % \end{latex}
374 %
375 % \myentry{字号}
376 % \DescribeMacro{\chuhao}
377 % \DescribeMacro{\xiaochu}
378 % \DescribeMacro{\yihao}
379 % 定义字体大小,分别为:
380 %
381 % \begin{center}
382 % \begin{tabular}{llllll}
383 % \toprule
384 % \cs{chuhao} & \cs{xiaochu} & \cs{yihao} & \cs{xiaoyi} & \cs{erhao} & \cs{xiaoer}\\
385 % \cs{sanhao} & \cs{xiaosan} & \cs{sihao} & \cs{xiaosi} & \cs{wuhao} & \cs{xiaowu}\\
386 % \cs{liuhao} & \cs{xiaoliu} & \cs{qihao} & \cs{bahao}\\\bottomrule
387 % \end{tabular}
388 % \end{center}
389 %
390 % 使用方法为:\cs{command}\oarg{num},其中 \cs{command} 为字号命令,\meta{num} 为行距。比
391 % 如 \cs{xiaosi}[1.5] 表示选择小四字体,行距 1.5 倍。
392 %
393 % \begin{latex}
394 % {\erhao 二号}
395 % {\sanhao[1.5] 三号,一点五倍行距}
396 % {\sihao 四号}
397 % {\qihao[2] 七号,两倍行距}
398 % \end{latex}
399 %
400 % 也可以使用 \CTeX\ 定义的 \cs{zihao}\marg{num} 来切换字号,具体用法参看其文
401 % 档。
402 %
403 % \subsection{前文}
404 % \label{sec:titlepage}
405 % 前文内容是正文之前,含封面、摘要、目录、符号表。
406 % 封面信息提供两种配置方法:一是通过统一设置命 令 \cs{hitszsetup}
407 % 通过\emph{key=value} 形式完成;二是每个信息利用命令独立设置, 其中命令的名字跟
408 % \emph{key} 相同。两种方式可以交叉使用,并按顺序执行(即后来的设置会覆
409 % 盖前面的)。以 \texttt{c} 开头的命令跟中文(chinese)相关,\texttt{e}
410 % 开头则为对应的英文(english)。
411 %
412 % \DescribeMacro{\hitszsetup}
413 % \cs{hitszsetup} 用法与常见 \emph{key=value} 命令相同,如下:
414 % \begin{latex}
415 % \hitszsetup{
416 % key1 = value1,
417 % key2 = {a value, with comma},
418 % }
419 % % 可以多次调用
420 % \hitszsetup{
421 % key3 = value3,
422 % key1 = value11, % 覆盖 value1
423 % }
424 % \end{latex}
425 %
426 % \note[注意:]{\cs{hitszsetup} 使用 \pkg{kvoptions} 机制,所以配置项之间不能有空行,否则
427 % 会报错。}
428 %
429 % 大多数命令的使用方法都是: \cs{command}\marg{arg},例外者将具体指出。这些命令都
430 % 在示例文档的 \file{front/cover.tex} 中。
431 %
432 % \subsubsection{密级}
433 % \label{sec:setup-secret}
434 % \myentry{密级}
435 % \DescribeMacro{statesecrets}
436 % \DescribeMacro{natclassifiedindex}
437 % \DescribeMacro{intclassifiedindex}
438 % 定义秘密级别和国内国际索引号。
439 % \begin{latex}
440 % \hitszsetup{
441 % statesecrets={公开},
442 % natclassifiedindex={TM301.2},
443 % intclassifiedindex={62-5},
444 % }
445 % \end{latex}
446 %
447 % \subsubsection{论文标题}
448 % \myentry{论文标题}
449 % \DescribeMacro{ctitle}
450 % \DescribeMacro{etitle}
451 % \DescribeMacro{ctitleone}
452 % \DescribeMacro{ctitletwo}
453 % \DescribeMacro{csubtitle}
454 % \DescribeMacro{esubtitle}
455 % 中英文标题。
456 % 如果有副标题,需要在封面选项中设置subtitle=true,否则不显示副标题。
457 % \begin{latex}
458 % \hitszsetup{
459 % ctitlecover={封面中文题目可断行},
460 % ctitle={论文中文题目},
461 % etitle={Thesis English Title},
462 % csubtitle={论文中文副题目(如果有)},
463 % esubtitle={Thesis English Sub-Title (if necessary)},
464 % ctitleone={本科生论文中文题目上部分},
465 % ctitletwo={本科生论文中文题目下部分},
466 % }
467 % \end{latex}
468 %
469 % \subsubsection{作者姓名}
470 % \myentry{作者姓名}
471 % \DescribeMacro{cauthor}
472 % \DescribeMacro{eauthor}
473 % 作者姓名。
474 % \begin{latex}
475 % \hitszsetup{
476 % cauthor={中文姓名},
477 % eauthor={Name in Pinyin}
478 % }
479 % \end{latex}
480 %
481 % \subsubsection{申请学位名称}
482 % \label{sec:degree}
483 % \myentry{学科名称}
484 % \DescribeMacro{cxueke}
485 % \DescribeMacro{exueke}
486 % 按照入学的培养计划中学科自行填写,具体学科名称不是本文档范畴。
487 %
488 % \begin{latex}
489 % \hitszsetup{
490 % cxueke={工学},
491 % exueke={Engineering},
492 % }
493 % \end{latex}
494 %
495 % \subsubsection{院系名称}
496 % \myentry{院系名称}
497 % \DescribeMacro{caffil}
498 % \DescribeMacro{eaffil}
499 % 院系名称,同上,按照入学的培养计划中学科自行填写,具体院系名称不是本文档范畴。
500 % \begin{latex}
501 % \hitszsetup{
502 % caffil={机电工程与自动化学院},
503 % eaffil={\emultiline[t]{School of Mechanical Engineering\\ and Automation}},
504 % }
505 % \end{latex}
506 % \note[注意:]{个别学院英文名过长,使用以上方法自行换行。}
507 %
508 % \subsubsection{专业名称}
509 % \myentry{专业名称}
510 % \DescribeMacro{csubject}
511 % \DescribeMacro{esubject}
512 % 专业名称,同上,按照入学的培养计划中学科自行填写,具体名称不是本文档范畴。
513 % \begin{latex}
514 % \hitszsetup{
515 % csubject={机械设计制造及其自动化},
516 % esubject={Mechanical Design, Manufacturing and Automation},
517 % }
518 % \end{latex}
519 %
520 % \subsubsection{导师}
521 % \myentry{导师}
522 % \DescribeMacro{csupervisor}
523 % \DescribeMacro{esupervisor}
524 % 直接导师。
525 % \begin{latex}
526 % \hitszsetup{
527 % csupervisor={导师~教授},
528 % esupervisor={Supervisor}
529 % }
530 % \end{latex}
531 %
532 % \myentry{副导师}
533 % \DescribeMacro{cassosupervisor}
534 % \DescribeMacro{eassosupervisor}
535 % 副指导教师。
536 % \begin{latex}
537 % \hitszsetup{
538 % cassosupervisor={副导师~副教授},
539 % eassosupervisor={2nd Boss}
540 % }
541 % \end{latex}
542 %
543 % \myentry{联合导师}
544 % \DescribeMacro{ccosupervisor}
545 % \DescribeMacro{ecosupervisor}
546 % 硕士生联合指导教师,博士生联合导师。
547 % \begin{latex}
548 % \hitszsetup{
549 % ccosupervisor={联合导师~教授},
550 % ecosupervisor={3rd Boss}
551 % }
552 % \end{latex}
553 %
554 % \subsubsection{成文日期}
555 % \myentry{日期}
556 % \DescribeMacro{cdate}
557 % \DescribeMacro{edate}
558 % 默认为当前时间,也可以自己指定。
559 % \begin{latex}
560 % \hitszsetup{
561 % cdate={中文日期},
562 % edate={English Date},
563 % }
564 % \end{latex}
565 %
566 % \subsubsection{学生类型}
567 % \myentry{学生类型}
568 % \DescribeMacro{cstudenttype}
569 % \DescribeMacro{estudenttype}
570 % 非全日制教育申请学位者
571 %(同等学力人员)、(工程硕士)、(工商管理硕士)、
572 %(高级管理人员工商管理硕士)、(公共管理硕士)、(中职教师)、(高校教师)等,
573 % 具体要求按照入学的培养计划中学科自行填写,具体名称不是本文档范畴。
574 % \begin{latex}
575 % \hitszsetup{
576 % cstudenttype={同等学力人员},
577 % estudenttype={Master of Art},
578 % }
579 % \end{latex}
580 %
581 % \subsubsection{学号}
582 % \myentry{学号}
583 % \DescribeMacro{cstudentid}
584 % 学号,具体要求按照入学的培养计划中学科自行填写。
585 % \begin{latex}
586 % \hitszsetup{
587 % cstudentid={9527},
588 % }
589 % \end{latex}
590 %
591 % \subsubsection{摘要}
592 % \myentry{摘要正文}
593 % \DescribeEnv{cabstract}
594 % \DescribeEnv{eabstract}
595 % \note[说明:]{摘要正文只能用环境命令的形式,不支持 \cs{hitszsetup}。}
596 %
597 % \begin{latex}
598 % \begin{cabstract}
599 % 摘要请写在这里...
600 % \end{cabstract}
601 %
602 % \begin{eabstract}
603 % Here comes the abstract in English...
604 % \end{eabstract}
605 % \end{latex}
606 %
607 % \myentry{关键词}
608 % \DescribeMacro{ckeywords}
609 % \DescribeMacro{ekeywords}
610 % 关键词用英文逗号分割写入相应的命令中,模板会解析各关键词并生成符合不同论文格式
611 % 要求的关键词格式。
612 % \begin{latex}
613 % \hitszsetup{
614 % ckeywords={关键词 1, 关键词 2},
615 % ekeywords={keyword 1, keyword 2}
616 % }
617 % \end{latex}
618 %
619 % \subsubsection{符号对照表}
620 % \DescribeEnv{denotation}
621 % 主要符号表环境,单独在文件\file{front/denotation.tex}中。
622 % 跟据\PGR\
623 % 示例中要求,窝工符号表是table环境,示例文件如下,由于窝工要求博士论文图表标题是双语,所以任何对单个标题的全局格式调整都会影响到双语标题,所以这里使用\cs{vspace},具体见实现细节中的描述。
624 %
625 % \lstinputlisting[style=lstStyleLaTeX]{front/denotation.tex}
626 %
627 % \subsubsection{目录}
628 % 目录不需要用户干预,自动生成,具体命令已经写在\file{main.tex} 中。
629 %
630 % \subsection{正文}
631 %
632 % \subsubsection{图和表}
633 % \hitsz\ 博士毕业论文要求使用中英双语图题、表题,这增加了维护难度。
634 % 因为现有唯一的方法是在已有的图题或表题的基础上再添加一行英语图题或表题。
635 % 两个题之间的距离具体多少不在\PGR\ 中要求。目前的方法是用户手动调节该距离。
636 % 关于图题\PGR\ 和\UGR\ 只规定了居中,并没有规定居中对其。然而评审老师很多喜欢居
637 % 中且居中对齐。模板默认选项是居中且居中对齐,如果不喜欢居中对齐,那么需要在
638 % \file{main.tex} 的文档类选项中设置选项capcenterlast=false。详细方法见前文的介绍
639 % 。
640 % \begin{hitszrgu}
641 % 每个图均应有图题(由图序和图名组成),图题不宜有标点符号,图名在图序之后空1个
642 % 半角字符排写。图序按章编排,如第1章第一个插图的图号为“图1-1”。图题置于图下,硕
643 % 士论文只用中文,博士论文用中、英两种文字,居中书写,中文在上,要求中文用宋体5
644 % 号字,英文用Times New Roman 5号字。有图注或其它说明时应置于图题之上。引用图应
645 % 注明出处,在图题右上角加引用文献号。图中若有分图时,分图题置于分图之下或图题之
646 % 下,可以只用中文书写,分图号用a)、b)等表示。图中各部分说明应采用中文(引用的外
647 % 文图除外)或数字符号,各项文字说明置于图题之上(有分图时,置于分图题之上)。图
648 % 中文字用宋体、Times New Roman字体,字号尽量采用5号字(当字数较多时可用小5号字
649 % ,以清晰表达为原则,但在一个插图内字号要统一)。同一图内使用文字应统一。图表中
650 % 物理量、符号用斜体。
651 % \end{hitszrgu}
652 %
653 % 单双语图题的方法如下:
654 % \begin{latex}
655 % \begin{figure}[htpb]
656 % \centering
657 % \includegraphics[width = 0.4\textwidth]{golfer}
658 % \bicaption[golfer1]{}{注意图中文字尽量用五号字
659 % }{Fig.$\!$}{The person playing golf}
660 % \end{figure}
661 % \end{latex}
662 %
663 % 单张单图题的格式如下:
664 % \begin{latex}
665 % \begin{figure}[h]
666 % \centering
667 % \includegraphics[width = 0.4\textwidth]{golfer}
668 % \caption{注意图中文字字号尽量用五号字}
669 % \end{figure}
670 % \end{latex}
671 %
672 % 并排图例:
673 % \begin{latex}
674 % \begin{figure}[htbp]
675 % \centering
676 % \begin{minipage}{0.4\textwidth}
677 % \centering
678 % \includegraphics[width=\textwidth]{golfer}
679 % \bicaption[golfer2]{}{打高尔夫球的人}{Fig.$\!$}{The person playing golf}
680 % \end{minipage}
681 % \begin{minipage}{0.4\textwidth}
682 % \centering
683 % \includegraphics[width=\textwidth]{golfer}
684 % \bicaption[golfer3]{}{打高尔夫球的人}{Fig.$\!$}{The person playing golf}
685 % \end{minipage}
686 % \end{figure}
687 % \end{latex}
688 %
689 % 子图图例:
690 % \begin{latex}
691 % \begin{figure}[htbp]
692 % \centering
693 % \subfigure{\label{golfer41}}\addtocounter{subfigure}{-2}
694 % \subfigure[The person playing golf]{\subfigure[打高尔夫球的人~1]{\includegraphics[width=0.4\textwidth]{golfer}}}
695 % \subfigure{\label{golfer42}}\addtocounter{subfigure}{-2}
696 % \subfigure[The person playing golf]{\subfigure[打高尔夫球的人~2]{\includegraphics[width=0.4\textwidth]{golfer}}}
697 % \bicaption[golfer4]{}{打高尔夫球的人}{Fig.$\!$}{The person playing golf}
698 % \end{figure}
699 % \end{latex}
700 %
701 % 表格示例,表格中的字体是可以自行调整的:
702 % \begin{latex}
703 % \begin{table}[htbp]
704 % \bicaption[table1]{}{符合研究生院绘图规范的表格}{Table$\!$}{Table in agreement of the standard from graduate school}
705 % \vspace{0.5em}\centering\wuhao
706 % \begin{tabular}{ccccc}
707 % \toprule[1.5pt]
708 % $D$(in) & $P_u$(lbs) & $u_u$(in) & $\beta$ & $G_f$(psi.in)\\
709 % \midrule[1pt]
710 % 5 & 269.8 & 0.000674 & 1.79 & 0.04089\\
711 % 10 & 421.0 & 0.001035 & 3.59 & 0.04089\\
712 % 20 & 640.2 & 0.001565 & 7.18 & 0.04089\\
713 % \bottomrule[1.5pt]
714 % \end{tabular}
715 % \end{table}
716 % \end{latex}
717 %
718 % 因为长表格不是浮动体,不会自动调整位置、也不会自动调整字体大小,一切都要手动设
719 % 置。特别繁琐。长表格示例:
720 % \begin{latex}
721 % \ltfontsize{\dawu[1.667]} %设置表格内字体行间距
722 % \dawu[1.667]\begin{longtable}{ccc} % 注意此处设置的是表格线距离
723 % \longbionenumcaption{}{{\wuhao 中国省级行政单位一览 %此处要添加字体设置
724 % }\label{table2}}{Table$\!$}{}{{\wuhao Overview of the provincial administrative
725 % unit of China}}{-0.5em}{3.15bp}\\ %注意后两个参数分别是中英标题间距、标题和表格的间距。
726 % %\caption{\wuhao 中国省级行政单位一览}\\[1em] %注意此处是标题和表格间距,这行
727 % %是单语标题
728 % \toprule[1.5pt] 名称 & 简称 & 省会或首府 \\ \midrule[1pt]
729 % \endfirsthead
730 % \multicolumn{3}{r}{表~\thetable(续表)}\vspace{0.5em}\\
731 % \toprule[1.5pt] 名称 & 简称 & 省会或首府 \\ \midrule[1pt]
732 % \endhead
733 % \bottomrule[1.5pt]
734 % \endfoot
735 % 北京市 & 京 & 北京\\
736 % 天津市 & 津 & 天津\\
737 % 河北省 & 冀 & 石家庄市\\
738 % 山西省 & 晋 & 太原市\\
739 % 内蒙古自治区 & 蒙 & 呼和浩特市\\
740 % 辽宁省 & 辽 & 沈阳市\\
741 % 吉林省 & 吉 & 长春市\\
742 % 黑龙江省 & 黑 & 哈尔滨市\\
743 % 上海市 & 沪/申 & 上海\\
744 % 江苏省 & 苏 & 南京市\\
745 % 浙江省 & 浙 & 杭州市\\
746 % 安徽省 & 皖 & 合肥市\\
747 % 福建省 & 闽 & 福州市\\
748 % 江西省 & 赣 & 南昌市\\
749 % 山东省 & 鲁 & 济南市\\
750 % 河南省 & 豫 & 郑州市\\
751 % 湖北省 & 鄂 & 武汉市\\
752 % 湖南省 & 湘 & 长沙市\\
753 % 广东省 & 粤 & 广州市\\
754 % 广西壮族自治区 & 桂 & 南宁市\\
755 % 海南省 & 琼 & 海口市\\
756 % 重庆市 & 渝 & 重庆\\
757 % 四川省 & 川/蜀 & 成都市\\
758 % 贵州省 & 黔/贵 & 贵阳市\\
759 % 云南省 & 云/滇 & 昆明市\\
760 % 西藏自治区 & 藏 & 拉萨市\\
761 % 陕西省 & 陕/秦 & 西安市\\
762 % 甘肃省 & 甘/陇 & 兰州市\\
763 % 青海省 & 青 & 西宁市\\
764 % 宁夏回族自治区 & 宁 & 银川市\\
765 % 新疆维吾尔自治区 & 新 & 乌鲁木齐市\\
766 % 香港特别行政区 & 港 & 香港\\
767 % 澳门特别行政区 & 澳 & 澳门\\
768 % 台湾省 & 台 & 台北市\\
769 % \end{longtable}\normalsize %注意这里要恢复正常字体
770 % \end{latex}
771 %
772 % \subsubsection{公式}
773 %
774 % 公式不做介绍,与正常用法一致。
775 %
776 % \subsubsection{数学环境}
777 % \label{sec:math}
778 %
779 % \hitszthesis\ 定义了常用的数学环境:
780 %
781 % \begin{center}
782 % \begin{tabular}{*{7}{l}}\toprule
783 % axiom & theorem & definition & proposition & lemma & conjecture &\\
784 % 公理 & 定理 & 定义 & 命题 & 引理 & 猜想 &\\\midrule
785 % proof & corollary & example & exercise & assumption & remark & problem \\
786 % 证明 & 推论 & 例子& 练习 & 假设 & 注释 & 问题\\\bottomrule
787 % \end{tabular}
788 % \end{center}
789 %
790 % 比如:
791 % \begin{latex}
792 % \begin{definition}
793 % 道千乘之国,敬事而信,节用而爱人,使民以时。
794 % \end{definition}
795 % \end{latex}
796 % 产生(自动编号):
797 % \medskip
798 %
799 % \noindent\framebox[\linewidth][l]{{\heiti 定义~1.1~~~} % {道千乘之国,敬事而信,节用而爱人,使民以时。}}
800 %
801 % \smallskip
802 % 列举出来的数学环境毕竟是有限的,如果想用\emph{胡说}这样的数学环境,那么可以定义:
803 % \begin{latex}
804 % \newtheorem{nonsense}{胡说}[chapter]
805 % \end{latex}
806 %
807 % 然后这样使用:
808 % \begin{latex}
809 % \begin{nonsense}
810 % 契丹武士要来中原夺武林秘笈。—— 慕容博
811 % \end{nonsense}
812 % \end{latex}
813 % 产生(自动编号):
814 %
815 % \medskip
816 % \noindent\framebox[\linewidth][l]{{\heiti 胡说~1.1~~~} % {契丹武士要来中原夺武林秘笈。—— 慕容博}}
817 % \subsubsection{算法}
818 % 窝工算法不在规范中要求且一千个评审老师有一千个算法格式喜好。详见
819 % \href{https://github.com/PlutoThesis/PlutoThesis}{PlutoThesis}
820 % 中的各个实验室算法喜好举例。
821 % \subsubsection{引用参考文献}
822 % \DescribeMacro{\inlinecite}
823 % 学校要求的参考文献引用有两种模式:(1)上标模式。比如``同样的工作有很
824 % 多$^{[1,2]}$\ldots''。(2)正文模式。比如``文[3] 中详细说明了\ldots''。其中上标
825 % 模式使用远比正文模式频繁,所以为了符合使用习惯,上标模式仍然用常规
826 % 的 \cs{cite}\marg{key},而 \cs{inlinecite}\marg{key} 则用来生成正文模式。
827 %
828 % 关于参考文献模板推荐使用 \BibTeX,关于中文参考文献需要额外增加一个 Entry:
829 % \texttt{language},将其设置为 \texttt{zh} 用来指示此参考文献为中文,以
830 % 便 \file{hitszthesis.bst} 处理。如:
831 % \begin{latex}
832 % @INPROCEEDINGS{cnproceed,
833 % author = {王重阳 and 黄药师 and 欧阳峰 and 洪七公 and 段皇帝},
834 % title = {武林高手从入门到精通},
835 % booktitle = {第~$N$~次华山论剑},
836 % year = 2006,
837 % address = {西安, 中国},
838 % month = sep,
839 % language = "zh",
840 % }
841 %
842 % @ARTICLE{cnarticle,
843 % AUTHOR = "贾宝玉 and 林黛玉 and 薛宝钗 and 贾探春",
844 % TITLE = "论刘姥姥食量大如牛之现实意义",
845 % JOURNAL = "红楼梦杂谈",
846 % PAGES = "260--266",
847 % VOLUME = "224",
848 % YEAR = "1800",
849 % LANGUAGE = "zh",
850 % }
851 % \end{latex}
852 %
853 % 注意如果不需要引用参考文献,请删除 \file{main.tex} 中 \cs{bibliography} 开头的两行,
854 % 以避免可能的编译错误。
855 %
856 % \subsubsection{列表环境}
857 % \DescribeEnv{itemize}
858 % \DescribeEnv{enumerate}
859 % \DescribeEnv{description}
860 % 为了适合中文习惯,模板将这三个常用的列表环境用 \env{enumitem} 进行了纵向间距压
861 % 缩。一方面清除了多余空间,另一方面用户可以自己指定列表环境的样式(如标签符号,
862 % 缩进等)。细节请参看 \env{enumitem} 文档,此处不再赘述。
863 % \subsection{后文}
864 %
865 % \subsubsection{结论}
866 % \DescribeEnv{conclusion}
867 % 结论之后为后文内容。
868 %
869 % \lstinputlisting[style=lstStyleLaTeX]{back/conclusion.tex}
870 %
871 % \subsubsection{参考文献}
872 % 在后文中的参考文献是自动生成的,不需要用户干预,具体命令在 \file{main.tex} 中有
873 % 示例。
874 %
875 % \subsubsection{附录}
876 % \DescribeEnv{appendix}
877 % 所有的附录都插到这里来。因为附录会更改默认的 chapter 属性,而后面的{\heiti 个人简
878 % 历}又需要恢复,所以实现为环境可以保证全局的属性不受影响。
879 % \begin{latex}
880 % \begin{appendix}
881 % \input{back/appA.tex}
882 % \end{appendix}
883 % \end{latex}
884 %
885 % 若需要附录从1开始编页码,在第一篇附录的 \cs{chapter} 后面
886 % 写上 \cs{SetPageNumberingFromOne} 命令即可。
887 % 若要求附录部分不含页码,则在 \env{appendix} 环境之前
888 % 写上 \cs{SetAppendixWithOnlyHeadings}命令。
889 %
890 % \subsubsection{所发表文章}
891 % \DescribeEnv{publication}
892 % \PGR 与\UGR\ 中都没有明确规定此处的格式,以下仅为示例。
893 %
894 % \lstinputlisting[style=lstStyleLaTeX]{back/publications.tex}
895 %
896 % \subsubsection{索引}
897 % \DescribeEnv{ceindex}
898 % 窝工要求中英文双语索引。后文中的自动索引实际上不需要用户干预。
899 % \subsubsection{授权}
900 % \DescribeMacro{\authorization}
901 % 授权页中的签名和日期是需要手写,不需要人工干预。具体示例在\file{main.tex} 中。
902 %\begin{latex}
903 % \authorization %授权
904 % %\authorization[scan.pdf] %添加扫描页的命令,与上互斥
905 %\end{latex}
906 %
907 % \subsubsection{致谢声明}
908 % \DescribeEnv{acknowledgement}
909 % 把致谢做成一个环境更好一些,直接往里面写感谢的话就可以啦!
910 %
911 % \lstinputlisting[style=lstStyleLaTeX]{back/acknowledgements.tex}
912 %
913 % \subsubsection{简历}
914 % \DescribeEnv{resume}
915 % 个人简历。
916 % 实际上,致谢和个人简历是自由发挥的地区,字体,文体,格式,内容,完全自己决定。
917 %
918 % \lstinputlisting[style=lstStyleLaTeX]{back/resume.tex}
919 %
920 % \subsection{其它}
921 % 模板的配置文件 \file{hitszthesis.cfg} 中定义了很多固定词汇,一般无须修改。如果有特殊需求,
922 % 推荐在导言区使用 \cs{renewcommand}。
923 %
924 % \section{致谢}
925 % \label{sec:thanks}
926 % 感谢\href{https://github.com/dustincys/hithesis}{hithesis}、\href{https://github.com/xueruini/thuthesis}{thuthesis}模板的作者,本模板基于他们改编而来!
927 %
928 % 欢迎各位到 \href{http://github.com/YangLaTeX/hitszthesis/}{\hitszthesis\ Github 主页}贡献!
929 %
930 % \StopEventually{\PrintChanges\PrintIndex}
931 % \clearpage
932 %
933 % \section{实现细节}
934 %
935 % \subsection{基本信息}
936 % \begin{macrocode}
937 %<cls>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
938 %<cls>\ProvidesClass{hitszthesis}
939 %<cfg>\ProvidesFile{hitszthesis.cfg}
940 %<cls|cfg>[2021/11/15 3.2.1 Dissertation Template for Harbin Institute of Technology, ShenZhen (HITSZ)]
941 % \end{macrocode}
942 %
943 % \subsection{定义选项}
944 % \label{sec:defoption}
945 % \begin{macrocode}
946 %<*cls>
947 \RequirePackage{ifthen}
948 \RequirePackage{kvoptions}
949 \SetupKeyvalOptions{
950 family=hitsz,
951 prefix=hitsz@,
952 setkeys=\kvsetkeys}
953 \newif\ifhitsz@bachelor
954 \newif\ifhitsz@master
955 \newif\ifhitsz@doctor
956 \define@key{hitsz}{type}{%
957 \hitsz@bachelorfalse
958 \hitsz@masterfalse
959 \hitsz@doctorfalse
960 \expandafter\csname hitsz@#1true\endcsname}
961 % \end{macrocode}
962 %
963 % 此处设置校区,没有明确给出哈尔滨或者威海校区的时候,默认为深圳校区。
964 % \begin{macrocode}
965 \newif\ifhitsz@shenzhen
966 \newif\ifhitsz@weihai
967 \newif\ifhitsz@harbin
968 \define@key{hitsz}{campus}{%
969 \hitsz@shenzhenfalse
970 \hitsz@weihaifalse
971 \hitsz@harbinfalse
972 \expandafter\csname hitsz@#1true\endcsname}
973 \ifhitsz@harbin
974 \relax
975 \else
976 \ifhitsz@weihai
977 \relax
978 \else
979 \hitsz@shenzhentrue
980 \fi
981 \fi
982 % \end{macrocode}
983 %
984 % 目录中英文是否用 Arial 字体(默认关闭)。
985 % \begin{macrocode}
986 \DeclareBoolOption[false]{arialtoc}
987 % \end{macrocode}
988 %
989 % 章节标题中的英文是否用 Arial 字体(默认关闭)。
990 % \begin{macrocode}
991 \DeclareBoolOption[false]{arialtitle}
992 % \end{macrocode}
993 %
994 % 封面第二页信息是否居左对齐(默认关闭)。
995 % \begin{macrocode}
996 \DeclareBoolOption[false]{infoleft}
997 % \end{macrocode}
998 %
999 % 封面第一页标题是否为两行,如果标题过长可以选择(默认关闭)。
1000 % \begin{macrocode}
1001 \DeclareBoolOption[false]{covertitletworow}
1002 % \end{macrocode}
1003 %
1004 % 图表题注是否加粗(默认关闭)。
1005 % \begin{macrocode}
1006 \DeclareBoolOption[false]{boldcaption}
1007 % \end{macrocode}
1008 %
1009 % \option{raggedbottom} 选项(默认开启)。如果不开启这个选项,会出现一页中尽量上
1010 % 下对齐,段的间距大。如果开启,尽量使段间距保持一致,页面底部出现空白。
1011 % \begin{macrocode}
1012 \DeclareBoolOption[true]{raggedbottom}
1013 % \end{macrocode}
1014 %
1015 % 在脚注标记中使用 \pkg{pifont} 的带圈数字(默认关闭)。
1016 % \begin{macrocode}
1017 \DeclareBoolOption[false]{pifootnote}
1018 % \end{macrocode}
1019 %
1020 % 字体间距设置(默认关闭)。
1021 % \begin{macrocode}
1022 \DeclareBoolOption[false]{glue}
1023 % \end{macrocode}
1024 %
1025 % 文科生四级目录设置(默认关闭)。
1026 % \begin{macrocode}
1027 \DeclareBoolOption[false]{tocfour}
1028 % \end{macrocode}
1029 %
1030 % 目录中“目录”位置是否空行(默认开启)。
1031 % \begin{macrocode}
1032 \DeclareBoolOption[false]{tocblank}
1033 % \end{macrocode}
1034 %
1035 % 章标题是否悬挂居中(默认开启)
1036 % \begin{macrocode}
1037 \DeclareBoolOption[true]{chapterhang}
1038 % \end{macrocode}
1039 %
1040 % 是否是全日制学生(默认是)。
1041 % \begin{macrocode}
1042 \DeclareBoolOption[true]{fulltime}
1043 % \end{macrocode}
1044 %
1045 % 是否有子标题(默认是)。
1046 % \begin{macrocode}
1047 \DeclareBoolOption[false]{subtitle}
1048 % \end{macrocode}
1049 %
1050 % 是否开启debug模式(默认否)。如果开启,载入显示行号等的包,只为开发调试用。
1051 % \begin{macrocode}
1052 \DeclareBoolOption[false]{debug}
1053 % \end{macrocode}
1054 %
1055 % 是否使用右开页(默认否)。
1056 % \begin{macrocode}
1057 \DeclareBoolOption[false]{openright}
1058 % \end{macrocode}
1059 %
1060 % 是否为提交图书馆电子版。
1061 % \begin{macrocode}
1062 \DeclareBoolOption[false]{library}
1063 % \end{macrocode}
1064 %
1065 % 图题和标题最后一行是否居中对其(默认是,非规范要求)。
1066 % \begin{macrocode}
1067 \DeclareBoolOption[true]{capcenterlast}
1068 % \end{macrocode}
1069 %
1070 % 子图图题和标题最后一行是否居中对其(默认是,非规范要求)。
1071 % \begin{macrocode}
1072 \DeclareBoolOption[true]{subcapcenterlast}
1073 % \end{macrocode}
1074 %
1075 % 中文目录中Abstract是否均为大写
1076 % \begin{macrocode}
1077 \DeclareBoolOption[true]{absupper}
1078 % \end{macrocode}
1079 %
1080 % 本科附录章节编号是否为大写字母
1081 % \begin{macrocode}
1082 \DeclareBoolOption[true]{alphappendix}
1083 % \end{macrocode}
1084 %
1085 % 此处添加控制本科论文的页码横线选项
1086 % \begin{macrocode}
1087 \DeclareBoolOption[true]{bsmainpagenumberline}
1088 \DeclareBoolOption[true]{bsfrontpagenumberline}
1089 \DeclareBoolOption[true]{bsheadrule}
1090 % \end{macrocode}
1091 %
1092 % 数学字体选项,默认使用\option{newtxmath}
1093 % \begin{macrocode}
1094 \newif\ifhitsz@newtxmath
1095 \newif\ifhitsz@mtprotwolite
1096 \newif\ifhitsz@mtprotwo
1097 \define@key{hitsz}{mathfont}{%
1098 \hitsz@newtxmathfalse
1099 \hitsz@mtprotwolitefalse
1100 \hitsz@mtprotwofalse
1101 \expandafter\csname hitsz@#1true\endcsname}
1102 \ifhitsz@mtprotwolite
1103 \relax
1104 \else
1105 \ifhitsz@mtprotwo
1106 \relax
1107 \else
1108 \hitsz@newtxmathtrue
1109 \fi
1110 \fi
1111 % \end{macrocode}
1112 %
1113 % 参考文献分割开关
1114 % \begin{macrocode}
1115 \DeclareBoolOption[false]{splitbibitem}
1116 % \end{macrocode}
1117 %
1118 % 声明字体选项
1119 % \begin{macrocode}
1120 \DeclareStringOption{fontset}
1121 % \end{macrocode}
1122 %
1123 % 将其余选项默认传递给 \pkg{ctexbook}。
1124 % \begin{macrocode}
1125 \DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{ctexbook}}
1126 % \end{macrocode}
1127 %
1128 % 解析用户传递过来的选项,并加载 \pkg{ctexbook}。
1129 % \begin{macrocode}
1130 \ProcessKeyvalOptions*
1131 % \end{macrocode}
1132 %
1133 % 使用 \XeTeX\ 引擎时,\pkg{fontspec} 宏包会被 \pkg{xeCJK} 自动调用。传递
1134 % 给 \pkg{fontspec} 宏包 \option{no-math} 选项,避免部分数学符号字体自动调整
1135 % 为 CMR。其他引擎下没有这个问题,这一行会被无视。
1136 % \begin{macrocode}
1137 \PassOptionsToPackage{no-math}{fontspec}
1138 % \end{macrocode}
1139 %
1140 % 载入单双面打印设置,本、硕单面,博士双面。
1141 % \begin{macrocode}
1142 \ifhitsz@bachelor
1143 \PassOptionsToClass{oneside}{book}
1144 \fi
1145 \ifhitsz@master
1146 \PassOptionsToClass{oneside}{book}
1147 \fi
1148 \ifhitsz@doctor
1149 \PassOptionsToClass{twoside}{book}
1150 \fi
1151 % \end{macrocode}
1152 %
1153 % 设置字体。由于宋体没有粗体,且窝工模板的标题要求使用粗宋体,于是面临CTeX的经典
1154 % 的伪粗体bug:“首次出现伪粗体字体之后的正常字体无法复制”。但如果使用自带宋体的
1155 % 思源字体,那么不必使用伪粗体。模板只给出了新windows字体的思源字体设置,且思源
1156 % 字体版本为Adobe版。
1157 % \begin{macrocode}
1158 \ifthenelse%
1159 {\equal{\hitsz@fontset}{}}%
1160 {%
1161 \PassOptionsToPackage{AutoFakeBold=2}{xeCJK}
1162 }%
1163 {%
1164 \ifthenelse%
1165 {\equal{\hitsz@fontset}{siyuan}}%
1166 {\relax}%
1167 {%
1168 \PassOptionsToPackage{AutoFakeBold=2}{xeCJK}
1169 }%
1170 \PassOptionsToClass{fontset=\hitsz@fontset}{ctexbook}
1171 }%
1172 % \end{macrocode}
1173 %
1174 % 使用 \XeLaTeX 编译 \pkg{mtpro2} 宏包必须加载此宏包
1175 % \begin{macrocode}
1176 \RequirePackage{etex}
1177 % \end{macrocode}
1178 %
1179 % 使用 \pkg{ctexbook} 类,优于调用 \pkg{ctex} 宏包。
1180 % \begin{macrocode}
1181 \LoadClass[a4paper,openany,UTF8,zihao=-4,scheme=plain]{ctexbook}
1182 % \end{macrocode}
1183 %
1184 % 用户至少要提供一个选项,指定论文类型。
1185 % \begin{macrocode}
1186 \ifhitsz@bachelor\relax\else
1187 \ifhitsz@master\relax\else
1188 \ifhitsz@doctor\relax\else
1189 \ClassError{hitszthesis}%
1190 {Please specify thesis type in option: \MessageBreak
1191 type=[bachelor | master | doctor]}{}
1192 \fi
1193 \fi
1194 \fi
1195 % \end{macrocode}
1196 %
1197 % \subsection{装载宏包}
1198 % \label{sec:loadpackage}
1199 %
1200 % 引用的宏包和相应的定义。
1201 % \begin{macrocode}
1202 \RequirePackage{etoolbox}
1203 \RequirePackage{ifxetex}
1204 \ifxetex
1205 \else
1206 \ClassError{hitszthesis}%
1207 {Please use: \MessageBreak
1208 xelatex}{}
1209 \fi
1210 \RequirePackage{xparse}
1211 % \end{macrocode}
1212 %
1213 % \AmSTeX\ 宏包,用来排出更加漂亮的公式。
1214 % \begin{macrocode}
1215 \RequirePackage{amsmath}
1216 % \end{macrocode}
1217 %
1218 % 定理类环境宏包,其中 \pkg{amsmath} 选项用来兼容 \AmSTeX\ 的宏包
1219 % \begin{macrocode}
1220 \RequirePackage[amsmath,thmmarks,hyperref]{ntheorem}
1221 \RequirePackage{amssymb}
1222 % \end{macrocode}
1223 %
1224 % \pkg{newtx} 设置 Times New Roman,Helvetica。
1225 % \begin{macrocode}
1226 \RequirePackage[defaultsups]{newtxtext}
1227 % \end{macrocode}
1228 %
1229 % 添加数学字体开关
1230 % \begin{macrocode}
1231 \ifhitsz@newtxmath
1232 \RequirePackage{newtxmath}
1233 \else
1234 \ifhitsz@mtprotwolite
1235 \let\Bbbk\relax
1236 \RequirePackage[lite,subscriptcorrection,slantedGreek,nofontinfo]{mtpro2}
1237 \else
1238 \ifhitsz@mtprotwo
1239 \let\Bbbk\relax
1240 \RequirePackage[mtphrb,mtpcal,zswash,uprightGreek]{mtpro2}
1241 \fi
1242 \fi
1243 \fi
1244 % \end{macrocode}
1245 %
1246 % 图形支持宏包。
1247 % \begin{macrocode}
1248 \RequirePackage{graphicx}
1249 % \end{macrocode}
1250 %
1251 % \pkg{pdfpages} 宏包便于我们插入扫描后的授权页和声明页 PDF 文档。
1252 % \begin{macrocode}
1253 \RequirePackage{pdfpages}
1254 \includepdfset{fitpaper=true}
1255 % \end{macrocode}
1256 %
1257 % 更好的列表环境。
1258 % \begin{macrocode}
1259 \RequirePackage{enumitem} %使用enumitem宏包,改变列表项的格式
1260 \RequirePackage{environ}
1261 % \end{macrocode}
1262 %
1263 % 禁止 \LaTeX 自动调整多余的页面底部空白,并保持脚注仍然在底部。
1264 % 脚注按页编号。
1265 % \begin{macrocode}
1266 \ifhitsz@raggedbottom
1267 \RequirePackage[bottom,perpage,hang]{footmisc}
1268 \raggedbottom
1269 \else
1270 \RequirePackage[perpage,hang]{footmisc}
1271 \fi
1272 % \end{macrocode}
1273 %
1274 % 脚注格式。
1275 % \begin{macrocode}
1276 \ifhitsz@pifootnote
1277 \RequirePackage{pifont}
1278 \fi
1279 % \end{macrocode}
1280 %
1281 % 利用 \pkg{xeCJKfntef} 实现汉字的下划线和盒子内两段对齐,并可以避免
1282 % \cs{makebox}\oarg{width}\oarg{s} 可能产生的 underful boxes。
1283 % \changes{v3.2.1}{2021/11/14}{CJKfntef包不再自动加载xeCJKfntef}
1284 % \begin{macrocode}
1285 \RequirePackage{xeCJKfntef}
1286 % \end{macrocode}
1287 %
1288 % 表格控制
1289 % \begin{macrocode}
1290 \RequirePackage{longtable}
1291 % \end{macrocode}
1292 %
1293 % 使用三线表:\cs{toprule},\cs{midrule},\cs{bottomrule}。
1294 % \begin{macrocode}
1295 \RequirePackage{booktabs}
1296 % \end{macrocode}
1297 %
1298 % 参考文献引用宏包。
1299 % \changes{v3.2.1}{2021/11/15}{add package \pkg{gbt7714}}
1300 % \begin{macrocode}
1301 \RequirePackage{gbt7714}
1302 \RequirePackage[sort&compress]{natbib}
1303 % \end{macrocode}
1304 %
1305 % 子公式编号。
1306 % \begin{macrocode}
1307 \RequirePackage{subeqnarray}
1308 % \end{macrocode}
1309 %
1310 % 生成有书签的 pdf 及其开关,请结合 gbk2uni 避免书签乱码。
1311 % \begin{macrocode}
1312 \RequirePackage{hyperref}
1313 \hypersetup{%
1314 CJKbookmarks=true,
1315 linktoc=all,
1316 bookmarksnumbered=true,
1317 bookmarksopen=true,
1318 bookmarksopenlevel=3,
1319 pdfcreator={XeLaTeX with hitszthesis class},
1320 breaklinks=true,
1321 colorlinks=false,
1322 plainpages=false,
1323 pdfstartview=FitH,
1324 pdfborder={0 0 0}
1325 }
1326 % \end{macrocode}
1327 %
1328 % 设置 url 样式,与上下文一致
1329 % \begin{macrocode}
1330 \urlstyle{same}
1331 % \end{macrocode}
1332 %
1333 % \subsection{页面设置}
1334 % \label{sec:layout}
1335 % 根据撰写规范设置版芯。
1336 % \begin{macrocode}
1337 \ifhitsz@debug
1338 \RequirePackage[showframe]{geometry}
1339 \else
1340 \RequirePackage{geometry}
1341 \fi
1342 \geometry{
1343 a4paper, % 210 * 297mm
1344 hcentering,
1345 ignoreall,
1346 nomarginpar,
1347 }
1348 % \end{macrocode}
1349 %
1350 % 设置版芯页边距
1351 % \begin{macrocode}
1352 \geometry{% 版芯高度 = textheight(224) + head(5) + headsep(3) + footskip(8) = 240 mm
1353 text={150true mm,224true mm},
1354 top=37.5true mm,
1355 left=30true mm,
1356 head=5true mm,
1357 headsep=3true mm,
1358 footskip=0true mm,
1359 foot=8true mm
1360 }
1361 % \end{macrocode}
1362 %
1363 % 载入显示行号的包。
1364 % \begin{macrocode}
1365 \ifhitsz@debug%
1366 \RequirePackage{layout}
1367 \RequirePackage{layouts}
1368 \RequirePackage{lineno}
1369 \fi
1370 % \end{macrocode}
1371 %
1372 % 利用 \pkg{fancyhdr} 设置页眉页脚。
1373 % \begin{macrocode}
1374 \RequirePackage{fancyhdr}
1375 % \end{macrocode}
1376 %
1377 % 其他包,表格、数学符号包
1378 % \begin{macrocode}
1379 \RequirePackage{tabularx}
1380 \RequirePackage{varwidth}
1381 % \end{macrocode}
1382 %
1383 % 此处changepage环境用来控制索引页面的左右边距,规范中给出的示例的边距要大于正文。
1384 % \begin{macrocode}
1385 \RequirePackage{changepage}
1386 \RequirePackage{multicol}
1387 \RequirePackage[below]{placeins}%允许上一个section的浮动图形出现在下一个section的开始部分,还提供\FloatBarrier命令,使所有未处理的浮动图形立即被处理
1388 \RequirePackage{flafter} % 使得所有浮动体不能被放置在其浮动环境之前,以免浮动体在引述它的文本之前出现.
1389 \RequirePackage{multirow} %使用Multirow宏包,使得表格可以合并多个row格
1390 \ifhitsz@subcapcenterlast
1391 \PassOptionsToPackage{centerlast}{subfigure}
1392 \fi
1393 \RequirePackage{subfigure}%支持子图 %centerlast 设置最后一行是否居中
1394 \RequirePackage[subfigure]{ccaption} %支持双语标题
1395 % \end{macrocode}
1396 %
1397 % 中英文索引包。
1398 % \begin{macrocode}
1399 \RequirePackage[makeindex]{splitidx}
1400 \newindex[]{china}
1401 \newindex[]{english}
1402 %</cls>
1403 % \end{macrocode}
1404 %
1405 % 窝工要求的索引格式。
1406 % \begin{macrocode}
1407 %<*ist>
1408 headings_flag 1
1409 heading_prefix "\{\\vskip -\\baselineskip\\centering\\normalsize\\textbf\{"
1410 heading_suffix "\}\\par\}\\nopagebreak\\wuhao\n"
1411 delim_0 "\\hspace*{\\fill}"
1412 delim_1 "\\hspace*{\\fill}"
1413 %</ist>
1414 % \end{macrocode}
1415 %
1416 % 排版logo。
1417 % \begin{macrocode}
1418 %<cls>\RequirePackage{xltxtra}
1419 % \end{macrocode}
1420 %
1421 % \subsection{主文档格式}
1422 % \label{sec:mainbody}
1423 %
1424 % \subsubsection{Three matters}
1425 %
1426 % \begin{macro}{\cleardoublepage}
1427 % 对于 \textsl{openright} 选项,必须保证章首页右开,且如果前章末页无内容须
1428 % 清空其页眉页脚。
1429 % 如果\textsl{library}为真,则强制设置\textsl{openright}为真。
1430 % \begin{macrocode}
1431 %<*cls>
1432 \ifhitsz@library
1433 \hitsz@openrightfalse
1434 \else
1435 \relax
1436 \fi
1437 \let\hitsz@cleardoublepage\cleardoublepage
1438 \newcommand{\hitsz@clearemptydoublepage}{%
1439 \clearpage{\pagestyle{hitsz@empty}\hitsz@cleardoublepage}
1440 }
1441 \let\cleardoublepage\hitsz@clearemptydoublepage
1442 % \end{macrocode}
1443 % \end{macro}
1444 %
1445 % \begin{macro}{\frontmatter}
1446 % 我们的单面和双面模式与常规的不太一样。
1447 % \begin{macrocode}
1448 \renewcommand\frontmatter{%
1449 \ifhitsz@openright\cleardoublepage\else\clearpage\fi
1450 \@mainmatterfalse
1451 \pagenumbering{Roman}
1452 \pagestyle{hitsz@empty}
1453 }
1454 % \end{macrocode}
1455 % \end{macro}
1456 %
1457 % \begin{macro}{\mainmatter}
1458 % 根据打印店(伪官方)的猛虎式操作,\cs{mainmatter}命令的逻辑是,双面打印时第一章必须在奇数页。
1459 % \begin{macrocode}
1460 \renewcommand\mainmatter{%
1461 \ifhitsz@tocblank%
1462 \addtocontents{toc}{\vspace{\baselineskip}}
1463 \addtocontents{toe}{\vspace{\baselineskip}}
1464 \fi%
1465 \ifhitsz@doctor%
1466 \ifhitsz@library\clearpage\else\cleardoublepage\fi
1467 \else%
1468 \clearpage
1469 \fi%
1470 \@mainmattertrue
1471 \pagenumbering{arabic}
1472 \pagestyle{hitsz@headings}
1473 }
1474 % \end{macrocode}
1475 % \end{macro}
1476 % \begin{macro}{\backmatter}
1477 % \begin{macrocode}
1478 \renewcommand\backmatter{%
1479 \ifhitsz@openright\cleardoublepage\else\clearpage\fi
1480 \@mainmattertrue}
1481 %</cls>
1482 % \end{macrocode}
1483 % \end{macro}
1484 %
1485 % \subsubsection{字体}
1486 % \label{sec:font}
1487 %
1488 % \begin{macro}{\normalsize}
1489 % 根据窝工规定,正文小四号 (12bp) 字,行距为1.25倍。
1490 % \begin{macrocode}
1491 %<*cls>
1492 \renewcommand\normalsize{%
1493 \@setfontsize\normalsize{12bp}{19.27374bp \@plus 2bp \@minus 2bp}%
1494 \abovedisplayskip=8pt
1495 \abovedisplayshortskip=8pt
1496 \belowdisplayskip=\abovedisplayskip
1497 \belowdisplayshortskip=\abovedisplayshortskip}
1498 % \end{macrocode}
1499 % \end{macro}
1500 %
1501 % WORD 中的字号对应该关系如下(1bp = 72.27/72 pt):
1502 % \begin{center}
1503 % \begin{tabular}{llll}
1504 % \toprule
1505 % 初号 & 42bp & 14.82mm & 42.1575pt \\
1506 % 小初 & 36bp & 12.70mm & 36.135 pt \\
1507 % 一号 & 26bp & 9.17mm & 26.0975pt \\
1508 % 小一 & 24bp & 8.47mm & 24.09pt \\
1509 % 二号 & 22bp & 7.76mm & 22.0825pt \\
1510 % 小二 & 18bp & 6.35mm & 18.0675pt \\
1511 % 三号 & 16bp & 5.64mm & 16.06pt \\
1512 % 小三 & 15bp & 5.29mm & 15.05625pt \\
1513 % 四号 & 14bp & 4.94mm & 14.0525pt \\
1514 % 小四 & 12bp & 4.23mm & 12.045pt \\
1515 % 五号 & 10.5bp & 3.70mm & 10.59375pt \\
1516 % 小五 & 9bp & 3.18mm & 9.03375pt \\
1517 % 六号 & 7.5bp & 2.56mm & \\
1518 % 小六 & 6.5bp & 2.29mm & \\
1519 % 七号 & 5.5bp & 1.94mm & \\
1520 % 八号 & 5bp & 1.76mm & \\\bottomrule
1521 % \end{tabular}
1522 % \end{center}
1523 %
1524 % \begin{macro}{\hitsz@def@fontsize}
1525 % 根据习惯定义字号。用法:\cs{hitsz@def@fontsize}\marg{字号名称}\marg{磅数}避免了
1526 % 字号选择和行距的紧耦合。所有字号定义时为单倍行距,并提供选项指定行距倍数。
1527 % \begin{macrocode}
1528 \def\hitsz@def@fontsize#1#2{%
1529 \expandafter\newcommand\csname #1\endcsname[1][1.3]{%
1530 \fontsize{#2}{##1\dimexpr #2}\selectfont}}
1531 % \end{macrocode}
1532 % \end{macro}
1533 %
1534 % \begin{macro}{\dachu}
1535 % \begin{macro}{\chuhao}
1536 % \begin{macro}{\xiaochu}
1537 % \begin{macro}{\yihao}
1538 % \begin{macro}{\xiaoyi}
1539 % \begin{macro}{\erhao}
1540 % \begin{macro}{\xiaoer}
1541 % \begin{macro}{\sanhao}
1542 % \begin{macro}{\xiaosan}
1543 % \begin{macro}{\sihao}
1544 % \begin{macro}{\banxiaosi}
1545 % \begin{macro}{\xiaosi}
1546 % \begin{macro}{\dawu}
1547 % \begin{macro}{\wuhao}
1548 % \begin{macro}{\xiaowu}
1549 % \begin{macro}{\liuhao}
1550 % \begin{macro}{\xiaoliu}
1551 % \begin{macro}{\qihao}
1552 % \begin{macro}{\bahao}
1553 % 一组字号定义。
1554 % \begin{macrocode}
1555 \hitsz@def@fontsize{dachu}{58bp}
1556 \hitsz@def@fontsize{chuhao}{42bp}
1557 \hitsz@def@fontsize{xiaochu}{36bp}
1558 \hitsz@def@fontsize{yihao}{26bp}
1559 \hitsz@def@fontsize{xiaoyi}{24bp}
1560 \hitsz@def@fontsize{erhao}{22bp}
1561 \hitsz@def@fontsize{xiaoer}{18bp}
1562 \hitsz@def@fontsize{sanhao}{16bp}
1563 \hitsz@def@fontsize{xiaosan}{15bp}
1564 \hitsz@def@fontsize{sihao}{14bp}
1565 \hitsz@def@fontsize{banxiaosi}{13bp}
1566 \hitsz@def@fontsize{xiaosi}{12bp}
1567 \hitsz@def@fontsize{dawu}{11bp}
1568 \hitsz@def@fontsize{wuhao}{10.5bp}
1569 \hitsz@def@fontsize{xiaowu}{9bp}
1570 \hitsz@def@fontsize{liuhao}{7.5bp}
1571 \hitsz@def@fontsize{xiaoliu}{6.5bp}
1572 \hitsz@def@fontsize{qihao}{5.5bp}
1573 \hitsz@def@fontsize{bahao}{5bp}
1574 %</cls>
1575 % \end{macrocode}
1576 % \end{macro}
1577 % \end{macro}
1578 % \end{macro}
1579 % \end{macro}
1580 % \end{macro}
1581 % \end{macro}
1582 % \end{macro}
1583 % \end{macro}
1584 % \end{macro}
1585 % \end{macro}
1586 % \end{macro}
1587 % \end{macro}
1588 % \end{macro}
1589 % \end{macro}
1590 % \end{macro}
1591 % \end{macro}
1592 % \end{macro}
1593 % \end{macro}
1594 % \end{macro}
1595 %
1596 % \subsubsection{页眉页脚}
1597 % \label{sec:headerfooter}
1598 %
1599 % \begin{macro}{\hitsz@empty}
1600 % \begin{macro}{\hitsz@onlyheadings}
1601 % \begin{macro}{\hitsz@headings}
1602 % 定义三种页眉页脚格式:
1603 % \begin{itemize}
1604 % \item \texttt{hitsz@empty}:页眉页脚都没有
1605 % \item \texttt{hitsz@onlyheadings}:只显示页眉。
1606 % \item \texttt{hitsz@headings}:页眉页脚同时显示。
1607 % \end{itemize}
1608 % \begin{macrocode}
1609 %<*cls>
1610 \let\hitsz@headrule\headrule
1611 \fancypagestyle{hitsz@empty}{%
1612 \fancyhf{}
1613 \let\headrule\hitsz@headrule%
1614 \renewcommand{\headrulewidth}{0pt}
1615 \renewcommand{\footrulewidth}{0pt}
1616 }
1617 \fancypagestyle{hitsz@onlyheadings}{%
1618 \fancyhf{}
1619 \fancyhead[C]{\songti\xiaowu[0]%
1620 \hitsz@cschoolname\hitsz@bachelor@cxuewei\hitsz@bachelor@cthesisname}%
1621 }
1622 % \end{macrocode}
1623 %
1624 % 此处根据本科生模板的多种版本,提供选项自定义页码、页眉样式。
1625 % \changes{v3.2}{2020/06/23}{Omit '深圳' in second titlepage, heading and authorization title}
1626 % \begin{macrocode}
1627 \fancypagestyle{hitsz@headings}{%
1628 \fancyhf{}
1629 \ifhitsz@doctor
1630 \fancyhead[CO]{\songti\xiaowu[0]\leftmark}
1631 \ifhitsz@harbin
1632 \fancyhead[CE]{\songti\xiaowu[0]\hitsz@cschoolname\hitsz@cdegree\hitsz@cthesisname}
1633 \fi
1634 \ifhitsz@shenzhen
1635 \fancyhead[CE]{\songti\xiaowu[0]%
1636 \hitsz@cschoolname\hitsz@cdegree\hitsz@cthesisname}
1637 \fi
1638 \ifhitsz@weihai
1639 \fancyhead[CE]{\songti\xiaowu[0]%
1640 \hitsz@cschoolname\hitsz@weihaicampus\hitsz@cdegree\hitsz@cthesisname}
1641 \fi
1642 \else
1643 \ifhitsz@master
1644 \ifhitsz@harbin
1645 \fancyhead[C]{\songti\xiaowu[0]%
1646 \hitsz@cschoolname\hitsz@cdegree\hitsz@cthesisname}
1647 \fi
1648 \ifhitsz@shenzhen
1649 \fancyhead[C]{\songti\xiaowu[0]%
1650 \hitsz@cschoolname\hitsz@cdegree\hitsz@cthesisname}
1651 \fi
1652 \ifhitsz@weihai
1653 \fancyhead[C]{\songti\xiaowu[0]%
1654 \hitsz@cschoolname\hitsz@weihaicampus\hitsz@cdegree\hitsz@cthesisname}
1655 \fi
1656 \fi
1657 \fi
1658 \ifhitsz@bachelor
1659 \ifhitsz@harbin
1660 \fancyhead[C]{\songti\xiaowu[0]%
1661 \hitsz@cschoolname\hitsz@bachelor@cxuewei\hitsz@bachelor@cthesisname}%
1662 \fi
1663 \ifhitsz@shenzhen
1664 \fancyhead[C]{\songti\xiaowu[0]%
1665 \hitsz@cschoolname\hitsz@bachelor@cxuewei\hitsz@bachelor@cthesisname}%
1666 \fi
1667 \ifhitsz@weihai
1668 \fancyhead[C]{\songti\xiaowu[0]%
1669 \hitsz@cschoolname\hitsz@weihaicampus\hitsz@bachelor@cxuewei\hitsz@bachelor@cthesisname}%
1670 \fi
1671 \fancyfoot[C]{\xiaowu%
1672 \if@mainmatter%
1673 \ifhitsz@bsmainpagenumberline-~\thepage~-
1674 \else\thepage
1675 \fi
1676 \else%
1677 \ifhitsz@bsfrontpagenumberline-~\thepage~-
1678 \else\thepage
1679 \fi
1680 \fi
1681 }
1682 \ifhitsz@bsheadrule
1683 \renewcommand{\headrule}{
1684 \vskip 1.190132pt
1685 \hrule\@height2.276208pt\@width\headwidth
1686 \vskip 0.75pt
1687 \hrule\@height.75pt\@width\headwidth
1688 }
1689 \else
1690 \renewcommand{\headrulewidth}{0pt}
1691 \fi
1692 \else%
1693 \fancyfoot[C]{\xiaowu-~\thepage~-}
1694 \renewcommand{\headrule}{%
1695 \vskip 1.190132pt
1696 \hrule\@height2.276208pt\@width\headwidth
1697 \vskip 0.75pt
1698 \hrule\@height.75pt\@width\headwidth
1699 }
1700 \fi
1701 % 页眉中小五汉字,0行距时,占用9bt,页眉高度为14pt,
1702 % 所以页眉中headrule四个距离之和要保持等于 14pt - 9bt = 4.96634pt
1703 \renewcommand{\footrulewidth}{0pt}
1704 }
1705 \AtBeginDocument{%此处解决页眉经典bug
1706 \pagestyle{hitsz@empty}
1707 \renewcommand{\chaptermark}[1]{\@mkboth{\CTEXthechapter\enspace#1}{}}}
1708 %</cls>
1709 % \end{macrocode}
1710 % \end{macro}
1711 % \end{macro}
1712 % \end{macro}
1713 %
1714 % \subsubsection{段落}
1715 % \label{sec:paragraph}
1716 %
1717 % 全文首行缩进 2 字符,标点符号用全角
1718 % \begin{macrocode}
1719 %<*cls>
1720 \ctexset{%
1721 punct=quanjiao,
1722 space=auto,
1723 autoindent=true}
1724 % \end{macrocode}
1725 %
1726 % 利用 \pkg{enumitem} 命令调整默认列表环境间的距离,以符合中文习惯。
1727 % \begin{macrocode}
1728 \setlist{nosep}
1729 %</cls>
1730 % \end{macrocode}
1731 %
1732 % \subsubsection{脚注}
1733 % \label{sec:footnote}
1734 %
1735 % 脚注符合中文习惯,数字带圈。
1736 % \begin{macrocode}
1737 %<*cls>
1738 \def\hitsz@textcircled#1{%
1739 \ifnum\value{#1} >9
1740 \ClassError{hitszszthesis}%
1741 {Too many footnotes in this page.}{Keep footnote less than 10.}
1742 \fi
1743 \ifhitsz@pifootnote%
1744 \ding{\the\numexpr\value{#1}+171\relax}%
1745 \else%
1746 \textcircled{\xiaoliu\arabic{#1}}%
1747 \fi}
1748 \renewcommand{\thefootnote}{\hitsz@textcircled{footnote}}
1749 \renewcommand{\thempfootnote}{\hitsz@textcircled{mpfootnote}}
1750 % \end{macrocode}
1751 %
1752 % 定义脚注分割线,字号(宋体小五),以及悬挂缩进(1.5字符)。
1753 % \begin{macrocode}
1754 \def\footnoterule{\vskip-3\p@\hrule\@width0.3\textwidth\@height0.4\p@\vskip2.6\p@}
1755 \let\hitsz@footnotesize\footnotesize
1756 \renewcommand\footnotesize{\hitsz@footnotesize\xiaowu[1.5]}
1757 \footnotemargin1.5em\relax
1758 % \end{macrocode}
1759 %
1760 % \cs{@makefnmark} 默认是上标样式,而在脚注部分要求为正文大小。利用\cs{patchcmd}
1761 % 动态调整 \cs{@makefnmark} 的定义。
1762 % \begin{macrocode}
1763 \let\hitsz@makefnmark\@makefnmark
1764 \def\hitsz@@makefnmark{\hbox{{\normalfont\@thefnmark}}}
1765 \pretocmd{\@makefntext}{\let\@makefnmark\hitsz@@makefnmark}{}{}
1766 \apptocmd{\@makefntext}{\let\@makefnmark\hitsz@makefnmark}{}{}
1767 %</cls>
1768 % \end{macrocode}
1769 %
1770 % \subsubsection{数学相关}
1771 % \label{sec:equation}
1772 %
1773 % 允许太长的公式断行、分页等。
1774 % \begin{macrocode}
1775 %<*cls>
1776 \allowdisplaybreaks[4]
1777 \predisplaypenalty=0 %公式之前可以换页,公式出现在页面顶部
1778 \postdisplaypenalty=0
1779 \renewcommand\theequation{\ifnum \c@chapter>\z@ \thechapter-\fi\@arabic\c@equation}
1780 % \end{macrocode}
1781 %
1782 % 公式距前后文的距离由 4 个参数控制,参见 \cs{normalsize} 的定义。
1783 % 同时为了让 \pkg{amsmath} 的 \cs{tag*} 命令得到正确的格式,我们必须修改这些代
1784 % 码。\cs{make@df@tag} 是定义 \cs{tag*} 和 \cs{tag} 内部命令的。
1785 % \cs{make@df@tag@@} 处理 \cs{tag*},我们就改它!
1786 % \begin{latex}
1787 % \def\make@df@tag{\@ifstar\make@df@tag@@\make@df@tag@@@}
1788 % \def\make@df@tag@@#1{%
1789 % \gdef\df@tag{\maketag@@@{#1}\def\@currentlabel{#1}}}
1790 % \end{latex}
1791 % \begin{macrocode}
1792 \def\make@df@tag{\@ifstar\hitsz@make@df@tag@@\make@df@tag@@@}
1793 \def\hitsz@make@df@tag@@#1{\gdef\df@tag{\hitsz@maketag{#1}\def\@currentlabel{#1}}}
1794 \iffalse
1795 \ifhitsz@bachelor
1796 \def\hitsz@maketag#1{\maketag@@@{%
1797 (\ignorespaces\text{\equationname\hskip0.5em}#1\unskip\@@italiccorr)}}
1798 \def\tagform@#1{\maketag@@@{%
1799 (\ignorespaces\text{\equationname\hskip0.5em}#1\unskip\@@italiccorr)\equcaption{#1}}}
1800 \fi
1801 \fi
1802 \def\hitsz@maketag#1{\maketag@@@{(\ignorespaces #1\unskip\@@italiccorr)}}
1803 \def\tagform@#1{\maketag@@@{(\ignorespaces #1\unskip\@@italiccorr)\equcaption{#1}}}
1804 % \end{macrocode}
1805 %
1806 % 修改 \cs{tagform} 会影响 \cs{eqref}。
1807 % \begin{macrocode}
1808 \renewcommand{\eqref}[1]{\textup{(\ref{#1})}}
1809 %</cls>
1810 % \end{macrocode}
1811 %
1812 % 定理标题使用黑体,正文使用宋体,冒号隔开。
1813 % \begin{macrocode}
1814 %<*cfg>
1815 \theorembodyfont{\normalfont}
1816 \theoremheaderfont{\normalfont\heiti}
1817 \theoremsymbol{\ensuremath{\square}}
1818 \newtheorem*{proof}{证明}
1819 \theoremstyle{plain}
1820 \theoremsymbol{}
1821 % \end{macrocode}
1822 %
1823 % 此处去除了冒号,如果需要在加上这个冒号。
1824 % \begin{macrocode}
1825 \theoremseparator{}
1826 \newtheorem{assumption}{假设}[chapter]
1827 \newtheorem{definition}{定义}[chapter]
1828 \newtheorem{proposition}{命题}[chapter]
1829 \newtheorem{lemma}{引理}[chapter]
1830 \newtheorem{theorem}{定理}[chapter]
1831 \newtheorem{axiom}{公理}[chapter]
1832 \newtheorem{corollary}{推论}[chapter]
1833 \newtheorem{exercise}{练习}[chapter]
1834 \newtheorem{example}{例}[chapter]
1835 \newtheorem{remark}{注释}[chapter]
1836 \newtheorem{problem}{问题}[chapter]
1837 \newtheorem{conjecture}{猜想}[chapter]
1838 %</cfg>
1839 % \end{macrocode}
1840 %
1841 % \subsubsection{浮动对象以及表格}
1842 % \label{sec:float}
1843 %
1844 % 设置浮动对象和文字之间的距离,由于规范中没有明确规定,根据经验,设置成正文汉字
1845 % 高度。
1846 % \begin{macrocode}
1847 %<*cls>
1848 \setlength{\intextsep}{\ifhitsz@glue 8.50398bp \@plus 2.83465bp \@minus 0bp\else 8.50398bp\fi}
1849 \setlength{\textfloatsep}{\ifhitsz@glue 8.50398bp \@plus 2.83465bp \@minus 0bp\else 8.50398bp\fi}
1850 \setlength{\floatsep}{\ifhitsz@glue 12bp \@plus 2.83465bp \@minus 0bp\else 12bp\fi}
1851 % \end{macrocode}
1852 %
1853 % 此处设置float在p选项时间隔,此处不设置\cs{@fptop}和\cs{@fpbot}以确保居中。
1854 % 下面这组命令使浮动对象的缺省值稍微宽松一点,从而防止幅度对象占据过多的文本页面,
1855 % 也可以防止在很大空白的浮动页上放置很小的图形。
1856 % \begin{macrocode}
1857 \g@addto@macro\appendix{\renewcommand*{\thefigure}{\thechapter-\arabic{figure}}}
1858 \g@addto@macro\appendix{\renewcommand*{\thetable}{\thechapter-\arabic{table}}}
1859 \g@addto@macro\appendix{\renewcommand*{\theequation}{\thechapter-\arabic{equation}}}
1860 \renewcommand{\textfraction}{0.15}
1861 \renewcommand{\topfraction}{0.85}
1862 \renewcommand{\bottomfraction}{0.65}
1863 \renewcommand{\floatpagefraction}{0.60}
1864 % \end{macrocode}
1865 %
1866 % 由于窝工的双标题,导致标题之下多出一空白字符的距离,去除。
1867 % \begin{macro}{\@makecaption}
1868 % 根据窝工规范,本科和硕博的图题序号之后的空格不一样。
1869 % \begin{hitszrgu}[\PGR][2.13.1]
1870 % 每个图均应有图题(由图序和图名组成),图题不宜有标点符号,图名在图序之后空1个
1871 % 半角字符排写。
1872 % \end{hitszrgu}
1873 % \begin{hitszrgu}[\UGR][2.13.1]
1874 % 每个图均应有图题(由图序和图名组成),图题不宜有标点符号,图名在图序之后空1个
1875 % 字符排写。
1876 % \end{hitszrgu}
1877 % 窝工规范中没有明确规定是否标题是否居中对齐,这里给出一个居中选项自行调整。
1878 % 注意,窝工只规定:“居中书写”。此处不额外添加悬挂处理。
1879 % \begin{macrocode}
1880 \long\def\@makecaption#1#2{%
1881 \vskip\abovecaptionskip
1882 \ifhitsz@boldcaption\songti\bfseries\fi
1883 \wuhao\sbox\@tempboxa{#1\ifhitsz@bachelor\hskip\ccwd\else\enskip\fi#2}%
1884 \ifdim \wd\@tempboxa >\hsize
1885 \ifhitsz@capcenterlast%
1886 \vskip 6.3bp%
1887 {\setbox0=\vbox{#1\ifhitsz@bachelor\hskip\ccwd\else\enskip\fi#2}
1888 \setbox1=\vbox{%
1889 \unvbox0
1890 \setbox2=\lastbox
1891 \hbox to \textwidth{\hfill\unhcopy2 \unskip\unskip\hfill}
1892 }
1893 \unvbox1}
1894 \else%
1895 #1\ifhitsz@bachelor\hskip\ccwd\else\enskip\fi#2%
1896 \fi%
1897 \par
1898 \else
1899 \global \@minipagefalse
1900 \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
1901 \fi
1902 \vskip\belowcaptionskip}
1903 % \end{macrocode}
1904 % \end{macro}
1905 %
1906 % \begin{macro}{\longbionenumcaption}
1907 % 长表格的双语标题是一个坑. 因为第一不能用浮动格式,只能用longtable包中的tabular
1908 % ,这样表题只能使用表格中前两行来写。这样出现了一个问题是,中英表题的间距,标题
1909 % 和表第一行间距,表格内部间距等多个变量的协调问题。这个问题只要使用tabular的形
1910 % 式,就是无解的。唯一的方法就是把这些参数都给用户列出来。以下,第2,5参数为中英
1911 % 双语标题内容,1,4为标题参数。6为中英标题间距,7为表题和表格间距。
1912 % \begin{macrocode}
1913 \renewcommand*{\longbionenumcaption}[7]{%
1914 \@if@contemptyarg{#1}{\caption{#2}}{\caption[#1]{#2}}%
1915 \global\let\@cont@oldtablename\tablename
1916 \gdef\tablename{#3}
1917 \global\let\LT@c@ption\@cont@LT@nonumintoc
1918 \\[#6]
1919 \@if@contemptyarg{#4}{\caption{#5}}{\caption[#4]{#5}}%
1920 \global\let\tablename\@cont@oldtablename
1921 \global\let\LT@c@ption\@cont@oldLT@c@ption
1922 \vspace{#7}}
1923 % \end{macrocode}
1924 % \end{macro}
1925 %
1926 % \begin{macro}{\ltfontsize}
1927 % 我们采用 \pkg{longtable} 来处理跨页的表格。同样我们需要设置其默认字体为五号,
1928 % 行距设置为1.3倍行距。此处还需要提供一个设置长表格内部字体的命令。
1929 % \begin{macrocode}
1930 \let\hitsz@LT@array\LT@array
1931 \def\LT@array{\wuhao\hitsz@LT@array} % set default font size
1932 \newcommand{\ltfontsize}[1]{\def\LT@array{#1\hitsz@LT@array}}
1933 % \end{macrocode}
1934 % \end{macro}
1935 %
1936 % 图表名称及格式。
1937 % \changes{v3.2.1}{2021/11/15}{change `thesubfigure' with both brackets}
1938 % \begin{macrocode}
1939 \renewcommand{\thesubtable}{(\alph{subtable})}
1940 \renewcommand{\thefigure}{\arabic{chapter}-\arabic{figure}}%使图编号为 7-1 的格式 %\protect{~}
1941 \renewcommand{\thesubfigure}{(\alph{subfigure})}%使子图编号为 a)的格式
1942 \renewcommand{\p@subfigure}{\thefigure~} %使子图引用为 7-1 a) 的格式,母图编号和子图编号之间用~加一个空格
1943 \renewcommand{\thetable}{\arabic{chapter}-\arabic{table}}%使表编号为 7-1 的格式
1944 % \end{macrocode}
1945 %
1946 % \begin{macro}{\figref}
1947 % \begin{macro}{\tabref}
1948 % \begin{macro}{\equref}
1949 % 图表的引用格式
1950 % \begin{macrocode}
1951 \newcommand\figref[1]{图\ref{#1}}
1952 \newcommand\tabref[1]{表\ref{#1}}
1953 \newcommand\equref[1]{式(\ref{#1})}
1954 % \end{macrocode}
1955 % \end{macro}
1956 % \end{macro}
1957 % \end{macro}
1958 %
1959 % 调整罗列环境、浮动格式、间距。
1960 % \begin{macrocode}
1961 \setitemize{leftmargin=0em,itemsep=0em,partopsep=0em,parsep=0em,topsep=0em,itemindent=3em}
1962 \setenumerate{leftmargin=0em,itemsep=0em,partopsep=0em,parsep=0em,topsep=0em,itemindent=3.5em}
1963 \newcommand{\citeup}[1]{\textsuperscript{\cite{#1}}}
1964 % \end{macrocode}
1965 %
1966 % 此处删除hang caption的设置
1967 % \begin{macrocode}
1968 \captionnamefont{\wuhao}
1969 \captiontitlefont{\wuhao}
1970 \renewcommand{\subcapsize}{\wuhao}
1971 \setlength{\abovecaptionskip}{0pt}%为了双标题之间的间距,不能设置
1972 \setlength{\belowcaptionskip}{0pt}
1973 % 自定义项目列表标签及格式 \begin{publist} 列表项 \end{publist}
1974 \newcounter{pubctr} %自定义新计数器
1975 \newenvironment{publist}{%%%%%定义新环境
1976 \begin{list}{[\arabic{pubctr}]} %%标签格式
1977 {
1978 \usecounter{pubctr}
1979 \setlength{\leftmargin}{2.2em} % 左边界 \leftmargin =\itemindent + \labelwidth + \labelsep
1980 \setlength{\itemindent}{0em} % 标号缩进量
1981 \setlength{\labelsep}{0.5em} % 标号和列表项之间的距离,默认0.5em
1982 \setlength{\rightmargin}{0em} % 右边界
1983 \setlength{\topsep}{0ex} % 列表到上下文的垂直距离
1984 \setlength{\parsep}{0ex} % 段落间距
1985 \setlength{\itemsep}{0ex} % 标签间距
1986 \setlength{\listparindent}{0pt} % 段落缩进量
1987 }}
1988 {\end{list}}
1989 % \end{macrocode}
1990 %
1991 % 设置定理定义格式
1992 % \begin{macrocode}
1993 \renewtheoremstyle{plain}
1994 {\item[\hskip\labelsep \theorem@headerfont ##1\ ##2\theorem@separator]}
1995 {\item[\hskip\labelsep \theorem@headerfont ##1\ ##2\ ##3\theorem@separator]}
1996 \theorembodyfont{\songti\rmfamily}
1997 \theoremheaderfont{\heiti\rmfamily}
1998 \theoremsymbol{$\square$}
1999 \setlength{\theorempreskipamount}{0pt}
2000 \setlength{\theorempostskipamount}{-2pt}
2001 \setlength{\parindent}{2em}
2002 \arraycolsep=1.6pt
2003 %</cls>
2004 % \end{macrocode}
2005 %
2006 % \subsubsection{章节标题}
2007 % \label{sec:theor}
2008 %
2009 % \begin{macrocode}
2010 %<*cfg>
2011 \ctexset{%
2012 chapter/name={第,章},
2013 appendixname=附录,
2014 contentsname={目\hspace{\ccwd}录},
2015 listfigurename=插图索引,
2016 listtablename=表格索引,
2017 figurename=图,
2018 tablename=表,
2019 bibname=参考文献,
2020 indexname=索引,
2021 }
2022 \newcommand\listfigureename{Index of figure}
2023 \newcommand\listtableename{Index of table}
2024 \newcommand\listequationename{Index of equation}
2025 \newcommand\listequationname{公式索引}
2026 \newcommand\equationname{公式}
2027 \newcommand{\cabstractcname}{摘\hspace{\ccwd}要}
2028 \newcommand{\cabstractename}{Abstract (In Chinese)}
2029 % \end{macrocode}
2030 %
2031 % 此处删除冗余选项
2032 % \begin{macrocode}
2033 \newcommand{\eabstractcname}{Abstract}
2034 \newcommand{\eabstractename}{Abstract (In English)}
2035 \newcommand{\hitsz@ckeywords@title}{关键词:}
2036 \def\hitsz@ckeywords@separator{;}
2037 \def\hitsz@ekeywords@separator{,}
2038 \let\CJK@todaysave=\today
2039 \def\CJK@todaysmall@short{\the\year 年 \the\month 月}
2040 \def\CJK@todaysmall{\the\year 年 \the\month 月 \the\day 日}
2041 \def\CJK@todaybig@short{\zhdigits{\the\year}年\zhnumber{\the\month}月}
2042 \def\CJK@todaybig{\zhdigits{\the\year}年\zhnumber{\the\month}月\zhnumber{\the\day}日}
2043 \def\CJK@today{\CJK@todaysmall}
2044 \renewcommand\today{\CJK@today}
2045 \newcommand\CJKtoday[1][1]{%
2046 \ifcase#1\def\CJK@today{\CJK@todaysave}
2047 \or\def\CJK@today{\CJK@todaysmall}
2048 \or\def\CJK@today{\CJK@todaybig}
2049 \fi}
2050 % \end{macrocode}
2051 %
2052 % 按照word示范要求,此处使用阿拉伯数字
2053 % \begin{macrocode}
2054 \cdate{\ifhitsz@bachelor\CJK@todaysmall@short\else\CJK@todaysmall@short\fi}
2055 \edate{\ifcase \month \or January\or February\or March\or April\or May%
2056 \or June\or July \or August\or September\or October\or November
2057 \or December\fi\unskip,\ \ \the\year}
2058 %</cfg>
2059 % \end{macrocode}
2060 %
2061 % 按照窝工要求,页面中标题之下不少于一行。
2062 % \begin{macrocode}
2063 %<*cls>
2064 \def\hitsz@title@font{%
2065 \ifhitsz@arialtitle\sffamily\else\heiti\fi}
2066
2067 \newcommand\hitsz@chapter@titleformat[1]{%开启悬挂缩进选项
2068 \ifthenelse%
2069 {\equal{#1}{\eabstractcname}}%
2070 {\bfseries #1}%
2071 %实现章标题的居中加悬挂缩进,注意,此处一定是\CTEX@chaptername\CTEX@chapter@aftername, 否则是英文标题长度
2072 {\ifhitsz@chapterhang%
2073 \settowidth{\hangindent}{\CTEX@chaptername\CTEX@chapter@aftername}\hangafter=1
2074 \fi#1}%
2075 %{\begin{varwidth}[t]{\hitsz@chapter@indentboxwidth}#1\end{varwidth}}
2076 }
2077
2078 \renewcommand\@afterheading{%
2079 \@nobreaktrue
2080 \everypar{%
2081 \if@nobreak
2082 \@nobreakfalse
2083 \clubpenalty 1
2084 \if@afterindent \else
2085 {\setbox\z@\lastbox}%
2086 \fi
2087 \else
2088 \clubpenalty 1
2089 \everypar{}%
2090 \fi}}
2091 % \end{macrocode}
2092 %
2093 % 设置一到四级标题、目录、书签格式。
2094 % \begin{macrocode}
2095 \ctexset{%
2096 chapter={
2097 afterindent=true,
2098 pagestyle={hitsz@headings},
2099 beforeskip={18.74658bp},%一个空行 1.57481 × 18
2100 afterskip={24.74658bp},%0.8应该不计算间距 0.8 × 18 + 0.57481×18
2101 aftername=\enspace,
2102 format={\centering\hitsz@title@font\xiaoer[1.57481]},%\center 会影响之后全局
2103 nameformat=\relax,
2104 numberformat=\relax,
2105 titleformat=\hitsz@chapter@titleformat,
2106 fixskip=true, % 添加这一行去除默认间距
2107 %hang=true,
2108 },
2109 section={
2110 afterindent=true,
2111 beforeskip={\ifhitsz@glue
2112 13.5bp \@plus 1.677267bp \@minus 1.157391bp
2113 \else
2114 \ifhitsz@bachelor 20.25bp \else 20.25bp
2115 \fi
2116 \fi}, % 原为13.5bp
2117 afterskip={\ifhitsz@glue
2118 13.5bp \@plus 1.677267bp \@minus 1.157391bp
2119 \else
2120 \ifhitsz@bachelor 20.25bp \else 20.25bp
2121 \fi
2122 \fi},
2123 format={\hitsz@title@font
2124 \ifhitsz@glue
2125 \fontsize{15bp}{21bp \@plus 1.677267bp \@minus 1.157391bp}
2126 \else
2127 \fontsize{15bp}{21bp}
2128 \fi
2129 \selectfont},
2130 aftername=\enspace,
2131 fixskip=true,
2132 break={},
2133 },
2134 subsection={
2135 afterindent=true,
2136 beforeskip={\ifhitsz@glue 11bp \@plus 1.842609bp \@minus 0.9920497bp
2137 \else
2138 \ifhitsz@bachelor 16.5bp
2139 \else 16.5bp
2140 \fi
2141 \fi}, % 原为11bp
2142 afterskip={ \ifhitsz@glue 11bp \@plus 2.33863bp \@minus 0.49602bp
2143 \else
2144 \ifhitsz@bachelor 16.5bp
2145 \else 16.5bp
2146 \fi
2147 \fi},
2148 format={\hitsz@title@font
2149 \ifhitsz@glue
2150 \fontsize{14bp}{18bp \@plus 1.842609bp \@minus 0.9920497bp}
2151 \else
2152 \fontsize{14bp}{18bp}
2153 \fi\selectfont},
2154 aftername=\enspace,
2155 fixskip=true,
2156 break={},
2157 },
2158 subsubsection={
2159 afterindent=true,
2160 beforeskip={\ifhitsz@glue 8.50398bp \@plus 2.83465bp \@minus 0bp
2161 \else
2162 \ifhitsz@bachelor 13.5bp
2163 \else 13.5bp
2164 \fi
2165 \fi}, % 原为9bp
2166 afterskip={ \ifhitsz@glue 8.50398bp \@plus 2.83465bp \@minus 0bp
2167 \else
2168 \ifhitsz@bachelor 13.5bp
2169 \else 13.5bp
2170 \fi
2171 \fi},
2172 format={\hitsz@title@font\normalsize},
2173 aftername=\enspace,
2174 fixskip=true,
2175 break={},
2176 },
2177 paragraph/afterindent=true,
2178 subparagraph/afterindent=true
2179 }
2180 % \end{macrocode}
2181 %
2182 % 设置附表、附录格式。
2183 % \begin{macrocode}
2184 \NewDocumentCommand{\hitsz@appendix@chapter}{s m o}{%
2185 \IfBooleanT{#1}%
2186 {
2187 \phantomsection
2188 \markboth{#2}{#2}
2189 \ifthenelse%
2190 {\equal{#2}{\eabstractcname}}%
2191 {\addcontentsline{toc}{chapter}{%
2192 \texorpdfstring{\ifhitsz@arialtitle\sffamily\heiti%
2193 \else\heiti
2194 \fi
2195 \ifhitsz@absupper\MakeUppercase{#2}%
2196 \else#2
2197 \fi}{#2}}}
2198 {\addcontentsline{toc}{chapter}{%
2199 \texorpdfstring{\ifhitsz@arialtitle\sffamily\heiti\else\heiti\fi #2}{#2}}}
2200 \IfValueT{#3}{\addcontentsline{toe}{chapter}{\texorpdfstring{\bfseries #3}{#3}}}
2201 \hitsz@chapter*{#2}
2202 }
2203 }
2204 % 该附录命令适用于发表文章,简历等
2205 \newcommand{\BiAppChapter}[2] % 该附录命令适用于有章节的完整附录
2206 {\phantomsection
2207 \chapter{#1}
2208 % \end{macrocode}
2209 %
2210 % 此处添加保护选项
2211 % \begin{macrocode}
2212 \addcontentsline{toe}{chapter}{%
2213 \texorpdfstring{\bfseries \xiaosi Appendix \thechapter~~#2}{Appendix \thechapter~~#2}}
2214 }
2215 % \end{macrocode}
2216 %
2217 % 设置章节命令。s: 星号,表示在目录中出不出现序号。m: 必须要有的选项,中文章
2218 % 节名称也即目录中名称,页眉中名称,书签中的名称。o: 可选内容,没有就默认是正
2219 % 文章节,如果有,则是英文目录中显示的内容。
2220 % \begin{macro}{\chapter}
2221 % \begin{macro}{\section}
2222 % \begin{macro}{\subsection}
2223 % \begin{macro}{\subsubsection}
2224 % \begin{macrocode}
2225 \let\hitsz@chapter\chapter
2226 \RenewDocumentCommand{\chapter}{s o m o}{%
2227 \ifhitsz@openright\cleardoublepage\else\clearpage\fi\phantomsection%
2228 \IfBooleanTF{#1}%
2229 {% if \chapter*
2230 \hitsz@chapter*{#3}%
2231 \IfValueT{#4}{%
2232 % \end{macrocode}
2233 %
2234 % 此处添加保护选项
2235 % \begin{macrocode}
2236 \addcontentsline{toe}{chapter}{\texorpdfstring{\bfseries #4}{#4}}
2237 }
2238 }%
2239 {% if \chapter
2240 \IfNoValueTF{#2}%
2241 {\hitsz@chapter{#3}}%
2242 {\hitsz@chapter[#2]{#3}}%
2243 \IfValueT{#4}{%
2244 % \end{macrocode}
2245 %
2246 % 此处需删除章节的空白
2247 % \begin{macrocode}
2248 \addcontentsline{toe}{chapter}{%
2249 \texorpdfstring{\bfseries\relax Chapter \thechapter\hspace{0.5em}\ignorespaces #4}{%
2250 Chapter \thechapter\hspace{0.5em}\ignorespaces #4}}
2251 }
2252 }
2253 }
2254
2255 \let\hitsz@section\section
2256 \RenewDocumentCommand\section{s o m o}{
2257 \IfBooleanTF{#1}%
2258 {% if \section*
2259 \hitsz@section*{#3}%
2260 \IfValueT{#4}{%
2261 \addcontentsline{toe}{section}{#4}
2262 }
2263 }%
2264 {% if \section
2265 \IfNoValueTF{#2}%
2266 {\hitsz@section{#3}}%
2267 {\hitsz@section[#2]{#3}}%
2268 \IfValueT{#4}{%
2269 % \end{macrocode}
2270 %
2271 % 此处需删除章节的空白
2272 % \begin{macrocode}
2273 \addcontentsline{toe}{section}{%
2274 \protect\numberline{\csname thesection\endcsname}\ignorespaces #4}
2275 }
2276 }
2277 }
2278
2279 \let\hitsz@subsection\subsection
2280 \RenewDocumentCommand\subsection{s o m o}{
2281 \IfBooleanTF{#1}%
2282 {% if \subsection*
2283 \hitsz@subsection*{#3}%
2284 \IfValueT{#4}{%
2285 \addcontentsline{toe}{subsection}{#4}
2286 }
2287 }%
2288 {% if \subsection
2289 \IfNoValueTF{#2}%
2290 {\hitsz@subsection{#3}}%
2291 {\hitsz@subsection[#2]{#3}}%
2292 \IfValueT{#4}{%
2293 % \end{macrocode}
2294 %
2295 % 此处需删除章节的空白
2296 % \begin{macrocode}
2297 \addcontentsline{toe}{subsection}{%
2298 \protect\numberline{\csname thesubsection\endcsname}\ignorespaces #4}
2299 }
2300 }
2301 }
2302
2303 \let\hitsz@subsubsection\subsubsection
2304 \RenewDocumentCommand\subsubsection{s o m o}{
2305 \IfBooleanTF{#1}%
2306 {% if \subsubsection*
2307 \hitsz@subsubsection*{#3}%
2308 \IfValueT{#4}{%
2309 \addcontentsline{toe}{subsubsection}{#4}
2310 }
2311 }%
2312 {% if \subsubsection
2313 \IfNoValueTF{#2}%
2314 {\hitsz@subsubsection{#3}}%
2315 {\hitsz@subsubsection[#2]{#3}}%
2316 \IfValueT{#4}{%
2317 % \end{macrocode}
2318 %
2319 % 此处需删除章节的空白
2320 % \begin{macrocode}
2321 \addcontentsline{toe}{subsubsection}{%
2322 \protect\numberline{\csname thesubsubsection\endcsname}\ignorespaces #4}
2323 }
2324 }
2325 }
2326 % \end{macrocode}
2327 % \end{macro}
2328 % \end{macro}
2329 % \end{macro}
2330 % \end{macro}
2331 %
2332 % \subsubsection{定义封面}
2333 % \label{sec:cov}
2334 %
2335 % 封面信息。
2336 % \changes{v3.2.1}{2021/11/15}{add key `cpostgraduatetype'}
2337 % \begin{macrocode}
2338 \def\hitsz@def@term#1{%
2339 \define@key{hitsz}{#1}{\csname #1\endcsname{##1}}
2340 \expandafter\gdef\csname #1\endcsname##1{%
2341 \expandafter\gdef\csname hitsz@#1\endcsname{##1}}
2342 \csname #1\endcsname{}}
2343
2344 \hitsz@def@term{statesecrets} %密级
2345 \hitsz@def@term{natclassifiedindex} %国内图书分类号
2346 \hitsz@def@term{intclassifiedindex} %国际图书分类号
2347
2348 \hitsz@def@term{ctitlecover} % 中文标题封面
2349 \hitsz@def@term{ctitle} % 中文标题
2350 \hitsz@def@term{csubtitle} % 中文副标题
2351 \hitsz@def@term{cxueke} % 中文学科
2352 \hitsz@def@term{cpostgraduatetype} % 中文学位类型:学术,专业
2353 \hitsz@def@term{cauthor} % 中文作者
2354 \hitsz@def@term{csupervisor} % 中文导师
2355 \hitsz@def@term{cassosupervisor} % 中文副导师
2356 \hitsz@def@term{ccosupervisor} % 中文联合导师
2357 \hitsz@def@term{caffil} % 中文院系
2358 \hitsz@def@term{csubject} % 中文专业
2359 \hitsz@def@term{cdate} % 封面日期指定
2360 \hitsz@def@term{cdatesecond} % 第二页日期指定
2361
2362 \hitsz@def@term{cstudentid}%
2363 \hitsz@def@term{cstudenttype}%
2364 \hitsz@def@term{ctitleone}%
2365 \hitsz@def@term{ctitletwo}%
2366
2367
2368 \hitsz@def@term{etitle} %英文标题
2369 \hitsz@def@term{esubtitle} %英文标题
2370 \hitsz@def@term{exueke} %英文学科
2371 \hitsz@def@term{eauthor} %英文作者
2372 \hitsz@def@term{esupervisor} %英文导师
2373 \hitsz@def@term{eassosupervisor} %英文副导师
2374 \hitsz@def@term{ecosupervisor} %英文联合导师
2375 \hitsz@def@term{eaffil}
2376 \hitsz@def@term{esubject}
2377 \hitsz@def@term{edate}
2378 \hitsz@def@term{estudenttype}
2379 \newcommand{\hitsz@@cabstract}[1]{\long\gdef\hitsz@cabstract{#1}}
2380 \newenvironment{cabstract}{\Collect@Body\hitsz@@cabstract}{}
2381 \newcommand{\hitsz@@eabstract}[1]{\long\gdef\hitsz@eabstract{#1}}
2382 \newenvironment{eabstract}{\Collect@Body\hitsz@@eabstract}{}
2383 \def\hitsz@parse@keywords#1{
2384 \define@key{hitsz}{#1}{\csname #1\endcsname{##1}}
2385 \expandafter\gdef\csname hitsz@#1\endcsname{}
2386 \expandafter\gdef\csname #1\endcsname##1{
2387 \@for\reserved@a:=##1\do{
2388 \expandafter\ifx\csname hitsz@#1\endcsname\@empty\else
2389 \expandafter\g@addto@macro\csname hitsz@#1\endcsname{%
2390 \ignorespaces\csname hitsz@#1@separator\endcsname}
2391 \fi
2392 \expandafter\expandafter\expandafter\g@addto@macro%
2393 \expandafter\csname hitsz@#1\expandafter\endcsname\expandafter{\reserved@a}}}}
2394 \hitsz@parse@keywords{ckeywords}
2395 \hitsz@parse@keywords{ekeywords}
2396 \def\hitszsetup{\kvsetkeys{hitsz}}
2397 %</cls>
2398 % \end{macrocode}
2399 %
2400 % 定义封面中用到的词汇。
2401 % \begin{macrocode}
2402 %<*cfg>
2403 \ifhitsz@doctor
2404 \gdef\hitsz@cxueweishort{博}
2405 \gdef\hitsz@exuewei{Doctor}
2406 \gdef\hitsz@exueweier{Doctoral}
2407 \gdef\hitsz@cxuewei{\hitsz@cxueweishort 士}
2408 \gdef\hitsz@cdegree{\hitsz@cxueke\hitsz@cxuewei}
2409 \gdef\hitsz@edegree{\hitsz@exuewei \ of \hitsz@exueke}
2410 \def\hitsz@cauthortitle{\hitsz@cxueweishort 士研究生}
2411 \fi
2412 \ifhitsz@master
2413 \gdef\hitsz@cxueweishort{硕}
2414 \gdef\hitsz@exuewei{Master}
2415 \gdef\hitsz@exueweier{Master's}
2416 \gdef\hitsz@cxuewei{\hitsz@cxueweishort 士}
2417 \gdef\hitsz@cdegree{\hitsz@cxueke\hitsz@cxuewei}
2418 \gdef\hitsz@edegree{\hitsz@exuewei \ of \hitsz@exueke}
2419 \def\hitsz@cauthortitle{\hitsz@cxueweishort 士研究生}
2420 \fi
2421 \ifhitsz@bachelor
2422 \gdef\hitsz@cxuewei{学士}
2423 \fi
2424 \def\hitsz@bachelor@cxuewei{本科}
2425 \def\hitsz@bachelor@cthesisname{毕业设计(论文)}
2426 \def\hitsz@bachelor@caffiltitle{院(系)}
2427 %</cfg>
2428 % \end{macrocode}
2429 %
2430 % 此处添加深圳校区设置
2431 % \begin{macrocode}
2432 %<*cfg>
2433 \def\hitsz@bachelor@caffiltitlesz{学院}
2434 \def\hitsz@bachelor@caffiltitlewh{学院}
2435 \def\hitsz@bachelor@cstudentidtitle{学号}
2436 \def\hitsz@bachelor@cmajortitle{专业}
2437 \def\hitsz@bachelor@csupervisortitle{指导教师}
2438 \def\hitsz@bachelor@cthesistitle{题目}
2439 \def\hitsz@bachelor@cstudenttitle{学生}
2440 \def\hitsz@cthesisname{学位论文}
2441 \def\hitsz@cschoolname{哈尔滨工业大学}
2442 %</cfg>
2443 % \end{macrocode}
2444 %
2445 % 此处添加深圳校区设置
2446 % \changes{v3.2.1}{2021/11/14}{Change 'Defence' to 'Defense'}
2447 % \changes{v3.2.1}{2021/11/14}{Change '发表的论文及其他成果' to '取得创新性成果'}
2448 % \begin{macrocode}
2449 %<*cfg>
2450 \def\hitsz@shenzhencampus{(深圳)}
2451 \def\hitsz@weihaicampus{(威海)}
2452 \def\hitsz@cschoolnametitle{授予学位单位}
2453 \def\hitsz@cdatetitle{答辩日期}
2454 \def\hitsz@caffiltitle{所在单位}
2455 \def\hitsz@csubjecttitle{学科}
2456 \def\hitsz@cdegreetitle{申请学位}
2457 \def\hitsz@csupervisortitle{导师}
2458 \def\hitsz@cassosupervisortitle{副导师}
2459 \def\hitsz@ccosupervisortitle{联合导师}
2460 \def\hitsz@title@csep{:}
2461 \def\hitsz@eauthortitle{Candidate}
2462 \def\hitsz@esupervisortitle{Supervisor}
2463 \def\hitsz@eassosupervisortitle{Associate Supervisor}
2464 \def\hitsz@ecosupervisortitle{Co Supervisor}
2465 \def\hitsz@edegreetitle{Academic Degree Applied for}
2466 \def\hitsz@esubjecttitle{Specialty}
2467 \def\hitsz@eaffiltitle{Affiliation}
2468 \def\hitsz@edatetitle{Date of Defense}
2469 \def\hitsz@eschoolnametitle{Degree-Conferring-Institution}
2470 \def\hitsz@eschoolname{Harbin Institute of Technology}
2471 \def\hitsz@title@esep{:}
2472 \def\hitsz@natclassifiedindextitle{国内图书分类号}
2473 \def\hitsz@internatclassifiedindextitle{国际图书分类号}
2474 \def\hitsz@secretlevel{密级}
2475 \def\hitsz@schoolidtitle{学校代码}
2476 \def\hitsz@schoolid{10213}
2477 \def\hitsz@conclusion@ctitle{结\hspace{\ccwd}论}
2478 \def\hitsz@conclusion@etitle{Conclusions}
2479 \def\hitsz@bibname@etitle{References}
2480 \def\hitsz@acknowledgement@ctitle{致\hspace{\ccwd}谢}
2481 \def\hitsz@acknowledgement@etitle{Acknowledgements}
2482 \def\hitsz@resume@ctitle{个人简历}
2483 \def\hitsz@resume@etitle{Resume}
2484 \def\hitsz@authorization@ctitle{哈尔滨工业大学学位论文原创性声明和使用权限}
2485 \def\hitsz@authorization@etitle{Statement of copyright and Letter of authorization}
2486 \newcommand{\hitsz@authorsig}{作者签名:}
2487 \newcommand{\hitsz@teachersig}{导师签名:}
2488 \newcommand{\hitsz@frontdate}{日期:}
2489 \newcommand{\hitsz@denotation@ctitle}{物理量名称及符号表}
2490 \newcommand{\hitsz@denotation@etitle}{List of physical quantity and symbol}
2491 \newcommand{\hitsz@authorizationtitle}{学位论文使用权限}
2492 \newcommand{\hitsz@authorizationtext}{%
2493 学位论文是研究生在哈尔滨工业大学攻读学位期间完成的成果,知识产权归属哈尔滨工业大学。学位论文的使用权限如下:
2494
2495 (1)学校可以采用影印、缩印或其他复制手段保存研究生上交的学位论文,并向国家图书馆报送学位论文;(2)学校可以将学位论文部分或全部内容编入有关数据库进行检索和提供相应阅览服务;(3)研究生毕业后发表与此学位论文研究成果相关的学术论文和其他成果时,应征得导师同意,且第一署名单位为哈尔滨工业大学。
2496
2497 保密论文在保密期内遵守有关保密规定,解密后适用于此使用权限规定。
2498
2499 本人知悉学位论文的使用权限,并将遵守有关规定。}
2500 \newcommand{\hitsz@declarename@bachelor}{%
2501 \ifhitsz@harbin%
2502 哈尔滨工业大学本科毕业设计(论文)原创性声明
2503 \else%
2504 \ifhitsz@shenzhen%
2505 哈尔滨工业大学本科毕业设计(论文)原创性声明
2506 \else%
2507 \ifhitsz@weihai%
2508 哈尔滨工业大学(威海)本科毕业设计(论文)原创性声明
2509 \fi%
2510 \fi%
2511 \fi%
2512 }
2513 \newcommand{\hitsz@authorizationtext@bachelor}{%
2514 本人郑重声明:在哈尔滨工业大学攻读学士学位期间,所提交的毕业设计(论文)《\hitsz@ctitle》,是本人在导师指导下独立进行研究工作所取得的成果。对本文的研究工作做出重要贡献的个人和集体,均已在文中以明确方式注明,其它未注明部分不包含他人已发表或撰写过的研究成果,不存在购买、由他人代写、剽窃和伪造数据等作假行为。
2515
2516 本人愿为此声明承担法律责任。}
2517 \newcommand{\hitsz@authorizationtext@bachelor@shenzhen}{%
2518 本人郑重声明:在哈尔滨工业大学(深圳)攻读学士学位期间,所提交的毕业设计(论文)《\hitsz@ctitle》,是本人在导师指导下独立进行研究工作所取得的成果。对本文的研究工作做出重要贡献的个人和集体,均已在文中以明确方式注明,其它未注明部分不包含他人已发表或撰写过的研究成果,不存在购买、由他人代写、剽窃和伪造数据等作假行为。
2519
2520 本人愿为此声明承担法律责任。}
2521 \newcommand{\hitsz@authorizationtext@bachelor@weihai}{%
2522 本人郑重声明:在哈尔滨工业大学(威海)攻读学士学位期间,所提交的毕业设计(论文)《\hitsz@ctitle》,是本人在导师指导下独立进行研究工作所取得的成果。对本文的研究工作做出重要贡献的个人和集体,均已在文中以明确方式注明,其它未注明部分不包含他人已发表或撰写过的研究成果,不存在购买、由他人代写、剽窃和伪造数据等作假行为。
2523
2524 本人愿为此声明承担法律责任。}
2525 \newcommand{\hitsz@declarename}{学位论文原创性声明}
2526 \newcommand{\hitsz@declaretext}{%
2527 本人郑重声明:此处所提交的学位论文《\hitsz@ctitle》,是本人在导师指导下,在哈尔滨工业大学攻读学位期间独立进行研究工作所取得的成果,且学位论文中除已标注引用文献的部分外不包含他人完成或已发表的研究成果。对本学位论文的研究工作做出重要贡献的个人和集体,均已在文中以明确方式注明。}
2528 \newcommand{\hitsz@datefill}{\hspace{2.5em}年\hspace{1.5em}月\hspace{1.5em}日}
2529 \newcommand{\hitsz@publication@ctitle}{攻读\hitsz@cxuewei 学位期间取得创新性成果}
2530 \newcommand{\hitsz@publication@etitle}{Papers published in the period of Ph.D. education}
2531 \def\hitsz@index@etitle{Index}
2532 \def\hitsz@dummyrow{哈深hitszthesis}
2533 \def\hitsz@cbraceleft{(}
2534 \def\hitsz@cbraceright{)}
2535 \def\hitsz@ebraceleft{(}
2536 \def\hitsz@ebraceright{)}
2537 %</cfg>
2538 % \end{macrocode}
2539 %
2540 % 中英文封面。
2541 % \changes{v3.0.3}{2020/03/12}{Change titlepage description of master dissertation}
2542 % \changes{v3.0.4}{2020/03/13}{Change second bachelor titilepage from heiti to songti}
2543 % \begin{macrocode}
2544 %<*cls>
2545 \newlength{\hitsz@title@width}
2546 \newcommand{\hitsz@put@title}[2][\hitsz@title@width]{%
2547 \begin{CJKfilltwosides}[b]{#1}#2\end{CJKfilltwosides}}
2548
2549 \def\hitsz@first@titlepage{%
2550 \ifhitsz@bachelor\hitsz@first@titlepage@bachelor\else\hitsz@first@titlepage@other\fi}
2551 \def\hitsz@second@titlepage{%
2552 \ifhitsz@bachelor\hitsz@second@titlepage@bachelor\else\hitsz@second@titlepage@other\fi}
2553
2554 \newcommand{\hitsz@first@titlepage@bachelor}{
2555 \ifthenelse%
2556 {\equal{\hitsz@fontset}{siyuan}}%
2557 {\xiaosi[1]\vspace*{0.65em}}%
2558 {\xiaosi[1]\textcolor[rgb]{1,1,1}{\songti{\hitsz@dummyrow}}}%
2559 \begin{center}
2560 \ifhitsz@covertitletworow
2561 \vspace*{0.7cm}
2562 \parbox[t][1.4cm][t]{\textwidth}{%
2563 \begin{center}
2564 \erhao[0]\heiti\hitsz@ctitleone
2565 \end{center}
2566 }\par
2567 \parbox[t][3cm][t]{\textwidth}{%
2568 \begin{center}
2569 \erhao[0]\heiti\hitsz@ctitletwo
2570 \end{center}
2571 }\par
2572 \else
2573 \vspace*{1.2cm}
2574 \parbox[t][3.4cm][t]{\textwidth}{%
2575 \begin{center}
2576 \erhao[0]\heiti\hitsz@ctitlecover
2577 \end{center}
2578 }
2579 \fi
2580 % 姓名
2581 \parbox[t][9cm][t]{\textwidth}{%
2582 \begin{center}
2583 \xiaoer[0]\songti\textbf{\hitsz@cauthor}
2584 \end{center}
2585 }
2586 \begin{center}
2587 \setlength{\hitsz@title@width}{4em}
2588 \heiti\xiaosi
2589 % \end{macrocode}
2590 %
2591 % 此处深圳校区竟然是左对齐。另外,院系名称也有点不一样。
2592 % \begin{macrocode}
2593 \ifhitsz@shenzhen%
2594 \begin{tabular}{@{}r@{}@{}l@{\qquad}}%
2595 \else%
2596 \begin{tabular}{rc}%
2597 \fi%
2598 {\hitsz@put@title{%
2599 \ifhitsz@harbin%
2600 \hitsz@bachelor@caffiltitle%
2601 \else%
2602 \ifhitsz@shenzhen%
2603 \hitsz@bachelor@caffiltitlesz%
2604 \else%
2605 \ifhitsz@weihai%
2606 \hitsz@bachelor@caffiltitlewh%
2607 \fi%
2608 \fi%
2609 \fi%
2610 }\hitsz@title@csep} & \hitsz@caffil\\[14pt]
2611 {\hitsz@put@title{\hitsz@bachelor@cstudentidtitle}\hitsz@title@csep} & \hitsz@cstudentid
2612 \end{tabular}
2613 \ifhitsz@shenzhen%
2614 \begin{tabular}{@{}r@{}@{}l@{}}%
2615 \else%
2616 \begin{tabular}{rc}%
2617 \fi%
2618 {\hitsz@put@title{\hitsz@bachelor@cmajortitle}\hitsz@title@csep} & \hitsz@csubject\\[14pt]
2619 {\hitsz@put@title{\hitsz@bachelor@csupervisortitle}\hitsz@title@csep} & \hitsz@csupervisor
2620 \end{tabular}
2621 \end{center}
2622 \vspace{2.6cm}
2623 {\xiaosi[0]\songti\textbf{\hitsz@cdate}}
2624 \end{center}
2625 }
2626 % \end{macrocode}
2627 %
2628 % 此处本科生使用了\hitsz\ 的logo且本科生论文标题使用了华文新魏字体,为了方便使用,
2629 % 此处使用了矢量化图片作为输入。
2630 % \begin{macrocode}
2631 \newdimen\infowidth
2632 \infowidth = 7cm
2633 \newcommand{\hitsz@second@titlepage@bachelor}{
2634 \vspace*{0.8cm}
2635 \ifhitsz@harbin%
2636 \centering{\includegraphics[width=6.2cm]{hitlogo}}
2637 \else%
2638 \ifhitsz@shenzhen%
2639 \centering{\includegraphics[width=6.2cm]{hitlogo}}
2640 \else%
2641 \ifhitsz@weihai%
2642 \centering{\includegraphics[width=6.2cm]{hitlogo}~~\raisebox{0.2em}{%
2643 \kaishu\yihao\hitsz@weihaicampus}}
2644 \fi%
2645 \fi%
2646 \fi%
2647 \vspace{1.3cm}
2648 \begin{center}
2649 \centering\includegraphics[width=10.5cm]{bthesistitle}
2650 \vfill
2651 \parbox[t][14.2cm][b]{\textwidth}
2652 {\heiti\xiaosan
2653 \begin{center} \renewcommand{\arraystretch}{2.5} \heiti
2654 \setlength{\hitsz@title@width}{5.5em}
2655 \ifhitsz@infoleft
2656 \begin{tabular}{l@{\ \ }l}
2657 {\xiaoer \hitsz@put@title{\hitsz@bachelor@cthesistitle}} &
2658 \underline{\makebox[\infowidth][l]{\hspace*{1em}\xiaoer\songti\textbf{\hitsz@ctitleone}}}\\
2659 & \underline{\makebox[\infowidth][l]{\hspace*{1em}\xiaoer\songti\textbf{\hitsz@ctitletwo}}}\\
2660 & \\
2661 {\hitsz@put@title{\hitsz@bachelor@cmajortitle}} &
2662 \underline{\makebox[\infowidth][l]{\hspace*{1em}\songti\textbf{\hitsz@csubject}}}\\
2663 {\hitsz@put@title{\hitsz@bachelor@cstudentidtitle}} &
2664 \underline{\makebox[\infowidth][l]{\hspace*{1em}\songti\textbf{\hitsz@cstudentid}}}\\
2665 {\hitsz@put@title{\hitsz@bachelor@cstudenttitle}} &
2666 \underline{\makebox[\infowidth][l]{\hspace*{1em}\songti\textbf{\hitsz@cauthor}}}\\
2667 {\hitsz@put@title{\hitsz@bachelor@csupervisortitle}} &
2668 \underline{\makebox[\infowidth][l]{\hspace*{1em}\songti\textbf{\hitsz@csupervisor}}}\\
2669 {\hitsz@put@title{\hitsz@cdatetitle}} &
2670 \underline{\makebox[\infowidth][l]{\hspace*{1em}\songti\textbf{\hitsz@cdatesecond}}}
2671 \end{tabular}
2672 \else
2673 \begin{tabular}{l@{\ \ }c}
2674 {\xiaoer \hitsz@put@title{\hitsz@bachelor@cthesistitle}} &
2675 \underline{\makebox[\infowidth]{\xiaoer\songti\textbf{\hitsz@ctitleone}}}\\
2676 & \underline{\makebox[\infowidth]{\xiaoer\songti\textbf{\hitsz@ctitletwo}}}\\
2677 & \\
2678 {\hitsz@put@title{\hitsz@bachelor@cmajortitle}} &
2679 \underline{\makebox[\infowidth]{\songti\textbf{\hitsz@csubject}}}\\
2680 {\hitsz@put@title{\hitsz@bachelor@cstudentidtitle}} &
2681 \underline{\makebox[\infowidth]{\songti\textbf{\hitsz@cstudentid}}}\\
2682 {\hitsz@put@title{\hitsz@bachelor@cstudenttitle}} &
2683 \underline{\makebox[\infowidth]{\songti\textbf{\hitsz@cauthor}}}\\
2684 {\hitsz@put@title{\hitsz@bachelor@csupervisortitle}} &
2685 \underline{\makebox[\infowidth]{\songti\textbf{\hitsz@csupervisor}}}\\
2686 {\hitsz@put@title{\hitsz@cdatetitle}} &
2687 \underline{\makebox[\infowidth]{\songti\textbf{\hitsz@cdatesecond}}}
2688 \end{tabular}
2689 \fi
2690 \renewcommand{\arraystretch}{1}
2691 \end{center}
2692 }
2693 \end{center}
2694 }
2695
2696 \newlength{\hitsz@etitlelength}%
2697 \newcommand{\hitsz@first@titlepage@other}{
2698 % 封面一
2699 \ifthenelse%
2700 {\equal{\hitsz@fontset}{siyuan}}%
2701 {\xiaosi[1]\vspace*{0.65em}}%
2702 {\xiaosi[1]\textcolor[rgb]{1,1,1}{\songti{\hitsz@dummyrow}}}%
2703 \vspace*{1.2cm}
2704 \begin{center}
2705 \begin{center}\xiaoyi[1]\songti\textbf{\hitsz@cxuewei\hitsz@cthesisname}\end{center}
2706 \vspace{1cm}
2707 \begin{center}\xiaoer[1]\songti\textbf{(\hitsz@cpostgraduatetype\hitsz@cthesisname)}\end{center}
2708 \ifhitsz@fulltime\vspace{1cm}\else%
2709 \begin{center}
2710 \xiaoyi[1]\songti
2711 \textbf{\hitsz@cbraceleft\hitsz@cstudenttype\hitsz@cbraceright}
2712 \end{center}
2713 \fi%
2714 \parbox[t][7.3cm][t]{\textwidth}{%
2715 \begin{center}\erhao\heiti\hitsz@ctitlecover\end{center}
2716 \ifhitsz@subtitle%
2717 \begin{center}
2718 \hspace{-4em}\xiaoer\heiti\pozhehao\hitsz@csubtitle
2719 \end{center}
2720 \fi
2721 \begin{center}%
2722 \settowidth{\hitsz@etitlelength}{%
2723 \erhao\hitsz@etitle\ifhitsz@subtitle\hitsz@title@esep\hitsz@esubtitle\fi}%
2724 \ifdim\hitsz@etitlelength>450mm\xiaoer\else\erhao\fi%
2725 \textbf{\MakeUppercase{\hitsz@etitle}%
2726 \ifhitsz@subtitle%
2727 \hitsz@title@esep\MakeUppercase{\hitsz@esubtitle}
2728 \fi}\end{center}}
2729
2730 \parbox[t][5.4cm][t]{\textwidth}{%
2731 \begin{center}\xiaoer\songti\textbf{\hitsz@cauthor}\end{center}
2732 }
2733 \parbox[t][1.4cm][t]{\textwidth}{%
2734 \begin{center}\kaishu\xiaoer\textbf{\hitsz@cschoolname}\end{center}
2735 }
2736 {\songti\xiaoer\textbf{\hitsz@cdate}}
2737 \end{center}
2738 }
2739
2740 %内封
2741 \newcommand{\hitsz@second@titlepage@other}{
2742 \begin{center}
2743 {\songti \xiaosi
2744 \begin{tabular}{@{}r@{:}l@{}}
2745 \hitsz@natclassifiedindextitle & \hitsz@natclassifiedindex\\
2746 \hitsz@internatclassifiedindextitle & \hitsz@intclassifiedindex
2747 \end{tabular}}\hfill
2748 {\songti \xiaosi
2749 \begin{tabular}{@{}r@{:}l@{}}
2750 \hitsz@schoolidtitle & \hitsz@schoolid\\
2751 \hitsz@secretlevel & \hitsz@statesecrets
2752 \end{tabular}}
2753 \parbox[t][3.2cm][t]{\textwidth}{\begin{center} \end{center} }
2754 \parbox[t][2.4cm][t]{\textwidth}{\xiaoer[1]
2755 \begin{center}\songti\bfseries\hitsz@cdegree\hitsz@cthesisname\end{center}
2756 \ifhitsz@fulltime\relax
2757 \else%
2758 \begin{center}
2759 \songti\textbf{\hitsz@cbraceleft\hitsz@cstudenttype\hitsz@cbraceright}
2760 \end{center}
2761 \fi}
2762 \parbox[t][5cm][t]{\textwidth}{\erhao
2763 \begin{center}\heiti\hitsz@ctitlecover\end{center}
2764 \ifhitsz@subtitle%
2765 \begin{center}
2766 \hspace{-4em}\xiaoer\heiti\pozhehao\hitsz@csubtitle
2767 \end{center}
2768 \fi}
2769 \parbox[t][9.8cm][b]{\textwidth}
2770 {\sihao
2771 \setlength{\hitsz@title@width}{6em}
2772 \begin{center} \renewcommand{\arraystretch}{1.62} \songti
2773 \begin{tabular}{l@{\hitsz@title@csep}l}
2774 {\heiti \hitsz@put@title{\hitsz@cauthortitle}} & \hitsz@cauthor\\
2775 {\heiti \hitsz@put@title{\hitsz@csupervisortitle}} & \hitsz@csupervisor\\
2776 \ifx\hitsz@cassosupervisor\@empty\else%
2777 {\heiti \hitsz@put@title{\hitsz@cassosupervisortitle}}& \hitsz@cassosupervisor\\
2778 \fi
2779 \ifx\hitsz@ccosupervisor\@empty\else%
2780 {\heiti \hitsz@put@title{\hitsz@ccosupervisortitle}} & \hitsz@ccosupervisor\\
2781 \fi
2782 {\heiti \hitsz@put@title{\hitsz@cdegreetitle}} & \hitsz@cdegree\\
2783 {\heiti \hitsz@put@title{\hitsz@csubjecttitle}} & \hitsz@csubject\\
2784 {\heiti \hitsz@put@title{\hitsz@caffiltitle}} & \hitsz@caffil\\
2785 {\heiti \hitsz@put@title{\hitsz@cdatetitle}} & \hitsz@cdate\\
2786 {\heiti \hitsz@put@title{\hitsz@cschoolnametitle}} & \hitsz@cschoolname
2787 \end{tabular} \renewcommand{\arraystretch}{1}
2788 \end{center} }
2789 \end{center}
2790 }
2791 % 英文封面
2792 \newcommand{\emultiline}[2][c]{%
2793 \renewcommand{\arraystretch}{1}%
2794 \begin{tabular}[#1]{@{}l@{}}#2\end{tabular}
2795 \renewcommand{\arraystretch}{1.3}
2796 }
2797 \newcommand{\hitsz@engcover}{
2798 {
2799 \xiaosi[1.667]\noindent Classified Index: \hitsz@natclassifiedindex \\[8pt]
2800 U.D.C: \hitsz@intclassifiedindex
2801 }
2802 \vspace*{1em}
2803 \begin{center}
2804 \ifhitsz@doctor%博士封面
2805 \parbox[t][1.6cm][t]{\textwidth}{\begin{center} \end{center}}
2806 \parbox[t][3.5cm][t]{\textwidth}{\xiaoer[1]%
2807 \begin{center}%
2808 Dissertation for the {\hitsz@exueweier} Degree in \hitsz@exueke
2809 \end{center}
2810 \ifhitsz@fulltime
2811 \relax
2812 \else%
2813 \begin{center}%
2814 \hitsz@ebraceleft\hitsz@estudenttype\hitsz@ebraceright%
2815 \end{center}
2816 \fi
2817 }
2818 \else%硕士封面
2819 \vspace*{1em}
2820 \parbox[t][4.5cm][t]{\textwidth}{\xiaoer[1]%
2821 \begin{center}%
2822 A dissertation submitted in partial fulfillment of \\[2pt]
2823 the requirements for the academic degree of \\[2pt]
2824 Master of \hitsz@exueke
2825 \end{center}
2826 \ifhitsz@fulltime
2827 \relax
2828 \else%
2829 \begin{center}%
2830 \hitsz@ebraceleft\hitsz@estudenttype\hitsz@ebraceright%
2831 \end{center}
2832 \fi
2833 }
2834 \fi
2835 \parbox[t][7cm][t]{\textwidth}{%
2836 \begin{center}%
2837 \settowidth{\hitsz@etitlelength}{%
2838 \erhao\hitsz@etitle%
2839 \ifhitsz@subtitle
2840 \hitsz@title@esep\hitsz@esubtitle%
2841 \fi
2842 }%
2843 \ifdim\hitsz@etitlelength>450mm\xiaoer\else\erhao\fi%
2844 \textbf{\MakeUppercase{\hitsz@etitle}%
2845 \ifhitsz@subtitle%
2846 \hitsz@title@esep\MakeUppercase{\hitsz@esubtitle}%
2847 \fi
2848 }
2849 \end{center}
2850 }
2851 % 表格
2852 {\sihao\renewcommand{\arraystretch}{1.3}
2853 \begin{tabular}{@{}l@{~}l@{}}
2854 \textbf{\hitsz@eauthortitle\hitsz@title@esep} & \hitsz@eauthor\\
2855 \textbf{\hitsz@esupervisortitle\hitsz@title@esep} & \hitsz@esupervisor\\
2856 \ifx\hitsz@eassosupervisor\@empty%
2857 \else%
2858 \textbf{\hitsz@eassosupervisortitle\hitsz@title@esep} & \hitsz@eassosupervisor\\
2859 \fi
2860 \ifx\hitsz@ecosupervisor\@empty%
2861 \else%
2862 \textbf{\hitsz@ecosupervisortitle\hitsz@title@esep} & \hitsz@ecosupervisor\\
2863 \fi
2864 \textbf{\hitsz@edegreetitle\hitsz@title@esep} & \hitsz@edegree\\
2865 \textbf{\hitsz@esubjecttitle\hitsz@title@esep} &\hitsz@esubject\\
2866 \textbf{\hitsz@eaffiltitle\hitsz@title@esep} &\hitsz@eaffil\\
2867 \textbf{\hitsz@edatetitle\hitsz@title@esep} & \hitsz@edate\\
2868 \textbf{\hitsz@eschoolnametitle\hitsz@title@esep} & \hitsz@eschoolname
2869 \end{tabular}
2870 \renewcommand{\arraystretch}{1}
2871 }
2872 \end{center}
2873 }
2874 % 制作封面
2875 \def\makecover{
2876 \phantomsection
2877 \pdfbookmark[0]{\hitsz@ctitle}{ctitle}
2878 \xiaosi[1]%
2879 % \end{macrocode}
2880 %
2881 % 此处添加提交图书馆电子版的逻辑
2882 % \begin{macrocode}
2883 \begin{titlepage}
2884 \hitsz@first@titlepage
2885 \ifhitsz@library\clearpage\else\cleardoublepage\fi
2886 \hitsz@second@titlepage
2887 \ifhitsz@library\clearpage\else\cleardoublepage\fi
2888 \ifhitsz@bachelor
2889 \relax
2890 \else
2891 \phantomsection
2892 \pdfbookmark[0]{\hitsz@etitle}{etitle}
2893 \hitsz@engcover
2894 \ifhitsz@library\clearpage\else\cleardoublepage\fi
2895 \fi
2896 \end{titlepage}
2897 \normalsize
2898 \hitsz@makeabstract}
2899 % \end{macrocode}
2900 %
2901 % 生成参考文献和关键字。
2902 % \begin{macrocode}
2903 \newbox\hitsz@kw
2904 \newcommand\hitsz@put@keywords[2]{%
2905 \begingroup
2906 \setbox\hitsz@kw=\hbox{#1}
2907 \noindent\hangindent\wd\hitsz@kw\hangafter1%
2908 \box\hitsz@kw#2\par
2909 \endgroup}
2910
2911 \newcommand{\hitsz@makeabstract}{%
2912 \ifhitsz@openright\cleardoublepage\else\clearpage\fi
2913 \hitsz@appendix@chapter*{\cabstractcname}[\cabstractename]
2914 \pagestyle{hitsz@headings}
2915 \pagenumbering{Roman}
2916 \hitsz@cabstract
2917 \vskip12bp
2918 \hitsz@put@keywords{\heiti\hitsz@ckeywords@title}{\hitsz@ckeywords}
2919 \ifhitsz@openright\cleardoublepage\else\clearpage\fi
2920 \hitsz@appendix@chapter*{\eabstractcname}[\eabstractename]
2921 \hitsz@eabstract
2922 \vskip12bp
2923 \hitsz@put@keywords{\textbf{Keywords:\enskip}}{\hitsz@ekeywords}}
2924 % \end{macrocode}
2925 %
2926 % 定义符号表。
2927 % \begin{macrocode}
2928 \newenvironment{denotation}[1][2.5cm]{%
2929 \ifhitsz@openright\cleardoublepage\else\clearpage\fi
2930 \hitsz@appendix@chapter*{\hitsz@denotation@ctitle}[\hitsz@denotation@etitle]
2931 \setcounter{table}{0}
2932 \renewcommand{\thetable}{\arabic{table}}%使表编号为 1 的格式
2933 }{\renewcommand{\thetable}{\arabic{chapter}-\arabic{table}}%使表编号为 7-1 的格式
2934 \setcounter{table}{0}}%
2935 % \end{macrocode}
2936 %
2937 % 定义索引、目录格式
2938 % \begin{macrocode}
2939 \def\hitsz@starttoc#1{% #1: float type, prepend type name in \listof*** entry.
2940 \let\oldnumberline\numberline
2941 \def\numberline##1{\oldnumberline{\csname #1name\endcsname\hskip.4em ##1}}
2942 \@starttoc{\csname ext@#1\endcsname}
2943 \let\numberline\oldnumberline}
2944 \def\hitsz@listof#1#2{% #1: float type
2945 \chapter*{\csname list#1name\endcsname}[#2]\hitsz@starttoc{#1}}
2946
2947 \renewcommand\listoffigures{\hitsz@listof{figure}{\listfigureename}}
2948 \renewcommand*\l@figure{\addvspace{6bp}\@dottedtocline{1}{0em}{4em}}
2949 \renewcommand\listoftables{\hitsz@listof{table}{\listtableename}}
2950 \let\l@table\l@figure
2951 \def\ext@equation{loe}
2952 \def\equcaption#1{%
2953 \addcontentsline{\ext@equation}{equation}%
2954 {\protect\numberline{#1}}}
2955 \newcommand\listofequations{\hitsz@listof{equation}{\listequationename}}
2956 \let\l@equation\l@figure
2957 % \end{macrocode}
2958 %
2959 % \subsubsection{目录}
2960 % \label{sec:toc}
2961 %
2962 % 本科文科生要求目录有四级。
2963 % \begin{macrocode}
2964 \setcounter{secnumdepth}{3}
2965 \setcounter{tocdepth}{2}
2966 \ifhitsz@bachelor\ifhitsz@tocfour\setcounter{tocdepth}{3}\fi\fi
2967 % \end{macrocode}
2968 %
2969 % 工大论文目录中的潜规则:目录中的目录位置是空白。
2970 % \begin{macrocode}
2971 \renewcommand\tableofcontents{%
2972 \ifhitsz@openright\cleardoublepage\else\clearpage\fi
2973 \phantomsection
2974 \markboth{\contentsname}{ccontent}
2975 \hitsz@chapter*{\contentsname}
2976 \pdfbookmark[0]{\contentsname}{ccontent}
2977 \normalsize\@starttoc{toc}}
2978 % \end{macrocode}
2979 %
2980 % 按照窝工要求的目录格式。
2981 % \begin{macrocode}
2982 \ifhitsz@arialtoc
2983 \def\hitsz@toc@font{\sffamily}
2984 \fi
2985 \def\@pnumwidth{4em}%规定中的提前悬挂
2986 \def\@tocrmarg{\@pnumwidth}
2987 \def\@dotsep{1}
2988 % \end{macrocode}
2989 %
2990 % 此处临时更改一下对齐方式。\CTeX\ 似乎无法应对双语目录。
2991 % \begin{macrocode}
2992 \setlength\@tempdima{4em}%
2993 \patchcmd{\@dottedtocline}{#4}{\csname hitsz@toc@font\endcsname #4}{}{}
2994 \patchcmd{\@dottedtocline}{\hb@xt@\@pnumwidth}{\hbox}{}{}
2995 \renewcommand*\l@chapter[2]{%
2996 \ifnum \c@tocdepth >\m@ne
2997 \addpenalty{-\@highpenalty}%
2998 %\vskip 4bp \@plus\p@
2999 \begingroup
3000 \parindent \z@ \rightskip \@pnumwidth
3001 \parfillskip -\@pnumwidth
3002 \leavevmode
3003 \advance\leftskip\@tempdima
3004 \hskip -\leftskip
3005 % numberline is called here, and it uses \@tempdima
3006 % \end{macrocode}
3007 %
3008 % 修改本科生论文目录格式
3009 % \begin{macrocode}
3010 {\ifhitsz@bachelor\rmfamily\else\csname hitsz@toc@font\endcsname\fi\heiti #1}
3011 \leaders\hbox{$\m@th\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill
3012 \nobreak{\normalfont\normalcolor #2}\par
3013 \penalty\@highpenalty
3014 \endgroup
3015 \fi}
3016 % \end{macrocode}
3017 %
3018 % 按工大标准, 缩小目录中各级标题之间的缩进,使它们相隔一个字符距离,也就是12pt。
3019 % \begin{macrocode}
3020 \renewcommand*\l@section{\@dottedtocline{1}{1em}{1.8em}}
3021 \renewcommand*\l@subsection{\@dottedtocline{2}{2em}{2.5em}}
3022 \renewcommand*\l@subsubsection{\@dottedtocline{3}{3\ccwd}{3.1em}}
3023 % \end{macrocode}
3024 %
3025 % 英文目录格式。
3026 % \begin{macrocode}
3027 \def\@dotsep{0.75} % 定义英文目录的点间距
3028 \setlength\leftmargini {0pt}
3029 \setlength\leftmarginii {0pt}
3030 \setlength\leftmarginiii {0pt}
3031 \setlength\leftmarginiv {0pt}
3032 \setlength\leftmarginv {0pt}
3033 \setlength\leftmarginvi {0pt}
3034
3035 \def\engcontentsname{\bfseries Contents}
3036 \newcommand\tableofengcontents{
3037 % \end{macrocode}
3038 %
3039 % 此处添加英文目录的章标题格式,默认细点
3040 % \begin{macrocode}
3041 %控制英文目录:细点\@dottedtocline,粗点\@dottedtoclinebold
3042 \def\l@chapter{\@dottedtocline{0}{0em}{5em}}
3043 \@restonecolfalse
3044 \chapter*{\engcontentsname %chapter*上移一行,避免在toc中出现。
3045 \pdfbookmark[0]{Contents}{econtent}
3046 \@mkboth{%
3047 \engcontentsname}{\engcontentsname}}
3048 % \end{macrocode}
3049 %
3050 % 此处临时更改一下对齐方式。\CTeX\ 似乎无法应对双语目录。
3051 % 删除增加 \cs{hangindent} 的方法,其原因是 \cs{numberline} 多出一个空格
3052 % \begin{macrocode}
3053 \@starttoc{toe}%
3054 \if@restonecol\twocolumn\fi}
3055 \def\@dotsep{0.75} % 定义英文目录的点间距
3056 % \end{macrocode}
3057 %
3058 % 目录中附录的章号格式。
3059 % \begin{macrocode}
3060 \ctexset{%
3061 appendix/number=\ifhitsz@bachelor%
3062 \ifhitsz@alphappendix%
3063 \Alph{chapter}%
3064 \else%
3065 \arabic{chapter}%
3066 \fi%
3067 \else%
3068 \Alph{chapter}%
3069 \fi,%
3070 }
3071 % \end{macrocode}
3072 %
3073 % 设置附录、结论、参考文献等格式。
3074 % \changes{v3.1}{2020/05/25}{Add support to Alph abstract title for bachelor thesis}
3075 % \changes{v3.2}{2020/06/23}{Add \env{algorithmen} environment for original english paper}
3076 % \changes{v3.2}{2020/06/23}{Add \cs{appendixcaption} command for captions in original english paper}
3077 % \begin{macrocode}
3078 \let\hitsz@appendix\appendix
3079 \renewenvironment{appendix}{%
3080 \let\title\hitsz@appendix@title%
3081 \hitsz@appendix%
3082 \ifhitsz@bachelor%
3083 \ifhitsz@alphappendix%
3084 \renewcommand{\thechapter}{\Alph{chapter}}%
3085 \else%
3086 \renewcommand{\thechapter}{\arabic{chapter}}%
3087 \fi%
3088 \fi%
3089 }{%
3090 \let\title\@gobble%
3091 }
3092 % 支持附录算法英文标题
3093 \newenvironment{algorithmen}[1][htb]{
3094 \renewcommand{\algorithmcfname}{Algorithm}%
3095 \begin{algorithm}[#1]%
3096 }{%
3097 \end{algorithm}
3098 }
3099 % 支持附录图表编号
3100 \newcommand{\appendixcaption}[1]{\centering\wuhao#1}
3101 % \end{macrocode}
3102 %
3103 % 附录页码重新编号
3104 % \changes{v3.2}{2020/06/23}{Add \cs{SetPageNumberingFromOne} command to set page numberging from 1}
3105 % \changes{v3.2}{2020/06/23}{Add \cs{SetAppendixWithOnlyHeadings} command to set appendix with only headings, i.e., without page number in bottom center}
3106 % \begin{macrocode}
3107 \newcommand{\SetPageNumberingFromOne}{\setcounter{page}{1}}
3108 \newcommand{\SetAppendixWithOnlyHeadings}{
3109 \ctexset{
3110 chapter/pagestyle = {hitsz@onlyheadings},
3111 }
3112 \thispagestyle{hitsz@headings}
3113 \pagestyle{hitsz@onlyheadings}
3114 }
3115 \let\title\@gobble
3116 \newcommand{\hitsz@appendix@title}[1]{%
3117 \begin{center}
3118 \bfseries\xiaosi #1
3119 \end{center}}
3120 \newlist{translationbib}{enumerate}{1}
3121 \setlist[translationbib]{label=[\arabic*],align=left,nosep,itemsep=6bp,
3122 leftmargin=10mm,labelsep=!,before=\vspace{0.5\baselineskip}\wuhao[1.3]
3123 }
3124 \newenvironment{conclusions}{%
3125 \ifhitsz@openright\cleardoublepage\else\clearpage\fi
3126 \hitsz@appendix@chapter*{\hitsz@conclusion@ctitle}[\hitsz@conclusion@etitle]}{}
3127 \newenvironment{acknowledgements}{%
3128 \ifhitsz@openright\cleardoublepage\else\clearpage\fi
3129 \hitsz@appendix@chapter*{\hitsz@acknowledgement@ctitle}[\hitsz@acknowledgement@etitle]}{}
3130 \newenvironment{resume}{%
3131 \ifhitsz@openright\cleardoublepage\else\clearpage\fi
3132 \hitsz@appendix@chapter*{\hitsz@resume@ctitle}[\hitsz@resume@etitle]}{}
3133 \newenvironment{publication}{%
3134 \ifhitsz@openright\cleardoublepage\else\clearpage\fi
3135 \hitsz@appendix@chapter*{\hitsz@publication@ctitle}[\hitsz@publication@etitle]}{}
3136 % \end{macrocode}
3137 %
3138 % 此处中英文索引的格式设置尽量符合\PGR\ 中给出的示例的格式。此处间距常数是人工调节的。
3139 % \begin{macrocode}
3140 \newenvironment{ceindex}{%
3141 \ifhitsz@openright\cleardoublepage\else\clearpage\fi
3142 \hitsz@appendix@chapter*{\indexname}[\hitsz@index@etitle]
3143 \setlength{\columnsep}{4em}
3144 \begin{adjustwidth}{2em}{2em}
3145 \begin{multicols*}{2}}{\end{multicols*}
3146 \end{adjustwidth}
3147 }
3148
3149 \newlist{idxwordlist}{description}{3}
3150 \setlist[idxwordlist, 1]{%
3151 itemsep=\baselineskip,
3152 labelindent=8em,
3153 font=\normalsize\bfseries,
3154 }
3155 \setlist[idxwordlist, 2]{%
3156 nosep,
3157 labelindent=2em,
3158 font=\wuhao\rm,
3159 }
3160 \setlist[idxwordlist, 3]{%
3161 nosep,
3162 labelindent=4em,
3163 font=\wuhao\rm,
3164 }
3165
3166 \def\hitsz@authorization@other{%
3167 \ifhitsz@openright\cleardoublepage\else\clearpage\fi
3168 \hitsz@appendix@chapter*{\hitsz@authorization@ctitle}[\hitsz@authorization@etitle]
3169 \xiaosi[1.6]\vspace{\baselineskip}
3170 \begin{center}\xiaosan\heiti\hitsz@declarename\end{center}
3171 \par\hitsz@declaretext
3172 \vspace{\baselineskip}
3173 \par\hspace{6em}\hitsz@authorsig\hfill\hitsz@frontdate\hitsz@datefill
3174 \vspace{2\baselineskip}
3175 \begin{center}\xiaosan\heiti\hitsz@authorizationtitle\end{center}
3176 \par\hitsz@authorizationtext
3177 \vspace{2\baselineskip}
3178 \par\hspace{6em}\hitsz@authorsig\hfill\hitsz@frontdate\hitsz@datefill
3179 \vspace{2\baselineskip}
3180 \par\hspace{6em}\hitsz@teachersig\hfill\hitsz@frontdate\hitsz@datefill
3181 }
3182 \def\hitsz@authorization@bachelor@toc{%
3183 \ifhitsz@shenzhen%
3184 原创性声明
3185 \else%
3186 \hitsz@declarename@bachelor
3187 \fi
3188 }
3189 \def\hitsz@authorization@bachelor{%
3190 \ifhitsz@openright\cleardoublepage\else\clearpage\fi
3191 \chapter*{\ifhitsz@weihai\sanhao\fi\hitsz@declarename@bachelor}
3192 \addcontentsline{toc}{chapter}{\hitsz@authorization@bachelor@toc}
3193 \ifhitsz@shenzhen%
3194 \hitsz@authorizationtext@bachelor@shenzhen
3195 \else%
3196 \ifhitsz@weihai%
3197 \hitsz@authorizationtext@bachelor@weihai
3198 \else%
3199 \hitsz@authorizationtext@bachelor
3200 \fi%
3201 \fi%
3202 \vspace{2\baselineskip}
3203 \par\hspace{6em}\hitsz@authorsig\hfill\hitsz@frontdate\hitsz@datefill
3204 }
3205
3206 \NewDocumentCommand{\authorization}{o}{%
3207 \IfNoValueTF{#1}{%
3208 \ifhitsz@bachelor\hitsz@authorization@bachelor\else\hitsz@authorization@other\fi
3209 }{%
3210 \includepdf[fitpaper=true,pagecommand={%
3211 \thispagestyle{hitsz@empty}%
3212 \phantomsection
3213 \addcontentsline{toc}{chapter}{%
3214 \ifhitsz@bachelor\hitsz@declarename@bachelor
3215 \else\hitsz@authorization@ctitle
3216 \fi}%
3217 \ifhitsz@doctor%
3218 \addcontentsline{toe}{chapter}{%
3219 \texorpdfstring{\bfseries \hitsz@authorization@etitle}{\hitsz@authorization@etitle}}%
3220 \fi%
3221 }]{#1}%
3222 }%
3223 }
3224 % \end{macrocode}
3225 % \begin{macrocode}
3226 \newcommand\bibstyle@numerical{\bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
3227 \newcommand\bibstyle@authoryear{\bibpunct{(}{)}{;}{a}{,}{,}}
3228 % \end{macrocode}
3229 % \changes{v3.2.1}{2021/11/15}{Redefine `biblabel' with full-width square brackets}
3230 % \begin{macrocode}
3231 \newcommand\bibstyle@inline{\bibpunct{[}{]}{,}{n}{,}{\hitsz@inline@sep}}
3232 \citestyle{numerical}
3233 \DeclareRobustCommand\inlinecite{\@inlinecite}
3234 \def\@inlinecite#1{\begingroup\citestyle{inline}\let\@cite\NAT@citenum\citep{#1}\endgroup}
3235 \let\onlinecite\inlinecite
3236 \def\@biblabel#1{[#1]}
3237 \renewenvironment{thebibliography}[1]{%
3238 \ifhitsz@openright\cleardoublepage\else\clearpage\fi\phantomsection%
3239 \hitsz@appendix@chapter*{\bibname}[\hitsz@bibname@etitle]
3240 \normalsize
3241 \list{\@biblabel{\@arabic\c@enumiv}}%
3242 {\renewcommand{\makelabel}[1]{##1\hfill}
3243 \settowidth{\labelwidth}{\@biblabel{#1}}
3244 \addtolength{\labelwidth}{0.5em}
3245 \setlength{\labelsep}{0.5em}
3246 \setlength{\itemindent}{0pt}
3247 \setlength{\leftmargin}{\labelsep+\labelwidth}
3248 \addtolength{\itemsep}{-0.8em}
3249 \usecounter{enumiv}%
3250 \let\p@enumiv\@empty
3251 \renewcommand\theenumiv{\@arabic\c@enumiv}}%
3252 \sloppy\frenchspacing
3253 % \end{macrocode}
3254 % \begin{macrocode}
3255 \flushbottom
3256 % \end{macrocode}
3257 % \begin{macrocode}
3258 \ifhitsz@splitbibitem
3259 \clubpenalty0
3260 \@clubpenalty \clubpenalty
3261 \widowpenalty0%
3262 \interlinepenalty-50%
3263 \else
3264 \clubpenalty4000
3265 \@clubpenalty \clubpenalty
3266 \widowpenalty4000%
3267 \interlinepenalty4000%
3268 \fi
3269 \sfcode`\.\@m}
3270 {\def\@noitemerr
3271 {\@latex@warning{Empty `thebibliography' environment}}%
3272 \endlist\frenchspacing}
3273 \patchcmd\NAT@citexnum{%
3274 \@ifnum{\NAT@ctype=\z@}{%
3275 \if*#2*\else\NAT@cmt#2\fi
3276 }{}%
3277 \NAT@mbox{\NAT@@close}%
3278 }{%
3279 \NAT@mbox{\NAT@@close}%
3280 \@ifnum{\NAT@ctype=\z@}{%
3281 \if*#2*\else\textsuperscript{#2}\fi
3282 }{}%
3283 }{}{}
3284 \renewcommand\NAT@citesuper[3]{\ifNAT@swa
3285 \if*#2*\else#2\NAT@spacechar\fi
3286 \unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close\if*#3*\else#3\fi}%
3287 \else #1\fi\endgroup}
3288 \patchcmd{\NAT@citex}{%
3289 \if*#2*\else\NAT@cmt#2\fi
3290 \if\relax\NAT@date\relax\else\NAT@@close\fi
3291 }{%
3292 \if\relax\NAT@date\relax\else\NAT@@close\fi
3293 \if*#2*\else\textsuperscript{#2}\fi
3294 }{}{}
3295 \renewcommand\NAT@cite%
3296 [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi
3297 #1\NAT@@close\if*#3*\else\textsuperscript{#3}\fi\else#1\fi\endgroup}
3298 %</cls>
3299 % \end{macrocode}
3300 %
3301 % \subsection{其它}
3302 % \label{sec:other}
3303 %
3304 % 在模板文档结束时即装入配置文件,这样用户就能在导言区进行相应的修改。
3305 % \begin{macrocode}
3306 %<*cls>
3307 \AtEndOfClass{\input{hitszthesis.cfg}}
3308 \AtEndOfClass{\sloppy}
3309 %</cls>
3310 % \end{macrocode}
3311 % \iffalse
3312 % \begin{macrocode}
3313 %<*dtx-style>
3314 \ProvidesPackage{dtx-style}
3315 \RequirePackage{hypdoc}
3316 \RequirePackage[UTF8,scheme=chinese,fontset=windowsnew]{ctex}
3317 \RequirePackage{newpxtext}
3318 \RequirePackage{newpxmath}
3319 \RequirePackage[
3320 top=2.5cm, bottom=2.5cm,
3321 left=4cm, right=2cm,
3322 headsep=8mm]{geometry}
3323 \RequirePackage{array,longtable,booktabs}
3324 \RequirePackage{listings}
3325 \RequirePackage{fancyhdr}
3326 \RequirePackage{xcolor}
3327 \RequirePackage{enumitem}
3328 \RequirePackage{etoolbox}
3329 \RequirePackage{metalogo}
3330 \RequirePackage{hyperref}
3331
3332 \colorlet{hitsz@macro}{blue!60!black}
3333 \colorlet{hitsz@env}{blue!70!black}
3334 \colorlet{hitsz@option}{purple}
3335 \patchcmd{\PrintMacroName}{\MacroFont}{\MacroFont\bfseries\color{hitsz@macro}}{}{}
3336 \patchcmd{\PrintDescribeMacro}{\MacroFont}{\MacroFont\bfseries\color{hitsz@macro}}{}{}
3337 \patchcmd{\PrintDescribeEnv}{\MacroFont}{\MacroFont\bfseries\color{hitsz@env}}{}{}
3338 \patchcmd{\PrintEnvName}{\MacroFont}{\MacroFont\bfseries\color{hitsz@env}}{}{}
3339
3340 \def\DescribeOption{%
3341 \leavevmode\@bsphack\begingroup\MakePrivateLetters%
3342 \Describe@Option}
3343 \def\Describe@Option#1{\endgroup
3344 \marginpar{\raggedleft\PrintDescribeOption{#1}}%
3345 \hitsz@special@index{option}{#1}\@esphack\ignorespaces}
3346 \def\PrintDescribeOption#1{\strut \MacroFont\bfseries\sffamily\color{hitsz@option} #1\ }
3347 \def\hitsz@special@index#1#2{\@bsphack
3348 \begingroup
3349 \HD@target
3350 \let\HDorg@encapchar\encapchar
3351 \edef\encapchar usage{%
3352 \HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage}%
3353 }%
3354 \index{#2\actualchar{\string\ttfamily\space#2}
3355 (#1)\encapchar usage}%
3356 \index{#1:\levelchar#2\actualchar
3357 {\string\ttfamily\space#2}\encapchar usage}%
3358 \endgroup
3359 \@esphack}
3360
3361 \lstdefinestyle{lstStyleBase}{%
3362 basicstyle=\small\ttfamily,
3363 aboveskip=\medskipamount,
3364 belowskip=\medskipamount,
3365 lineskip=0pt,
3366 boxpos=c,
3367 showlines=false,
3368 extendedchars=true,
3369 upquote=true,
3370 tabsize=2,
3371 showtabs=false,
3372 showspaces=false,
3373 showstringspaces=false,
3374 numbers=none,
3375 linewidth=\linewidth,
3376 xleftmargin=4pt,
3377 xrightmargin=0pt,
3378 resetmargins=false,
3379 breaklines=true,
3380 breakatwhitespace=false,
3381 breakindent=0pt,
3382 breakautoindent=true,
3383 columns=flexible,
3384 keepspaces=true,
3385 gobble=2,
3386 framesep=3pt,
3387 rulesep=1pt,
3388 framerule=1pt,
3389 backgroundcolor=\color{gray!5},
3390 stringstyle=\color{green!40!black!100},
3391 keywordstyle=\bfseries\color{blue!50!black},
3392 commentstyle=\slshape\color{black!60}}
3393
3394 \lstdefinestyle{lstStyleShell}{%
3395 style=lstStyleBase,
3396 frame=l,
3397 rulecolor=\color{purple},
3398 language=bash}
3399
3400 \definecolor{hitcolor}{RGB}{21,95,130}
3401 \lstdefinestyle{lstStyleLaTeX}{%
3402 style=lstStyleBase,
3403 frame=l,
3404 rulecolor=\color{hitcolor},
3405 language=[LaTeX]TeX}
3406
3407 \lstnewenvironment{latex}{\lstset{style=lstStyleLaTeX}}{}
3408 \lstnewenvironment{shell}{\lstset{style=lstStyleShell}}{}
3409
3410 \setlist{nosep}
3411
3412 \DeclareDocumentCommand{\option}{m}{\textsf{#1}}
3413 \DeclareDocumentCommand{\env}{m}{\texttt{#1}}
3414 \DeclareDocumentCommand{\pkg}{s m}{%
3415 \texttt{#2}\IfBooleanF#1{\hitsz@special@index{package}{#2}}}
3416 \DeclareDocumentCommand{\file}{s m}{%
3417 \texttt{#2}\IfBooleanF#1{\hitsz@special@index{file}{#2}}}
3418 \newcommand{\myentry}[1]{%
3419 \marginpar{\small\raggedleft\color{purple}\bfseries\strut #1}}
3420 \newcommand{\note}[2][Note]{{%
3421 \color{magenta}{\bfseries #1}\emph{#2}}}
3422 %</dtx-style>
3423 % \end{macrocode}
3424 % \begin{macrocode}
3425 %<cfg|dtx-style>\newcommand{\pozhehao}{——}
3426 %<cfg|dtx-style>\def\hitszthesis{\textsc{Hitsz}\-\textsc{Thesis}}
3427 %<cfg|dtx-style>\def\hitsz{哈尔滨工业大学(深圳)}
3428 %<cfg|dtx-style>\def\PGR{\href{http://hitgs.hit.edu.cn/aa/fd/c3425a109309/page.htm}
3429 %<cfg|dtx-style>{《\hitsz 研究生学位论文撰写规范》}}
3430 %<cfg|dtx-style>\def\UGR{\href{http://www.hitsz.edu.cn/UserFiles/editor/file/20190923/1569224708968004622.doc}
3431 %<cfg|dtx-style>{《\hitsz 本科生毕业论文撰写规范》}}
3432 %<cfg>\def\hitsz@inline@sep{,}
3433 % \end{macrocode}
3434 % \begin{macrocode}
3435 %<*dtx-style>
3436 \NewDocumentEnvironment{hitszrgu}{o o}
3437 { \IfNoValueTF{#1}{\PGR,\UGR}{#1}\IfNoValueF{#2}{#2中}%
3438 \color{red}规定:“}{”}
3439 %</dtx-style>
3440 % \end{macrocode}
3441 % \fi
3442 %
3443 % \Finale
3444 %
3445 \endinput
3446 % \iffalse
3447 % Local Variables:
3448 % mode: doctex
3449 % TeX-master: t
3450 % End:
3451 % \fi