forked from liantze/usmthesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusmthesis.tex
316 lines (285 loc) · 11.9 KB
/
usmthesis.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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
%% usmthesis.tex 2022/01/09 version v1.5
%%
%% Created by Lim Lian Tze (Ph.D.)
%% liantze@gmail.com
%% http://liantze.penguinattack.org.
%% Creator/Maintainer: 2005-2023
%%
%% Updated by Wan Nor Arifin to follow the latest USM format
%% wnarifin@gmail.com
%% https://wnarifin.github.io
%% Maintainer: 2023-
%% ---- Read this ----
%% Some formattings are easiest changed by uncommenting
%% some lines in this .tex file or by changing certain
%% options.
%%
%% Make sure you carefully read _quickstart.pdf_ document
%% especially section 3 Compiling your thesis
%% A common issue is "List of Publications" pages do not appear,
%% so make sure the steps for compiling the thesis are followed.
%% Many thanks to Lim Lian Tze for her work on usmthesis all these years
%% ---- Original preface by Lim Lian Tze ----
%% IMPORTANT MESSAGE (Dec 2016)
%% Due to the recent numerous changes requested by IPS, USM to different
%% candidates -- often conflicting even within the same week -- without much
%% consistency nor in black in white, I have found it increasingly difficult
%% to maintain a coherent version. I have therefore decided to provide some
%% options that seem to be favored by IPS on different occasions; but will no
%% longer update the template until an updated formatting guidelines with clear
%% instructions and concrete samples is published.
%%
%% THERE WILL BE NO FURTHER UPDATES UNTIL IPS-USM PUBLISHES AN OFFICIAL
%% UPDATED FORMATTING GUIDELINES WITH CONCRETE, CLEAR INSTRUCTIONS.
%%
%% Individual requests for help to modify this version for your needs will be
%% handled on a case by case basis, depending on my mood, perhaps for a fee.
%% Requests for help to modify past versions will NOT be entertained.
%% Please read http://tex.my/how-to-ask-for-latex-related-help-effectively/.
%%
%% (Yes I'm that tired and frustrated. I know everyone just want to graduate,
%% but I am by now genuinely put off by the tone of some requests with rude
%% attitudes, unclear descriptions, flip-flopping conditions, etc for something
%% that was originally for my own use.)
%%
%% Usmthesis _was_ fun; but it has ceased to be so for me.
%%
%% Submit a git pull request on https://github.com/liantze/usmthesis
%% if you wish to contribute your changes. No timeframe is set for approvals.
%% I cannot check through any edited usmthesis.cls of any version without
%% CVS.
%%
%% Oh and if you'd like to adapt this template (the .cls and/or the .tex) for
%% your institution, that's perfectly fine, but at least keep the license
%% (LPPL 1.3) and the original author (me) won't you? It's just normal decency.
%% THANK you. :-)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% If you prefer -- and have been allowed -- to use
%% Arial, then
%% \documentclass[arial]{usmthesis}
%% It's not really Arial, it's a Helvetica look-alike,
%% but if you're not a designer nor a typographer, you
%% probably can't tell the difference (I can't either)
%%
%% OTHER IMPORTANT OPTIONS:
%% singespacetitle - Make title on cover and title
%% page single-spaced.
%%
%% chapnumwords — Make chapter titles be `Chapter One'
%% tocchapnumwords — Make the ToC use `Chapter One' too
%% (Engineering IPS seems to like the above two settings)
%%
%% tocpage These options will add a ``Page'' label at the
%% lotpage top of the Table of Contents, List of Tables,
%% lofpage List of Figures and List of Plates respectively.
%% loppage I don't know lah, one moment IPS says must add at
%% the top of all these lists; one month later say
%% only the ToC, a few months later say don't add at all.
%% Find, mix-and-match yourself based on the instrustions you got.
%%
%% tocCAPSfront - Sometimes IPS wants the ``Table of Contents'', ``List of
%% Figures'', ``Abstract'' etc to be all-caps in the ToC;
%% sometimes they don't. Use this option to make them ALL CAPS.
%%
%% tocCAPSref - Similar to the above but for the ``References''.
%% tocCAPSapp - Similar to the above but for the ``Appendices''.
\documentclass[
singlespacetitle, % Make title on cover page singlespaced
% chapnumwords,tocchapnumwords, %% ``Chapter One'' I think Engineering like this
%tocpage, % Put ``Page'' at top of ToC. Add lotpage, lofpage if
% ``Page'' is also needed for LoT and LoF.
% Remove "Page" for TOC as per latest USM format as of Sept 2022
lotpage, % Add "Page" for the rest
loppage,
loapage,
lofpage,
tocCAPSfront, % Make ``List of Tables'' etc in ToC CAPS
tocCAPSref, % Make ``References'' in ToC CAPS
tocCAPSapp, % Make ``Appendices'' in ToC CAPS
]{usmthesis}
%% Example of loading other packages that you may require.
%% I'm loading the marvosym package so that I can produce a
%% smiley face with the command \Smiley.
\usepackage{marvosym}
%% Also, the enumitem package is great for customising
%% list environments.
\usepackage{enumitem}
%% Listings is a nice package for typesetting code
%% listings. Other possible packages include fancyvrb,
%% minted, etc.
\usepackage{listings}
\lstset{basicstyle=\ttfamily,breaklines=true}
%% For those who need to produce algorithms and pseudocode.
%% There are a number of different packages available, but
%% unfortunately they tend not to work well together!
%% I'm using algorithmicx, specifically algpseucode, here.
\usepackage{algpseudocode}
\usepackage{algorithm}
\usepackage{indentfirst}
%% Redefined commands
\renewcommand*{\aclabelfont}[1]{{\acsfont{#1}}} % Unbold \acro as per latest USM format as of Sept 2022
%% Enter particulars about your thesis HERE
% Your Name
\author{Lim Lian Tze}
% English title of your thesis
\title{Writing Your Thesis with LaTeX with a Very, Very, Very Long Title}
% Malay title of your thesis
\titlems{Penulisan Tesis dengan LaTeX}
% Year submitted
\submityear{2022}
% Month submitted
\submitmonth{September}
%% Choose only 1 degree type! :-)
\degreetype{Doctor of Philosophy}
% \degreetype{Master of Science}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% You can comment out the following line if you don't have a
% "List of Own Publications". And make it all caps yourself
% if it needs to be all caps in the ToC.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcites{own}{List of Publications}
\usepackage[plainpages=false,bookmarksnumbered,
bookmarksdepth=section,breaklinks=true]{hyperref}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Options for generating hyperlinks when using pdfLaTeX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifpdf
\makeatletter
\hypersetup{hypertexnames=false,%
pdfauthor={\@author},pdftitle={\@title}}
\makeatother
\fi
\usepackage{ragged2e}
\begin{document}
%% \listofalgorithms fix -- otherwise it won't appear in TOC
\renewcommand{\listofalgorithms}{\begingroup
\tocfile{\texorpdfstring{LIST OF ALGORITHMS}{List of Algorithms}}{loa}
\endgroup}
\makeatletter
\let\l@algorithm\l@figure
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Default bibliography style is apa (using
% \RequirePackage[natbibapa]{apacite} in the class file).
%
% If you prefer the number system though, use bibliography
% style "plainnat" for [1][2][3] or "alpha" for [Jon94] (the label
% will be auto-generated).
% To use "plainnat" or "alpha", open "usmthesis.cls",
% then comment out apacite as "% \RequirePackage[natbibapa]{apacite}"
% and uncomment "\RequirePackage[numbers]{natbib}" to use "plainnat"
% or uncomment "\RequirePackage{natbib}" to use "alpha".
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibliographystyle{apacite}
\bibliographystyleown{apacite}
%\bibliographystyle{plainnat}
%\bibliographystyleown{plainnat}
%\bibliographystyle{alpha}
%\bibliographystyleown{alpha}
\frontmatter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Inserts the cover page (the hard cover with gold-lettering)
% and the title page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makecover
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MAKE SURE YOU HAVE A acknowledgements.tex FILE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\include{acknowledgement}
\tableofcontents \clearpage
\listoftables \clearpage
\listoffigures \clearpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% You can comment out the following line if you don't
% have a "List of Plates"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\listofplates \clearpage
%% \listofalgorithms style fix -- else it will show Figure instead of Algorithm
\let\oldlistofalgorithms\listofalgorithms
\let\oldnumberline\numberline%
\newcommand{\algnumberline}[1]{Algorithm~#1~~~~~}
\renewcommand{\listofalgorithms}{%
\let\numberline\algnumberline%
\oldlistofalgorithms
\let\numberline\oldnumberline%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% You can comment out the following line if you don't
% have a "List of Algorithms"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\listofalgorithms \clearpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% List of Symbols, Abbreviations and Appendix
% Comment out as required
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\include{lo-sym}
\include{lo-abb}
\include{lo-app}
% Paragraph spacing
\setlength\parskip{18pt}
% Text-float spacing
\setlength\intextsep{24pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Your Malay and English abstracts, each in one file.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{abs-mal}
\input{abs-eng}
\mainmatter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The actual chapters of your thesis as listed in
% mainchaps.tex. Make sure you have the relevant
% chapter files.
% E.g. if you mainchaps.tex contains the lines
%
% \include{hypothesis.tex}
% \include{proof.tex}
%
% Then you MUST have the files hypothesis.tex, proof.tex
% (containing the relevant chapters) in the same directory
% as mainchaps.tex.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{mainchaps}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The bibliography. Turn on page numbering.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\addtocontents{toc}{\protect\cftpagenumberson{chap}}
%%%% Soooo if IPS says there should be 5cm top margin
%%%% on the ``References'' heading page, uncomment the
%%%% line just before and after \bibliography. Repeat for
%%%% \bibliographyown if necessary
%% Increase spacing before chapter heading
\titlespacing*{\chapter}{0pt}{\dimexpr2.5cm-50pt}{\baselineskip}
\bibliography{mybib}
% now change it back to normal
\titlespacing*{\chapter}{0pt}{-50pt}{\baselineskip}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The appendices.
% If you don't have any, you may delete everything below,
% until and including \input{appendices}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\appendix
\assignpagestyle{\chapter}{empty}
%% * If IPS says they don't want any page numbering in the footer,
%% add \pagestyle{empty}
%% * If they don't want any page numbering in the ToC either,
%% add \addtocontents{toc}{\protect\cftpagenumbersoff{chap}}
%% * If they say they don't want Appendix A, B, C... to appear
%% in the ToC either, add
%% \addtocontents{toc}{\protect\setcounter{tocdepth}{-1}}
%% \addtocontents{toc}{\textbf{List of Publications}} % (to get it to appear)
%\pagestyle{empty}
\addtocontents{toc}{\protect\setcounter{tocdepth}{-1}}
\input{appendices}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The list of own publications. If you don't have one, you may
% comment out the next 4 lines.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
\assignpagestyle{\chapter}{plain}
\phantomsection % hyperref to list of publications in ToC
% Uncomment/comment these lines if you need the List of Publications to be bold/not bold in the ToC.
%\addcontentsline{toc}{part}{\uppercase{List of Publications}} % not bold
\addcontentsline{toc}{part}{\textbf{\uppercase{List of Publications}}} % bold
\nociteown{lim:2007,lim:latextypesetting}
\bibliographyown{mybib}
\end{document}