• No results found

A Thesis Template for Huazhong University of Science and Technology: the hustthesis class

N/A
N/A
Protected

Academic year: 2021

Share "A Thesis Template for Huazhong University of Science and Technology: the hustthesis class"

Copied!
61
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

A Thesis Template for Huazhong

University of Science and Technology: the

hustthesis

class

Xu Cheng

xucheng@me.com

November 17, 2016

Contents

I Introduction

4

II

中文使用说明

5

1 使用必要条件 . . . . 5 2 安装 . . . . 5 2.1 安装到本地 . . . 5 2.2 免安装使用 . . . 6 3 基本用法 . . . . 6 3.1 文档类型选项 . . . 6 3.2 基本字段设置 . . . 7 3.3 其它基本命令 . . . 9 4 简单示例 . . . . 11 5 预设宏包介绍 . . . . 12 6 高级设置 . . . . 13 6.1 切换字体 . . . 13 6.2 内部字段设置 . . . 13

(2)

III English Version Instruction

14

1 Requirement . . . . 14

2 Installation . . . . 14

2.1 Install into local . . . 14

2.2 Use without installation . . . 15

3 Usage . . . . 15

3.1 Option . . . 15

3.2 Variables setting . . . 16

3.3 Other commands . . . 17

4 Simple example . . . . 19

5 Introduction to some packages used in the template . . . . . 20

IV Implementation

21

1 Process Options . . . . 21 2 Check Engine . . . . 22 3 Font Setting . . . . 22 4 Basic Format . . . . 26 5 Load Packages . . . . 27 6 Variables Setting . . . . 28 7 Localization . . . . 32 8 Style Setting . . . . 37 8.1 Equation Style . . . 37 8.2 Theorem Style . . . 37

8.3 Floating Objects Style . . . 38

8.4 Table Style . . . 39

8.5 Caption Style . . . 40

8.6 Code Highlight Style . . . 40

8.7 Section Title Style . . . 41

8.8 TOC Style . . . 42

8.9 Head & Foot Style . . . 43

8.10 List Environment Style . . . 43

8.11 Footnote Style . . . 43

(3)

V Index

54

(4)

I Introduction

This is a thesis template forHuazhong University of Science & Tech-nology. This template is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The whole project is published under LPPL v1.3 License atGitHub. 中文使用说明见Part II。

(5)

II

中文使用说明

1

使用必要条件

1. 安装最新版本的TeXLive(推荐)或MiKTeX。因为未及时更新的宏包可 能存在未修复的bug,请确保所有宏包都更新至最新。 2. 安装如下中文字体1 a) AdobeSongStd-Light b) AdobeKaitiStd-Regular c) AdobeHeitiStd-Regular d) AdobeFangsongStd-Regular 如果使用LuaTEX,安装字体之后需运行命令mkluatexfontdb 生成字体索引。

2

安装

2.1

安装到本地

使用如下命令即可安装本模板到本地: make install 如需卸载,则使用如下命令: make uninstall 对于没有安装 Make 的Windows 系统用户,可以使用如下命令安装: makewin32.bat install 如需卸载,则使用如下命令: makewin32.bat uninstall 虽然 makewin32.bat 表现与 Makefile 极其相似,但是还是强烈建议你安装 Make,对于Windows 用户可以在这里下载。

1本模板所用到的英文字体 Tex Gyre Termes,Droid Sans 和 CMU Typewriter Text 均默

(6)

2.2

免安装使用

如果你希望临时使用本模板,而非安装到本地供长期使用。使用如下命令 解压模板文件: make unpack 对于没有安装 Make 的Windows 系统用户,则使用如下命令解压: makewin32.bat unpack 再将 hustthesis 目录下的如下文件拷贝到你TEX 工程根目录下即可: • hustthesis.bst • hustthesis.cls • hust-title.eps • hust-title.pdf

3

基本用法

本文档只能使用X E LATEX 或 LuaLATEX(推荐)编译。

在源文件开头处选择加载本文档类型,即可使用本模板,如下所示:

\documentclass{hustthesis}

3.1

文档类型选项

加载本文档类型时,有如下三个选项提供选择。

format = hdraft|finali

(7)

language = hchinese|english|english-drafti 指定论文语言。特别的,如果设定为 english-draft,将会剔除论文中的所有 中文内容,这有利于在未安装中文字体的环境中使用。如果不指定,默认设置为 chinese。 language Updated: 2013-07-01 Table 1: degree 选项的作用 选项 中文标题 (字段\HUST@zhapplyname) 英文标题 (字段\HUST@enapplyname) none 学位论文 A Thesis Submitted in

Par-tial Fulfillment of the Re-quirements for the Degree fyp 毕业论文 A Thesis Submitted in

Par-tial Fulfillment of the Re-quirements for Final Year Project

bachelor 学士学位论文 A Thesis Submitted in Par-tial Fulfillment of the Re-quirements for the Degree of Bachelor

master 硕士学位论文 A Thesis Submitted in Par-tial Fulfillment of the Re-quirements for the Degree of Master

phd 博士学位论文 A Thesis Submitted in Par-tial Fulfillment of the Re-quirements for the Degree of Philosophy

3.2

基本字段设置

模板中定义一些命令用于设置文档中的字段。其中一部分命令是以\zhX{<Chinese var>}, \enX{<English var>}和\X{<Chinese var>}{<English var>}的形式出现,

他们分别意味着设置字段 X 的中文部分,英文部分及一同设定。

\zhtitle{hChinese titlei} \entitle{hEnglish titlei}

\title{hChinese titlei}{hEnglish titlei}

这一组命令用于设定论文的中英文标题。

(8)

\zhauthor{hChinese authori} \enauthor{hEnglish authori}

\author{hChinese authori}{hEnglish authori}

这一组命令用于设定论文的中英文作者名。 \zhauthor \enauthor \author \date{hYeari}{hMonthi}{hDayi} 该命令用于设定论文的答辩日期。如果不设定,则会选择当前编译日期作为答 辩日期。 \date

\zhschoolname{hChinese school namei} \enschoolname{hEnglish school namei}

\schoolname{hChinese school namei}{hEnglish school namei}

这一组命令用于设定论文的中英文学校名。该字段在模板中已默认设置为 \schoolname{华中科技大学}{Huazhong University of Science \& Tech-nology}。所以除非需更改学校名,无需使用该命令。 \zhschoolname \enschoolname \schoolname \zhaddress{hChinese addressi} \enaddress{hEnglish addressi}

\address{hChinese addressi}{hEnglish addressi}

这一组命令用于设定论文的中英文学校地址。该字段在模板中已默认设置为 \address{中国,武汉,430074}{Wuhan~430074, P.~R.~China}。所以除非 需更改学校地址,无需使用该命令。 \zhaddress \enaddress \address

\zhapplyname{hChinese apply namei} \enapplyname{hEnglish apply namei}

\applyname{hChinese apply namei}{hEnglish apply namei}

这一组命令用于自定义中英文封面处的标题和正文处的页眉。详情见degree 文档类型选项。 \zhapplyname \enapplyname \applyname Updated: 2016-11-17 \zhmajor{hChinese majori} \enmajor{hEnglish majori}

\major{hChinese majori}{hEnglish majori}

这一组命令用于设定论文的中英文专业名。 \zhmajor \enmajor \major \zhsupervisor{hChinese supervisori} \ensupervisor{hEnglish supervisori}

\supervisor{hChinese supervisori}{hEnglish supervisori}

这一组命令用于设定论文的中英文指导老师名(含职称)。

(9)

\zhasssupervisor{hChinese asssupervisori} \enasssupervisor{hEnglish asssupervisori}

\asssupervisor{hChinese asssupervisori}{hEnglish asssupervisori}

