%%
%%  kaist.cls   Document class for KAIST thesis, 96/01/13 version
%%
%%              Requires hLaTeXp, a Hangul LaTeX2e by the same author,
%%              or HanTeX package from Hangul & Computer. Co
%%
%%              By Jae Choon Cha
%%                 Industrial Mathematics Laboratory
%%                 KAIST
%%
%%  Copyright (C) Jae Choon Cha. All Rights are reserved.
%%  You are not allowed to change this file.
%%  This file (and any derivation) cannot be sold or distributed with
%%  any commercial product or used in any commercial organization without
%%  additional agreement with the author.
%%
%%  Send any comments to jccha@math.kaist.ac.kr.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{kaist}[1995/11/29 Document class for KAIST thesis]
%
\LoadClass[12pt,oneside,a4paper]{report}
%
\DeclareOption{korean}{\gdef\@korean{}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
\ProcessOptions
%
\AtBeginDocument{\make@covertitle}
%
\topmargin=4.6mm % comment out if want exact top margin
\advance\topmargin 19mm
\oddsidemargin=4.6mm
\advance\oddsidemargin 10mm % comment out if want exact left margin
\evensidemargin=\oddsidemargin
\textwidth=188mm
\advance\textwidth by-60mm
\textheight=257mm
\advance\textheight by-60mm
\footskip=10mm
%\footheight=5mm
\headheight=0mm
\headsep=0mm
\topskip=0mm
\overfullrule=0pt
\def\baselinestretch{1.3}
\def\bibname{References}
\def\code#1{\def\@code{#1}} 
\def\emajor#1{\def\@emajor{#1}}
\def\kmajor#1{\def\@kmajor{#1}}
\def\etitle#1{\def\@etitle{#1}}
\def\ktitle#1{\def\@ktitle{#1}}
\def\advisor#1{\def\@advisor{#1}}
\def\coadvisor#1{\def\@coadvisor{#1}}
\def\ename#1{\def\@ename{#1}}
\def\kname#1{\def\@kname{#1}}
\def\cname#1{\def\@cname{#1}}
\def\studentid#1{\def\@studentid{#1}}
\def\coveryear#1{\def\@coveryear{#1}}
\def\advisorsigndate#1#2#3{\def\@advisorsigndate{#1. #2. #3}}
\def\refereesigndate#1#2#3{\def\@refereesigndate{#1년 #2월 #3일}}
\def\refereeA#1{\def\@refereeA{#1}}
\def\refereeB#1{\def\@refereeB{#1}}
\def\refereeC#1{\def\@refereeC{#1}}
\def\refereeD#1{\def\@refereeD{#1}}
\def\refereeE#1{\def\@refereeE{#1}}
\def\npages#1{\def\@npages{#1}}
\def\@npages{\pageref{paperlastpagelabel}}
\def\birthday#1#2#3{\def\@birthday{#1년 #2월 #3일}}
\def\birthplace#1{\def\@birthplace{#1}}
\def\addr#1{\def\@addr{#1}}

\def\D@char{D}
\def\split@code#1#2\eop{\def\@md{#1}\def\@dept{#2}}
\def\PH{PH}
\def\LS{LS}
\def\BT{BT}
\def\MA{MA}
\def\CH{CH}
\def\ME{ME}
\def\NE{NE}
\def\PE{PE}
\def\AE{AE}
\def\MG{MG}
\def\MP{MP}
\def\IE{IE}
\def\ID{ID}
\def\CM{CM}
\def\MS{MS}
\def\EM{EM}
\def\CE{CE}
\def\ChE{ChE}
\def\EE{EE}
\def\CS{CS}
\pagestyle{plain}
\def\insert@hss#1#2{#1#2\hss}
\def\maketitlebreakwork{\def\titlebreak{\\\ignorespaces}}
\def\maketitlebreaknotwork{\def\titlebreak{\ }}
\maketitlebreaknotwork
\def\make@covertitle{%
  \ifx\@korean\@@@@undefined@@@@\else
    \def\contentsname{목 차}
    \def\listfigurename{그림 목차}
    \def\listtablename{표 목차}
    \def\refname{참 고 문 헌}
    \def\bibname{참 고 문 헌}
    \def\indexname{찾 아 보 기}
    \def\figurename{그림}
    \def\tablename{표}
  \fi
  \expandafter\split@code\@code\eop
  \ifx\@dept\PH \def\@kdept{물리} \def\@edept{Physics} \def\@em{Science}\fi
  \ifx\@dept\LS \def\@kdept{생명과} \def\@edept{Life Science} \def\@em{Science}\fi
  \ifx\@dept\BT \def\@kdept{생물공} \def\@edept{Biotechnology} \def\@em{Science}\fi
  \ifx\@dept\MA \def\@kdept{수} \def\@edept{Mathematics} \def\@em{Science}\fi
  \ifx\@dept\CH \def\@kdept{화} \def\@edept{Chemistry} \def\@em{Science}\fi
  \ifx\@dept\ME \def\@kdept{기계공} \def\@edept{Mechanical Engineering} \def\@em{Engineering}\fi
  \ifx\@dept\NE \def\@kdept{원자력공} \def\@edept{Nuclear Engineering} \def\@em{Engineering}\fi
  \ifx\@dept\PE \def\@kdept{정밀공} \def\@edept{Precision Engineering and Mechatronics} \def\@em{Engineering}\fi
  \ifx\@dept\AE \def\@kdept{항공우주공} \def\@edept{Aerospace Engineering} \def\@em{Engineering}\fi
  \ifx\@dept\MG \def\@kdept{경영과} \def\@edept{Management Science} \def\@em{Engineering}\fi
  \ifx\@dept\MP \def\@kdept{경영정책} \def\@edept{Management \& Policy} \def\@em{Engineering}\fi
  \ifx\@dept\IE \def\@kdept{산업공} \def\@edept{Industrial Engineering} \def\@em{Engineering}\fi
  \ifx\@dept\ID \def\@kdept{산업디자인} \def\@edept{Industrial Design} \def\@em{Engineering}\fi
  \ifx\@dept\CM \def\@kdept{무기재료공} \def\@edept{Ceramic Science and Engineering} \def\@em{Engineering}\fi
  \ifx\@dept\MS \def\@kdept{재료공} \def\@edept{Materials Science & Engineering} \def\@em{Engineering}\fi
  \ifx\@dept\EM \def\@kdept{전자재료공} \def\@edept{Electronic Materials Engineering} \def\@em{Engineering}\fi
  \ifx\@dept\CE \def\@kdept{토목공} \def\@edept{Civil Engineering} \def\@em{Engineering}\fi
  \ifx\@dept\ChE \def\@kdept{화학공} \def\@edept{Chemical Engineering} \def\@em{Engineering}\fi
  \ifx\@dept\EE \def\@kdept{전기및전자공} \def\@edept{Electrical Engineering} \def\@em{Engineering}\fi
  \ifx\@dept\CS \def\@kdept{전산} \def\@edept{Computer Science} \def\@em{Engineering}\fi
  \ifx \D@char\@md \def\@kmd{박사}\def\@emd{Doctor of Philosophy}
  \else \def\@kmd{석사} \def\@emd{Master of \@em} \fi

  \thispagestyle{empty}
  \vbox to\textheight{\vspace*{5mm}
  \begin{center}\maketitlebreakwork
    \leavevmode\hbox to50mm{\fontsize{17}{20pt}\selectfont \expandafter\insert@hss\@kmd\hss
      학\hss 위\hss 논\hss 문}\\
    \fontsize{20.74}{35pt}\selectfont \@ktitle\\
    \vfill \fontsize{17}{28pt}\selectfont \@kname{ }(\@cname)\\
    \@kdept 학과 (\@kmajor{ }전공)\\한국과학기술원\\\@coveryear
  \maketitlebreaknotwork
  \end{center}\vspace*{5mm}}
  \newpage\thispagestyle{empty}
  \vspace*{30mm}
  \begin{center}\maketitlebreakwork
    \fontsize{20.74}{28pt}\selectfont \@ktitle \\[20pt]\@etitle
    \maketitlebreaknotwork
  \end{center}
  \newpage\thispagestyle{empty}\vbox to\textheight{\vspace*{5mm}
  \begin{center}\fontsize{20.74}{24pt}\selectfont{\maketitlebreakwork\@etitle
    \maketitlebreaknotwork}\\
  \vspace{4mm}
  \fontsize{14}{20pt}\selectfont Advisor : \@advisor\\
    \ifx\@coadvisor\@@@@undefined@@@@ \else Co-Advisor : \@coadvisor\\ \fi
    \vspace{2mm} by\\\vspace{2mm}\@ename\\[2mm]
    Department of \@edept{ }\mbox{(\@emajor{ }program)}\\
    Korea Advanced Institute of Science and Technology
  \end{center}
  \vfill
  \begin{trivlist}\item[]\fontsize{14}{20pt}\selectfont
  \hskip 1em A thesis submitted to the faculty of the Korea Advanced
  Institute of Science and Technology in partial fulfillment
  of the requirements for the degree of {\@emd} in the Department
  of {\@edept} ({\@emajor} program)
  \end{trivlist}
  \vfill\vspace*{6mm}
  \begin{flushright}\fontsize{14}{20pt}\selectfont
  \parbox{5cm}{\raggedright\noindent Taejon, Korea\\\@advisorsigndate\\Approved by\\
    \vskip 18mm\hrule\vskip 8pt\noindent Major Advisor\\}
  \end{flushright}
  \vspace*{2mm}}
  \newpage\thispagestyle{empty}\vbox to\textheight{\vspace*{5mm}
  \begin{center}\fontsize{20.74}{28pt}\selectfont{\maketitlebreakwork\@ktitle
    \maketitlebreaknotwork}\\[1cm]
     \fontsize{17}{20pt}\selectfont \@kname\\
  \end{center}\vfill
  \begin{trivlist}\item[]\fontsize{14}{20pt}\selectfont
  \hskip 1em 위 논문은 한국과학기술원 {\@kmd} 학위논문으로
  학위논문심사위원회에서 심사 통과하였음.
  \end{trivlist}
  \vfill
  \begin{flushright}\fontsize{14}{18pt}\selectfont 
    \@refereesigndate\\[1cm]
    \begin{tabular}{rlc@{}}
      심사위원장 & \@refereeA & (인)\\[9pt] 
      심사위원 & \@refereeB & (인)\\[9pt] 
      심사위원 & \@refereeC & (인)\\[9pt]
      \ifx \D@char\@md 
      심사위원 & \@refereeD & (인)\\[9pt] 
      심사위원 & \@refereeE & (인)\\[9pt]
      \fi
    \end{tabular}
  \end{flushright}
  \vskip-9pt}\newpage}

\def\abstract{\hbox{\parbox[t]{2cm}{\strut\@code\\\@studentid}\advance\linewidth by-2cm
  \parbox[t]{\linewidth}{\@kname. \@ename. \@etitle. \@ktitle. Department of \@edept.
  \@coveryear. \@npages{p}. Advisor: \@advisor \ifx\@coadvisor\@@@@undefined@@@@
  \else, \@coadvisor\fi.}}%
  \thispagestyle{empty}\pagestyle{empty}
  \vskip 2cm}
\def\endabstract{\thispagestyle{empty}\pagestyle{plain}\newpage}

\def\makecontents{%
  \pagestyle{empty}\thispagestyle{empty}
  {\let\thispagestyle\@gobble \tableofcontents}%
  \setcounter{page}{0}%
  \thispagestyle{empty}\pagestyle{plain}}

\def\@makechapterhead#1{\vspace*{10pt}%
  {\parindent=0pt \begin{center}
    \ifnum \c@secnumdepth >\m@ne
      \Large\bf \@chapapp{} \thechapter. \fi
    \Large\bf #1\par
    \nobreak\vskip10pt \end{center}%
}}
\def\@makeschapterhead#1{\vspace*{10pt}%
  {\parindent=0pt\begin{center}
    \Large\bf #1\par
    \nobreak\vskip10pt \end{center}%
}}
\def\@chapapp{}
\def\thechapter{\arabic{chapter}}     

