% Default language option is [thaithesis]. The other possible option is [engthesis].
% Default format option is [ugrad]. Other possible options are [master,doctor].
%\documentclass[a4paper]{chula-memoir}
%\documentclass[a4paper,thaithesis,master]{chula-memoir}
\documentclass[a4paper,engthesis,master]{chula-memoir}
% List all required packages here
\usepackage{float}              % for floating figures
\usepackage{amsmath}            % for math related environment
\usepackage{amsfonts}           % fonts for math
\usepackage{listings}           % for pseudo-code, lines of codes
\usepackage[labelformat=simple]{subcaption}
\renewcommand\thesubfigure{(\alph{subfigure})}    % for (a) in subcaption
\usepackage{enumitem}
\usepackage{graphicx}
\usepackage{wrapfig}            % for figures wrap inside text paragraph
\usepackage{pdfpages}           % for including pdf pages
\usepackage{verbatim}           % for block comment
\usepackage{multicol}
\usepackage{standalone}         % for proposal text inclusion
\usepackage{pgfgantt}           % for gantt chart
\usepackage{longtable}          % for multi-page table
% listings format
\lstset{
basicstyle=\ttfamily,
numbers=left,
numberstyle=\small,
xleftmargin=.1\linewidth,
frame=single,
captionpos=b,
columns=fullflexible,
breaklines=true,
keepspaces=true,
showstringspaces=false,
}
\usepackage{tikz}
\usetikzlibrary{shapes,positioning,arrows,backgrounds,fit,decorations.pathreplacing}
\usepackage{adjustbox}
\usepackage[ruled,vlined]{algorithm2e}
% \setlength{\arrayrulewidth}{1mm}
\setlength{\tabcolsep}{10pt}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
%% helper commands
\newcommand\Tstrut{\rule{0pt}{2.6ex}}         % = `top' strut
\newcommand\Bstrut{\rule[-0.9ex]{0pt}{0pt}}   % = `bottom' strut
\newbox\mybox
\def\centerfigureone#1{%
    \setbox\mybox\hbox{#1}%
    \raisebox{-0.3\dimexpr\ht\mybox+\dp\mybox}{\copy\mybox}%
}
\newbox\mybox
\def\centerfiguretwo#1{%
    \setbox\mybox\hbox{#1}%
    \raisebox{-0.4\dimexpr\ht\mybox+\dp\mybox}{\copy\mybox}%
}
\newbox\mybox
\def\centerfigurethree#1{%
    \setbox\mybox\hbox{#1}%
    \raisebox{-0.4\dimexpr\ht\mybox+\dp\mybox}{\copy\mybox}%
}
%% Quantum related commands
\input{quantum-circuit-drawing-command}
%%------------------------------------------------------------
%%-               SETTING THESIS PARAMETERS                  -
%%------------------------------------------------------------
\input{thesisParam}
%%-------------------------------------------------------------------------------
%%-                               DOCUMENT                                      -
%%-------------------------------------------------------------------------------
\begin{document}
\frontmatter
% Thesis starts with Thai Cover
\makethaicover
\clearpage
% Followed by English Cover
\makeenglishcover
\clearpage
% Generate committee page
\makecommittee
\clearpage
% Thai Abstract Section
\include{abstractthai}
\clearpage
% English Abstract Section
\include{abstractenglish}
\newpage
% Acknowledgement Section
\include{acknowledgement}
\clearpage
% Table of Content
\tableofcontents        % generate table of content
\clearpage
\listoftables           % generate list of tables
\clearpage
\listoffigures          % generate list of figures
\clearpage
% Main Content
\mainmatter
%\doublespacing
\include{1-introduction} 
\include{2-background}
\include{3-review-of-literature}
\include{4-proposed-circuit}
\include{5-results}
\include{6-discussion}
%% References Section (must be placed before appendices)
\ULforem %%%
\setlength{\bibhang}{1.5cm}
% using Chula's bibliography style
\bibliographystyle{chulanat}
% specify your bibtex file here (this example is my-thesis-ref.bib)
\bibliography{my-thesis-ref}
\normalem
% Appendix Section
% first appendix MUST be specified like below.
% chapter declaration must be in this file and use \input for contents
\appendix
\chapter[Appendix Sample]{Sample Chapter}
\input{A0-appendix-sample}
\include{A1-list-of-publications}
%% Biography Section
% specify your biography file here (this example is biography.tex)
\include{biography} 
\end{document}