forked from tzhuan/ntu-thesis
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy paththesis.tex
226 lines (173 loc) · 6.63 KB
/
thesis.tex
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
\documentclass[oneside]{ntuthesis}
\usepackage{cite} % 使連續的引用可以變成破折號\cite{newcombe2011dtam,engel2014lsd,engel2018direct} ex [4][5][6] => [4-6]
\usepackage{indentfirst}
\usepackage{times}
\usepackage{verbatim}
\usepackage{color}
\usepackage{url}
\usepackage{graphicx}
\usepackage{array}
\usepackage{wallpaper}
\usepackage{hyperref}
\usepackage{amsmath}
\usepackage{amssymb} % \mathbb
\usepackage{notoccite} % 引用編號時忽略圖目錄裡出現的引用 Ignore citations in captions in list of figures when numbering https://tex.stackexchange.com/questions/36304/ignore-citations-in-captions-in-list-of-figures-when-numbering
\newcommand{\refFig}[1]{%
圖\ref{#1} - p.\pageref{#1}
}
\newcommand{\refP}[1]{%
\ref{#1} - p.\pageref{#1}
}
\interfootnotelinepenalty=10000 % 防止footnote分頁
\input{glossary} % 中英文字對照
%\usepackage{csvsimple} % 輸入中英文對照表 csv 用
\usepackage{fancyhdr} % 借用此套件來擺放浮水印 設定頁首頁尾用的套件
%% ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ 數學相關 ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
\usepackage{mathtools}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
\usepackage{siunitx}% degree symbol
%% ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲ 數學相關 ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲
%% ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ 表格相關 ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
\usepackage{booktabs}
\usepackage{multirow} % 表格跨欄
\usepackage{caption}
\captionsetup[table]{skip=5pt}
\usepackage{threeparttable}
\usepackage{tabularx}
%% ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲ 表格相關 ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲
%% ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ 目錄行距 ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
\usepackage{tocloft}
\setlength\cftbeforechapskip{0pt}
\setlength{\cftbeforesecskip}{-8pt}
\setlength{\cftbeforesubsecskip}{-8pt}
\renewcommand{\cftchapafterpnum}{\vspace{5pt}}
\hypersetup{%
colorlinks=true,% switch on coloured instead of framed links
linkcolor=[rgb]{0.713,0.188,0.09},% main link color (e.g. for the ToC)182,48,23
filecolor=magenta,% color of links to external files
urlcolor=red,% color to external URLs
}
%% ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲ 目錄行距 ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲
%% ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ 中文章節 ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
\usepackage{titlesec}
\usepackage{titletoc}
\usepackage{xCJKnumb}
\newcommand{\tocformat}{%
\titleformat{\chapter}
{\huge\bfseries}
{第\,\xCJKnumber{\thechapter}\,章}{-3.3em}\\{}
}
\newcommand{\tocformatbib}{%
\titleformat{\chapter}
{\huge\bfseries}
{第\,\xCJKnumber{\thechapter}\,章}{1em}{}
}
\renewcommand{\contentsname}{目錄}
\renewcommand{\figurename}{圖}
\renewcommand{\tablename}{表}
\renewcommand{\listfigurename}{圖目錄}
\renewcommand{\listtablename}{表目錄}
\renewcommand{\bibname}{參考文獻}
%% ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲ 中文章節 ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲
%% ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ 浮水印 ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
\pagestyle{fancy} % 啟動 fancy header/footer 套件
\setlength{\headheight}{15pt}
\fancyheadoffset{15pt}
\renewcommand{\headrulewidth}{0pt} % header 的直線; 0pt 則無線
\input{watermark.tex}
%% ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲ 浮水印 ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲
%% ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ 頁首頁尾 ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\pagestyle{fancy} % 啟動 fancy header/footer 套件
\fancypagestyle{normal_chapter}{%
\renewcommand{\headrulewidth}{0.5pt}
\addtolength{\headwidth}{\marginparsep}
\addtolength{\headwidth}{\marginparwidth}
\addtolength{\headwidth}{-33mm}
%% 頁首 - 右
\rhead[\fancyplain{}{\bfseries\leftmark}]{%
\fancyplain{}{\bfseries\thepage}
}
%% 頁首 - 左
\lhead[\fancyplain{}{\bfseries\thepage}]{%
\fancyplain{}{\bfseries\rightmark}
}
\cfoot{} % 清除頁尾頁碼
}
%% ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲ 頁首頁尾 ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲
% Using the tex-text mapping for ligatures etc.
\defaultfontfeatures{Mapping=tex-text}
% Set the default fonts
\setmainfont{Times New Roman}
\setCJKmainfont{標楷體}
% Windows 字型
% > dir %windir%\fonts
\ifdefined\withwatermark
\CenterWallPaper{0.174}{watermark.pdf}
\setlength{\wpXoffset}{6.1725cm}
\setlength{\wpYoffset}{10.5225cm}
\fi
% digital object identifier
\ifdefined\withdoi
\insertdoi
\fi
\makeatletter
\AtBeginDocument{
\hypersetup{
pdftitle={\@titleen},
pdfauthor={\@authoren},
pdfsubject={\@typeen{} \@classen},
pdfkeywords={\@keywordsen}
}
}
\makeatother
% Your information goes here
\input{thesis_vars}
\begin{document}
\frontmatter
\makecover
\makecertification
\input{acknowledgements}
\input{abstract}
\clearpage % 換頁
{
\hypersetup{%
pdfborder = {0 0 0}%移除超連結外的紅框框
}
\addtocontents{toc}{\protect{\pdfbookmark[0]{\contentsname}{toc}}}%把目錄頁加入pdf書籤
\tableofcontents
\listoffigures
\clearpage % 換頁
\listoftables
\clearpage
\glossarystyle{aiaostyle} % 中英文字對照
\setlength{\glsdescwidth}{0.5\textwidth} % 中英文字對照
\setlength{\glspagelistwidth}{0.1\textwidth} % 中英文字對照
\printglossary[title={中英文字對照}] % 中英文字對照
% \chapter*{中英文字對照}
%
% \csvreader[tabular=l l l l ,
% table head=\hline & 中文 & 英文 & 縮寫\\\hline,
% late after line=\\\hline]%
% {eng_cht_table.csv}%
% {zh=\zh,eng=\eng,abbrev=\abbrev}%
% {\thecsvrow & \zh & \eng & \abbrev}%
}
\mainmatter
\pagestyle{normal_chapter} %改變頁首、頁尾樣式 (不包含chapter頁 (plain))
\tocformat
% Your thesis goes here
\input{introduction}
%\input{related}
%\input{method}
%\input{experiment}
%\input{conclusion}
\tocformatbib
\appendix
\backmatter
%% 參考文獻
\addcontentsline{toc}{chapter}{\bibname} %摘要、文獻等頁碼編進目錄
\bibliographystyle{IEEEtran}
\bibliography{thesis}
\end{document}