Version 1.1

This commit is contained in:
Krishna Kumar 2014-02-04 01:49:00 +00:00
commit 6e00ac94c2
9 changed files with 688 additions and 547 deletions

7
.gitignore vendored
View File

@ -12,6 +12,12 @@
*.nlo*
*make*
*.d*
*.bcf*
*.blg*
*~*
*.nlo*
*make
*.d
*.btmp*
*.fls*
*.glo*
@ -26,3 +32,4 @@
thesis.txt*
thesis.bcf*
thesis.run.xml*
*run.xml*

View File

@ -30,27 +30,31 @@
\DeclareOption{index}{\PHD@indextrue}
% ******************************* Font Option **********************************
\newif\ifsetFont\setFontfalse % Font is not set
\newif\ifsetFont\setFontfalse % Font is not set
\newif\ifPHD@times\PHD@timesfalse % Times with Math Support
\newif\ifPHD@times\PHD@timesfalse % Times with Math Support
\DeclareOption{times}{\PHD@timestrue}
\newif\ifPHD@fourier\PHD@fourierfalse % Fourier with Math Support
\newif\ifPHD@fourier\PHD@fourierfalse % Fourier with Math Support
\DeclareOption{fourier}{\PHD@fouriertrue}
\newif\ifPHD@customfont\PHD@customfontfalse % Custom Font with Math Support
\newif\ifPHD@customfont\PHD@customfontfalse % Custom Font with Math Support
\DeclareOption{customfont}{\PHD@customfonttrue}
% ******************************* Bibliography *********************************
\newif\ifsetBib\setBibfalse % Using Custom Bibliography
\newif\ifsetBib\setBibfalse % Custom Bibliography = true/false
\newif\ifsetBiBLaTeX\setBiBLaTeXfalse % BiBLaTeX = True / False
\newif\ifPHD@authoryear\PHD@authoryearfalse % Author-Year citation
\newif\ifPHD@biblatex\PHD@biblatexfalse % BiBLaTeX
\DeclareOption{biblatex}{\PHD@biblatextrue}
\newif\ifPHD@authoryear\PHD@authoryearfalse % Author-Year citation
\DeclareOption{authoryear}{\PHD@authoryeartrue}
\newif\ifPHD@numbered\PHD@numberedfalse % Numbered citiation
\newif\ifPHD@numbered\PHD@numberedfalse % Numbered citiation
\DeclareOption{numbered}{\PHD@numberedtrue}
\newif\ifPHD@custombib\PHD@custombibfalse % Custom Bibliography
\newif\ifPHD@custombib\PHD@custombibfalse % Custom Bibliography
\DeclareOption{custombib}{\PHD@custombibtrue}
% ************************* Header / Footer Styling ****************************
@ -79,6 +83,15 @@ If not, please remove the option `abstract' from the document class and
recompile. Good luck with your writing!}
}
% ****************** Chapter Mode - To print only selected chapters ************
\newif \ifdefineChapter\defineChapterfalse %To enable Separate abstract
\newif\ifPHD@chapter\PHD@chapterfalse % Enable Separate Abstract
\DeclareOption{chapter}{
\PHD@chaptertrue
\ClassWarning{PhDThesisPSnPDF}{You have chosen an option that generates only selected chapters with references, if this was intentional, ignore this warning. If not, please remove the option `chapter' from the document class and recompile. Good luck with your writing!}
}
\ProcessOptions\relax%
% *************************** Pre-defined Options ******************************
@ -273,22 +286,40 @@ supported!}
% ******************************* Bibliography *********************************
\ifPHD@authoryear
\ifPHD@biblatex
\RequirePackage[backend=bibtex8, style=authoryear, citestyle=alphabetic, sorting=nty, natbib=true]{biblatex}
\setBiBLaTeXtrue
\else
\RequirePackage[round, sort, numbers, authoryear]{natbib} %author year
\fi
\setBibtrue
\else
\ifPHD@numbered
\ifPHD@biblatex
\RequirePackage[backend=bibtex8, style=numeric-comp, citestyle=numeric, sorting=none, natbib=true]{biblatex}
\setBiBLaTeXtrue
\else
\RequirePackage[numbers,sort&compress]{natbib} % numbered citation
\fi
\setBibtrue
\else
\ifPHD@custombib
\setBibfalse
\ifPHD@biblatex
\setBiBLaTeXtrue
\fi
\else
\RequirePackage[numbers,sort&compress]{natbib} % Default - numbered
\ifPHD@biblatex
\RequirePackage[backend=bibtex8, style=numeric-comp, citestyle=numeric, sorting=none, natbib=true]{biblatex}
\setBiBLaTeXtrue
\else
\RequirePackage[numbers,sort&compress]{natbib} % Default - numbered
\fi
\setBibtrue
\ClassWarning{PhDThesisPSnPDF}{No bibliography style was specified.
Default numbered style is used. If you would like to use a different style, use
`authoryear' or `numbered' in the options in documentclass or use `custombib`
and define the natbibpackage with required style in the Preamble.tex file}
and define the natbib package or biblatex package with required style in the Preamble.tex file}
\fi
\fi
\fi
@ -297,7 +328,8 @@ and define the natbibpackage with required style in the Preamble.tex file}
% *********************** To copy ligatures and Fonts **************************
\RequirePackage{textcomp}
\RequirePackage[utf8]{inputenc}
%[utf8] was used - removed for biblatex - biber backend required
\RequirePackage{inputenc}
\RequirePackage[T1]{fontenc}
% Font Selection
@ -432,6 +464,16 @@ font in the preamble.tex file by specifying `customfont' in the class options}
\renewcommand{\thepage}{\roman{page}}}
{\newpage\renewcommand{\thepage}{\arabic{page}}}
% ******************************* Appendices **********************************
% Appending the appendix name to the letter in TOC
% Especially when backmatter is enabled
%\renewcommand\backmatter{
% \def\chaptermark##1{\markboth{%
% \ifnum \c@secnumdepth > \m@ne \@chapapp\ \thechapter: \fi ##1}{%
% \ifnum \c@secnumdepth > \m@ne \@chapapp\ \thechapter: \fi ##1}}%
% \def\sectionmark##1{\relax}}
% ******************************************************************************
% **************************** Macro Definitions *******************************
@ -631,6 +673,24 @@ font in the preamble.tex file by specifying `customfont' in the class options}
\newcommand{\printthesisindex}{}
\fi
% ***************************** Chapter Mode ***********************************
% The chapter mode allows user to only print particular chapters with references
% All other options are disabled by default
% To include only specific chapters without TOC, LOF, Title and Front Matter
% To send it to supervisior for changes
\ifPHD@chapter
\defineChaptertrue
% Disable the table of contents, figures, tables, index and nomenclature
\renewcommand{\maketitle}{}
\renewcommand{\tableofcontents}{}
\renewcommand{\listoffigures}{}
\renewcommand{\listoftables}{}
\renewcommand{\printnomencl}{}
\renewcommand{\printthesisindex}{}
\else
\defineChapterfalse
\fi
% ******************************** Abstract ************************************
% The abstract environment puts a large, bold, centered "Abstract" label at

