/
upnmthesis.cls
628 lines (570 loc) · 20 KB
/
upnmthesis.cls
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
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
%%%%%%%%%%%%
%% This is upnmthesis.cls, created by Lian Tze LIM (liantze@gmail.com)
%% for the Centre of Graduate Studies, Universiti Pertahanan Nasional
%% Malaysia.
%% http://liantze.penguinattack.org/latextypesetting.html#upnmthesis
%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{upnmthesis}[2016/04/20 LaTeX2e class for Universiti Pertahanan Nasional Malaysia (UPNM) v1.0.2. Copyright (c) 2015--2016 Lian Tze LIM (liantze@gmail.com)]
\LoadClass[12pt,a4paper,oneside]{memoir}
\RequirePackage{etoolbox}
%%%%%%%%%%
% Class option whether this is an undergrad thesis.
% Default is none (i.e. postgrad thesis).
%%%%%%%%%%
\newif\if@undergrad
\newif\if@microtype
\newif\if@newtx
\DeclareOption{undergrad}{\@undergradtrue}
\DeclareOption{microtype}{\@microtypetrue}
\DeclareOption{newtx}{\@newtxtrue}
\ProcessOptions
%%%%%%%%%%
% Filter some annoying warning messages
%%%%%%%%%%
\RequirePackage{silence}
\WarningFilter{babel}{No hyphenation patterns were preloaded}
\WarningFilter{inputenc}{inputenc package ignored with utf8 based engines}
\WarningFilter{tex}{destination with the same identifier}
%%%%%%%%%%
% Defaults: UTF-8 input encoding; T1 font encoding
%%%%%%%%%%
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{helvet}
\if@newtx%
\IfFileExists{newtxmath.sty}{\RequirePackage{newtxtext,newtxmath}}{\RequirePackage{mathptmx}}
\else%
\RequirePackage{mathptmx}
\fi
\RequirePackage{amsmath,amssymb,amsfonts,bm}
\renewcommand\ttdefault{lmvtt}
\if@microtype\RequirePackage{microtype}\fi
\RequirePackage{ragged2e}
%%%%%%%%%%%
% Information about the thesis
%%%%%%%%%%%
\def\theauthor{\textbf{!INSERT AUTHOR!}}
\def\thetitle{\textbf{!INSERT TITLE!}}
\def\@mtsubmissionyear{\textbf{!INSERT YEAR!}}
\def\@mtsubmissionmonth{\textbf{!INSERT MONTH!}}
\def\@mtdegree{\textbf{!INSERT DEGREE!}}
\def\@mtstudyfield{\textbf{!INSERT studyfield!}}
\def\@mtfaculty{\textbf{!INSERT FACULTY!}}
\def\@mtvivadate{\textbf{!INSERT VIVA DATE!}}
\newcommand{\submissionyear}[1]{\def\@mtsubmissionyear{#1}}
\newcommand{\submissionmonth}[1]{\def\@mtsubmissionmonth{#1}}
\newcommand{\degree}[1]{\def\@mtdegree{#1}}
\newcommand{\studyfield}[1]{\def\@mtstudyfield{#1}}
\newcommand{\faculty}[1]{\def\@mtfaculty{#1}}
\newcommand{\vivadate}[1]{\def\@mtvivadate{#1}}
%%%%%%%%%%
% Load Bahasa and English
%%%%%%%%%%
\RequirePackage[bahasam,main=english]{babel}
\addto\captionsenglish{%
\renewcommand*\abstractname{\texorpdfstring{ABSTRACT}{Abstract}}
\renewcommand*\contentsname{\texorpdfstring{TABLE OF CONTENTS}{Table of Contents}}
\renewcommand*\listtablename{\texorpdfstring{LIST OF TABLES}{List of Tables}}
\renewcommand*\listfigurename{\texorpdfstring{LIST OF FIGURES}{List of Figures}}
\renewcommand*\acronymname{\texorpdfstring{LIST OF ABBREVIATIONS}{List of Abbreviations}}
\renewcommand*\refname{\texorpdfstring{REFERENCES}{References}}
\renewcommand*\appendixtocname{\texorpdfstring{APPENDICES}{Appendices}}
}
%%%%%%%%%
% Load hyperref and glossaries -- glossaries has to be loaded after
% hyperref to make the hyperlinks work properly.
%%%%%%%%%
\AtEndPreamble{%
\usepackage[breaklinks,pdfborder={0 0 0},pdfpagelabels,plainpages=false]{hyperref}%
\usepackage[noredefwarn,toc,nonumberlist,shortcuts,translate=false,style=long,acronym]{glossaries}
\renewcommand{\glossarypreamble}{\vspace*{3\onelineskip}}
\makeglossaries
}
%%%%%%%%%%%%
% Page layout
%
% Margins: T - 25mm; B - 25mm; L - 40mm; R - 25mm
% No running headers.
% Page number at centre bottom of page
%%%%%%%%%%%%
\settrimmedsize{297mm}{210mm}{*}
\setlrmarginsandblock{40mm}{25mm}{*}
\setulmarginsandblock{25mm}{25mm}{*}
\setheadfoot{\baselineskip}{10mm}
\addtolength\footskip{-6pt}
\makeoddfoot{plain}{}{\footnotesize\thepage}{}
\makeevenfoot{plain}{}{\footnotesize\thepage}{}
\pagestyle{plain}
\checkandfixthelayout
%%%%%%%%%%%%
% Line and paragraph spacing
% - double spacing for normal text
% - 4-space between paragraphs
% - no paragraph indent
%%%%%%%%%%%%
\DisemulatePackage{setspace}
\RequirePackage{setspace}
\setstretch{2.0}
\abnormalparskip{6\onelineskip}
\setlength{\parindent}{0em}
%%%%%%%%%%%%
% Footnotes
% - Font size = 8pt = \tiny for 12pt body font in memoir
% - Double spacing between footnotes
%%%%%%%%%%%%
\renewcommand{\foottextfont}{\tiny}
\setlength\footnotesep{\onelineskip}
%%%%%%%%%%%%
% Chapter headings
%%%%%%%%%%%%
\renewcommand\chapterheadstart{\normalsize\vspace*{\beforechapskip}}
\setlength\beforechapskip{3\onelineskip}
\setlength\midchapskip{3\onelineskip}
%\setlength\afterchapskip{0.5\onelineskip}
%\setlength\beforechapskip{3em}
%\setlength\midchapskip{3em}
%\setlength\afterchapskip{1em}
\setlength\afterchapskip{0pt}
\renewcommand*\chapnamefont{\normalsize\bfseries}
\renewcommand*\chapnumfont{\normalsize\bfseries\centering}
\renewcommand*\chaptitlefont{\SingleSpacing\normalsize\bfseries\centering}
\renewcommand{\printchaptername}{{\chapnamefont\MakeUppercase{\chaptername}}}
\renewcommand*{\afterchapternum}{\vskip\midchapskip}
\renewcommand*{\printchaptertitle}[1]{{\chaptitlefont\MakeUppercase{#1}\par}}
%%%%%%%%%%%%
% Sectional headings
%%%%%%%%%%%%
\setsecheadstyle{\SingleSpacing\normalsize\bfseries}
\setbeforesecskip{3\onelineskip}
\setaftersecskip{0.1pt}
%\setsubsecindent{2.5em}
\setsubsecheadstyle{\SingleSpacing\normalsize\bfseries}
\setbeforesubsecskip{\onelineskip}
\setaftersubsecskip{0.1pt}
\setsubsubsecheadstyle{\SingleSpacing\normalsize\bfseries}
\setbeforesubsubsecskip{\onelineskip}
\setaftersubsubsecskip{0.1pt}
\newenvironment{subsecs}{\begin{adjustwidth}{2.5em}{0em}}{\end{adjustwidth}}
%%%%%%%%%%
% Abstracts
%%%%%%%%%%
\abstractintoc
\setlength\abstitleskip{0pt}
\renewcommand\abstractnamefont{\normalsize\bfseries}
\renewcommand\abstracttextfont{\normalsize}
\setlength\absleftindent{0pt}
\setlength\absrightindent{0pt}
\newcommand{\abstractfromfile}[1]{
\renewcommand*\abstractname{\texorpdfstring{ABSTRACT}{Abstract}}
\clearpage\mbox{}\begin{abstract}\vspace*{-\baselineskip}\input{#1}\end{abstract}
}
\newcommand{\msabstractfromfile}[1]{%
\renewcommand*\abstractname{\texorpdfstring{ABSTRAK}{Abstrak}}
\clearpage\mbox{}\begin{abstract}\otherlanguage{bahasam}\vspace*{-\baselineskip}\input{#1}\end{abstract}
}
\renewcommand\abstractnamefont{\normalsize\bfseries}
%%%%%%%%%%
% Bibliography
%%%%%%%%%%
\RequirePackage[natbibapa]{apacite}
\bibliographystyle{apacite}
\patchcommand{\bibitem}{\SingleSpacing}{}
\AtBeginDocument{
\renewcommand*\refname{\texorpdfstring{REFERENCES}{References}}
\renewcommand*\bibname{\texorpdfstring{BIBLIOGRAPHY}{Bibliography}}
}
%%%%%%%%%%
% List of Publications
%%%%%%%%%%
\RequirePackage[resetlabels]{multibib}
\newcites{own}{LIST OF PUBLICATIONS}
\bibliographystyleown{apacite}
%%%%%%%%%%
% Appendices
%%%%%%%%%%
\renewcommand*\appendixname{Appendix}
\newlistof{listofappendices}{apx}{\texorpdfstring{LIST OF APPENDICES}{List of Appendices}}
\addtodef\appendix{}{\renewcommand\chaptername{\appendixname}}
\def\app@chapter[#1]#2{%
\m@mpn@new@chaptrue%
\m@mpn@new@schapfalse%
\def\f@rbdy{#2}%
\ifx\ch@pt@c\@empty % no optional args
\def\f@rtoc{#2}%
\def\f@rhdr{#2}%
\else % at least one opt arg
\let\f@rtoc\ch@pt@c
\ifx\@empty#1\@empty
\let\f@rhdr\ch@pt@c
\else
\def\f@rhdr{#1}%
\fi
\fi
\m@m@Andfalse
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\m@m@Andtrue
\fi
\fi
\ifm@m@And
\refstepcounter{chapter}%
\fi
\ifartopt
\@makechapterhead{#2}%
\@afterheading
\chaptermark{\f@rhdr}%
\else
\chaptermark{\f@rhdr}
\insertchapterspace
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\fi
\@afterheading
\fi
\ifm@m@And
\ifanappendix
\addcontentsline{apx}{appendix}{%
\protect\chapternumberline{\thechapter}\f@rtoc}%
\memappchapinfo{\thechapter}{\f@rtoc}{\f@rhdr}{#2}%
\else
\addcontentsline{apx}{chapter}{%
\protect\chapternumberline{\thechapter}\f@rtoc}%
\memchapinfo{\thechapter}{\f@rtoc}{\f@rhdr}{#2}%
\fi
\else
\addcontentsline{apx}{chapter}{\f@rtoc}%
\ifanappendix
\memappchapinfo{}{\f@rtoc}{\f@rhdr}{#2}%
\else
\memchapinfo{}{\f@rtoc}{\f@rhdr}{#2}%
\fi
\fi
\ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{\f@rtoc}\fi%
}
\newtoggle{appheadintoc}
\toggletrue{appheadintoc}
\apptocmd{\listofappendices}{\global\togglefalse{appheadintoc}}{}{}
\AtBeginEnvironment{appendices}{%
\SingleSpacing%
\abnormalparskip{\onelineskip}%
\setlength\afterchapskip{3\onelineskip}%
\renewcommand{\chaptername}{Appendix}
\iftoggle{appheadintoc}{%
\phantomsection\addappheadtotoc%
\settocdepth{part}%
}{%
\let\@chapter\app@chapter
\settocdepth{chapter}%
}%
\cftinserthook{apx}{AppendixToCLines}
\renewcommand\mychap[1]{\orichapter{#1}}
}
\AfterEndEnvironment{appendices}{\settocdepth{chapter}}
%%%%%%%%%%
% Tighter lists
%%%%%%%%%%
\firmlist
%%%%%%%%%%
% Quotations and equatons
%%%%%%%%%%
%\AtBeginEnvironment{quotation}{\vspace*{-0.5\onelineskip}\SingleSpacing}
%\AtEndEnvironment{quotation}{\vspace*{-\onelineskip}}
%\AtBeginEnvironment{quote}{\vspace*{-0.5\onelineskip}\SingleSpacing}
%\AtBeginEnvironment{equation}{\vspace*{-\onelineskip}}
%\AtBeginEnvironment{equation*}{\vspace*{-\onelineskip}}
\AtBeginEnvironment{quotation}{\vspace*{-.5\parskip}\SingleSpacing}
\AtEndEnvironment{quotation}{\vspace*{-.5\parskip}}
\AtBeginEnvironment{quote}{\vspace*{-.5\parskip}\SingleSpacing}
\AtEndEnvironment{quote}{\vspace*{-.5\parskip}}
\AtBeginEnvironment{equation}{\vspace*{-\parskip}}
\AtBeginEnvironment{equation*}{\vspace*{-\parskip}}
\maxsecnumdepth{subsection}
\setcounter{lofdepth}{2}
\setcounter{lotdepth}{2}
%%%%%%%%%%
% Float captions
%%%%%%%%%%
\captionnamefont{\bfseries}
\captiondelim{\hspace{0.5em}}
\newsubfloat{figure}
\newsubfloat{table}
%%%%%%%%%%
% Content lists
%%%%%%%%%%
\let\orichapter\chapter
\newcommand\mychap[2][]{\orichapter%
[\ifstrempty{#1}{\texorpdfstring{\MakeUppercase{#2}}{#2}}%
{\texorpdfstring{\MakeUppercase{#1}}{#1}}]%
{#2}}
\newcommand\mystarchap[1]{\orichapter*{#1}}
\renewcommand\chapter{\@ifstar{\mystarchap}{\mychap}}
\newlength\tmplength
\settowidth{\tmplength}{\bfseries CHAPTER}
\settocdepth{subsection}
\renewcommand*\cftdotsep{\cftnodots}
\renewcommand*\cftchapterpagefont{\normalfont\mdseries\upshape}
\setpnumwidth{2em}
\setrmarg{4em}
\setlength{\cftchapternumwidth}{\tmplength}
\renewcommand*{\cftchapterpresnum}{\hfil}
\renewcommand*{\cftchapteraftersnumb}{\hspace{1em}}
\renewcommand*{\cftchapterformatpnum}[1]{%
\cftchapterformatpnumhook{#1}%
\hbox to \@pnumwidth{\hfil{\cftchapterpagefont #1}\hfil}}
\cftsetindents{section}{\dimexpr\tmplength+1em}{2.25em}
\renewcommand*{\cftsectionformatpnum}[1]{%
\cftsectionformatpnumhook{#1}%
\hbox to \@pnumwidth{\hfil{\cftsectionpagefont #1}\hfil}}
\cftsetindents{subsection}{\dimexpr\tmplength+1em+2.5em}{3.0em}
\renewcommand*{\cftsubsectionformatpnum}[1]{%
\cftsubsectionformatpnumhook{#1}%
\hbox to \@pnumwidth{\hfil{\cftsubsectionpagefont #1}\hfil}}
\renewcommand*{\cftfigureformatpnum}[1]{%
\cftfigureformatpnumhook{#1}%
\hbox to \@pnumwidth{\hfil{\cftfigurepagefont #1}\hfil}}
\renewcommand*{\cftsubfigureformatpnum}[1]{%
\cftfigureformatpnumhook{#1}%
\hbox to \@pnumwidth{\hfil{\cftfigurepagefont #1}\hfil}}
\setlength{\cftsubfigurenumwidth}{2em}
\renewcommand*{\cfttableformatpnum}[1]{%
\cfttableformatpnumhook{#1}%
\hbox to \@pnumwidth{\hfil{\cfttablepagefont #1}\hfil}}
\renewcommand*{\cftsubtableformatpnum}[1]{%
\cfttableformatpnumhook{#1}%
\hbox to \@pnumwidth{\hfil{\cfttablepagefont #1}\hfil}}
\setlength{\cftsubtablenumwidth}{2em}
\setlength{\cftbeforechapterskip}{0pt}
\renewcommand{\aftertoctitle}{%
\par\nobreak\vspace*{\afterchapskip}\mbox{}\hfill{\bfseries Page}\par\nobreak}
\renewcommand{\afterloftitle}{%
\par\nobreak\vspace*{\afterchapskip}\mbox{}\hfill{\bfseries Page}\par\nobreak}
\renewcommand{\afterlottitle}{%
\par\nobreak\vspace*{\afterchapskip}\mbox{}\hfill{\bfseries Page}\par\nobreak}
\renewcommand{\afterapxtitle}{%
\par\nobreak\vspace*{\afterchapskip}\mbox{}\hfill{\bfseries Page}\par\nobreak}
\cftinsertcode{MinimalChapterToCLines}{%
\setlength{\cftbeforechapterskip}{0pt}
}
\cftinsertcode{MainChapterToCLines}{%
\setlength{\cftbeforechapterskip}{\onelineskip}
}
\cftinsertcode{AppendixToCLines}{%
\settowidth{\tmplength}{\appendixname\space}
\renewcommand*{\cftchapterpresnum}{\appendixname\space}
\renewcommand*\cftchapteraftersnum{:\space}%
\renewcommand*\cftchapteraftersnumb{}%
\setlength\cftchapternumwidth{\dimexpr\tmplength+1.5em}%
\renewcommand*\cftchapterfont{\normalfont\mdseries\upshape}%
\renewcommand*\cftchapterpagefont{\normalfont\mdseries\upshape}%
}
\apptocmd{\mainmatter}{%
\addtocontents{toc}{\protect\vspace*{\onelineskip}}%
\addtocontents{toc}{\protect\textbf{CHAPTER}\par\nobreak}
\cftinserthook{toc}{MainChapterToCLines}
\addtocontents{toc}{\protect\vspace*{-\onelineskip}}%
}{}{}
\pretocmd{\bibliography}{%
\addtocontents{toc}{\protect\vspace*{\onelineskip}}%
\cftinserthook{toc}{MinimalChapterToCLines}%
}{}{}
\pretocmd{\bibliographyown}{%
\nobibintoc%
\addtocontents{toc}{\protect\vspace*{-\onelineskip}}%
\renewcommand{\prebibhook}{%
\phantomsection%
\addcontentsline{toc}{chapter}{\texorpdfstring{LIST OF PUBLICATIONS}{List of Publications}}%
}
}{}{}
%%%%%%%%%%%%%%%%%%%%%%%
% Cover and title pages
%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\makecoverandtitlepage}{%
\renewcommand{\thepage}{C\arabic{page}}%
\makecoverpage%
\mbox{}\thispagestyle{empty}\clearpage% % leave a blank page
\renewcommand{\thepage}{\arabic{page}}%
\pagenumbering{roman}%
\maketitlepage%
}
\newcommand{\makecoverpage}{
\begingroup%
\changepage{-70mm}{15mm}{}{-15mm}{-15mm}{35mm}{}{}{}%
\begin{titlingpage*}%
\SingleSpacing
\thispagestyle{empty}%
\fontsize{18pt}{20pt}\bfseries\selectfont\centering%
\MakeUppercase{\thetitle}\par%
\vfill%
\MakeUppercase{\theauthor}\par%
\vfill%
\MakeUppercase{\@mtdegree}\par%\vspace{3\onelineskip}%
UNIVERSITI PERTAHANAN NASIONAL MALAYSIA
\par\vspace{3\onelineskip}%
\@mtsubmissionyear\par%
\end{titlingpage*}%
\endgroup%
}
\newcommand{\maketitlepage}{%
\begin{titlingpage*}%
\centering\SingleSpacing%
\textbf{\MakeUppercase{\thetitle}}\par%
\vfill%
\textbf{\MakeUppercase{\theauthor}}\par%
\vfill%
{\justifying\noindent Thesis submitted to \if@undergrad\else the Centre for Graduate Studies,\space\fi Universiti Pertahanan Nasional Malaysia, in fulfilment of the requirements for the Degree of \@mtdegree\space(\@mtstudyfield)\par}
%\vfill
\@mtsubmissionmonth\space\@mtsubmissionyear\par%
\end{titlingpage*}%
}
%%%%%%%%%%%%%%%%%%
% Needs a blank page at the end
%%%%%%%%%%%%%%%%%%
\AtEndDocument{\clearpage\mbox{}\thispagestyle{empty}\clearpage}
%%%%%%%%%%%%%%%%%%
% Dedication
%%%%%%%%%%%%%%%%%%
\newcommand{\dedication}[1]{\newpage\mbox{}\thispagestyle{empty}%
\begin{vplace}[.25]\itshape\centering#1\end{vplace}%
\clearpage}
%%%%%%%%%%%%%%%%%%%%%%
% Acknowledgements
%%%%%%%%%%%%%%%%%%%%%%
\newenvironment{acknowledgements}{\chapter{Acknowledgements}}{}
%%%%%%%%%%%%%%%%%%%%%%
% Approval Forms
%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{pgfkeys}
\RequirePackage{tabularx}
\newtoggle{approvaladded}
\togglefalse{approvaladded}
\newenvironment{committee}{
\pgfkeys{%
/member/.is family, /member,
% Here are the options that a user can pass
default/.style = {
title = {},
institute = {Universiti Pertahanan Nasional Malaysia},
department = {},
role = {Member}
},
title/.estore in = \membertitle,
department/.estore in = \memberdepartment,
institute/.estore in = \memberinstitute,
role/.estore in = \memberrole
}%
\newcommand\member[2][]{%
\pgfkeys{/member, default, ##1}%
\mbox{}\newline
\textbf{##2} \newline
\ifdefempty{\membertitle}{}{\membertitle \newline}
\ifdefempty{\memberdepartment}{}{\memberdepartment \newline}
\memberinstitute \newline
(\memberrole) \newline
\mbox{}
& \\\hline%
}%
\tabularx{\textwidth}{| >{\raggedright\arraybackslash}X | >{\centering\arraybackslash}p{4cm} |}
\hline
& \emph{Signature}\\[-\onelineskip]
}{
\endtabularx
}
\RequirePackage{comment}
\if@undergrad
\excludecomment{examcommapproval}%
\else
\newenvironment{examcommapproval}{%
\clearpage%
\abnormalparskip{\onelineskip}%
\nottoggle{approvaladded}{
\phantomsection%
\addcontentsline{toc}{chapter}{\texorpdfstring{APPROVAL}{Approval}}%
\global\toggletrue{approvaladded}%
}{}%
\SingleSpacing%
I certify that an Examination Committee has met on \textbf{\@mtvivadate} to conduct the final examination of \textbf{\theauthor} on his (or her) degree thesis entitled \textbf{`\thetitle'}. The committee recommends that the student be awarded the \@mtdegree\space(\@mtstudyfield).\par
Members of the Examination Committee were as follows.\par
\committee
}{
\endcommittee
\clearpage
}
\fi
\newenvironment{supervisoryapproval}{%
\clearpage%
\abnormalparskip{\onelineskip}%
\nottoggle{approvaladded}{
\phantomsection%
\addcontentsline{toc}{chapter}{\texorpdfstring{APPROVAL}{Approval}}%
\global\toggletrue{approvaladded}%
}{}%
\SingleSpacing%
\if@undergrad%
This thesis was submitted to the \@mtfaculty, Universiti Pertahanan Nasional Malaysia and has been accepted as partial fulfillment of the requirement for the Bachelor's degree in \textbf{\@mtstudyfield}. %
\else%
This thesis was submitted to the Senate of Universiti Pertahanan Nasional Malaysia and has been accepted as fulfillment of the requirement for the degree of \textbf{\@mtdegree\space(\@mtstudyfield)}. %
\fi
The members of the Supervisory Committee were as follows.\par
\committee
}{
\endcommittee
\clearpage
}
%%%%%%%%%%%%%%%%%%%
% Declaration form.
\newcommand{\declarationpage}{{%
\clearpage%
\phantomsection%
\addcontentsline{toc}{chapter}{\texorpdfstring{DECLARATION}{Declaration}}%
\SingleSpacing\abnormalparskip{\onelineskip}%\enlargethispage{\baselineskip}%
{ \centering%
\rule{\textwidth}{1.5pt}\par
\textbf{UNIVERSITI PERTAHANAN NASIONAL MALAYSIA}\par
DECLARATION OF THESIS\par
}
{ \setlength\extrarowheight{\onelineskip}%
\begin{tabularx}{0.95\textwidth}{@{}l @{\hspace{1em}:\hspace{1em}} >{\hrulefill}X}
Author's full name &\\
Date of birth &\\
Title &\\
Academic Session &\\
\end{tabularx}
}
I declare that this thesis is classified as:\\
{ \setlength\extrarowheight{\onelineskip}%
\begin{tabularx}{\textwidth}{@{\Large$\square$ } >{\bfseries}l @{\hspace{1.5em}} >{\raggedright\arraybackslash}X @{}}
CONFIDENTIAL & (Contains confidential information under the Official Secret Act 1972)*\\
RESTRICTED & (Contains restricted information as specified by the organisation where research was done)*\\
OPEN ACCESS & I agree that my thesis to be published as online open access (full text)
\end{tabularx}%
}
I acknowledge that Universiti Pertahanan Nasional Malaysia reserves the right as follows.
\vspace*{-\onelineskip}
\begin{enumerate}
\tightlist
\item The thesis is the property of Universiti Pertahanan Nasional Malaysia.
\item The library of Universiti Pertahanan Nasional Malaysia has the right to make copies for the purpose of research only.
\item The library has the right to make copies of the thesis for academic exchanges.
\end{enumerate}
\begin{tabularx}{\textwidth}{@{}>{\centering\arraybackslash}X @{\hspace{.25\textwidth}} >{\centering\arraybackslash}X}
\\
\hrulefill \newline Signature &
\hrulefill \newline Signature of Main Supervisor\\[1cm]
\hrulefill \newline IC/Passport No. &
\hrulefill \newline Name of Main Supervisor\\[\onelineskip]
Date: \hrulefill & Date: \hrulefill
\end{tabularx}
\hangfrom{Note: *\hspace{1em}}{If the thesis is CONFIDENTIAL OR RESTRICTED, please attach the letter from the organisation stating the period and reasons for confidentiallity and restriction.}\par\vspace*{-\baselineskip}
\rule{\textwidth}{1.5pt}%
}}
%%%%%%%%%%%
% Biodata of Student
%%%%%%%%%%%
\newenvironment{biodata}{%
\chapter*{Biodata of Student}
\addcontentsline{toc}{chapter}{\texorpdfstring{BIODATA OF STUDENT}{Biodata of Student}}
}{}
\endinput