这一组命令用于设定论文的中英文副指导老师名(含职称)。该命令是可选的, 如果不加以设定,封面处不会显示相应项。 \zhasssupervisor \enasssupervisor \asssupervisor \schoolcode{hschool codei} 用于设置学校代码。 \schoolcode \stuno{hstudent numberi} 用于设置学号。 \stuno \classno{hclassify numberi} 用于设置分类号。 \classno \secretlevel{hsecret leveli} 用于设置密级。 \secretlevel \zhabstract{hChinese abstracti} \enabstract{hEnglish abstracti}

\abstract{hChinese abstracti}{hEnglish abstracti}

这一组命令用于设定论文的中英文摘要。 \zhabstract \enabstract \abstract \zhkeywords{hChinese keywordsi} \enkeywords{hEnglish keywordsi}

\keywords{hChinese keywordsi}{hEnglish keywordsi}

(10)
(11)

\TurnOffTabFontSetting \TurnOnTabFontSetting 因为模板中设定了表格的行距和字号,使得使用中无法临时自定义表格的行距 和字号。故提供两个命令用于关闭和开启默认表格的行距和字号设置。比如你 如果需要输出一个自己定义字号的表格,可以使用如下示例: \begingroup \TurnOffTabFontSetting \footnotesize % 设置字号 \begin{tabular}{...} <content> \end{tabular} \TurnOnTabFontSetting \endgroup \email{hEmail Addressi} 用于生成邮箱地址。如\email{name@example.com}会生成如下效果的地址: name@example.com。 \email

4

简单示例

如下为一个使用本模板的简单示例。更完整的例子请见 hustthesis-zh-example.tex 文件,其效果见hustthesis-zh-example.pdf。

(12)

20 \makeabstract 21 \ tableofcontents 22 \ listoffigures 23 \listoftables 24 \mainmatter 25 26 %% 正 文 27 28 \backmatter 29 30 \begin{ack} 31 %% 致 谢 32 \end{ack} 33 \bibliography{ 参 考 文 献 .bib 文 件 } 34 35 \appendix 36 37 \begin{ publications } 38 %% 发 表 过 的 论 文 列 表 39 \end{ publications } 40 41 %% 附 录 剩 余 部 分 42 43 \end{document}

5

预设宏包介绍

本模板中预设了一些宏包,下面对其进行简单介绍。 • algorithm2e算法环境。 • enumitem自定义列表环境的式样。 • fancynum用于将大数每三位断开。 • listings代码环境。如需更好的代码高亮可以使用minted宏包。 • longtable跨页的超长表格环境。

• ltxtablelongtable 环境和 tabularx 环境的合并。

• multirow用于表格中合并行。

• overpic用于在图片上层叠其他内容。

• tabularx扩展到表格环境。

(13)

6

高级设置

6.1

切换字体

模板正文字体为宋体(AdobeSongStd-Light),同时我们提供如下命令切 换中文字体: {\HEI hcontenti} \hei{hcontenti} 切换字体为黑体(AdobeHeitiStd-Regular)。 \HEI \hei {\KAI hcontenti} \kai{hcontenti} 切换字体为楷体(AdobeKaitiStd-Regular)。 \KAI \kai {\FANGSONG hcontenti} \fangsong{hcontenti} 切换字体为仿宋(AdobeFangsongStd-Regular)。 \FANGSONG \fangsong

如果需要加载其他字体,请参阅宏包fontspec,宏包xeCJK(对于X E LATEX)

和宏包luatex-ja(对于LuaLATEX)的文档。

6.2

内部字段设置

(14)

III English Version Instruction

1 Requirement

Install the latest version ofTeXLive(Recommend) orMiKTeX. Please en-sure that all the packages are up-to-date.

If you need to produce the final format of thesis (seesubsection 3.1for more details), you should also need to install following Chinese fonts:

• AdobeSongStd-Light • AdobeKaitiStd-Regular • AdobeHeitiStd-Regular • AdobeFangsongStd-Regular

If you use LuaTEX, you need to run the command

mkluatex-fontdbto refresh font database index after installing the fonts.

2 Installation

2.1 Install into local

Use the command below to install this template into local.

make install

If you need uninstall it, use the command below.

make uninstall

For Windows User who don’t install Make, use the command below to install.

makewin32.bat install

If you need uninstall it, use the command below.

makewin32.bat uninstall

(15)

2.2 Use without installation

If you want to use this template temporary rather than installing it into local for long term use. Run below command to unpack the package.

make unpack

For Windows User who don’t install Make, use the command below to un-pack the un-package.

makewin32.bat unpack

Then copy the following files from directory hustthesis into your TEX project root directory.

• hustthesis.bst • hustthesis.cls • hust-title.eps • hust-title.pdf

3 Usage

This template can only be compiled by

X E LATEX orLuaLATEX(Recommend).

Insert below code in the top of source code to use this template:

\documentclass[language=english]{hustthesis}

3.1 Option

There’re three options available when use this template.

format = hdraft|finali

If format is set to final, the header will be removed. This option is only valid if language is not set to english-draft. The default value is final.

format

language = hchinese|english|english-drafti

Set what language is used in the document. Specially, if it’s set to en-glish-draft, all the Chinese characters will be removed in the document. This is extremely helpful when you don’t install Chinese fonts. The default value is chinese.

language

(16)

degree = hnone|fyp|bachelor|master|phdi

Set the category of thesis. It will influence the title of document, see Table2. The default value is none. Noted that the apply name field in the title page can be further customized through\applynamecommand.

degree

Table 2: Title under different degree Option Title

none A Thesis Submitted in Partial Fulfillment of the Require-ments for the Degree

fyp A Thesis Submitted in Partial Fulfillment of the Require-ments for Final Year Project

bachelor A Thesis Submitted in Partial Fulfillment of the Require-ments for the Degree of Bachelor

master A Thesis Submitted in Partial Fulfillment of the Require-ments for the Degree of Master

phd A Thesis Submitted in Partial Fulfillment of the Require-ments for the Degree of Philosophy

3.2 Variables setting

There’re some commands which are used to set the variables for the thesis. \title{htitlei} Set title. \title \author{hauthori} Set author. \author \date{hYeari}{hMonthi}{hDayi}

Set date. If you don’t set it, template will use current date.

\date

\schoolname{hschool namei}

Set the name of school which has been set as

\schoolname{Huazhong University of Science \& Technology}by de-fault. So unless you want to change the name, you don’t need to use this command.

(17)

\address{haddressi}

Set the address of school which has been set as

\address{Wuhan~430074, P.~R.~China}by default. So unless you want to change the address, you don’t need to use this command.

\address

\applyname{happly namei}

Custom the apply name which affects English title page. See more detail atdegreeoption.

\applyname

Updated: 2016-11-17

\major{hmajori}

Set your major.

\major

\supervisor{hsupervisori}

Set your supervisor.

\supervisor

\asssupervisor{hass-supervisori}

Set your ass-supervisor if you have.

\asssupervisor

\abstract{habstracti}

Put your abstract.

\abstract

\keywords{hkeywordsi}

Put your keywords.

\keywords

3.3 Other commands

Used to determine the different part of document. You can see the example atsection 4.

\frontmatter \mainmatter \backmatter

\maketitleand \makecover are the same. Used to create the title page.

\maketitle \makecover

Used to create abstract page.

\makeabstract

Used to create table of contents.

\tableofcontents

Used to print the date.

\endateformat

The ack environment is used to create acknowledge page.

(18)

\begin{ack} <content> \end{ack}

\bibliography{h.bib filei}

Used to create bibliography page.

\bibliography

The appendix environment is for appendix of course. Used like this:

appendix

\begin{appendix} <content> \end{appendix}

Or simple use \appendix to indicate that the rest of document are all in appendix, like this:

\appendix <content> \appendix

Create the index for all the figures and tables separately.

\listoffigures \listoftables

The publications environment is where you list all of your published

publications

thesises. It’s usually putted in appendix.

\begin{publications} \item <thesis> <...>

(19)

\TurnOffTabFontSetting \TurnOnTabFontSetting