\def\section{\@startsection {section}{1}{\z@}%
  {3.5ex plus 1ex minus .2ex}%
  {1.7ex plus.2ex}%
  {\bf}}
\def\subsection{\@startsection{subsection}{2}{\z@}%
  {3.25ex plus1ex minus.2ex}%
  {-1em}%
  {\bf}}

\def\appendix{\par\setcounter{chapter}{0}\setcounter{section}{0}
  \ifx\@korean\@@@@undefined@@@@ \def\@chapapp{Appendix}
    \else \def\@chapapp{부 록}\fi
  \def\thechapter{\Alph{chapter}}}

\def\summary{\chapter*{요 약 문}
  \addcontentsline{toc}{chapter}{Summary (in Korean)}
  \thispagestyle{empty}\pagestyle{empty}
  \begin{center}\fontsize{14}{20pt}\selectfont{\maketitlebreakwork\@ktitle
    \maketitlebreaknotwork}
  \end{center}\vspace{1.5cm}}

\def\thebibliography#1{\chapter*{\bibname\@mkboth
 {\uppercase{\bibname}}{\uppercase{\bibname}}}%
 \addcontentsline{toc}{chapter}{\bibname}\list
 {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
 \advance\leftmargin\labelsep
 \usecounter{enumi}}
 \def\newblock{\hskip .11em plus .33em minus .07em}
 \sloppy\clubpenalty4000\widowpenalty4000
 \sfcode`\.=1000\relax\thispagestyle{plain}\pagestyle{plain}\relax}
\def\endthebibliography{\label{paperlastpagelabel}%
  \def\@noitemerr{\@warning{Empty `thebibliography' environment}}%
  \endlist}


