วันอาทิตย์ที่ 26 มิถุนายน พ.ศ. 2554

การเขียนวิทยานิพนธ์ ม.ข. ด้วย LaTeX - การสร้างหน้าปกและปกใน

การสร้างส่วนปกของวิทยานิพนธ์ แบ่งออกเป็น 3 ส่วนคือ
  1. ปกหน้า ประกอบด้วยตรามหาวิทยาลัย ชื่อวิทยานิพนธ์
  2. ปกใน ภาษาไทยและภาษาอังกฤษ มีรายละเอียดเพิ่มเติมเกี่ยวกับวิทยานิพนธ์
  3. ใบรับรอง ระบุชื่อคณะกรรมการสอบวิทยานิพนธ์ ส่วนให้คณบดีของคณะต้นสังกัด และคณบดีบัณฑิตศึกษาลงนาม
เพื่อดำเนินการในส่วนนี้ได้สะดวก จะต้องมีส่วนที่ศูนย์ คือการกำหนดค่าตัวแปรที่เกี่ยวข้องกับวิทยานิพนธ์ต่าง ๆ เช่นชื่อวิทยานิพนธ์ ชื่อผู้แต่ง หลักสูตร ฯลฯ จะขออธิบายโดยเริ่มจากส่วนที่ศูนย์ก่อน