This template has set the font size and line spread for all the tables which makes it’s impossible to change font format temporary in one table. So it provides these to command to temporary disable or enable default font setting in table. For example, if you want to change table font size, you can use the code like this:

\begingroup

\TurnOffTabFontSetting

\footnotesize % Set your font format as you like. \begin{tabular}{...} <content> \end{tabular} \TurnOnTabFontSetting \endgroup \email{hEmail Addressi}

A command to display email address. For example, \email{name@exam-ple.com}would look like this: name@example.com.

\email

4 Simple example

Below is a simple example of using this template. For a complete ex-ample see hustthesis-en-exex-ample.tex which will generate hustthesis-en-example.pdf.

1 \documentclass[degree=phd ,language=english ]{ hustthesis} 2

3 \title{your title} 4 \author{your name} 5 \major{your major}

(20)

17 \ tableofcontents 18 \ listoffigures 19 \listoftables 20 \mainmatter 21 22 %% main body 23 24 \backmatter 25 26 \begin{ack} 27 %% acknowledge 28 \end{ack}

29 \bibliography{. bib file} 30 31 \appendix 32 33 \begin{ publications } 34 %% your publications 35 \end{ publications } 36 37 %% rest of appendix 38 39 \end{document}

5 Introduction to some packages used in the

tem-plate

Here’s a list of some packages used in the template. • algorithm2eFor display algorithm.

• enumitemFor set the style of enumerate, itemize and description en-vironment.

• fancynumDisplay the really big number.

• listingsFor display the highlighted code. If you need better quality, use the packageminted.

• longtableCreate a very long table.

• ltxtableCombine the features of longtable anb tabularx. • multirowCombine multi-rows in table.

(21)

IV Implementation

1 %<*class>

2 \RequirePackage{ifthen}

1 Process Options

Usexkeyvalto process options.

