Skip to content

Commit

Permalink
Added support to include supervisor and advisor
Browse files Browse the repository at this point in the history
  • Loading branch information
Krishna Kumar committed Dec 21, 2015
1 parent 928336b commit a5feb07
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## Change log
### 2015/06/20 - Version 2.1
> Commit
* Support for including supervisor and/or advisor

### 2015/06/20 - Version 2.0.1
> Commit 0e0d1e617acb42b034870ea325271cce8d3d8d8e
* Fixed centering of year on front page - Issue #16
Expand Down
63 changes: 59 additions & 4 deletions Classes/PhDThesisPSnPDF.cls
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
%% %%
%% A PhD thesis LaTeX template for Cambridge University Engineering Department%%
%% %%
%% Version: v2.0 %%
%% Version: v2.1 %%
%% Authors: Krishna Kumar %%
%% License: MIT License (c) 2015 Krishna Kumar %%
%% GitHub Repo: https://github.com/kks32/phd-thesis-template/ %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% ************************** Class Identification ******************************
\newcommand\fileversion{2.0}
\newcommand\filedate{2015/06/20}
\newcommand\fileversion{2.1}
\newcommand\filedate{2015/12/21}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{PhDThesisPSnPDF}[\filedate\space A PhD thesis class file
by Krishna Kumar (v\fileversion)]
Expand Down Expand Up @@ -876,10 +876,27 @@ wish to left align your text}
\newcommand{\@collegeshield}{}
\newcommand{\collegeshield}[1]{\renewcommand{\@collegeshield}{#1}\PHD@collegeshieldtrue}

% Supervisor
\newif\ifPHD@supervisor\PHD@supervisorfalse
\newcommand{\@supervisor}{}
\newcommand{\supervisor}[1]{\renewcommand{\@supervisor}{#1}\PHD@supervisortrue}

% Supervisor Title (Supervisor - Default, can be changed)
\newcommand{\@supervisorrole}{Supervisor: }
\newcommand{\supervisorrole}[1]{\renewcommand{\@supervisorrole}{#1}}

% Advisor
\newif\ifPHD@advisor\PHD@advisorfalse
\newcommand{\@advisor}{}
\newcommand{\advisor}[1]{\renewcommand{\@advisor}{#1}\PHD@advisortrue}

% Advisor Title (Advisor - Default, can be changed)
\newcommand{\@advisorrole}{Advisor: }
\newcommand{\advisorrole}[1]{\renewcommand{\@advisorrole}{#1}}

% Submission Text
\newcommand{\submissiontext}{This dissertation is submitted for the degree of }


% keywords (These keywords will appear in the PDF meta-information
% called `pdfkeywords`.)
\newcommand{\@keywords}{}
Expand Down Expand Up @@ -980,6 +997,18 @@ wish to left align your text}
{\usebox{\PHD@author}}
\vspace*{1em}

% Supervisor
\ifPHD@supervisor%
{\usebox{\PHD@supervisor}}
\vspace*{0.5em}
\fi

% Advisor
\ifPHD@advisor%
{\usebox{\PHD@advisor}}
\vspace*{0.5em}
\fi

% Department and University
{\usebox{\PHD@dept}}
\vspace{.2\PHD@titlepagespacing}
Expand Down Expand Up @@ -1188,6 +1217,30 @@ wish to left align your text}
\end{minipage}
\end{lrbox}

% Supervisor Box
\newsavebox{\PHD@supervisor}
\begin{lrbox}{\PHD@supervisor}
\begin{minipage}[c]{\textwidth}
\ifthenelse{\equal{\@supervisor}{}}{
% supervisor is not defined
}{
\centering \Large {\@supervisorrole \@supervisor}
} % supervisor is defined
\end{minipage}
\end{lrbox}

% Advisor Box
\newsavebox{\PHD@advisor}
\begin{lrbox}{\PHD@advisor}
\begin{minipage}[c]{\textwidth}
\ifthenelse{\equal{\@advisor}{}}{
% advisor is not defined
}{
\centering \Large {\@advisorrole \@advisor}
} % advisor is defined
\end{minipage}
\end{lrbox}

% Department Box
\newsavebox{\PHD@dept}
\begin{lrbox}{\PHD@dept}
Expand Down Expand Up @@ -1237,6 +1290,8 @@ wish to left align your text}
- \totalheightof{\usebox{\PHD@crest}}
- \totalheightof{\usebox{\PHD@collegecrest}}
- \totalheightof{\usebox{\PHD@author}}
- \totalheightof{\usebox{\PHD@supervisor}}
- \totalheightof{\usebox{\PHD@advisor}}
- \totalheightof{\usebox{\PHD@dept}}
- \totalheightof{\usebox{\PHD@submission}}
- \totalheightof{\usebox{\PHD@collegedate}}
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ CUED PhD thesis template

* Draft mode: Draft water mark, timestamp, version numbering and line numbering

* Add supervisor and/or advisor to your PhD thesis or MPhil report

* A LyX Template is now available at [https://github.com/kks32/PhDThesisLyX/](https://github.com/kks32/PhDThesisLyX/)

--------------------------------------------------------------------------------
Expand Down Expand Up @@ -524,4 +526,4 @@ The history of releases can be viewed at [ChangeLog](ChangeLog.md)

* Tina Schwamb - testing and bug reports

* John Plaice - Bug fixes
* John Plaice - Bug fixes
12 changes: 12 additions & 0 deletions thesis-info.tex
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@
% Crest minimum should be 30mm.
%\collegeshield{\includegraphics[width=0.2\textwidth]{CollegeShields/Kings}}


%% Supervisor (optional)
%\supervisor{Prof. Kenichi Soga}
%% Supervisor Role (optional) - Supervisor (default) or advisor
%\supervisorrole{Advisor: }

%% Advisor (optional)
%\advisor{Prof. Malcolm Bolton}
%% Advisor Role (optional) - Advisor (default) or leave empty
%\advisorrole{Advisor: }


%% You can redefine the submission text:
% Default as per the University guidelines:
% ``This dissertation is submitted for the degree of''
Expand Down
Binary file modified thesis.pdf
Binary file not shown.
Binary file modified thesis.ps
Binary file not shown.

0 comments on commit a5feb07

Please sign in to comment.