Derived from CUED PhD Thesis template by Krishna Kumar.
Edited and Modified by Soumyadeep Das, IDD, Dept. of Physics, Batch of 2014~2019.
Report issues here, or send me an email to contribute.
Download the zip here, or get it from
-
Written in accordance to Revised Specification and Information Regarding the Preparation of Thesis, dated 29th August, 2016.
-
Well-suited for sending to major institutions all over the world.
-
Supports LaTeX, XeLaTeX and LuaLaTeX. Fully compatible for online IDEs.
-
Completely modular, highly intuitive, and extremely flexible.
-
Adaptive Title Page: Title page adapts to title length. Title page with the institute crest.
-
Easily editable certificates, declaration and copyright transfer pages.
-
Recognise and inflate NASA-ADS Abbreviations used in bibliography, for thesis in astrophysics.
-
Print / On-line version: Different layout and hyper-referencing styles.
-
Pre-defined and custom fonts (Times/ Fourier / Latin Modern) with math support also available. Also supports system fonts (XeLaTeX).
-
Pre-defined and custom bibliography style support (authoryear / numbered / custom)
-
Custom page styles: 3 Different Header / Footer styles, with pre-defined and custom margin sizes.
-
Separate abstract required during final submission can be generated by compiling the
abstract-standalone.tex
file. -
Option to generate only specific chapters and references without the frontmatter and title page. Useful for review and corrections.
-
Draft mode: Draft water mark, timestamp, version numbering and line numbering.
When starting a new session, compile and run (order specified below) thesis-template.tex
first. After this, running/building any of the individual tex files you are currently working would render the complete document.
Set the following build order on your IDE for the desired results.
pdflatex
bibtex
pdflatex
pdflatex
view-pdf-internal
Confused on what to use? This may help!
Set thesis-template.tex
as the primary document and compile.
Work under progress, will be updated soon.
This guide is broken into the following sections. Parts of this guide have been taken as-is from the original repo, and the rest have been modified accordingly.
- Class options
- Title Page
- Certificate, declaration and copyright transfer
- Abstract standalone
- Adding and editing chapters
- Using the draft mode
- Choosing the bibliography style
- Choosing the fonts
- Choosing the page style
- Changing the visual style of chapter headings
- Custom settings
- Nomenclature definition
- To-do Notes
- General guidelines from the original author
Thesis information such as title, author, year, degree, etc., and other meta-data can be modified in thesis-info.tex
The class file, PhDThesisPSnPDF
, is based on the standard book
class.
It supports the following custom options in the documentclass in thesis-template.tex
:
(Usage \documentclass[a4paper,12pt,times,twoside]{PhDThesisPSnPDF}
)
-
a4paper
(default as per the University guidelines) ora5paper
: Paper size -
12pt
,times
: The institute guidelines require using Times New Roman with font size of 12 pt. This template also supports10pt
and11pt
. -
oneside
ortwoside
(default): This is especially useful for printing double side (twoside) or single side. Leaving this blank would yield double-sided page-layout. -
print
: Supports Print and Online Version with different page margins and hyperlink styles. Useprint
in the options to activate Print Version with appropriate margins and page layout and view styles. Leaving the options field blank will activate Online version. -
custommargin
: You can alter the margin dimension for both print and online version by using the keywordcustommargin
in the options. Then you can define the dimensions of the margin in thepreamble.tex
file:\ifsetCustomMargin \RequirePackage[left=37mm,right=30mm,top=35mm,bottom=30mm]{geometry} \setFancyHdr \fi
\setFancyHdr
should be called when using custom margins for proper header/footer dimensions\ifsetMargin
is deprecated, please use\ifsetCustomMargin
instead. -
index
: Including this option builds the index, which is placed at the end of the thesis.Instructions on how to use the index can be found here.
Note: the package
makeidx
is used to create the index. -
chapter
: This option enables only the specified chapter and it's references. Useful for review and corrections. -
draft
: The default draft mode supports some special features such as line numbers, images, and water mark with timestamp and custom text. Position of the text can be modified inpreamble.tex
. -
draftclassic
: This mode is similar to the default draft mode in the book class. Images are not loaded. -
lineno
: Enables pagewise line numbering on the outer edge. You can switch-off line numbering by specifyingnolineno
in the options.
Page 14 of the Revised Specification and Information Regarding the Preparation of Thesis specifies the title-page format.
-
The front page (title page) resizes to fit your title length. You can modify the options in
Titlepage/titlepage.tex
. -
Edit the degree as per your requirements.
-
By default, the name and designation of the guide(s) does not appear on the titlepage. Please add the same suitably if needed.
The institute guidelines require a certificate, declaration, dedication, and copyright transfer to be included in the thesis prelimnaries. Each of these are defined in separate tex files in the Certficates
directory.
-
certificate.tex
anddedication.tex
use tabular environments to list supervisor(s). To add or remove supervisors, add or drop columns from the table, keeping in mind the spacings that have been hard-coded. -
For PhD thesis, uncomment the line mentioning Comprehensive Examination, Candidacy and SOTA in
certificate.tex
.
Both the thesis-template and the standalone document derive the abstract from Abstract/abstract-text.tex
. Editing this only will be sufficient.
-
A separate abstract with the title of the thesis, the candidate name, and the name of the guiding professor has to be submitted to the Academic Office along with the soft-bound copy of the thesis.
-
This can be generated by separately editing and building
Abstract-standalone/abstract-standalone.tex
file.
(abstract-standalone.tex
is an independant tex file, and will soon be incorporated into the main template.)
This template uses separate tex files for separate chapters. Three sample chapters are provided for illustrative purposes.
-
To add a new chapter, create a corresponding tex file (say
Chapter4/chapter4.tex
), and add an entry under sectionmainmatter
ofthesis-template.tex
.\mainmatter \include{Chapter4/chapter4} % New Chapter
-
Figures corresponding to each chapter should be stored in the
Figs
folder inside the chapter directory. One can create separatevector
andraster
folders for corresponding graphic files inside theFigs
folder, or simply drop the graphic files in theFigs
folder. Examples can be found in chapter 2 of the template. -
It is possible to add bibliography separately for each chapter. Just put the corresponding
.bib
file in the chapter directory, and specify bibliography options in the chapter tex file. -
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 inthesis.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} \fi
draft
adds a watermark draft
text with timestamp and version number at the top or
the bottom of the page. Pagewise line numbering is added on every page. draft
settings can be tweaked in the preamble.tex
.
-
Use
draftclassic
in the document class options to use the default book class draft mode. -
To add figures in draft mode (default enabled), in the preamble set
\setkeys{Gin}{draft=false}
.draft=true
disables figures -
To change the watermark text \SetDraftText{DRAFT}
-
To change the position of the watermark text. Default watermark position is top. The location can be changed to (top / bottom) \SetDraftWMPosition{bottom}
-
To change the draft version. Default draft version is v1.0. \SetDraftVersion{v1.1}
-
Watermark grayscale value can be modified. Text grayscale value (should be between 0-black and 1-white). Default value is 0.75 \SetDraftGrayScale{0.8}
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.
-
authoryear
: For author-year citation eg., Krishna (2013) -
numbered
: (Default Option) For numbered and sorted citation e.g., [1,5,2] -
custombib
: Define your own bibliography style in thepreamble.tex
file.\RequirePackage[square, sort, numbers, authoryear]{natbib}
-
If you would like to use biblatex instead of natbib. Pass the option
custombib
in the documentclass. In thepreamble.tex
file, edit the custombib section. Make sure you don't load the natbib package and you can specify the layout of your references inthesis.tex
in the reference section. If you are usingbiber
as backend, runpdflatex thesis.tex >> biber thesis >> pdflatex thesis.tex >> biber thesis >> pdflatex thesis.tex
. If you are using the default natbib package, don't worry about this.
(Have a look at various Natbib and Biblatex based bibliography styles.)
PhDThesisPSnPDF
currently supports three fonts Times
, Fourier
and Latin Modern (default)
.
-
times
: (Institute guidelines require using Times). Specifying times option in the document class will usemathptpx
orTimes
font with Math Support. -
fourier
: fourier font with math support -
default (empty)
: When no font is specified,Latin Modern
is used as the default font with Math Support. -
customfont
: Any custom font can be set in preamble by usingcustomfont
option in the document class. Then the custom font can be loaded in preamble.tex in the line:\ifsetCustomFont \RequirePackage{Your_Custom_Font} \fi
-
To use a system font (open type) font with XeLaTeX, please select
customfont
option in thedocumentclass
inthesis.tex
. Add the path and font name to the custom font definition inpreamble.tex
\ifsetCustomFont \setmainfont[ Path = ./libertine/opentype/, Extension = .otf, UprightFont = LinLibertine_R, BoldFont = LinLibertine_RZ, % Regular Semibold ItalicFont = LinLibertine_RI, BoldItalicFont = LinLibertine_RZI, % Regular Semibold Italic ] {libertine} \newfontfamily\libertinesystemfont{Linux Libertine O} \fi
Please use XeLaTeX tool chain with LaTeXmk.
PhDThesisPSnPDF
defines 3 different page styles (header and footer). The following definition is for twoside
layout. To choose a page style, include it in the documentclass
options: \documentclass[PageStyleI]{PhDThesisPSnPDF}
. Alternatively, page style can be changed by adding \pagestyle{PageStyleI}
or \pagestyle{PageStyleII}
in thesis.tex
. Note: Using \pagestyle
command will override documentclass
options when used globally.
-
default (leave empty)
: For Page Numbers in Header (Left Even, Right Odd) and Chapter Name in Header (Right Even) and Section #. Section Name (Left Odd). Blank Footer.Header (Even) : 4 Introduction Header (Odd) : 1.2 Section Name 5 Footer : Empty
-
PageStyleI
: For Page Numbers in Header (Left Even, Right Odd) and Chapter Name next to the Page Number on Even Side (Left Even). Section Number and Section Name and Page Number in Header on Odd Side (Right Odd). Footer is empty. Layout:Header (Even) : 4 | Introduction Header (Odd) : 1.2 Section Name | 5 Footer : Empty
-
PageStyleII
: Chapter Name on Even Side (Left Even) in Header. Section Number and Section Name in Header on Odd Side (Right Odd). Page numbering in footer. Layout:Header (Even) : Introduction Header (Odd) : 1.2 Section Name Footer[centered]: 3
The visual style of chapter headings can be modified using the titlesec
package. Edit the following lines in the preamble.tex
file.
\RequirePackage{titlesec}
\newcommand{\PreContentTitleFormat}{\titleformat{\chapter}[display]{\scshape\Large}
{\Large\filleft{\chaptertitlename} \Huge\thechapter}
{1ex}{}
[\vspace{1ex}\titlerule]}
\newcommand{\ContentTitleFormat}{\titleformat{\chapter}[display]{\scshape\huge}
{\Large\filleft{\chaptertitlename} \Huge\thechapter}{1ex}
{\titlerule\vspace{1ex}\filright}
[\vspace{1ex}\titlerule]}
\newcommand{\PostContentTitleFormat}{\PreContentTitleFormat}
\PreContentTitleFormat
-
The depth for the table of contents can be set using:
\setcounter{secnumdepth}{3} \setcounter{tocdepth}{3}
A depth of [3] indicates to a level of
\subsubsection
or #.#.#.#. Default set as 2. -
To hide sections from appearing in TOC use:
\tochide\section{Section name}
in your TeX files -
Define custom caption style for figure and table caption in
preamble.tex
using:\RequirePackage[small,bf,figurename=Fig.,labelsep=space,tableposition=top]{caption}
-
Uncomment the following lines in
preamble.tex
to force a figure to be displayed in a particular location. UseH
when including graphics. NoteH
instead ofh
.\usepackage{float} \restylefloat{figure}
-
Bibliography with Author-Year Citation in
preamble.tex
:\RequirePackage[round, sort, numbers, authoryear]{natbib}
-
Line spacing for the entire document can be specified in
preamble.tex
. Uncomment the line spacing you prefer. e.g., \onehalfspacing
-
To use nomenclature in your chapters:
\nomenclature[g-pi]{$\pi$}{ $\simeq 3.14\ldots$}
The sort keys have prefix. In this case a prefix of
g
is used to denote Greek Symbols, followed by-pi
or-sort_key
. Use a-
to separate sort key from the prefixes. The standard prefixes defined in this class are:-
A
ora
: Roman Symbols -
G
org
: Greek Symbols -
Z
orz
: Acronyms/Abbreviations -
R
orr
: Superscripts -
S
ors
: Subscripts -
X
orx
: Other Symbols
-
-
You can change the Title of Nomenclature to Notations or Symbols in the
preamble.tex
using:\renewcommand\nomname{Symbols}
TexStudio's default compile option doesn't include nomenclature
, to compile your document with the nomenclature, do the following:
Options >> Configure TexStudio >> Build >> User Commands >> add user command
In add user command
type makenomeclature:makenomenclature
on the left pane and makeindex %.nlo -s nomencl.ist -o %.nls
on the execution side. Now you can run the user defined command makenomenclature
from Tools >> User >> makenomenclature
.
To include custom to-do notes in your pdf document use \mynote{Hey! I have a note}
anywhere in your chapters. To activate this feature, you need to uncomment the following lines in preamble.tex
. To-do notes will be available only in the draft
or draftclassic
and not in the final thesis.
\ifsetDraft
\usepackage[colorinlistoftodos]{todonotes}
\newcommand{\mynote}[1]
{\todo[author=kks32,size=\small,inline,color=green!40]{#1}}
\else
\newcommand{\mynote}[1]{}
\newcommand{\listoftodos}{}
\fi
Why is it important to follow good practices and not get killed by a Velociraptor ;)
-
To restrict the length of the figure caption in List of figures use a [short-title] and {longtitle} for the caption or the section:
`\caption[Caption that you want to appear in TOC]{Actual caption of the figure}` `\section[short]{title}`
-
To exclude sections from being numbered and disable it from appearing in the Table of Contents use \section*{Section_Name} or \chapter*{Chapter_Name}
-
To only exclude it from being listed in the Table of Contents encapsulate the section command inside the
\tochide
command.\tochide{\section{Section_Name}}
the section will not appear in the Table of Contents, but the section will be numbered. -
When including figures in your tex file, it's a good practice to size your picture depending on the page size, instead of using absolute values. In the following example
0.75\textwidth
refers to picture width being set to 75% of the text width.\includegraphics[width=0.75\textwidth]{minion}
-
Use a
-
to separate sort key from the prefixes, eg.,g-pi
denotes the Greek symbolpi
.
W1:I get the package Fancyhdr Warning: \fancyhead's E
option without twoside option is useless on input line # or #. What should I do?
Nothing. The warning is because the twoside option is also defined in the class, although only the oneside option is currently used.
W2: I get the Class PhDThesisPSnPDF Warning: Unknown or non-standard option 'something'. Will see if I can load it from the book class. If you get a warning unused global option(s): something
then the option is not supported! on input line #.
You are either trying to use a undefined option or a non-standard option which is in the book class but not defined in the PhD Thesis Template. If it can be used it will be loaded and you will get no further warnings. If not, the option you chose is unavailable.
You are trying to load an option that is not supported in the PhDThesisClass and the Book Class. Are you sure you are using the right option? Check your spelling!
W4: I get I'm skipping whatever remains of this command line # of file thesis.aux @input{Chapter1/chapter1.aux}
If you are generating a separate abstract for your thesis submission, ignore this warning and good luck with your submission. If you are compiling your thesis and see this warning, please remove the option abstract
from the document class.
This is normal for a book class. Usually, a new chapter in a book always starts on the right hand side, which is why you see a blank page. You can remove the extra blank page by passing openany
option to the documentclass. This works for double sided printing. However, if you are printing on a single side, please pass oneside
option to the document class.
This is controlled by the bibliography style. Please use \bibliographystyle{unsrt}
in thesis.tex
instead of apalike
. This applicable only for numerically sorted references.
-
Hyperlinks doesn't seem to be working in Post-Script file, however works on DVI and PDF (which is produced from the PS file), possibly viewer limitation than a code bug.
-
On older versions of dvips (version 5.97 or below), if your page margins do not appear properly in your PDF, when compiling through DVI >> PS >> PDF, please ensure that you have set a4paper or a5paper in the document class. If you are still having issues you can run:
ps2pdf -sPAPERSIZE=a4 thesis.ps thesis.pdf
This issue occurs only when the papersize is not specified in the document class and you are compiling DVI >> PS >> PDF using an older version (5.97 or below) of dvips.
-
Open issues in the original template can be tracked at https://github.com/kks32/phd-thesis-template/issues. If you would like a new feature to be added to the template, please create an issue and label it as an enhancement.
The history of releases can be viewed at ChangeLog
Huge thanks to Krishna Kumar and team for CUED PhD Thesis template.
-
Shyam Menon and Yash Jain - for ideas, insights and support.
-
Ninad K. Dongre, Abhinav K. Singh - for intensive bug finding.
-
Entire IDD 2014 batch for using this and giving constructive inputs.