3 \RequirePackage{xkeyval} Option format. 4 \newif\ifHUST@finalformat 5 \HUST@finalformattrue 6 \DeclareOptionX{format}[final]{ 7 \ifthenelse{\equal{#1}{final}}{ 8 \HUST@finalformattrue 9 }{ 10 \ifthenelse{\equal{#1}{draft}}{ 11 \HUST@finalformatfalse 12 }{ 13 \ClassError{hustthesis}

14 {Option format can only be 'final' or 'draft'} 15 {Try to remove option format^^J}

16 } 17 } 18 } Option language. 19 \gdef\HUST@language{chinese} 20 \DeclareOptionX{language}[chinese]{

21 \ifthenelse{\equal{#1}{chinese} \OR \equal{#1}{english} \OR

\equal{#1}{en-glish-draft}}{

22 \gdef\HUST@language{#1} 23 }{

24 \ClassError{hustthesis}

25 {Option language can only be 'chinese', 'english' or 'english-draft'} 26 {Try to remove option language^^J}

(22)

Option degree.

29 \gdef\HUST@degree{none}

30 \DeclareOptionX{degree}[none]{

31 \ifthenelse{\equal{#1}{none} \OR \equal{#1}{fyp} \OR

\equal{#1}{bach-elor} \OR \equal{#1}{master} \OR \equal{#1}{phd}}{

32 \gdef\HUST@degree{#1} 33 }{

34 \ClassError{hustthesis}

35 {Option degree can only be 'none', 'fyp', 'bachelor', 'master' or 'phd'} 36 {Try to remove option degree^^J}

37 } 38 }

Process options and load class book.

39 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}} 40 \ProcessOptionsX

41 \LoadClass[12pt, a4paper, openany]{book}

2 Check Engine

Check engine, only X E LATEX and LuaLATEX are supported.

(23)

choose Tex Gyre Termes, Droid Sans and CMU Typewriter Text as docu-ment main font, sans font and mono font.

57 \ifthenelse{\equal{\HUST@language}{english-draft}}{ 58 \RequirePackage{fontspec} 59 \setmainfont[ 60 Ligatures={Common,TeX}, 61 Extension=.otf, 62 UprightFont=*-regular, 63 BoldFont=*-bold, 64 ItalicFont=*-italic, 65 BoldItalicFont=*-bolditalic]{texgyretermes} 66 \setsansfont[Ligatures={Common,TeX}]{Droid Sans} 67 \setmonofont{CMU Typewriter Text}

68 \defaultfontfeatures{Mapping=tex-text}

Now let’s set the Chinese font commands into empty, when document is under english-draft mode.

69 \let\HEI\relax 70 \let\KAI\relax 71 \let\FANGSONG\relax 72 \newcommand{\hei}[1]{#1} 73 \newcommand{\kai}[1]{#1} 74 \newcommand{\fangsong}[1]{#1} 75 }{}

Below is the font setting under chinese or english mode. We chooses the same English font as under english-draft mode. We usexecjk pack-age (for X E LATEX) orluatex-ja package (for LuaLATEX, recommend) to

han-dle Chinese font. We will use font: AdobeSongStd-Light, AdobeKaitiStd-Regular, AdobeHeitiStd-Regular and AdobeFangsongStd-Regular.

76 \ifthenelse{\equal{\HUST@language}{english-draft}}{}{ 77 \ifXeTeX % XeTeX下使用fontspec + xeCJK处理字体

(24)

88 \setsansfont[Ligatures={Common,TeX}]{Droid Sans} 89 \setmonofont{CMU Typewriter Text}

90 \defaultfontfeatures{Mapping=tex-text}

91 % 中文字体

92 \RequirePackage[CJKmath]{xeCJK} 93 \setCJKmainfont[

94 BoldFont={Adobe Heiti Std},

95 ItalicFont={Adobe Kaiti Std}]{Adobe Song Std} 96 \setCJKsansfont{Adobe Kaiti Std} 97 \setCJKmonofont{Adobe Fangsong Std} 98 \xeCJKsetup{PunctStyle=kaiming} 99 100 \newcommand\ziju[2]{{\renewcommand{\CJKglue}{\hskip #1} #2}} \HEI 101 \newCJKfontfamily\HEI{Adobe Heiti Std} (End definition for \HEI. This function is documented on page13.)

\KAI

102 \newCJKfontfamily\KAI{Adobe Kaiti Std} (End definition for \KAI. This function is documented on page13.)

\FANGSONG

103 \newCJKfontfamily\FANGSONG{Adobe Fangsong Std} (End definition for \FANGSONG. This function is documented on page13.)

\hei

104 \newcommand{\hei}[1]{{\HEI #1}}

(End definition for \hei. This function is documented on page13.)

\kai

105 \newcommand{\kai}[1]{{\KAI #1}}

(End definition for \kai. This function is documented on page13.)

\fangsong

(25)

(End definition for \fangsong. This function is documented on page13.)

107 \else\fi

108 \ifLuaTeX % LuaTeX下使用luatex-ja处理字体 [推荐] 109 \RequirePackage{luatexja-fontspec}

110 % 英文字体

111 \setmainfont[Ligatures={Common,TeX}]{Tex Gyre Termes} 112 \setsansfont[Ligatures={Common,TeX}]{Droid Sans} 113 \setmonofont{CMU Typewriter Text}

114 \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} 115 % 中文字体 116 \setmainjfont[ 117 BoldFont={AdobeHeitiStd-Regular}, 118 ItalicFont={AdobeKaitiStd-Regular}]{AdobeSongStd-Light} 119 \setsansjfont{AdobeKaitiStd-Regular} 120 \defaultjfontfeatures{JFM=kaiming} 121 122 \newcommand\ziju[2]{\vbox{\ltjsetparameter{kanjiskip=#1} #2}} \HEI 123 \newjfontfamily\HEI{AdobeHeitiStd-Regular} (End definition for \HEI. This function is documented on page13.)

\KAI

124 \newjfontfamily\KAI{AdobeKaitiStd-Regular} (End definition for \KAI. This function is documented on page13.)

\FANGSONG

125 \newjfontfamily\FANGSONG{AdobeFangsongStd-Regular} (End definition for \FANGSONG. This function is documented on page13.)

\hei

126 \newcommand{\hei}[1]{{\jfontspec{AdobeHeitiStd-Regular} #1}} (End definition for \hei. This function is documented on page13.)

\kai

127 \newcommand{\kai}[1]{{\jfontspec{AdobeKaitiStd-Regular} #1}} (End definition for \kai. This function is documented on page13.)

\fangsong

(26)

(End definition for \fangsong. This function is documented on page13.)

129 \else\fi

Generate Chinese number usingzhnumber.

130 \RequirePackage{zhnumber}

131 \def\CJKnumber#1{\zhnumber{#1}} % 兼容CJKnumb 132 }

4 Basic Format

We set global line spread to 1.3. 133 \linespread{1.3}\selectfont

Usegeometrypackage to handle paper page.

134 \RequirePackage{geometry} 135 \geometry{ 136 top=1.77in, 137 bottom=0.8in, 138 left=1.1in, 139 right=1.1in, 140 includefoot 141 } 142 \ifthenelse{\isundefined{\pagewidth}}{ 143 \pdfpagewidth=\paperwidth 144 \pdfpageheight=\paperheight 145 }{ 146 \pagewidth=\paperwidth 147 \pageheight=\paperheight 148 }

Indent of paragraph and skip between paragraphs. 149 \RequirePackage{indentfirst}

150 \setlength{\parindent}{2em}

151 \setlength{\parskip}{0pt plus 2pt minus 1pt} Packages to handle color.

152 \RequirePackage{color}

153 \RequirePackage[table]{xcolor}

Usehyperrefpackage to generate cross-reference link.

(27)

157 bookmarksopen=true, 158 bookmarksopenlevel=1, 159 breaklinks=true, 160 colorlinks=true, 161 allcolors=black, 162 linktoc=all, 163 plainpages=false, 164 pdfpagelabels=true,

165 pdfstartview={XYZ null null 1},

166 pdfinfo={Template.Info={hustthesis.cls v1.1 2013/07/01, Copyright (C) 2013-2014 by Xu Cheng 2014 by hust-latex, https://github.com/hust-latex/hustthesis}} 167 }

5 Load Packages

Load packages for math.

168 \RequirePackage{amsmath,amssymb,amsfonts}

169 \RequirePackage[amsmath,amsthm,thmmarks,hyperref,thref]{ntheorem} 170 \RequirePackage{fancynum}

171 \setfnumgsym{\,}

172 \RequirePackage[lined,boxed,linesnumbered,ruled,vlined,algochapter]{algorithm2e} Load packages for picture.

173 \RequirePackage{overpic}

174 \RequirePackage{graphicx,caption,subcaption} Load packages for table.

175 \RequirePackage{array}

176 \RequirePackage{multirow,tabularx,ltxtable}

Load package for code highlight. Here we uselistingsto highlight the code. But if you need more features, useminted.

177 \RequirePackage{listings}

Load package for bibliography cite style.

178 \RequirePackage[numbers,square,comma,super,sort&compress]{natbib} Other packages for style setting.

(28)

185 \RequirePackage{datenumber} 186 \RequirePackage{etoolbox} 187 \RequirePackage{appendix} 188 \RequirePackage[titles]{tocloft} 189 \RequirePackage{xstring} 190 \RequirePackage{perpage}

6 Variables Setting

\zhtitle \entitle \title

Commands to set the title.

191 \def\zhtitle#1{\gdef\HUST@zhtitle{#1}\hypersetup{pdftitle={#1}}} 192 \def\entitle#1{\gdef\HUST@entitle{#1}} 193 \DeclareDocumentCommand\title{m g} 194 { 195 \IfNoValueTF{#2}{ 196 \zhtitle{#1}\entitle{#1} 197 }{ 198 \zhtitle{#1}\entitle{#2} 199 } 200 } 201 \title{}{}

(End definition for \zhtitle , \entitle , and \title. These functions are documented on page

7.)

\zhauthor \enauthor \author

Commands to set the author.

202 \def\zhauthor#1{\gdef\HUST@zhauthor{#1}\hypersetup{pdfauthor={#1}}} 203 \def\enauthor#1{\gdef\HUST@enauthor{#1}} 204 \DeclareDocumentCommand\author{m g} 205 { 206 \IfNoValueTF{#2}{ 207 \zhauthor{#1}\enauthor{#1} 208 }{ 209 \zhauthor{#1}\enauthor{#2} 210 } 211 } 212 \author{}{}

(End definition for \zhauthor , \enauthor , and \author. These functions are documented on

(29)

\date \zhdateformat \endateformat \dateformat

A command to set the date and several commands to display date. 213 \def\date#1#2#3{

214 \setdate{#1}{#2}{#3} 215 }

216 \setdatetoday

217 \def\zhdateformat{~\thedateyear~年~\thedatemonth~月~\thedateday~日} 218 \def\endateformat{\datedate} 219 \ifthenelse{\equal{\HUST@language}{chinese}}{ 220 \let\dateformat\zhdateformat 221 }{ 222 \let\dateformat\endateformat 223 }

(End definition for \date and others. These functions are documented on page16.)

\zhschoolname \enschoolname \schoolname

Commands to set the school name.

224 \def\zhschoolname#1{\gdef\HUST@zhschoolname{#1}} 225 \def\enschoolname#1{\gdef\HUST@enschoolname{#1}} 226 \DeclareDocumentCommand\schoolname{m g} 227 { 228 \IfNoValueTF{#2}{ 229 \zhschoolname{#1}\enschoolname{#1} 230 }{ 231 \zhschoolname{#1}\enschoolname{#2} 232 } 233 }

234 \schoolname{华中科技大学}{Huazhong University of

Science~\char38~Tech-nology}

(End definition for \zhschoolname , \enschoolname , and \schoolname. These functions are

documented on page8.)

\zhaddress \enaddress \address

Commands to set the address.

(30)

244 }

245 \address{中国,武汉,430074}{Wuhan~430074, P.~R.~China}

(End definition for \zhaddress , \enaddress , and \address. These functions are documented

on page8.)

\zhapplyname \enapplyname \applyname

Commands to custom apply name.

246 \def\zhapplyname#1{\def\HUST@zhapplyname{#1}} 247 \def\enapplyname#1{\def\HUST@enapplyname{#1}} 248 \DeclareDocumentCommand\applyname{m g} 249 { 250 \IfNoValueTF{#2}{ 251 \enapplyname{#1} 252 }{ 253 \zhapplyname{#1}\enapplyname{#2} 254 } 255 }

(End definition for \zhapplyname , \enapplyname , and \applyname. These functions are

doc-umented on page8.)

\zhmajor \enmajor \major

Commands to set the major.

256 \def\zhmajor#1{\gdef\HUST@zhmajor{#1}} 257 \def\enmajor#1{\gdef\HUST@enmajor{#1}} 258 \DeclareDocumentCommand\major{m g} 259 { 260 \IfNoValueTF{#2}{ 261 \zhmajor{#1}\enmajor{#1} 262 }{ 263 \zhmajor{#1}\enmajor{#2} 264 } 265 } 266 \major{}{}

(End definition for \zhmajor , \enmajor , and \major. These functions are documented on page

8.)

\zhsupervisor \ensupervisor \supervisor

Commands to set the supervisor.

267 \def\zhsupervisor#1{\gdef\HUST@zhsupervisor{#1}} 268 \def\ensupervisor#1{\gdef\HUST@ensupervisor{#1}} 269 \DeclareDocumentCommand\supervisor{m g}

(31)

273 }{

274 \zhsupervisor{#1}\ensupervisor{#2} 275 }

276 }

277 \supervisor{}{}

(End definition for \zhsupervisor , \ensupervisor , and \supervisor. These functions are

documented on page8.)

\zhasssupervisor \enasssupervisor \asssupervisor

Commands to set the asssupervisor.

278 \def\zhasssupervisor#1{\gdef\HUST@zhasssupervisor{#1}} 279 \def\enasssupervisor#1{\gdef\HUST@enasssupervisor{#1}} 280 \DeclareDocumentCommand\asssupervisor{m g} 281 { 282 \IfNoValueTF{#2}{ 283 \zhasssupervisor{#1}\enasssupervisor{#1} 284 }{ 285 \zhasssupervisor{#1}\enasssupervisor{#2} 286 } 287 } 288 \asssupervisor{}{}

(End definition for \zhasssupervisor , \enasssupervisor , and \asssupervisor. These

functions are documented on page9.)

\schoolcode A command to set school code.

289 \def\schoolcode#1{\gdef\HUST@schoolcode{#1}} 290 \schoolcode{}

(End definition for \schoolcode. This function is documented on page9.)

\stuno A command to set student number.

291 \def\stuno#1{\gdef\HUST@stuno{#1}} 292 \stuno{}

(End definition for \stuno. This function is documented on page9.)

\classno A command to set classification number.

293 \def\classno#1{\gdef\HUST@classno{#1}} 294 \classno{}

(End definition for \classno. This function is documented on page9.)

\secretlevel A command to set secret level.

(32)

(End definition for \secretlevel. This function is documented on page9.)

\zhabstract \enabstract \abstract

Commands to set the abstract.

297 \long\def\zhabstract#1{\long\gdef\HUST@zhabstract{#1}} 298 \long\def\enabstract#1{\long\gdef\HUST@enabstract{#1}} 299 \DeclareDocumentCommand\abstract{+m +g} 300 { 301 \IfNoValueTF{#2}{ 302 \zhabstract{#1}\enabstract{#1} 303 }{ 304 \zhabstract{#1}\enabstract{#2} 305 } 306 } 307 \abstract{}{}

(End definition for \zhabstract , \enabstract , and \abstract. These functions are

docu-mented on page9.)

\zhkeywords \enkeywords \keywords

Commands to set the keywords.

308 \def\zhkeywords#1{\gdef\HUST@zhkeywords{#1}\hypersetup{pdfkeywords={#1}}} 309 \def\enkeywords#1{\gdef\HUST@enkeywords{#1}} 310 \DeclareDocumentCommand\keywords{m g} 311 { 312 \IfNoValueTF{#2}{ 313 \zhkeywords{#1}\enkeywords{#1} 314 }{ 315 \zhkeywords{#1}\enkeywords{#2} 316 } 317 } 318 \keywords{}{}

(End definition for \zhkeywords , \enkeywords , and \keywords. These functions are

(33)

322 \def\tablename{表} 323 \AtBeginDocument{\def\listingscaption{代码}} 324 \def\bibname{参考文献} 325 \def\contentsname{目\hspace{1em}录} 326 \def\contentsnamenospace{目录} 327 \def\appendixname{附录} 328 \def\HUST@listfigurename{插图索引} 329 \def\HUST@listtablename{表格索引} 330 \def\equationautorefname{公式} 331 \def\footnoteautorefname{脚注} 332 \def\itemautorefname~#1\null{第~#1~项\null} 333 \def\figureautorefname{图} 334 \def\tableautorefname{表} 335 \def\appendixautorefname{附录} 336 \expandafter\def\csname\appendixname autorefname\endcsname{\ap-pendixname}

(34)

361 \def\equationautorefname{Equation} 362 \def\footnoteautorefname{Footnote} 363 \def\itemautorefname{Item} 364 \def\figureautorefname{Figure} 365 \def\tableautorefname{Table} 366 \def\appendixautorefname{Appendix} 367 \expandafter\def\csname\appendixname autorefname\endcsname{\ap-pendixname} 368 \def\chapterautorefname{Chapter} 369 \def\sectionautorefname{Section} 370 \def\subsectionautorefname{Subsection} 371 \def\subsubsectionautorefname{Sub-subsection} 372 \def\FancyVerbLineautorefname{Line} 373 \def\pageautorefname{Page} 374 \def\lstlistingautorefname{Code Fragment} 375 \def\definitionautorefname{Definition} 376 \def\propositionautorefname{Proposition} 377 \def\lemmaautorefname{Lemma} 378 \def\theoremautorefname{Theorem} 379 \def\axiomautorefname{Axiom} 380 \def\corollaryautorefname{Corollary} 381 \def\exerciseautorefname{Exercise} 382 \def\exampleautorefname{Example} 383 \def\proofautorefname{Proof} 384 \SetAlgorithmName{Algorithm}{Algorithm}{List of Algorithms} 385 \SetAlgoProcName{Procedure}{Procedure} 386 \SetAlgoFuncName{Function}{Function} 387 \def\AlgoLineautorefname{Line} 388 } Internal variables.

389 \def\HUST@classnotitle{{分}\hfill{类}\hfill{号}} 390 \def\HUST@stunotitle{学号}

391 \def\HUST@schoolcodetitle{学校代码} 392 \def\HUST@secrettile{密级}

393 \def\HUST@zhauthortitle{{学}\hfill{位}\hfill{申}\hfill{请}\hfill{人}} 394 \def\HUST@zhmajortitle{{学}\hfill{科}\hfill{专}\hfill{业}}

395 \def\HUST@zhsupervisortitle{{指}\hfill{导}\hfill{教}\hfill{师}}

396 \def\HUST@zhasssupervisortitle{{副}\hfill{指}\hfill{导}\hfill{教}\hfill{

(35)

399 \def\HUST@enauthortitle{Student} 400 \def\HUST@enmajortitle{Major} 401 \def\HUST@ensupervisortitle{Supervisor} 402 \def\HUST@enasssupervisortitle{Co-Supervisor} 403 404 \def\HUST@originaldeclare{独创性声明} 405 \long\def\HUST@originaldeclaretext{ 406 本人声明所呈交的学位论文是我个人在导师的指导下进行的研究工作及取得的研 究成果。尽我所知,除文中已标明引用的内容外,本论文不包含任何其他人或集体已 经发表或撰写过的研究成果。对本文的研究做出贡献的个人和集体,均已在文中以明 确方式标明。本人完全意识到本声明的法律结果由本人承担。 407 } 408 \def\HUST@zhauthorsig{学位论文作者签名:}

409 \def\HUST@zhdatefield{日期:\hspace{2em}年\hspace{2em}月\hspace{2em}

(36)

433 \def\HUST@acknamenospace{致谢} 434 \def\HUST@publicationtitle{攻读学位期间发表的学术论文} 435 }{ 436 \def\HUST@ackname{Acknowledge} 437 \def\HUST@acknamenospace{Acknowledge} 438 \def\HUST@publicationtitle{Publication} 439 } 440 441 \ifthenelse{\equal{\HUST@degree}{none}}{ 442 \def\HUST@zhapplyname{学位论文}

443 \def\HUST@enapplyname{A Thesis Submitted in Partial Fulfillment of the

Re-quirements for the Degree}

444 }{} 445

446 \ifthenelse{\equal{\HUST@degree}{fyp}}{ 447 \def\HUST@zhapplyname{毕业设计论文}

448 \def\HUST@enapplyname{A Thesis Submitted in Partial Fulfillment of the

Re-quirements for Final Year Project}

449 }{} 450

451 \ifthenelse{\equal{\HUST@degree}{bachelor}}{ 452 \def\HUST@zhapplyname{学士学位论文}

453 \def\HUST@enapplyname{A Thesis Submitted in Partial Fulfillment of the

Re-quirements for the Degree of Bachelor}

454 }{} 455

456 \ifthenelse{\equal{\HUST@degree}{master}}{ 457 \def\HUST@zhapplyname{硕士学位论文}

458 \def\HUST@enapplyname{A Thesis Submitted in Partial Fulfillment of the

Re-quirements for the Degree of Master}

459 }{} 460

461 \ifthenelse{\equal{\HUST@degree}{phd}}{ 462 \def\HUST@zhapplyname{博士学位论文}

463 \def\HUST@enapplyname{A Thesis Submitted in Partial Fulfillment of the

Re-quirements for the Degree of Philosophy}

464 }{} 465

466 \ifthenelse{\equal{\HUST@language}{chinese}}{

(37)

469 \hypersetup{pdfsubject={\HUST@enapplyname}} 470 }

Set \listfigurename and \listtablename. 471 \def\listfigurename{\HUST@listfigurename} 472 \def\listtablename{\HUST@listtablename}

8 Style Setting

8.1 Equation Style

Allow long equation breaking between lines or pages. 473 \allowdisplaybreaks[4]

Set skip between equation and context. 474 \abovedisplayskip=10bp plus 2bp minus 2bp 475 \abovedisplayshortskip=10bp plus 2bp minus 2bp 476 \belowdisplayskip=\abovedisplayskip

477 \belowdisplayshortskip=\abovedisplayshortskip Set equation numbering style.

478 \numberwithin{equation}{chapter}

8.2 Theorem Style

We useamsthmto handle the proof environment and usentheoremto handle other theorem environments.

479 \theoremnumbering{arabic} 480 \ifthenelse{\equal{\HUST@language}{chinese}}{ 481 \theoremseparator{:} 482 }{ 483 \theoremseparator{:} 484 }

(38)

494 }{ 495 \newtheorem{definition}{Definition}[chapter] 496 } 497 498 \theoremstyle{plain} 499 \theorembodyfont{\itshape} 500 \ifthenelse{\equal{\HUST@language}{chinese}}{ 501 \newtheorem{proposition}{命题}[chapter] 502 \newtheorem{lemma}{引理}[chapter] 503 \newtheorem{theorem}{定理}[chapter] 504 \newtheorem{axiom}{公理}[chapter] 505 \newtheorem{corollary}{推论}[chapter] 506 \newtheorem{exercise}{练习}[chapter] 507 \newtheorem{example}{例}[chapter] 508 \def\proofname{\hei{证明}} 509 }{ 510 \newtheorem{proposition}{Proposition}[chapter] 511 \newtheorem{lemma}{Lemma}[chapter] 512 \newtheorem{theorem}{Theorem}[chapter] 513 \newtheorem{axiom}{Axiom}[chapter] 514 \newtheorem{corollary}{Corollary}[chapter] 515 \newtheorem{exercise}{Exercise}[chapter] 516 \newtheorem{example}{Example}[chapter] 517 \def\proofname{\textbf{Proof}} 518 }

8.3 Floating Objects Style

Set the skip to the context for floating object with argument ‘h’.

519 \setlength{\intextsep}{0.7\baselineskip plus 0.1\baselineskip minus

0.1\base-lineskip}

Set the skip to the context for top or bottom floating object.

520 \setlength{\textfloatsep}{0.8\baselineskip plus 0.1\baselineskip

mi-nus 0.2\baselineskip}

Set the fraction of floating object. Make the fraction less crowded than default value to prevent floating object occupying too much space.

521 \renewcommand{\textfraction}{0.15} 522 \renewcommand{\topfraction}{0.85}

(39)

8.4 Table Style

\tabincell A command make it easier to insert a new table into an existing cell.

525 \newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}} (End definition for \tabincell. This function is documented on page ??.)

To prevent \cline breaking page inlongtableenvironment, use in this way: htable contenti \\* \nopagebreak \cline{i-j}3

526 \def\@cline#1-#2\@nil{% 527 \omit 528 \@multicnt#1% 529 \advance\@multispan\m@ne 530 \ifnum\@multicnt=\@ne\@firstofone{&\omit}\fi 531 \@multicnt#2% 532 \advance\@multicnt-#1% 533 \advance\@multispan\@ne 534 \leaders\hrule\@height\arrayrulewidth\hfill 535 \cr 536 \noalign{\nobreak\vskip-\arrayrulewidth}}

Here we set the global font setting (font size: 11pt and line spread: 1.4) for tables. But first we will declare a variable to determine whether table global font setting is activated.

537 \newif\ifHUST@useoldtabular 538 \HUST@useoldtabularfalse

\TurnOffTabFontSetting Use \TurnOffTabFontSetting to deactivate global font setting.

539 \def\TurnOffTabFontSetting{\HUST@useoldtabulartrue}

(End definition for \TurnOffTabFontSetting. This function is documented on page19.)

\TurnOnTabFontSetting Use \TurnOnTabFontSetting to activate global font setting.

540 \def\TurnOnTabFontSetting{\HUST@useoldtabularfalse}

(End definition for \TurnOnTabFontSetting. This function is documented on page19.)

Hook the tabular, tabularx and longtable environment to imply the global font setting.

541 \AtBeginEnvironment{tabular}{ 542 \ifHUST@useoldtabular\else

543 \fontsize{11pt}{15.4pt}\selectfont

3Reference:http://tex.stackexchange.com/questions/52100/

(40)

544 \fi 545 } 546 \AtBeginEnvironment{tabularx}{ 547 \ifHUST@useoldtabular\else 548 \fontsize{11pt}{15.4pt}\selectfont 549 \fi 550 } 551 \AtBeginEnvironment{longtable}{ 552 \ifHUST@useoldtabular\else 553 \fontsize{11pt}{15.4pt}\selectfont 554 \fi 555 }

8.5 Caption Style

Set caption font size as 11pt, use hang format, remove ‘:’ after number and set the skip between context as 12pt.

556 \DeclareCaptionFont{HUST@captionfont}{\fontsize{11pt}{14.3pt}\select-font} 557 \DeclareCaptionLabelFormat{HUST@caplabel}{#1~#2} 558 \captionsetup{ 559 font=HUST@captionfont, 560 labelformat=HUST@caplabel, 561 format=hang, 562 labelsep=quad, 563 skip=12pt 564 }

Set figure and table numbering style.

565 \renewcommand{\thetable}{\arabic{chapter}.\arabic{table}} 566 \renewcommand{\thefigure}{\arabic{chapter}-\arabic{figure}}

8.6 Code Highlight Style

(41)

575 showspaces=false, 576 showstringspaces=false, 577 showtabs=false, 578 numbers=left, 579 numberstyle=\tiny\color{black}, 580 frame=lines, 581 rulecolor=\color{black}, 582 breaklines=true 583 }

8.7 Section Title Style

Set the numbering depth for section. 584 \setcounter{secnumdepth}{3}

Chapter tilte format and spacing setting. 585 \titleformat{\chapter} 586 { 587 \bfseries 588 \HEI 589 \centering 590 \fontsize{18pt}{23.4pt}\selectfont 591 } 592 { 593 \ifthenelse{\equal{\HUST@language}{chinese}} 594 {\zhnumber{\thechapter}} 595 {Chapter~\thechapter} 596 } 597 {1em} 598 {} 599 \titlespacing*{\chapter}{0pt}{0pt}{20pt} Section tilte format and spacing setting.

600

\titleformat*{\section}{\bfseries\HEI\fontsize{16pt}{20.8pt}\select-font}

601 \titlespacing*{\section}{0pt}{18pt}{6pt} Subsection tilte format and spacing setting.

602

\titleformat*{\subsection}{\bfseries\HEI\fontsize{14pt}{18.2pt}\se-lectfont}

(42)

604 \titleformat*{\subsubsection}{\bfseries\HEI\fontsize{13pt}{16.9pt}\se-lectfont} 605 \titlespacing*{\subsubsection}{0pt}{12pt}{6pt}

8.8 TOC Style

TOC depth. 606 \setcounter{tocdepth}{1} TOC right margin. 607 \contentsmargin{2.0em}

Remove vertical space between two continues chapter entries. 4

608 \newskip\HUST@oldcftbeforechapskip 609 \HUST@oldcftbeforechapskip=\cftbeforechapskip 610 \newskip\HUST@oldcftbeforesecskip 611 \HUST@oldcftbeforesecskip=\cftbeforesecskip 612 \let\HUST@oldl@chapter\l@chapter 613 \let\HUST@oldl@section\l@section 614 \let\HUST@oldl@subsection\l@subsection 615 \def\l@chapter#1#2{\HUST@oldl@chapter{#1}{#2}\cftbeforechapskip=3pt} 616 \def\l@section#1#2{\HUST@oldl@section{#1}{#2}\cftbeforechapskip=\HUST@old-cftbeforechapskip\cftbeforesecskip=3pt} 617 \def\l@subsection#1#2{\HUST@oldl@subsection{#1}{#2}\cftbeforesecskip=\HUST@old-cftbeforesecskip}

Set LOF LOT style. 5

(43)

8.9 Head & Foot Style

628 \let\ps@plain\ps@fancy 629 \pagestyle{fancy} 630 \fancyhf{} 631 \renewcommand{\headrulewidth}{0pt} 632 \renewcommand{\footrulewidth}{0pt} 633 634 \ifthenelse{\equal{\HUST@degree}{fyp}}{ 635 \fancyfoot[R]{\thepage} 636 }{ 637 \fancyfoot[C]{\thepage} 638 } 639 640 \ifthenelse{\equal{\HUST@language}{english-draft}}{}{ 641 \ifHUST@finalformat\else 642 \fancyhead[C]{ 643 \ziju{1em}{\kai{\fontsize{14pt}{18.2pt}\selectfont\HUST@zhschool-name\HUST@zhapplyname}} 644 \vskip -5pt 645 \vbox{

646 \hrule width \textwidth height 2pt

647 }

648 } 649 \fi 650 }

8.10 List Environment Style

(44)

658 \def\frontmatter{ 659 \clearpage 660 \@mainmatterfalse 661 \pagenumbering{Roman} 662 } 663 \def\mainmatter{ 664 \clearpage 665 \@mainmattertrue 666 \pagenumbering{arabic} 667 } 668 \def\backmatter{ 669 \clearpage 670 \@mainmatterfalse 671 \settocdepth{chapter} 672 \hypersetup{bookmarksopenlevel=0} 673 }

(End definition for \frontmatter , \mainmatter , and \backmatter. These functions are

doc-umented on page17.)

Chinese title page. 674 \def\HUST@zhtitlepage{ 675 \begin{center} 676 \vspace*{-1.0cm} 677 \parbox[t][2.2cm][t]{\textwidth}{ 678 \begin{center} 679 \setlength{\tabcolsep}{0pt} 680 \setlength{\extrarowheight}{12pt} 681 \TurnOffTabFontSetting 682 \fontsize{14pt}{16.8pt}\selectfont 683 \begin{tabularx}{\textwidth}{p{4em}p{5em}Xp{2em}p{12em}}

(45)

696 \ziju{10bp}{\fontsize{42pt}{54.6pt}\selectfont\HEI\HUST@zhapply-name} 697 \end{center} 698 } 699 \parbox[t][4.8cm][t]{.8\textwidth}{ 700 \vspace{1.4cm} 701 \begin{center} 702 \fontsize{22pt}{35.2pt}\selectfont\hei{\HUST@zhtitle} 703 \end{center} 704 } 705 \parbox[t][7.4cm][t]{\textwidth}{ 706 \vspace{1.2cm} 707 \begin{center} 708 \fontsize{18pt}{27.0pt}\selectfont 709 \setlength{\extrarowheight}{0pt} 710 \TurnOffTabFontSetting 711 \begin{tabular}{p{5em}@{{:\hspace{1em}}}l} 712 \HUST@zhauthortitle & {\HUST@zhauthor} \\ 713 \HUST@zhmajortitle & {\HUST@zhmajor} \\ 714 \HUST@zhsupervisortitle & {\HUST@zhsupervisor} \\ 715 \ifthenelse{\equal{\HUST@zhasssupervisor}{}}{}{

716 \HUST@zhasssupervisortitle & {\HUST@zhasssupervisor} \\ 717 }

718 \HUST@zhdatetitle & \zhdateformat 719 \end{tabular} 720 \TurnOnTabFontSetting 721 \end{center} 722 } 723 \end{center} 724 }

(46)

735 \fontsize{18pt}{23.4pt}\selectfont 736 \textbf{\textsf{\HUST@entitle}} 737 \end{center} 738 } 739 \parbox[t][5cm][t]{.8\textwidth}{ 740 \begin{center} 741 \setlength{\extrarowheight}{5pt} 742 \fontsize{16pt}{24.0pt}\selectfont 743 \TurnOffTabFontSetting 744 \begin{tabular}{l@{~:~}p{18em}}

745 \HUST@enauthortitle & {\HUST@enauthor} \\ 746 \HUST@enmajortitle & {\HUST@enmajor} \\ 747 \HUST@ensupervisortitle & {\HUST@ensupervisor} 748 \ifthenelse{\equal{\HUST@enasssupervisor}{}}{}{

749 \\ \HUST@enasssupervisortitle & {\HUST@enasssupervisor}

750 } 751 \end{tabular} 752 \TurnOnTabFontSetting 753 \end{center} 754 } 755 \parbox[t][7cm][b]{.8\textwidth}{ 756 \begin{center} 757 \bfseries 758 \fontsize{14pt}{28.0pt}\selectfont 759 \HUST@enschoolname \\ 760 \HUST@enaddress \\ 761 \endateformat 762 \end{center} 763 } 764 \end{center} 765 } Copyright page. 766 \def\HUST@authorization{

767 \centerline{\fontsize{16pt}{20.8pt}\selectfont \HEI

\HUST@originalde-clare}

768 \vspace{1cm} 769 {

(47)

774 \parbox[t]{\textwidth}{

775 \fontsize{12pt}{18.0pt}\selectfont 776 \TurnOffTabFontSetting

777 \hfill\begin{tabular}{ll}

778 \HUST@zhauthorsig & \hspace{2em}\\ 779 \HUST@zhdatefield & \hspace{2em}\\ 780 \end{tabular}

781 \TurnOnTabFontSetting 782 }

783 \\[1.9cm]

784 \centerline{\fontsize{16pt}{20.8pt}\selectfont \HEI

\HUST@authti-tle} 785 \\[1cm] 786 { 787 \fontsize{12pt}{24.0pt}\selectfont 788 \indent\HUST@authorizationtext \\ 789 \indent\HUST@authorizationaddon \\ 790 \indent\HUST@authorizationcheck 791 } 792 \\[1.9cm] 793 \hspace{2em}\parbox[t]{.9\textwidth}{ 794 \fontsize{12pt}{18.0pt}\selectfont 795 \TurnOffTabFontSetting 796 \begin{tabular}{ll}

797 \HUST@zhauthorsig & \hspace{2em}\\ 798 \HUST@zhdatefield & \hspace{2em}\\ 799 \end{tabular}

800 \hfill

801 \begin{tabular}{ll}

802 \HUST@zhteachersig & \hspace{2em}\\ 803 \HUST@zhdatefield & \hspace{2em}\\ 804 \end{tabular} 805 \TurnOnTabFontSetting 806 } 807 \vfill 808 } \maketitle \makecover

Commands to generate title page. 809 \def\maketitle{

(48)

812 bottom=1.2in, 813 left=1in, 814 right=1in, 815 } 816 \let\HUST@oldthepage\thepage 817 \ifthenelse{\equal{\HUST@language}{english-draft}} 818 {\def\thepage{Titlepage}} 819 {\def\thepage{封面}} 820 \begin{titlepage} 821 \ifthenelse{\equal{\HUST@language}{english-draft}}{}{ 822 \thispagestyle{empty} 823 \HUST@zhtitlepage 824 \clearpage 825 } 826 \thispagestyle{empty} 827 \HUST@entitlepage 828 \end{titlepage} 829 \ifthenelse{\equal{\HUST@language}{english-draft}}{}{ 830 \def\thepage{版权页} 831 \thispagestyle{empty} 832 \HUST@authorization 833 \clearpage 834 } 835 \restoregeometry 836 \let\thepage\HUST@oldthepage 837 \setcounter{page}{1} 838 } 839 \let\makecover\maketitle

(End definition for \maketitle and \makecover. These functions are documented on page17.)

(49)

849 \def\HUST@enabstractpage{ 850 \chapter*{\textsf{\HUST@enabstractname}} 851 \begingroup 852 \fontsize{10.5pt}{13.7pt}\selectfont 853 \HUST@enabstract \par 854 \vskip 1.2ex 855 \noindent\textbf{\HUST@enkeywordstitle}\hspace{.8em} \HUST@enkey-words 856 \endgroup 857 }

\makeabstract A command to generate abstract page.

858 \def\makeabstract{ 859 \phantomsection 860 \ifthenelse{\equal{\HUST@language}{chinese}}{ 861 \addcontentsline{toc}{chapter}{\HUST@zhabstractnamenospace} 862 }{ 863 \addcontentsline{toc}{chapter}{\HUST@enabstractname} 864 } 865 \ifthenelse{\equal{\HUST@language}{english-draft}}{}{ 866 \HUST@zhabstractpage 867 \clearpage 868 } 869 \HUST@enabstractpage 870 \clearpage 871 }

(End definition for \makeabstract. This function is documented on page17.)

\tableofcontents A command to generate table of contents.

872 \let\HUST@tableofcontents\tableofcontents 873 \def\tableofcontents{ 874 \ifthenelse{\equal{\HUST@language}{chinese}}{ 875 \pdfbookmark{\contentsnamenospace}{\contentsnamenospace} 876 }{ 877 \pdfbookmark{\contentsname}{\contentsname} 878 } 879 \HUST@tableofcontents 880 \clearpage 881 }

(50)

ack A command to generate acknowledge page. 882 \newenvironment{ack}{ 883 \clearpage 884 \phantomsection 885 \addcontentsline{toc}{chapter}{\HUST@acknamenospace} 886 \chapter*{\HUST@ackname} 887 \begingroup 888 \fontsize{10.5pt}{13.7pt}\selectfont 889 }{ 890 \endgroup 891 }

publications A command to generate publications page.

892 \newenvironment{publications}{ 893 \clearpage 894 \ifHUST@inappendix 895 \chapter{\HUST@publicationtitle} 896 \else 897 \phantomsection 898 \addcontentsline{toc}{chapter}{\HUST@publicationtitle} 899 \chapter*{\HUST@publicationtitle} 900 \fi 901 \begin{enumerate}[labelindent=0pt,label={[\arabic*]},itemsep=0.5ex] 902 \fontsize{10.5pt}{10.5pt}\selectfont 903 }{ 904 \end{enumerate} 905 }

\bibliography A command to generate bibliography page.

(51)

(End definition for \bibliography. This function is documented on page18.)

appendix The appendix environment.

918 \newif\ifHUST@inappendix 919 \HUST@inappendixfalse 920 \newif\ifHUST@appendix@resetmainmatter 921 \HUST@appendix@resetmainmatterfalse 922 \renewenvironment{appendix}{ 923 \if@mainmatter 924 \HUST@appendix@resetmainmatterfalse 925 \else 926 \HUST@appendix@resetmainmattertrue 927 \@mainmattertrue 928 \fi 929 \appendixtitletocon 930 \appendices 931 \titleformat{\chapter} 932 { 933 \bfseries\HEI 934 \centering 935 \fontsize{18pt}{23.4pt}\selectfont 936 } 937 {\appendixname\,\thechapter} 938 {1em} 939 {} 940 \HUST@inappendixtrue 941 }{ 942 \endappendices 943 \HUST@inappendixfalse 944 \ifHUST@appendix@resetmainmatter 945 \HUST@appendix@resetmainmatterfalse 946 \@mainmatterfalse 947 \else\fi 948 }

\listoffigures A command to generate list of figures.

949 \let\HUST@listoffigures\listoffigures 950 \def\listoffigures{

951 \clearpage

952 \ifHUST@inappendix

(52)

954 \def\listfigurename{\appendixname\,\thechapter\hspace{1em}\HUST@listfigurename} 955 \else 956 \def\listfigurename{\HUST@listfigurename} 957 \fi 958 \phantomsection 959 \ifHUST@inappendix 960 \addcontentsline{toc}{chapter}{\thechapter\hspace{1em}\HUST@list-figurename} 961 \else 962 \addcontentsline{toc}{chapter}{\listfigurename} 963 \fi 964 \HUST@listoffigures 965 \def\listfigurename{\HUST@listfigurename} 966 }

(End definition for \listoffigures. This function is documented on page18.)

\listoftables A command to generate list of tables.

967 \let\HUST@listoftables\listoftables 968 \def\listoftables{ 969 \clearpage 970 \ifHUST@inappendix 971 \addtocounter{chapter}{1} 972 \def\listtablename{\appendixname\,\thechapter\hspace{1em}\HUST@listtablename} 973 \else 974 \def\listtablename{\HUST@listtablename} 975 \fi 976 \phantomsection 977 \ifHUST@inappendix 978 \addcontentsline{toc}{chapter}{\thechapter\hspace{1em}\HUST@list-tablename} 979 \else 980 \addcontentsline{toc}{chapter}{\listtablename} 981 \fi 982 \HUST@listoftables 983 \def\listtablename{\HUST@listtablename} 984 }

(53)

10 Other Command

\email

985 \def\email#1{

986 \href{mailto:#1}{\texttt{#1}} 987 }

(End definition for \email. This function is documented on page19.)

(54)

V Index

The italic numbers denote the pages where the corresponding en-try is described, numbers underlined point to the definition, all others in-dicate the places where it is used.

(55)
(56)
(57)
(58)

\subsubsection . . . 604,605 \subsubsectionautorefname 340,371 \supervisor . . . 8,8,17,17,267 \surd . . . 422 T \tabcolsep . . . 679 \tabincell . . . 417,525 \tableautorefname . . . 334,365 \tablename . . . 322,623 \tableofcontents . . . 10,17,872 TEX and LATEX2ε commands:

(59)
(60)
(61)

VI Change History

v1.0

General: Initial version . . . 1 v1.1

General: Add language option . . 1 Pack template using dtx and

ins file . . . 1 v1.2

General: Fix for TeXLive 2016. Remove interfaces and

other problematic package . . 1 v1.3

General: Fix for X E LATEX . . . . 1

v1.4

General: Add command to

custom apply name field. . . . 1 Minor update to fulfill school

Referenties

GERELATEERDE DOCUMENTEN

The addition of the tannins to the different maceration time wines did not exhibit significant differences when compared to their respective controls, but when compared to each

The aim of this study was to investigate the role of the leptin (ob) and leptin receptor (obR) genes in predisposition to pre-eclampsia and involved screening the genes in

A multimodal automated seizure detection algorithm integrating behind-the-ear EEG and ECG was developed to detect focal seizures.. In this framework, we quantified the added value

cMRI was found to be the most important MRI modality for brain tumor segmentation: when omitting cMRI from the MP-MRI dataset, the decrease in mean Dice score was the largest for

Specifically, we evaluate the response to acoustic stimuli in three-class auditory oddball and auditory attention detection (AAD) in natural speech paradigms.. The former relies

Geology of the Tosca area with the major economical centers, roads, dry riverbeds, irrigation areas (blue circles) and surface elevation contours (mamsl). The resource units RU1,

The two neighbouring ions will be compared, as before in Chapter 6, by investigating the values for the three AIM properties: the electron density ( ), the

To further investigate these structure–activity relationships (SAR), in the present study, additional C5- and C6-substituted isatin analogues were synthesized and