-
Notifications
You must be signed in to change notification settings - Fork 20
/
FDUThesis.sty
executable file
·188 lines (171 loc) · 7.97 KB
/
FDUThesis.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
\ProvidesPackage{FDUThesis}
%----------------------------Page Layout-------------------------------!
%\usepackage[top=1.75in, bottom=1.75in, left=1.75in, right=1.25in]{geometry}
\usepackage[twoside, head=15pt, bindingoffset=1cm, textwidth=.7\paperwidth,ignorefoot]{geometry}
%\usepackage[top=2.54cm, bottom=2.54cm, left=3.18cm, right=3.18cm]{geometry}
\geometry{a4paper} % ... or a4paper or a5paper or ...
%\usepackage{layout}
%\layout
%-----------------------------Index, Indent, LineSpace Setup--------------------------!
\usepackage{imakeidx} %Index Enabled
\makeindex[columns=2, options=-s Thesis]
\usepackage[font=footnotesize, totoc]{idxlayout}
\setlength{\parindent}{2em} %Indent
\usepackage{setspace}
\setstretch{1.385}
%\doublespacing
%\onehalfspacing
%\setlength{\baselineskip}{20bp} %baseline skip. No effect in Preamble, insert after begin{document}
%\linespread{1.3844827586206896}
\newcommand{\frontchapter}[1]{\cleardoublepage \phantomsection \addcontentsline{toc}{chapter}{#1} \chapter*{#1} \markboth{\sffamily {#1}}{}}
\newcommand{\backchapter}[1]{\cleardoublepage \phantomsection \addcontentsline{toc}{chapter}{#1} \chapter*{#1} \markboth{\sffamily {#1}}{}}
%-----------------------------------Misc-----------------------------------!
\usepackage{graphicx}
\usepackage{amsmath, amsthm, amssymb}
\usepackage{latexsym,bm}
\usepackage{titlesec}
\titleformat{\chapter}[display]{\Huge\sffamily\bfseries}{\thechapter}{1em}{}
%\titleformat{\chapter}[hang]{\center\Huge\sffamily\bfseries}{\thechapter}{1em}{}
\usepackage{xcolor} %Basic: \color{red} \colorbox{red}{text} \fcolorbox \textcolor{red}{text}
\usepackage{caption}
\captionsetup{font={small}}
\captionsetup[table]{belowskip=1ex}
\usepackage{enumitem}
\newcommand\litem[1]{\item{\bfseries #1\par}}
\setlist{nolistsep}
\usepackage{fancybox}
\usepackage{picinpar}
\usepackage{siunitx}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{arydshln}
\usepackage{pdfpages}
\raggedbottom
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\newcommand{\ud}{\mathrm{d}}
\newcommand{\ut}{\mathrm{T}} %Matrix Transpose
\newcommand{\Laplace}[1]{\mathcal{L} \left\{ {#1} \right\}}
\newcommand{\Lacelap}[1]{\mathcal{L}^{-1} \left\{ {#1} \right\}}
\newcommand{\RNum}[1]{\uppercase\expandafter{\romannumeral #1\relax}}
\sisetup{
output-exponent-marker = \ensuremath{\mathrm{E}},
exponent-product={}
}
%--------------------------------Bib Setup-------------------------------!
\RequirePackage[numbers,super,sort&compress]{natbib}
\bibpunct{[}{]}{,}{s}{}{,}
\renewcommand{\bibfont}{\wuhao}
%\setlength{\bibsep}{0pt}
\usepackage{hypernat}
%-----------------------------Hyper Ref Setup--------------------------!
%Enable Href HyperLinks, BookMarks
\usepackage[colorlinks=true,% Hyper ref Enabled
bookmarks=true,%
linkcolor=black,%
citecolor=black,%
CJKbookmarks=true,%
unicode=true,%
%pagebackref=true,%
hyperindex=true,%
hyperfigures=true,%
pdfauthor={Xu Deyuan}]{hyperref}
%-----------------------------CJK Font Setup--------------------------!
\usepackage[PunctStyle=kaiming,AutoFakeBold=false,AutoFakeSlant=false,indentfirst,CJKnumber]{xeCJK}
\xeCJKDeclareSubCJKBlock{PUNC}{"FF1F}
\setCJKmainfont[BoldFont={Songti SC Bold}, PUNC=SimSun] {Songti SC Light}
\setCJKsansfont[BoldFont={Heiti SC Medium}]{Heiti SC}
\setCJKmonofont[BoldFont={Hiragino Sans GB W6}]{Hiragino Sans GB W3}
\setCJKfamilyfont{zhxinsong}{SimSun}
\setCJKfamilyfont{zhsong}[BoldFont={Songti SC Bold}]{Songti SC Light}
\setCJKfamilyfont{zhhei}[BoldFont={Heiti SC Medium}]{Heiti SC}
\setCJKfamilyfont{zhfs}{FangSong}
\setCJKfamilyfont{zhkai}[BoldFont={Kaiti SC Bold}]{Kaiti SC Regular}
\setCJKfamilyfont{zhli}{LiSu}
\setCJKfamilyfont{zhyou}{YouYuan}
\newcommand*{\simsun}{\CJKfamily{zhxinsong}} % 新宋
\newcommand*{\songti}{\CJKfamily{zhsong}} % 宋体
\newcommand*{\heiti}{\CJKfamily{zhhei}} % 黑体
\newcommand*{\fangsong}{\CJKfamily{zhfs}} % 仿宋
\newcommand*{\kaishu}{\CJKfamily{zhkai}} % 楷书
\newcommand*{\lishu}{\CJKfamily{zhli}} % 隶书
\newcommand*{\youyuan}{\CJKfamily{zhyou}} % 幼圆
% Use Fontsize inside {}, include a \par at the end of bracket to enable baselineskip
\newcommand{\chuhao}{\fontsize{42pt}{50.4pt}\selectfont} %初号
\newcommand{\xiaochu}{\fontsize{36pt}{43.12pt}\selectfont} %小初号
\newcommand{\yihao}{\fontsize{27.5pt}{33pt}\selectfont} %一号
\newcommand{\erhao}{\fontsize{21pt}{25.2pt}\selectfont} %二号
\newcommand{\xiaoer}{\fontsize{18pt}{21.6pt}\selectfont} %小二号
\newcommand{\sanhao}{\fontsize{15.75pt}{18.9pt}\selectfont} %三号
\newcommand{\sihao}{\fontsize{13.75pt}{16.5pt}\selectfont} %四号
\newcommand{\xiaosi}{\fontsize{12pt}{14.4pt}\selectfont} %小四号
\newcommand{\wuhao}{\fontsize{10.5pt}{12.6pt}\selectfont} %五号
\newcommand{\xiaowu}{\fontsize{9pt}{10.8pt}\selectfont} %小五号
\newcommand{\liuhao}{\fontsize{7.875pt}{9.45pt}\selectfont} %六号
\newcommand{\qihao}{\fontsize{5.25pt}{6.3pt}\selectfont} %七号
% Will Robertson's fontspec.sty can be used to simplify font choices.
% To experiment, open /Applications/Font Book to examine the fonts provided on Mac OS X,
% and change "Hoefler Text" to any of these choices.
%-----------------------------English Font Setup--------------------------!
\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont{Times New Roman}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Helvetica}
\setmonofont[Scale=MatchLowercase]{Courier New}
\newfontfamily{\AMT}{American Typewriter}
\newfontfamily{\Curly}{Baskerville}
\newfontfamily{\Fraktur}{Euclid Fraktur}
%Define Han Length
\newlength{\Han}
\settowidth{\Han}{汉}
%-----------------------------TOC LOF Setup--------------------------!
%Define ListOfContent, Header/Footer, Index
\usepackage[titles]{tocloft}
\renewcommand{\cftchapfont}{\sffamily}
\renewcommand{\cftdotsep}{5}
\renewcommand{\cftparskip}{0pt}
\addtolength{\cftchapnumwidth}{3\Han} % add the extra space
\setlength{\cftbeforechapskip}{0.6em} % Adjust Chapter Menu Spacing
\setlength{\cftbeforesecskip}{\cftbeforechapskip} % Equal Menu Vertical Spacing
\setlength{\cftbeforesubsecskip}{\cftbeforechapskip}
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}} % for chapters
\addtolength{\cftsecnumwidth}{0.69\Han} % add the extra space
\renewcommand{\cftsecpresnum}{\raisebox{0.07em}{\S\,}} % for sections
%-----------------------------Fancy Header Setup--------------------------!
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\chaptermark}[1]{\markboth{\sffamily\chaptername\ \thechapter \quad #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\sffamily\thesection.\ #1}}
\fancyhf{}
\fancyhead[ER]{\small\leftmark}
\fancyhead[OL]{\small\rightmark}
\fancyhead[EL,OR]{$\cdot$\ \thepage\,$\cdot$}
%----------------------------Language Setup--------------------------!
\theoremstyle{plain}
\newtheorem{assumption}{假设}[chapter]
\newtheorem{definition}{定义}[chapter]
\newtheorem{proposition}{命题}[chapter]
\newtheorem{lemma}{引理}[chapter]
\newtheorem{theorem}{定理}[chapter]
\newtheorem{axiom}{公理}[chapter]
\newtheorem{corollary}{推论}[chapter]
\newtheorem{exercise}{练习}[chapter]
\newtheorem{example}{例}[chapter]
\newtheorem{remark}{注释}[chapter]
\newtheorem{problem}{问题}[chapter]
\newtheorem{conjecture}{猜想}[chapter]
\renewcommand{\chaptername}{}
\renewcommand{\contentsname}{\textsf{目\hspace{.5em}录}}
\renewcommand{\listfigurename}{\textsf{插图索引}}
\renewcommand{\listtablename}{表格索引}
\renewcommand{\bibname}{\textsf{参考文献}}
\renewcommand{\indexname}{\textsf{索\hspace{.5em}引}}
\renewcommand{\figurename}{图}
\renewcommand{\tablename}{表}
\renewcommand{\appendixname}{附\hspace{.5em}录}
\renewcommand{\thechapter}{第\CJKnumber{\arabic{chapter}}章}
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}}
\renewcommand{\thefigure} {\arabic{chapter}-\arabic{figure}}
\renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}
\renewcommand{\thetable} {\arabic{chapter}-\arabic{table}}