View File

@ -4,6 +4,7 @@
% Add `custommargin' in the document class options to use this section
% Set {innerside margin / outerside margin / topmargin / bottom margin} and
% other page dimensions
\ifsetMargin
\else
\RequirePackage[left=37mm,right=30mm,top=35mm,bottom=30mm]{geometry}
@ -14,10 +15,12 @@
% ******************* Fonts (like different typewriter fonts etc.)*************
% Add `customfont' in the document class option to use this section
\ifsetFont
\else
% Set your custom font here and use `customfont' in options. Leave empty to
% load computer modern font (default LaTeX font).
\RequirePackage{libertine}
\fi
@ -29,12 +32,17 @@
% Add `custombib' in the document class option to use this section
\ifsetBib % True, Bibliography option is chosen in class options
\else % If custom bibliography style chosen then load bibstyle here
\RequirePackage[square, sort, numbers, authoryear]{natbib} % CustomBib
\ifsetBiBLaTeX
\RequirePackage[backend=bitex8, style=numeric-comp, citestyle=numeric, sorting=nty, natbib=true]{biblatex}
\else
\RequirePackage[square, sort, numbers, authoryear]{natbib} % CustomBib
\fi
\fi
% changes the default name `Bibliography` -> `References'
\renewcommand{\bibname}{References}
% *****************************************************************************
% *************** Changing the Visual Style of Chapter Headings ***************
% Uncomment the section below. Requires titlesec package.
@ -132,5 +140,4 @@
% The default value of both \appendixtocname and \appendixpagename is `Appendices'. These names can all be changed via:
%\renewcommand{\appendixtocname}{List of appendices}
%\renewcommand{\appendixname}{Appndx}

View File