กำหนดตัวแปรที่สำคัญ
% - Thesis Information
\newcommand*{\titleth}[1]{\def\@titleth{#1}}      % Thesis Title in Thau
\newcommand*{\authorth}[1]{\def\@authorth{#1}}    % Author name with title in Thai
\newcommand*{\authortha}[1]{\def\@authortha{#1}}  % Author name without title in Thai
\newcommand*{\authora}[1]{\def\@authora{#1}}      % Author name with title in English
\newcommand*{\yearth}[1]{\def\@yearth{#1}}        % Academic Year in B.E.
\newcommand*{\degreeth}[1]{\def\@degreeth{#1}}    % Degree in Thai
\newcommand*{\advisorth}[1]{\def\@advisorth{#1}}  % Advisor name in Thai

\newcommand*{\yearen}[1]{\def\@yearen{#1}}        % Academic year in A.D.
\newcommand*{\degree}[1]{\def\@degree{#1}}        % Degree in English
\newcommand*{\advisoren}[1]{\def\@advisoren{#1}}  % Advisor name in English

\newcommand*{\committeechair}[1]{\def\@committeechair{#1}}   % Committee chair name
\newcommand*{\firstcommittee}[1]{\def\@firstcommittee{#1}}   % Committee name
\newcommand*{\secondcommittee}[1]{\def\@secondcommittee{#1}} % Committee name
\newcommand*{\deanofgs}[1]{\def\@deanofgs{#1}}               % Dean of Graduate Schoold
\newcommand*{\deanofen}[1]{\def\@deanofen{#1}}               % Dean of Host Faculty (Need to change to more proper name)

หน้าปก
จะต้องวางตราสัญลักษณ์มหาวิทยาลัยขอนแก่นไว้ตรงกลางหน้า ต่ำจากนั้นลงมาก็จะเป็นชื่อวิทยานิพนธ์ภาษาไทย (ตัวหนา) และภาษาอังกฤษ (ตัวหนาและเป็นตัวใหญ่ทั้งหมด) ตามลำดับ จากนั้นเว้นระยะไป 6 ซ.ม. จึงจะเป็นชื่อผู้แต่งไม่มีคำนำหน้า (ตัวหนา) เว้นระยะไปอีก 6.9 ซ.ม. ก็จะเป็นการประกาศวุฒิ มหาวิทยาลัย และปีการศึกษา ซึ่งส่วนของวุฒิและปีการศึกษานั้นจะรับมาจากตัวแปรข้างบน ส่วนชื่อมหาวิทยาลัยขอนแก่นนั้นจะฝังลงไปในคลาสเลย สำหรับตัวเลขระยะที่ระบุในส่วนนี้ได้จากการวัดระยะตัวอย่างวิทยานิพนธ์จริง ฝังระยะคงที่นี้ไว้ในคลาสเลยเช่นเดียวกัน แต่ว่าน่าจะปรับปรุงได้ในอนาคต
% - Front Cover
\begin{titlepage}
\begin{ċenter}
 \begin{figure}
   \begin{ċenter}
  \IfFileExists{kkuNew.eps}{\includegraphics[scale =0.1]{kkuNew.eps}}{File kkuNew.eps is not found.}
     \end{ċenter}
 \end{figure}
\end{ċenter}
\begin{ċenter}
{\large \textbf{\MakeUppercase{\@titleth}}} \\
{\large \textbf{\MakeUppercase{\@title}}}
\end{ċenter}
\vspace{6cm}
\begin{ċenter}
{\large \textbf{\MakeUppercase{\@authorth}}}
\end{ċenter}
\vspace{6.9cm}
\begin{ċenter}
{\large \textbf{วิทยานิพนธ์ปริญญา\@degreeth \\ มหาวิทยาลัยขอนแก่น} \\
\textbf{พ.ศ. \@yearth}}
\end{ċenter}
\end{titlepage}%

ปกใน
ปกในมีสองส่วนย่อยคือปกในภาษาไทยและปกในภาษาอังกฤษ ซึ่งทั้งสองส่วนจะมีโครงสร้างคล้าย ๆ กันคือ ชื่อวิทยานิพนธ์อยู่กลางหน้าด้านบน (ตัวหนา) เว้นระยะ 9 ซ.ม. จะเป็นชื่อผู้แต่งมีคำนำหน้า (ตัวหนา) และเว้นระยะอีก 9 ซ.ม. ก็จะเป็นการประกาศว่าวิทยานิพนธ์นี้เป็นส่วนหนึ่งของหลักสูตรอะไร สาขาอะไร ในมหาวิทยาลัยขอนแก่น ในส่วนนี้ผมนึกชื่อตัวแปรที่จะใช้บรรจุสาขาวิชาไม่ออก เลยเขียน hard code ลงไปในคลาสเลย ควรได้รับการปรับปรุงเพื่อให้สามารถส่งชื่อสาขาวิชาผ่านตัวแปรได้ ในค่าระยะคงที่ที่ใช้ในคลาสมาจาการวัดจริงจากตัวอย่างวิทยานิพนธ์เช่นเดียวกัน
% Title page in Thai
\begin{titlepage}
\thispagestyle{empty}
\begin{ċenter}
{\large \textbf{\MakeUppercase{\@titleth}}}
\end{ċenter}
\vspace{9cm}
\begin{ċenter}
{\large \textbf{\@authorth}}
\end{ċenter}
\vspace{9cm}
\begin{ċenter}
\textbf{วิทยานิพนธ์นี้เป็นส่วนหนึ่งของการศึกษาตามหลักสูตรปริญญา\@degreeth}\\
\textbf{สาขาวิชาวิศวกรรมไฟฟ้า}\\
\textbf{บัณฑิตวิทยาลัย มหาวิทยาลัยขอนแก่น}\\
\textbf{พ.ศ. \@yearth}
\end{ċenter}
\end{titlepage}

% Title page in English
\begin{titlepage}
\thispagestyle{empty}
\begin{ċenter}
{\large \textbf{\MakeUppercase{\@title}}}
\end{ċenter}
\vspace{9cm}
\begin{ċenter}
{\large \textbf{\MakeUppercase{\@author}}}
\end{ċenter}
\vspace{8.7cm}
\begin{ċenter}
\textbf{\MakeUppercase{A thesis submitted in partial fulfillment of the requirements}}\\
\textbf{\MakeUppercase{for the degree of \@degree}}\\
\textbf{\MakeUppercase{in Electrical Engineering}}\\
\textbf{\MakeUppercase{Graduate School Khon Kaen University}}\\
\textbf{\MakeUppercase{\@yearen}}
\end{ċenter}
\end{titlepage}

ใบรับรอง
ในหน้านี้จะประกอบด้วยตราสัญลักษณ์มหาวิทยาลัยขอนแก่นตรงกลางหน้าด้านบน ต่ำลงมาจะเป็นคำประกาศใบรับรองวิทยานิพนธ์ ตรงจุดนี้ผมใช้การใส่ข้อมูลตรง ๆ ลงไปในคลาส ไม่ผ่านตัวแปรซึ่งควรแก้ไข ต่ำลงมา 1 ซ.ม. จะเป็นชื่อวิทยานิพนธ์ ต่ำลงมาอีก 1 ซ.ม. จะเป็นชื่อผู้เขียน (มีคำนำหน้า) ต่ำลงมาอีก 1 ซ.ม. จะเป็นรายชื่อกรรมการสอบวิทยานิพนธ์ เว้นระยะลงมา 2 ซ.ม. เป็นชื่ออาจารย์ที่ปรึกษา หลังจากนั้นจะเป็นส่วนที่จะให้คณบดีคณะต้นสังกัด และคณบดีบัณฑิตวิทยาลัยลงนาม
% Certificate page
\begin{titlepage}
\thispagestyle{empty}
\begin{ċenter}
 %\vspace{2.5cm}
 \begin{figure}
   \begin{ċenter}
  \IfFileExists{kkuNew.eps}{\includegraphics[scale =0.1]{kkuNew.eps}}{File kkuNew.eps is not found.}
     \end{ċenter}
 \end{figure}
\end{ċenter}
\begin{ċenter}
\textbf{ใบรับรองวิทยานิพนธ์}\\
\textbf{มหาวิทยาลัยขอนแก่น}\\
\textbf{หลักสูตร}\\
\textbf{วิศวกรรมศาสตรมหาบัณฑิต}\\
\textbf{สาขาวิชาวิศวกรรมไฟฟ้า}
\end{ċenter}
\vspace{1cm}
\begin{flushleft}
\textbf{ชื่อวิทยานิพนธ์}: \hspace{2em} \@titleth \\
\vspace{1cm}
\textbf{ชื่อผู้ทำวิทยานิพนธ์}: \hspace{2em} \@authorth \\
\vspace{1cm}
\begin{tabular}{@{}lll}
\textbf{คณะกรรมการสอบวิทยานิพนธ์} & \@committeechair  & ประธานกรรมการ \\
                               & \@firstcommittee & กรรมการ \\
                               & \@secondcommittee  & กรรมการ
\end{tabular}
\end{flushleft}
\vspace{2cm}
\textbf{อาจารย์ที่ปรึกษาวิทยานิพนธ์:}\\
\begin{ċenter}
% \makebox with zero width is free from center environment
% this is very handy for signature line.
% Could be useful for official memo (Thailand) too.
\makebox[6cm][l]{\dotfill{}}\makebox[0pt][l]{ อาจารย์ที่ปรึกษา}\\
(\@advisorth)
\end{ċenter}
\vspace{1cm}
\begin{ċenter}
\begin{tabular}{ccc}
\dotfill{}&&\dotfill{}\\
 (\@deanofgs)&&(\@deanofen)\\
คณบดีบัณฑิตวิทยาลัย && คณบดีคณะวิศวกรรมศาสตร์ \\
\end{tabular}
\end{ċenter}
\vspace{1cm}
\begin{ċenter}
ลิขสิทธิ์ของมหาวิทยาลัยขอนแก่น
\end{ċenter}
\end{titlepage}

นำคำสั่งทุกคำสั่งที่ตั้งแต่ส่วนที่ใช้สร้างปกจนถึงส่วนใบรับรองบรรจุไว้ในส่วนสร้างคำสั่ง \maketitle
\renewcommand\maketitle{
% Commands that create covers and certificate page described earlier
}
หมายความว่าคำสั่งทั้งหมดที่ใช้สร้างปกที่อธิบายไว้ข้างต้น จะต้องอยู่ระหว่าง { และ } ของคำสั่ง \renewcommand\maketitle นั่นเอง

ไม่มีความคิดเห็น: