-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcpe-thesis-en.cls
More file actions
775 lines (716 loc) · 30.4 KB
/
cpe-thesis-en.cls
File metadata and controls
775 lines (716 loc) · 30.4 KB
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
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Filename = cpe-project.cls v1.0
% Data Jun 4, 2020
% Author = Peerapon Siripongwutikorn (peerapon@cpe.kmutt.ac.th)
%
% This is a LaTeX class file for project report and thesis at CPE,
% KMUTT.
% Date: May 25, 2016
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Edited
% May 26, 2016
% - Width of box holding section number too small.
% Old: \@tempdima 2em % width of box holding section number
% New: \@tempdima 3em
% - Baseline skip
% Old:
% \def\baselineskipxii{24pt}
%\def\baselineskipxi{18.6pt} % for title and signature page
% New:
%\def\baselineskipxii{16pt}
% \def\baselineskipxi{16pt} % for title and signature page
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{cpe-thesis-en}[2016/05/30 CPE KMUTT Thesis Template]
\LoadClass{report}
\typeout{Document Style `CPE Thesis'.}
\newcommand{\dotrule}[1]{%
\parbox[t]{#1}{\dotfill}}
\usepackage[left=4cm,top=3cm,right=2cm,bottom=2cm]{geometry}
\usepackage{graphicx} %%% Use the option pdftex instead of
%%% dvips if you use pdflatex
\usepackage{array}
\usepackage{amsfonts,amsmath} %% For math fonts and operations
\usepackage{mathspec}
\usepackage[no-math]{fontspec} %Font package
\usepackage{xunicode,xltxtra}
\usepackage{url}
\usepackage{hyperref}
\hypersetup{
linktocpage,
colorlinks=true, %set true if you want colored links
% linktoc=all, %set to all if you want both sections and subsections linked
linkcolor=blue, %choose some color if you want links to stand out
}
%%%% For using thaifonts
%%% Comment out if using Polyglossia package
%\newcommand{\textthai}[1]{{\fontspec[Language=Thai,Scale=1.23]{TH Sarabun New:script=thai}#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% Definitions of major strings %%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\disstitleone{TITLE OF DISSERTATION} % 1st line of TITLE of dissertation
\def\disstitletwo{} % 2nd line of TITLE if needed
\def\disstitlethree{} % 3rd line of TITLE if needed
\def\disstitlefour{} % 4th line of TITLE if needed
\def\dissauthor{Your Name 1} % Author of dissertation
\def\dissauthortwo{Your friend's name 2 } % Author of dissertation
\def\dissauthorthree{Your friend's name 3} % Author of dissertation
\def\dissdiplomaone{B.A., Carnegie Mellon University, 1991} % first degree
\def\dissdiplomatwo{M.S., University of Pittsburgh, 1993} % second degree
\def\dissdiplomathree{} % still in school?
\def\dissdiplomafour{} % collecting them?
\def\dissdegree{Doctor of Philosophy} % Name of the degree
\def\dissdegreeabrev{Ph.D.} % Abbreviation of the degree
\def\dissyear{1995} % Year of submission
\def\dissdefensedate{June 1 2000} % Date of defense
%\def\disscommitteechair{Prof. Francis Crick} % Name of the Chairman
\def\dissadvisor{Prof. My advisor } % Advisor
\def\disscoadvisor{My Co-advisor, Ph.D.} % Co-advisor
\def\disscoadvisortwo{} % Co-advisor 2, Added by Thanin (Senior Project TA) 22/11/2023
\def\disscommitteetwo{Prof. Committee} % 2rd committee member
\def\disscommitteethree{} % 3rd committee member
\def\disscommitteefour{} % 4th committee member
\def\thaiworktype{}
\def\thaidisstitleone{}
\def\thaidisstitletwo{}
\def\thaidisauthor{}
\def\thaidisauthortwo{}
\def\thaidisauthorthree{}
\def\thaidissadvisor{}
\def\thaidisscoadvisortwo{} % Co-advisor 2, Added by Thanin (Senior Project TA) 22/11/2023
\def\thaidissdegree{}
\def\thaidissyear{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Include the following line (uncommented) in your dissertation file
% if your work has more than one appendix. This is what will be written on the
% cover page preceding the appendices. By default, it is set to {Appendix}.
%
% \def\appendixnames{Appendices} % if more than one appendix
%
% Your dissertation should be structured the following way:
% \maketitlepage, \makecopyrightpage, \makesignaturepage,
% \abstract{}, \preface{}, \tableofcontents, \listoftables, \listoffigures,
% \chapter{},....., \appendix{},.....,
% \thebibliography (or \bibliography{} with BiBTeX), \theindex
%
% ************************************************************************
% **************************************************************************
% Redefinition of some values
% **************************************************************************
\def\ssp{\def\baselinestretch{1.0}\large\normalsize}
\def\dsp{\def\baselinestretch{1.37}\large\normalsize}
%\def\dsp{\def\baselinestretch{1.1}\large\normalsize}
\newif\ifdraftmode \draftmodefalse
\ifdim \overfullrule > 0pt \draftmodetrue \ssp \else \dsp \fi % draft mode on?
\def\truebaselineskip{\baselineskip}
\def\baselineskipxii{16pt}
\def\baselineskipxi{16pt} % for title and signature page
\def\emptyline#1{\vspace*{#1\baselineskip}}
\newif\iffirstappendix \firstappendixtrue
\newif\iffirstchapter \firstchaptertrue
\def\tocprefix{}
\newif\ifprelude \preludetrue
\newif\ifromanmode \romanmodetrue \pagenumbering{roman}
\def\setarabic{\ifromanmode \romanmodefalse \pagenumbering{arabic} \fi}
\setcounter{secnumdepth}{5}
\topmargin -0.8cm \oddsidemargin 0.5 in
%\textheight 9.0truein \advance\textheight by \topskip \textwidth 6.0truein
\textheight 24.69cm \advance\textheight by \topskip \textwidth 6.0truein
\footskip 30pt \footnotesep 7.7pt
\headheight 12 truept \headsep 25 truept
\onecolumn \parindent 0em
\if@twoside\else\raggedbottom\fi
\widowpenalty=10000 \clubpenalty=10000 \looseness=1
% ***********************************************************************
% Modifications for single spacing and indentation, from Ethan V. Munson's
% style file for dissertations at the Univ of California
% ***********************************************************************
\def\smallssp{\def\baselinestretch{1.0}\large\small}
\def\scriptsizessp{\def\baselinestretch{1.0}\large\scriptsize}
%\def\tabular{\par\ssp\let\@halignto\@empty\@tabular}
%\expandafter \def\csname tabular*\endcsname #1{\par\ssp\def\@halignto{to#1}\@tabular}
\def\smalltabular{\par\smallssp\let\@halignto\@empty\@tabular}
\def\endsmalltabular{\endtabular}
\expandafter \def\csname smalltabular*\endcsname #1{\par\smallssp\def\@halignto{to#1}\@tabular}
\expandafter \let \csname endsmalltabular*\endcsname = \endtabular
\def\scriptsizetabular{\par\scriptsizessp\let\@halignto\@empty\@tabular}
\def\endscriptsizetabular{\endtabular}
\expandafter \def\csname scriptsizetabular*\endcsname #1{\par\scriptsizessp\def\@halignto{to#1}\@tabular}
\expandafter \let \csname endscriptsizetabular*\endcsname = \endtabular
\long\def\@footnotetext#1{\insert\footins{\ssp\reset@font\footnotesize
\interlinepenalty\interfootnotelinepenalty\splittopskip\footnotesep
\splitmaxdepth \dp\strutbox \floatingpenalty \@MM \hsize\columnwidth \@parboxrestore
\edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
{\rule{\z@}{\footnotesep}\ignorespaces #1\strut}}}
\def\@startsection#1#2#3#4#5#6{\if@noskipsec \leavevmode \fi
\par \@tempskipa #4\relax \@afterindenttrue
\ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \relax\fi
\if@nobreak \everypar{}\else
\addpenalty{\@secpenalty}\addvspace{\@tempskipa}\fi \@ifstar
{\@ssect{#3}{#4}{#5}{#6}}{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
% ***********************************************************************
% Redefinition of main dissertation divisions, to comply with KMUTT
% regulations.
% ***********************************************************************
%%%%%%%%%%%%%%%%%%%%%%%%% pagestyles %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\ps@plain{\let\@mkboth\markboth\def\@oddfoot{}\def\@evenfoot{}
\def\@oddhead{\hbox{}\hfil\rm\thepage} \def\@evenhead{\rm\thepage\hfil\hbox{}}}
\def\ps@plainbottom{\let\@mkboth\markboth\def\@oddhead{}\def\@evenhead{}
\def\@oddfoot{\hfil\rm\thepage\hfil} \def\@evenfoot{\hfil\rm\thepage\hfil}}
\ps@plainbottom
%%%%%%%%%%%%%%%%%%%%%%%%% Chapter font %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Chapter heading in the text for \chapter{}
\def\@makechapterhead#1{%\vspace*{.8truein}%
% \fontsize{15}{18}{\centering{\bf \MakeUppercase{\@chapapp{}} \thechapter}\hskip 5\p@}%\vskip 20\p@
% \fontsize{15}{18}{\centering\MakeUppercase{\bf #1}\par\nobreak\emptyline 2}}
{\centering\MakeUppercase{\large\bf \@chapapp{} \thechapter\hskip 5\p@ #1}\par\nobreak\vskip 30\p@ }}
%\def\@makeschapterhead#1{\vspace*{.8truein}%
% {\centering{\large\bf #1}\par\nobreak\vskip 40\p@ }}
\def\chapter{\clearpage
% \ifprelude \pagestyle{plainbottom} \else
% \pagestyle{plain}\thispagestyle{plainbottom} \fi
\global\@topnum\z@ \@afterindenttrue
\secdef\@chapter\@schapter}
\def\@chapter[#1]#2{\preludefalse\setarabic
% \pagestyle{plain}\thispagestyle{plainbottom} % added in v2.4
\pagestyle{plain}\thispagestyle{empty} % No page number in chapter.
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
%% Put the work CHAPTER in ToC before the first chapter
\iffirstchapter
\addcontentsline{toc}{chapterxx}{\mdseries\bf CHAPTER}
\firstchapterfalse
\fi
%% Add the chapter heading in ToC
\addcontentsline{toc}{chapter}{\normalsize\bf\MakeUppercase{\tocprefix {\protect \numberline{\thechapter.}\hskip -0.5em #1}}}
\chaptermark{#1}%
%\addtocontents{lof} {\protect\addvspace{0\p@}}
%\addtocontents{lot} {\protect\addvspace{0\p@}}
\addtocontents{lof} {\protect\addvspace{0em}}
\addtocontents{lot} {\protect\addvspace{0em}}
\pagestyle{plain}\thispagestyle{empty}
% Must be added after addcontentsline
% Otherwise, the page number may not show up..
\@makechapterhead{#2} \@afterheading}
%% Remove top space from \chapter*{}
%% Chapter heading in the text for \chapter*{}
\def\@makeschapterhead#1{%
%\vspace*{50\p@}%
{\parindent \z@ \centering%\raggedright
\normalfont
\interlinepenalty\@M
\large \bfseries #1\par\nobreak
\vskip 20\p@
}}
\def\@schapter#1{\@makeschapterhead{#1} \@afterheading}
%%%%%%%%%%%%%%% Section heading fonts %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{0.1ex\@plus.1ex}
%{2.3ex \@plus.2ex}%
{\normalfont\fontsize{14}{16.8}\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{0.1ex \@plus .2ex}%
{\normalfont\fontsize{13}{15.6}\bfseries}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{0.1ex \@plus .2ex}%
{\normalfont\normalsize\bfseries}}
%%%%%%%%%%%%%%% Table/figure caption font %%%%%%%%%%%%%%%%%%%%%%%%
\setlength\belowcaptionskip{10\p@}
\long\def\@maketablecaption#1#2{
\global \@minipagefalse
\hbox to \hsize{\parbox[t]{\hsize}{{\bf #1} #2 \vskip 0.5em}}}
\let\old@floatboxreset\@floatboxreset
\def\table{%
\let\@makecaption\@maketablecaption
%\def\@floatboxreset{%
% \old@floatboxreset
% \@tablesize
%}%
\let\footnoterule\relax
\let\contcaption\conttablecaption \@float{table}}
\def\endtable{\end@float}
\long\def\@makecaption#1#2{%
\vskip\abovecaptionskip
\sbox\@tempboxa{{\bf #1} #2}%
\ifdim \wd\@tempboxa >\hsize
{\bf #1} #2\par
\else
\global \@minipagefalse
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Define how the content lines show up in ToC when using
%%% addcontentsline{}{}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% Normal chapter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand*\l@chapter[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
\vskip 1.0em \@plus\p@
%\vskip 0.5em \@plus\p@ %% Space between entry in toc
\setlength\@tempdima{1.5em}%
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode %\bfseries
\advance\leftskip\@tempdima
\hskip -\leftskip
\bfseries #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
\penalty\@highpenalty
\endgroup
\fi}
%% Special lines such as abstract, acknowledgment
%% have no extra spacing between lines.
\newcommand*\l@chapterx[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
\vskip 0.2em \@plus\p@ %% No spacing between lines
\setlength\@tempdima{1.5em}%
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode %\bfseries
\advance\leftskip\@tempdima
\hskip -\leftskip
\bfseries #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
\penalty\@highpenalty
\endgroup
\fi}
%%% Special toc entry with no number
\newcommand*\l@chapterxx[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
\vskip 1em \@plus\p@ % Space between entry
\setlength\@tempdima{1.5em}%
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode %\bfseries
\advance\leftskip\@tempdima
\hskip -\leftskip
\bfseries #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss}\par
\penalty\@highpenalty
\endgroup \vskip -0.8em
\fi}
%\newlength\@chapterl
%\newlength\@sectionl
%\newlength\@subsectionl
%\newlength\@subsubsectionl
%\newlength\@presubs
%\newlength\@presubsub
%
%\setlength\@chapterl{1.5em}
%\setlength\@sectionl{1.5em}
%\setlength\@subsectionl{1em}
%\setlength\@subsubsectionl{1em}
%
%\setlength\@presubs{1\@sectionl}
%\addtolength\@presubs{1\@chapterl}
%\setlength\@presubsub{1\@presubs}
%\addtolength\@presubsub{1\@subsectionl}
%%% Section entries %%%%%%%%%%%%%%
\def\l@section#1#2{\addpenalty{\@secpenalty} % good place for page break
%\addvspace{1.0em plus 1pt} % space above toc entry
\addvspace{0.2em} % space above toc entry
\@tempdima 2.2em % width of box holding section number
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
%\sc % Small caps
\leavevmode % TeX command to enter horizontal mode.
\advance\leftskip\@tempdima %% added 5 Feb 88 to conform to
\hskip -\leftskip %% 25 Jan 88 change to \numberline
\hskip 1em #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
%\hskip 2em #1\nobreak\hfil \nobreak\hbox to\@pnumwidth{\hss #2}\par
\endgroup}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%\let\l@subsection\l@section
%% May 17, 2021
%% Add indentation to subsection in table of contents
\def\l@subsection#1#2{
%\addvspace{1.0em plus 1pt} % space above toc entry
\addvspace{0.2em} % space above toc entry
\@tempdima 3em % width of box holding section number
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
%\sc % Small caps
\leavevmode % TeX command to enter horizontal mode.
\advance\leftskip\@tempdima %% added 5 Feb 88 to conform to
\hskip -\leftskip %% 25 Jan 88 change to \numberline
\hskip 3.2em #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
\endgroup}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%\let\l@subsubsection\l@section
%% Nov 6, 2021
%% Add indentation to subsubsection in table of contents
\def\l@subsubsection#1#2{
%\addvspace{1.0em plus 1pt} % space above toc entry
\addvspace{0.2em} % space above toc entry
\@tempdima 4em % width of box holding section number
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
%\sc % Small caps
\leavevmode % TeX command to enter horizontal mode.
\advance\leftskip\@tempdima %% added 5 Feb 88 to conform to
\hskip -\leftskip %% 25 Jan 88 change to \numberline
\hskip 6.2em #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
\endgroup}
%%% Figure/table entries in list of figures and tables shows up
\def\l@figure#1#2{\addpenalty{\@secpenalty} % good place for page break
%\addvspace{1.0em plus 1pt} % space above toc entry
\addvspace{0.2em} % space above toc entry
\@tempdima 2em % width of box holding section number
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
%\sc % Small caps
\leavevmode % TeX command to enter horizontal mode.
\advance\leftskip\@tempdima %% added 5 Feb 88 to conform to
\hskip -\leftskip %% 25 Jan 88 change to \numberline
\hskip 0em #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
%\hskip 2em #1\nobreak\hfil \nobreak\hbox to\@pnumwidth{\hss #2}\par
\endgroup}
\let\l@table\l@figure
%%% Appendix content lines
\def\l@apdx#1#2{\addpenalty{\@secpenalty} % good place for page break
\addvspace{0.2em} % space above toc entry
\@tempdima 2em % width of box holding section number
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
%\sc % Small caps
\leavevmode % TeX command to enter horizontal mode.
\advance\leftskip\@tempdima %% added 5 Feb 88 to conform to
\hskip -\leftskip %% 25 Jan 88 change to \numberline
\hskip 2em #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
\endgroup}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%% Title page %%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\faculty{}
\def\worktype{} % Type of work..
\def\titleempty{}
\def\maketitlepage{\thispagestyle{empty}\c@page\@ne\baselineskip \baselineskipxii
\emptyline 2 {\centering
\makebox{\MakeUppercase{\disstitleone}} \par
\ifx \titleempty\disstitletwo \else
\makebox{\MakeUppercase{\disstitletwo}} \par
\fi
\vfill \MakeUppercase{\dissauthor} \par
\ifx \titleempty\dissauthortwo \else
\makebox{\MakeUppercase{\dissauthortwo}} \par
\fi
\ifx \titleempty\dissauthorthree \else
\makebox{\MakeUppercase{\dissauthorthree}} \par
\fi
\vfill
% \emptyline 7 \MakeUppercase{\dissauthor} \par \emptyline 7
%\makebox{\dissdiplomaone} \par \makebox{\dissdiplomatwo} \par
%\makebox{\dissdiplomathree} \par \makebox{\dissdiplomafour} \par
A \MakeUppercase{\worktype}\ SUBMITTED IN PARTIAL FULFILLMENT \par
OF THE REQUIREMENTS FOR \par
THE DEGREE OF \MakeUppercase{\dissdegree}\ (\makebox{\MakeUppercase{\department}}) \par
FACULTY OF \makebox{\MakeUppercase{\faculty}} \par
% \makebox{\schoolname} in partial fulfillment \par
% of the requirements for the degree of \par \dissdegree \par
KING MONGKUT'S UNIVERSITY OF TECHNOLOGY THONBURI \par
\dissyear \vspace*{2cm}\par}
\newpage\baselineskip \truebaselineskip}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright page %%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\makecopyrightpage{\newpage
{\centering{\vbox{}\vfill Copyright by \dissauthor\par\dissyear\par \vfill\vbox{}}}\newpage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%% Signature page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\def\thesis{Thesis}
\def\makesignaturepage{
\newpage\thispagestyle{empty}\baselineskip \baselineskipxi {\centering
\makebox {\disstitleone} \par
\ifx \titleempty\disstitletwo \else
\makebox{\disstitletwo} \par
\fi
%\makebox {\disstitletwo} \par
%\makebox {\disstitlethree} \par \makebox {\disstitlefour} \par
\vfill \dissauthor\ \par
\ifx \titleempty\dissauthortwo \else
\makebox{\dissauthortwo} \par
\fi
\ifx \titleempty\dissauthorthree \else
\makebox{\dissauthorthree} \par
\fi
\vfill A \worktype\ Submitted in Partial Fulfillment \par
of the Requirements for \par
the Degree of \dissdegree \ (\department) \par
Faculty of\ \makebox{\faculty} \par
King Mongkut's University of Technology Thonburi \par
\dissyear \par}
\emptyline 1
\begin{flushleft}
\worktype\ Committee \par\par
\begin{tabular*}{\textwidth}{@{}c@{\extracolsep{1.2cm}}l@{}}
& \\
%%%%% Thesis or project advisor %%%%%%%%
\dotrule{3.6in} & \worktype\ Advisor\\
(\dissadvisor) & \\
& \\
%%%%%%% Co-advisor %%%%%%%%%%%%%%%%%%
\ifx \titleempty\disscoadvisor \else
\dotrule{3.6in} & \worktype\ Co-Advisor\\
(\disscoadvisor) & \\
& \\
\fi
%%%%%%% Co-advisor 2 %%%%%%%%%%%%%%%%%% % Co-advisor 2, Added by Thanin (Senior Project TA) 22/11/2023
\ifx \titleempty\disscoadvisortwo \else
\dotrule{3.6in} & \worktype\ Co-Advisor\\
(\disscoadvisortwo) & \\
& \\
\fi
%%%%%%% 2nd committee %%%%%%%%%%%%%%%%%%
\dotrule{3.6in} & Committee Member \\
(\disscommitteetwo) & \\
& \\
%%%%%%% 3rd committee %%%%%%%%%%%%%%%%%%
\ifx \titleempty\disscommitteethree \else
\dotrule{3.6in} & Committee Member \\
(\disscommitteethree) & \\
& \\
\fi
%%%%%%%% 4th committee %%%%%%%%%%%%%%%%
\ifx \titleempty\disscommitteefour \else
\dotrule{3.6in} & Committee Member \\
(\disscommitteefour) & \\
& \\
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{tabular*}
\end{flushleft}
\begin{center}
\vspace*{\fill}Copyright reserved
\vspace*{\fill}
%\vfill Copyright reserved
\end{center}
\newpage\baselineskip \truebaselineskip}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%% English Abstract %%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\abstract{
\newpage
\setcounter{page}{2}
\pagestyle{plain}%\thispagestyle{empty}
\addcontentsline{toc}{chapterx}{\mdseries ABSTRACT}
\begin{flushleft}
\begin{tabular}{@{}lp{0.7\textwidth}}
\worktype\ Title & \disstitleone\ \\
\ifx \titleempty\disstitletwo \else
& \disstitletwo \\
\fi
Credits & \disscredit \\
Member(s) & \dissauthor \\
\ifx \titleempty\dissauthortwo \else
& \dissauthortwo \\
\fi
\ifx \titleempty\dissauthorthree \else
& \dissauthorthree \\
\fi
\worktype\ Advisor & \dissadvisor \\
\ifx \titleempty\disscoadvisor \else
Co-advisor & \disscoadvisor \\
\fi
\ifx \titleempty\disscoadvisortwo \else % Co-advisor 2, Added by Thanin (Senior Project TA) 22/11/2023
& \disscoadvisortwo \\
\fi
Program & \dissdegree \\
Field of Study & \fieldofstudy \\
Department & \department \\
Faculty & \faculty \\
Academic Year & \dissyear
\end{tabular}
\end{flushleft}
%}
\emptyline 1
\begin{center}
\textbf{Abstract}
\end{center}
\par
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%% Thai Abstract %%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\thaiabstract{
\newpage
\addcontentsline{toc}{chapterx}{\mdseries THAI ABSTRACT}
\begin{flushleft}
\begin{tabular}{@{}lp{0.7\textwidth}}
\textthai{หัวข้อ}\thaiworktype & \thaidisstitleone\ \\
\ifx \titleempty\thaidisstitletwo \else
& \thaidisstitletwo \\
\fi
\textthai{หน่วยกิต} & \textthai{\disscredit} \\
\textthai{ผู้เขียน} & \thaidissauthor \\
\ifx \titleempty\thaidissauthortwo \else
& \thaidissauthortwo \\
\fi
\ifx \titleempty\thaidissauthorthree \else
& \thaidissauthorthree \\
\fi
\textthai{อาจารย์ที่ปรึกษา} & \thaidissadvisor \\
\ifx \titleempty\disscoadvisor \else
& \thaidisscoadvisor \\
\fi
\ifx \titleempty\disscoadvisortwo \else % Co-advisor 2, Added by Thanin (Senior Project TA) 22/11/2023
& \thaidisscoadvisortwo \\
\fi
\textthai{หลักสูตร} & \thaidissdegree \\
\textthai{สาขาวิชา} & \thaifieldofstudy \\
\textthai{ภาควิชา} & \thaidepartment \\
\textthai{คณะ} & \thaifaculty \\
\textthai{ปีการศึกษา} & \textthai{\thaidissyear}
\end{tabular}
\end{flushleft}
%}
\emptyline 1
\begin{center}
\textthai{บทคัดย่อ}
\end{center}
\par
}
\def\endabstract{\newpage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%% Acknowledgement %%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\preface{\chapter*{\large ACKNOWLEDGMENTS}%
\addcontentsline{toc}{chapterx}{\mdseries ACKNOWLEDGMENTS}
\thispagestyle{plain}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%% Content page %%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Table of contents
\setcounter{tocdepth}{5} % must be same as secnumdepth
\def\contentsname{CONTENTS}
\def\tableofcontents{\chapter*{\large\MakeUppercase{\contentsname}\@mkboth{}{}%
\\ \emptyline 1 \hfill\textbf{PAGE}\\[-0.4em]}
% 23 Nov 2021, Thanin
%put \addcontentsline before \ssp\@starttoc to fix wrong numbering
\addcontentsline{toc}{chapterx}{\mdseries CONTENTS}
{\ssp\@starttoc{toc}}
\pagestyle{plain}\thispagestyle{plain}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%% List of table page %%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% List of tables
\def\listtablename{LIST OF TABLES}
\def\listoftables{\chapter*{\large \MakeUppercase{\listtablename}\@mkboth{TABLE}{PAGE}\thispagestyle{plain}
\\ \emptyline 1 \normalsize\textbf{TABLE}\hfill\textbf{PAGE}\\[-0.4em] }
\addcontentsline{toc}{chapterx}{\mdseries LIST OF TABLES} {\ssp\@starttoc{lot}}}
%\def\l@table{}
%\def\l@table{\vskip 1.0em plus\p@\@dottedtocline{1}{1.5em}{2.3em}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%% List of figure page %%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\listfigurename{LIST OF FIGURES}
\def\listoffigures{\chapter*{\large\MakeUppercase{\listfigurename}\@mkboth{FIGURE}{PAGE}\thispagestyle{plain}\\
\emptyline 1
\normalsize\textbf{FIGURE}\hfill\textbf{PAGE}\\[-0.4em] }
\addcontentsline{toc}{chapterx}{\mdseries LIST OF FIGURES} {\ssp\@starttoc{lof}}}
\let\l@figure\l@table
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%% List of symbol page %%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\listofsymbols{\chapter*{\large LIST OF SYMBOLS}
%\\ \emptyline 1 \textbf{SYMBOL}\hfill\textbf{UNIT}\\[-1cm]}
\addcontentsline{toc}{chapterx}{\mdseries LIST OF SYMBOLS}\thispagestyle{plain}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%% List of vocab page %%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\listofvocab{\chapter*{\large LIST OF TECHNICAL VOCABULARY AND ABBREVATIONS}%
\addcontentsline{toc}{chapterx}{\mdseries LIST OF TECHNICAL VOCABULARY AND ABBREVATIONS}\thispagestyle{plain}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%% Appendix pages %%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\firstappendixtrue
\def\appendixnames{Appendix} % assume only one appendix
\def\appendixcover#1{%
\newpage\pagestyle{plain}\thispagestyle{empty}
\iffirstappendix %
\setcounter{chapter}{0} % Reset chapter numbering
\setcounter{figure}{0} % Reset figure numbering (May 2022 by Thanin)
\renewcommand{\thechapter}{\Alph{chapter}}
\def\@chapapp{\MakeUppercase{\appendixname}}%
\addcontentsline{toc}{chapter}{\mdseries\bf \MakeUppercase{\appendixnames}}%
\firstappendixfalse%
\fi
\setcounter{equation}{0} % Reset equation numbering
\setcounter{figure}{0} % Reset figure numbering (May 2022 by Thanin)
\addtocounter{chapter}{1} % Start the 1st appendix
{\centering{\vbox{}\vfill \MakeUppercase{\bf
APPENDIX \thechapter} \par \MakeUppercase{#1} \vfill\vbox{}}}\newpage}
% {\centering{\vbox{}\vfill \MakeUppercase{{\normalsize\bf APPENDIX
%\thechapter}} \par \MakeUppercase{#1}} \vfill\vbox{}}}\newpage}
\def\appendix#1{%
\appendixcover{#1}
\addcontentsline{toc}{apdx}{\thechapter\hskip 1em #1}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%% Bibliography page %%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\refname{REFERENCES}
\def\referencepage{\chapter*{\large\bf \MakeUppercase{\refname} \\
\emptyline 1}%
\addcontentsline{toc}{chapter}{\mdseries\bf \MakeUppercase{\refname}}\thispagestyle{empty}
}
%\def\bibliographycover{\newpage \typeout{\bibname .} \thispagestyle{empty}
% {\centering{\vbox{}\vfill {\LARGE\bf \bibname} \vfill\vbox{}}}\newpage}
%%% Change the brackets to dot around bib number.%%%%%%%%%%%%%%
\newdimen\bibindent
\bibindent=2em
\def\@biblabel#1{#1.}
\def\thebibliography#1{%\bibliographycover
%\chapter*{\bibname\@mkboth{}{}}
%\addcontentsline{toc}{chapter}{\bibname} \ssp
\referencepage \vspace*{-30\p@}\ssp\pagestyle{plain}
\list{\@biblabel{\arabic{enumiv}}}{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth \advance\leftmargin\labelsep
\usecounter{enumiv} \let\p@enumiv\@empty
\def\theenumiv{\arabic{enumiv}}}%
\def\newblock{\hskip .11em plus.33em minus.07em}%
\sloppy\clubpenalty4000\widowpenalty4000 \sfcode`\.=\@m }
\def\endthebibliography{\ifdraftmode \dsp \fi
\def\@noitemerr{\@warning{Empty `thebibliography' environment}} \endlist}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Vitae %%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\vitae{
\clearpage
\chapter*{\large\bf CURRICULUM VITAE}%
\vspace*{-5\p@}\ssp
\addcontentsline{toc}{chapter}{\normalsize\bf CURRICULUM VITAE}
\pagestyle{plain}\thispagestyle{plain}
}
% ************************************************************
% personal stuff
%\input latexsym.sty
\usepackage{latexsym}
\newcounter{definition}[chapter]
\newenvironment{definition}[1]{\refstepcounter{definition}
\par\hbox{}\par\noindent
{\bfseries Definition \thechapter.\thedefinition\ #1}
\par\noindent\ignorespaces}
{\par\hbox{}\par}
\newenvironment{proof}{
\par\noindent{\bfseries Proof: }\ignorespaces}
{ $\Box$\par\hbox{}\par}
% *******************************************************************
\endinput