\def\acknowledgement{\chapter*{감사의 말}\thispagestyle{empty}\pagestyle{empty}}

\def\vitae{\chapter*{이 력 서}\thispagestyle{empty}\pagestyle{empty}%
  \begin{tabular}{@{}ccl}
    \hbox to 2cm{성\hss명}&:& \@kname \\[5pt]
    \hbox to 2cm{생\hss년\hss월\hss일}&:& \@birthday\\[5pt]
    \hbox to 2cm{출\hss생\hss지}&:& \@birthplace\\[5pt]
    \hbox to 2cm{본\hss적}&:& \@addr\\
  \end{tabular}}
\newlength{\temp@len}
\def\education#1{\vspace{1cm}
  \begin{center}\fontsize{14}{20pt}\selectfont학 력
  \end{center}\vspace{.5cm}\settowidth{\temp@len}{#1}
  \begin{list}{}{\labelwidth=\temp@len\labelsep=.5cm
  \advance\temp@len by.5cm\leftmargin=\temp@len
  \def\makelabel##1{##1\hss}}}
\def\endeducation{\end{list}}
\def\experience#1{\vspace{1cm}
  \begin{center}\fontsize{14}{20pt}\selectfont경 력
  \end{center}\vspace{.5cm}\settowidth{\temp@len}{#1}
  \begin{list}{}{\labelwidth=\temp@len\labelsep=.5cm
  \advance\temp@len by.5cm\leftmargin=\temp@len
  \def\makelabel##1{##1\hss}}}
\def\endexperience{\end{list}}
\def\activity{\vspace{1cm}
  \begin{center}\fontsize{14}{20pt}\selectfont학 회 활 동
  \end{center}\vspace{.5cm}}
\def\endactivity{}