@ -49,6 +49,12 @@ THE SOFTWARE.
* A separate abstract with thesis title and author name, along with the titlepage can be generated by passing the argument `abstract` to the document class.
* Option to generate only specific chapters and references without the frontmatter and title page. Useful for review and corrections.
* BibLaTeX support for Bibliography
* A LyX Template is now available at [https://github.com/kks32/PhDThesisLyX/](https://github.com/kks32/PhDThesisLyX/)
## Building your thesis
@ -101,11 +107,15 @@ Usage: `sh ./compile-thesis.sh [OPTIONS] [filename]`
## Usage details
Thesis information such as title, author, year, degree, etc., and other meta-data can be modified in `thesis-info.tex`
### Class Options
The class file, `PhDThesisPSnPDF`, is based on the standard `book` class
It supports the following custom options:
It supports the following custom options in the documentclass in thesis.tex:
(Usage `\documentclass[a4paper,11pt,print]{Classes/PhDThesisPSnPDF}`)
* `a4paper` (default as per the University guidelines) or `a5paper`: Paper size
@ -135,21 +145,35 @@ It supports the following custom options:
* `abstract`: This option enables only the thesis title page and the abstract with title and author to be printed.
* `chapter`: This option enables only the specified chapter and it's references. Useful for review and corrections.
### Abstract separate
* A separate abstract with the title of the PhD and the candidate name has to be submitted to the Student Registry. This can be generated using `abstract` option in the document class. Ignore subsequent warnings about skipping sections (if any).
* To generate the separate abstract and the title page, make sure the following commands are in the `preamble.tex` file:
* To generate the separate abstract and the title page, make sure the following commands are in the preamble section of `thesis.tex` file:
\ifdefineAbstract
\includeonly{Abstract/abstract}
\else
\fi
### Chapter Mode
* The chapter mode allows user to only print specific chapters along with references. By default, it excludes everything else in the front matter and appendices. This can done by using `chapter` option in the document class in `thesis.tex`. Ignore subsequent warnings about skipping sections (if any).
* To generate the separate abstract and the title page, make sure the following commands are in the preamble section of `thesis.tex` file:
\ifdefineChapter
\includeonly{Chapter3/chapter3}
\else
\fi
### Choosing the Fonts
`PhDThesisPSnPDF` currently supports two fonts `Times` and `Latin Modern (default)`.
`PhDThesisPSnPDF` currently supports three fonts `Times`, `Fourier` and `Latin Modern (default)`.
* `times`: (The University of Cambridge guidelines recommend using Times). Specifying times option in the document class will use `mathptpx` or `Times` font with Math Support.
* `fourier`: fourier font with math support
@ -163,7 +187,9 @@ It supports the following custom options:
### Choosing the Bibliography style
`PhDThesisPSnPDF` currently supports two styles `authoryear` and `numbered (default)`. Citation style has to be set. You can also specify `custombib` style
`PhDThesisPSnPDF` currently supports two styles `authoryear` and `numbered (default)`. Citation style has to be set. You can also specify `custombib` style and customise the bibliography.
* BibLaTeX support has been added and can be invoked using `biblatex` in the documentclass. Bibtex is used as the backend for `biblatex` at the moment. Will be replaced with biber when Makefile support is added.
* `authoryear`: For author-year citation eg., Krishna (2013)
@ -371,9 +397,16 @@ If you are generating a separate abstract for your thesis submission, ignore thi
* Make example thesis a document on how to use the template and include general guidelines and good practices.
* Biber backend support for biblatex with Makefile
--------------------------------------------------------------------------------
## ChangeLog
### 2014/02/04 - Version 1.1
> Commit
* BibLatex Support with bibtex backend
* Chapter mode for compiling only specified chapters and references
### 2014/01/11 - Version 1.0
> Commit 2f6918863e3c9d0a7e95bd2651ce7ef8ae38f90a
* Fixed an issue with the headers in Nomenclature section

40
thesis-info.tex Normal file
View File

@ -0,0 +1,40 @@
% ************************ Thesis Information & Meta-data **********************
%% The title of the thesis
\title{Writing your PhD Thesis in \texorpdfstring{\\ \LaTeX2e}{LaTeX2e}}
%\texorpdfstring is used for PDF metadata. Usage:
%\texorpdfstring{LaTeX_Version}{PDF Version (non-latex)} eg.,
%\texorpdfstring{$sigma$}{sigma}
%% The full name of the author
\author{Krishna Kumar}
%% Department (eg. Department of Engineering, Maths, Physics)
\dept{Department of Engineering}
%% University and Crest
\university{University of Cambridge}
\crest{\includegraphics[width=0.25\textwidth]{University_Crest}}
%% You can redefine the submission text:
% Default as per the University guidelines: This dissertation is submitted for
% the degree of Doctor of Philosophy
%\renewcommand{\submissiontext}{change the default text here if needed}
%% Full title of the Degree
\degree{Doctor of Philosophy}
%% College affiliation (optional)
\college{King's College}
%% Submission date
\degreedate{2013}
%% Meta information
\subject{LaTeX} \keywords{{LaTeX} {PhD Thesis} {Engineering} {University of
Cambridge}}
% ***************************** BiBLaTeX Reference *****************************
\ifsetBiBLaTeX
\bibliography{References/references}
\fi

Binary file not shown.

Binary file not shown.

977
thesis.ps

File diff suppressed because it is too large Load Diff

View File

@ -28,6 +28,9 @@
% `abstract': To generate only the title page and abstract page with
% dissertation title and name, to submit to the Student Registry
%
% `chapter`: This option enables only the specified chapter and it's references
% Useful for review and corrections.
%
% ************************* Custom Page Margins ********************************
%
% `custommargin`: Use `custommargin' in options to activate custom page margins,
@ -48,6 +51,8 @@
%
% ********************** Choosing the Bibliography style ***********************
%
% `biblatex`: To enable BibLaTeX Support with bibtex backend
%
% `authoryear': For author-year citation eg., Krishna (2013)
%
% `numbered': (Default Option) For numbered and sorted citation e.g., [1,5,2]
@ -72,60 +77,33 @@
\input{Preamble/preamble}
% ************************ Thesis Information & Meta-data **********************
%% The title of the thesis
\title{Writing your PhD Thesis in \texorpdfstring{\\ \LaTeX2e}{LaTeX2e}}
%\texorpdfstring is used for PDF metadata. Usage:
%\texorpdfstring{LaTeX_Version}{PDF Version (non-latex)} eg.,
%\texorpdfstring{$sigma$}{sigma}
%% The full name of the author
\author{Krishna Kumar}
%% Department (eg. Department of Engineering, Maths, Physics)
\dept{Department of Engineering}
%% University and Crest
\university{University of Cambridge}
\crest{\includegraphics[width=0.25\textwidth]{University_Crest}}
%% You can redefine the submission text:
% Default as per the University guidelines: This dissertation is submitted for
% the degree of Doctor of Philosophy
%\renewcommand{\submissiontext}{change the default text here if needed}
%% Full title of the Degree
\degree{Doctor of Philosophy}
%% College affiliation (optional)
\college{King's College}
%% Submission date
\degreedate{2013}
%% Meta information
\subject{LaTeX} \keywords{{LaTeX} {PhD Thesis} {Engineering} {University of
Cambridge}}
% Thesis title and author information, refernce file for biblatex
\input{thesis-info}
% ***************************** Abstract Separate ******************************
% To printout only the titlepage and the abstract with the PhD title and the
% author name for submission to the Student Registry, use the abstract option in
% author name for submission to the Student Registry, use the `abstract' option in
% the document class.
\ifdefineAbstract
\includeonly{Abstract/abstract}
\else
\fi
% ***************************** Chapter Mode ***********************************
% The chapter mode allows user to only print particular chapters with references
% Title, Contents, Frontmatter are disabled by default
% Useful option to review a particular chapter or to send it to supervisior.
% To use choose `chapter' option in the document class
\ifdefineChapter
\includeonly{Chapter3/chapter3}
\fi
% ******************************** Front Matter ********************************
\begin{document}
\frontmatter
\begin{titlepage}
\maketitle
@ -163,19 +141,28 @@ Cambridge}}
% ********************************** Back Matter *******************************
% ********************************** Bibliography ******************************
% Backmatter should be commented out, if you are using appendices after References
%\backmatter
% ********************************** Bibliography ******************************
\begin{spacing}{0.9}
% To use BibLaTeX for your references, use `biblatex' in the document class
% Bibfile (reference.bib) is specified in Line 38 in thesis-info.tex '\ifsetBiBLaTeX \bibliography{References/references} \fi'
\ifsetBiBLaTeX % BiBLaTeX
\printbibliography[heading=bibintoc, title={References}]
% To use the conventional natbib style referencing
% Bibliography style previews: http://nodonn.tipido.net/bibstyle.php
\else % NatBiB
\bibliographystyle{apalike}
%\bibliographystyle{plainnat} % use this to have URLs listed in References
\bibliographystyle{apalike}
%\bibliographystyle{plainnat} % use this to have URLs listed in References
\cleardoublepage
\bibliography{References/references} % Path to your References.bib file
\cleardoublepage
\bibliography{References/references} % Path to your References.bib file
\fi
\end{spacing}