Version 1.3

This commit is contained in:
Krishna Kumar 2014-06-09 22:05:10 +01:00
commit cd42b42a53
15 changed files with 2270 additions and 1604 deletions

2
.gitignore vendored
View File

@ -33,3 +33,5 @@ thesis.txt*
thesis.bcf*
thesis.run.xml*
*run.xml*
*.latexmkrc*
*_latexmk*

View File

@ -18,7 +18,7 @@
or
\subsection*{Basic MikTeX - TeX distribution}
\subsection*{Basic MikTeX - \TeX~ distribution}
\begin{enumerate}
\item Download Basic-MiK\TeX (32bit or 64bit) from\\
\href{http://miktex.org/download}{http://miktex.org/download}
@ -27,7 +27,7 @@ or
\item Select or search for packages to install
\end{enumerate}
\subsection*{TexStudio - Tex Editor}
\subsection*{TexStudio - \TeX~ editor}
\begin{enumerate}
\item Download TexStudio from\\
\href{http://texstudio.sourceforge.net/\#downloads}{http://texstudio.sourceforge.net/\#downloads}
@ -35,14 +35,14 @@ or
\end{enumerate}
\section*{Mac OS X}
\subsection*{MacTeX - TeX distribution}
\subsection*{MacTeX - \TeX~ distribution}
\begin{enumerate}
\item Download the file from\\
\href{https://www.tug.org/mactex/}{https://www.tug.org/mactex/}
\item Extract and double click to run the installer. It does the entire configuration, sit back and relax.
\end{enumerate}
\subsection*{TexStudio - Tex Editor}
\subsection*{TexStudio - \TeX~ editor}
\begin{enumerate}
\item Download TexStudio from\\
\href{http://texstudio.sourceforge.net/\#downloads}{http://texstudio.sourceforge.net/\#downloads}
@ -51,7 +51,7 @@ or
\section*{Unix/Linux}
\subsection*{TeXLive - TeX distribution}
\subsection*{TeXLive - \TeX~ distribution}
\subsubsection*{Getting the distribution:}
\begin{enumerate}
\item TexLive can be downloaded from\\
@ -79,7 +79,7 @@ mount -t iso9660 -o ro,loop,noauto /your/texlive####.iso /mnt
\item Set the path for the directory of TexLive binaries in your .bashrc file
\end{enumerate}
\subsubsection*{For 32Bit OS}
\subsubsection*{For 32bit OS}
For Bourne-compatible shells such as bash, and using Intel x86 GNU/Linux and a default directory setup as an example, the file to edit might be \begin{verbatim}
edit $~/.bashrc file and add following lines
PATH=/usr/local/texlive/2011/bin/i386-linux:$PATH;
@ -89,7 +89,7 @@ export MANPATH
INFOPATH=/usr/local/texlive/2011/texmf/doc/info:$INFOPATH;
export INFOPATH
\end{verbatim}
\subsubsection*{For 64Bit}
\subsubsection*{For 64bit OS}
\begin{verbatim}
edit $~/.bashrc file and add following lines
PATH=/usr/local/texlive/2011/bin/x86_64-linux:$PATH;
@ -104,7 +104,7 @@ export INFOPATH
%\subsection{Installing directly using Linux packages}
\subsubsection*{Fedora/RedHat/CENTOS:}
\subsubsection*{Fedora/RedHat/CentOS:}
\begin{verbatim}
sudo yum install texlive
sudo yum install psutils

View File

@ -1,6 +1,6 @@
% ******************************* Thesis Appendix B ********************************
\chapter{Installing the CUED Class file}
\chapter{Installing the CUED class file}
\LaTeX.cls files can be accessed system-wide when they are placed in the
<texmf>/tex/latex directory, where <texmf> is the root directory of the users \TeX installation. On systems that have a local texmf tree (<texmflocal>), which

View File

@ -2,7 +2,7 @@
%*********************************** First Chapter ***************************************
%*****************************************************************************************
\chapter{Getting Started} %Title of the First Chapter
\chapter{Getting started} %Title of the First Chapter
\ifpdf
\graphicspath{{Chapter1/Figs/Raster/}{Chapter1/Figs/PDF/}{Chapter1/Figs/}}
@ -12,7 +12,7 @@
%********************************** %First Section **************************************
\section{What is Loren Ipsum? Title with Math \texorpdfstring{$\sigma$}{[sigma]}} %Section - 1.1
\section{What is loren ipsum? Title with math \texorpdfstring{$\sigma$}{[sigma]}} %Section - 1.1
Lorem Ipsum is simply dummy text of the printing and typesetting industry (see Section~\ref{section1.3}). Lorem Ipsum~\citep{Aup91} has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum~\citep{AAB95,Con90,LM65}.
@ -35,7 +35,7 @@ CIF: \hspace*{5mm}F_0^j(a) = \frac{1}{2\pi \iota} \oint_{\gamma} \frac{F_0^j(z)}
%********************************** %Second Section *************************************
\section{Why do we use Loren Ipsum?} %Section - 1.2
\section{Why do we use loren ipsum?} %Section - 1.2
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using `Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for `lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).

View File

@ -2,7 +2,7 @@
%*********************************** Second Chapter **************************************
%*****************************************************************************************
\chapter{My Second Chapter}
\chapter{My second chapter}
\ifpdf
\graphicspath{{Chapter2/Figs/Raster/}{Chapter2/Figs/PDF/}{Chapter2/Figs/}}
@ -11,7 +11,7 @@
\fi
\section[Short title]{Reasonably Long Section Title}
\section[Short title]{Reasonably long section title}
% Uncomment this line, when you have siunitx package loaded.
%The SI Units for dynamic viscosity is \si{\newton\second\per\metre\squared}.
@ -65,7 +65,7 @@ If you have trouble viewing this document contact Krishna at: \href{mailto:kks32
\clearpage
\tochide\section{Hidden Section}
\tochide\section{Hidden section}
\textbf{Lorem ipsum dolor sit amet}, \textit{consectetur adipiscing elit}. In magna nisi, aliquam id blandit id, congue ac est. Fusce porta consequat leo. Proin feugiat at felis vel consectetur. Ut tempus ipsum sit amet congue posuere. Nulla varius rutrum quam. Donec sed purus luctus, faucibus velit id, ultrices sapien. Cras diam purus, tincidunt eget tristique ut, egestas quis nulla. Curabitur vel iaculis lectus. Nunc nulla urna, ultrices et eleifend in, accumsan ut erat. In ut ante leo. Aenean a lacinia nisl, sit amet ullamcorper dolor. Maecenas blandit, tortor ut scelerisque congue, velit diam volutpat metus, sed vestibulum eros justo ut nulla. Etiam nec ipsum non enim luctus porta in in massa. Cras arcu urna, malesuada ut tellus ut, pellentesque mollis risus.Morbi vel tortor imperdiet arcu auctor mattis sit amet eu nisi. Nulla gravida urna vel nisl egestas varius. Aliquam posuere ante quis malesuada dignissim. Mauris ultrices tristique eros, a dignissim nisl iaculis nec. Praesent dapibus tincidunt mauris nec tempor. Curabitur et consequat nisi. Quisque viverra egestas risus, ut sodales enim blandit at. Mauris quis odio nulla. Cras euismod turpis magna, in facilisis diam congue non. Mauris faucibus nisl a orci dictum, et tempus mi cursus.
Etiam elementum tristique lacus, sit amet eleifend nibh eleifend sed \footnote{My footnote goes blah blah blah! \dots}. Maecenas dapibu augue ut urna malesuada, non tempor nibh mollis. Donec sed sem sollicitudin, convallis velit aliquam, tincidunt diam. In eu venenatis lorem. Aliquam non augue porttitor tellus faucibus porta et nec ante. Proin sodales, libero vitae commodo sodales, dolor nisi cursus magna, non tincidunt ipsum nibh eget purus. Nam rutrum tincidunt arcu, tincidunt vulputate mi sagittis id. Proin et nisi nec orci tincidunt auctor et porta elit. Praesent eu dolor ac magna cursus euismod. Integer non dictum nunc.
@ -79,9 +79,21 @@ I can cite Wall-E (see Fig.~\ref{fig:WallE}) and Minions in despicable me (Fig.~
\begin{figure}
\centering
\subfloat[A Tom and Jerry]{\label{fig:TomJerry}\includegraphics[width=0.3\textwidth]{TomandJerry}}
\subfloat[A Wall-E]{\label{fig:WallE}\includegraphics[width=0.3\textwidth]{WallE}}
\subfloat[A Minion]{\label{fig:Minnion}\includegraphics[width=0.3\textwidth]{minion}}
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[width=\textwidth]{TomandJerry}
\caption{Tom and Jerry}
\label{fig:TomJerry}
\end{subfigure}
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[width=\textwidth]{WallE}
\caption{Wall-E}
\label{fig:WallE}
\end{subfigure}
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[width=\textwidth]{minion}
\caption{Minions}
\label{fig:Minnion}
\end{subfigure}
\caption{Best Animations}
\label{fig:animations}
\end{figure}

View File

@ -1,4 +1,4 @@
\chapter{My Third Chapter}
\chapter{My third chapter}
% **************************** Define Graphics Path **************************
\ifpdf
@ -7,22 +7,22 @@
\graphicspath{{Chapter3/Figs/Vector/}{Chapter3/Figs/}}
\fi
\section{First Section of the Third Chapter}
\section{First section of the third chapter}
And now I begin my third chapter here \dots
And now to cite some more people~\citet{Rea85,Ancey1996}
\subsection{First Subsection in the First Section}
\subsection{First subsection in the first section}
\dots and some more
\subsection{Second Subsection in the First Section}
\subsection{Second subsection in the first section}
\dots and some more \dots
\subsubsection{First subsub section in the second subsection}
\dots and some more in the first subsub section otherwise it all looks the same
doesn't it? well we can add some text to it \dots
\subsection{Third Subsection in the First Section}
\subsection{Third subsection in the first section}
\dots and some more \dots
\subsubsection{First subsub section in the third subsection}
@ -34,12 +34,12 @@ some more and some more and some more and some more and some more \dots
\dots and some more in the first subsub section otherwise it all looks the same
doesn't it? well we can add some text to it \dots
\section{Second Section of the Third Chapter}
\section{Second section of the third chapter}
and here I write more \dots
Now we can refer to the table using Table.~\ref{t:borders}.
\begin{table}[h]
\caption{Table with Borders}
\caption{Table with borders}
\centering
\label{t:borders}
\begin{tabular}{|l|c| r|}

View File

@ -25,6 +25,8 @@
\newif\if@print\@printfalse
\DeclareOption{print}{\@printtrue}
\newif\ifPHD@draft\PHD@draftfalse
% ****************************** Define index **********************************
\newif\ifPHD@index\PHD@indexfalse
\DeclareOption{index}{\PHD@indextrue}
@ -33,29 +35,92 @@
\newif\ifsetFont\setFontfalse % Font is not set
\newif\ifPHD@times\PHD@timesfalse % Times with Math Support
\DeclareOption{times}{\PHD@timestrue}
\DeclareOption{times}{
\ifsetFont
\ClassWarning{PhDThesisPSnPDF}{Font selection conflict: A font package was
aleady specified. Please check the document class options in case you
have defined two fonts.}
\else
\PHD@timestrue
\setFonttrue
\fi
}
\newif\ifPHD@fourier\PHD@fourierfalse % Fourier with Math Support
\DeclareOption{fourier}{\PHD@fouriertrue}
\DeclareOption{fourier}{
\ifsetFont
\ClassWarning{PhDThesisPSnPDF}{Font selection conflict: A font package was
aleady specified. Please check the document class options in case you
have defined two fonts.}
\else
\PHD@fouriertrue
\setFonttrue
\fi
}
\newif\ifPHD@customfont\PHD@customfontfalse % Custom Font with Math Support
\DeclareOption{customfont}{\PHD@customfonttrue}
\newif\ifsetCustomFont\setCustomFontfalse % Custom Font with Math Support
\DeclareOption{customfont}{
\ifsetFont
\ClassWarning{PhDThesisPSnPDF}{Font selection conflict: A font package was
aleady specified. Please check the document class options in case you
have defined two fonts.}
\else
\setCustomFonttrue
\setFonttrue
\fi
}
% ******************************* Bibliography *********************************
\newif\ifsetBib\setBibfalse % Custom Bibliography = true/false
\newif\ifsetBiBLaTeX\setBiBLaTeXfalse % BiBLaTeX = True / False
\newif\ifPHD@biblatex\PHD@biblatexfalse % BiBLaTeX
\DeclareOption{biblatex}{\PHD@biblatextrue}
\DeclareOption{biblatex}{
\ifsetBib
\ClassWarning{PhDThesisPSnPDF}{Bibliography selection conflict: A
bibliography style aleady specified. Please check the document class
options in case you have defined two bibliography styles.}
\else
\PHD@biblatextrue
\setBibtrue
\fi
}
\newif\ifPHD@authoryear\PHD@authoryearfalse % Author-Year citation
\DeclareOption{authoryear}{\PHD@authoryeartrue}
\DeclareOption{authoryear}{
\ifsetBib
\ClassWarning{PhDThesisPSnPDF}{Bibliography selection conflict: A
bibliography style aleady specified. Please check the document class
options in case you have defined two bibliography styles.}
\else
\PHD@authoryeartrue
\setBibtrue
\fi
}
\newif\ifPHD@numbered\PHD@numberedfalse % Numbered citiation
\DeclareOption{numbered}{\PHD@numberedtrue}
\DeclareOption{numbered}{
\ifsetBib
\ClassWarning{PhDThesisPSnPDF}{Bibliography selection conflict: A
bibliography style aleady specified. Please check the document class
options in case you have defined two bibliography styles.}
\else
\PHD@numberedtrue
\setBibtrue
\fi
}
\newif\ifPHD@custombib\PHD@custombibfalse % Custom Bibliography
\DeclareOption{custombib}{\PHD@custombibtrue}
\newif\ifuseCustomBib\useCustomBibfalse % Custom Bibliography
\DeclareOption{custombib}{
\ifsetBib
\ClassWarning{PhDThesisPSnPDF}{Bibliography selection conflict: A
bibliography style aleady specified. Please check the document class
options in case you have defined two bibliography styles.}
\else
\useCustomBibtrue
\setBibtrue
\fi
}
% ************************* Header / Footer Styling ****************************
\newif\ifPHD@pageStyleI\PHD@pageStyleIfalse % Set Page StyleI
@ -65,10 +130,9 @@
\DeclareOption{PageStyleII}{\PHD@pageStyleIItrue}
% ***************************** Custom Margins ********************************
\newif\ifsetMargin\setMarginfalse % Margins are not set
\newif\ifPHD@custommargin\PHD@custommarginfalse % Custom margin
\DeclareOption{custommargin}{\PHD@custommargintrue}
\newif\ifsetCustomMargin\setCustomMarginfalse % Set Custom Margin
\newif\ifsetMargin\setMarginfalse % Set Custom Margin
\DeclareOption{custommargin}{\setCustomMargintrue}
% **************************** Separate Abstract ******************************
\newif \ifdefineAbstract\defineAbstractfalse %To enable Separate abstract
@ -77,10 +141,10 @@
\DeclareOption{abstract}{
\PHD@abstracttrue
\ClassWarning{PhDThesisPSnPDF}{You have chosen an option that generates only
the Title page and an abstract with PhD title and author name, if this was
intentional, ignore this warning. Congratulations on submitting your thesis!!
If not, please remove the option `abstract' from the document class and
recompile. Good luck with your writing!}
the Title page and an abstract with PhD title and author name, if this was
intentional, ignore this warning. Congratulations on submitting your thesis!
If not, please remove the option `abstract' from the document class and
recompile. Good luck with your writing!}
\PassOptionsToClass{oneside}{book}
}
@ -90,7 +154,10 @@ recompile. Good luck with your writing!}
\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!}
\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%
@ -109,6 +176,7 @@ footnotes.}
\DeclareOption{11pt}{\renewcommand\PHD@ptsize{11pt}}%
\DeclareOption{12pt}{\renewcommand\PHD@ptsize{12pt}}%
\PassOptionsToClass{\PHD@ptsize}{book}%
\message{PhDThesisPSnPDF: Font size is set as \PHD@ptsize}
% Page Size
\newcommand\PHD@papersize{a4paper} % Set Default as a4paper
@ -117,7 +185,7 @@ footnotes.}
\DeclareOption{a5paper}{\renewcommand\PHD@papersize{a5paper}}
\DeclareOption{letterpaper}{
\ClassWarning{PhDThesisPSnPDF}{The Cambridge University Engineering Deparment
PhD thesis guidelines recommend using A4 or A5paper}
PhD thesis guidelines recommend using A4 or A5paper}
\renewcommand\PHD@papersize{letterpaper}
}
@ -128,7 +196,19 @@ PhD thesis guidelines recommend using A4 or A5paper}
\DeclareOption{twoside}{\PassOptionsToClass{\CurrentOption}{book}}%
% Draft Mode
\DeclareOption{draft}{\PassOptionsToClass{\CurrentOption}{book}}%
\DeclareOption{draft}{\PassOptionsToClass{\CurrentOption}{book}
\ClassWarning{PhDThesisPSnPDF}{Draft is ON. You can use `draftmode' instead,
which adds watermark with timestamp and line numbering. Don't forget to turn
`draft' off for your final version.}}%
\DeclareOption{draftmode}{\PassOptionsToClass{draft}{book}\PHD@drafttrue
\ClassWarning{PhDThesisPSnPDF}{Draft Mode is ON.
Don't forget to turn it off for your final version.}}%
% Line Numbers
\newif\ifPHD@lineno\PHD@linenotrue
\DeclareOption{lineno}{\PHD@linenotrue}
\DeclareOption{nolineno}{\PHD@linenofalse}
% Generates Warning for unknown options
\DeclareOption*{
@ -158,92 +238,11 @@ supported!}
\fi
\fi
%* ***************************** Print / Online ********************************
% Defines a print / online version to define page-layout and hyperrefering
\ifsetDVI
\special{papersize=\the\paperwidth,\the\paperheight}
\RequirePackage[dvips,unicode=true]{hyperref}
\else
\RequirePackage[unicode=true]{hyperref}
\pdfpagewidth=\the\paperwidth
\pdfpageheight=\the\paperheight
\fi
\if@print
% For Print version
\hypersetup{
plainpages=false,
pdfstartview=FitV,
pdftoolbar=true,
pdfmenubar=true,
bookmarksopen=true,
bookmarksnumbered=true,
breaklinks=true,
linktocpage,
colorlinks=true,
linkcolor=black,
urlcolor=black,
citecolor=black,
anchorcolor=black
}
\ifPHD@custommargin
\setMarginfalse
\else
\ifsetDVI
% Odd and Even side Margin for binding and set viewmode for PDF
\RequirePackage[dvips,paper=\PHD@papersize,hmarginratio=1:1,vmarginratio=1:1,scale=0.75,bindingoffset=5mm]{geometry}
\else
\RequirePackage[pdftex,paper=\PHD@papersize,hmarginratio=1:1,vmarginratio=1:1,scale=0.75,bindingoffset=5mm]{geometry}
\fi
\setMargintrue
\fi
\if@twoside
\hypersetup{pdfpagelayout=TwoPageRight}
\else
\hypersetup{pdfpagelayout=OneColumn}
\fi
\else
% For PDF Online version
\hypersetup{
plainpages=false,
pdfstartview=FitV,
pdftoolbar=true,
pdfmenubar=true,
bookmarksopen=true,
bookmarksnumbered=true,
breaklinks=true,
linktocpage,
colorlinks=true,
linkcolor=blue,
urlcolor=blue,
citecolor=blue,
anchorcolor=green
}
\ifPHD@custommargin
\setMarginfalse
\else
% No Margin staggering on Odd and Even side
\ifsetDVI
\RequirePackage[dvips,paper=\PHD@papersize,hmarginratio=1:1,vmarginratio=1:1,scale=0.75]{geometry}
\else
\RequirePackage[pdftex,paper=\PHD@papersize,hmarginratio=1:1,vmarginratio=1:1,scale=0.75]{geometry}
\fi
\setMargintrue
\fi
\hypersetup{pdfpagelayout=OneColumn}
\fi
% ******************************************************************************
% ******************************** Packages ************************************
% ******************************************************************************
% ************************** Layout and Formatting *****************************
\renewcommand\pdfshellescape{1}
\RequirePackage{lscape} % Supports Landscape Layout
@ -261,6 +260,11 @@ supported!}
% Add appendices
\RequirePackage[title,titletoc]{appendix}
\renewcommand{\contentsname}{Table of contents}
\renewcommand{\listfigurename}{List of figures}
\renewcommand{\listtablename}{List of tables}
% *************************** Graphics and Figures *****************************
\RequirePackage[usenames, dvipsnames]{color}
\ifpdf
@ -277,70 +281,210 @@ supported!}
\fi
% ******************************* Time Stamp ***********************************
% Compute the timestamp based on an idea of
% Tim Piessens \texttt{<Tim.Piessens@esat.kuleuven.ac.be>}.
\RequirePackage{datetime}
\newcount\PHD@hour \newcount\PHD@minute
\PHD@hour=\time
\divide \PHD@hour by 60
\PHD@minute=\time
\count@=\PHD@hour
\multiply \count@ by -60
\advance \PHD@minute by \count@
\newcommand{\PHD@daytime}{%
\today\space--\space%
\ifnum\PHD@hour=0 00\else\ifnum\PHD@hour<10 0\fi%
\number\PHD@hour\fi:\ifnum\PHD@minute<10 0\fi\number\PHD@minute
}
% ******************************* Draft Mode ***********************************
% Initializing Draft Text
\newcommand\SetDraftText[1]{}
% Initializing Draft Version
\newcommand\SetDraftVersion[1]{}
% Initializing Draft Content
\newcommand\SetDraftWMPosition[1]{}
% Initializing Draft Gray Scale
\newcommand\SetDraftGrayScale[1]{}
% If Draft Mode is active
\ifPHD@draft
% Line numbering (can be switched off)
\ifPHD@lineno
\RequirePackage[switch,pagewise,mathlines]{lineno}
\renewcommand{\frontmatter}{\nolinenumbers}
\renewcommand{\mainmatter}{\linenumbers}
\renewcommand{\backmatter}{\linenumbers}
\fi
% Creates a Watermark Draft at the specified location.
% The settings can be tweaked in the preamble
% Draft text
\newcommand\drafttext{Draft}
\renewcommand\SetDraftText[1]{%
\renewcommand\drafttext{#1}}
% Draft Version
\newcommand\draftVersion{v1.0}
\renewcommand\SetDraftVersion[1]{%
\renewcommand\draftVersion{#1}}
% Draft Gray Scale
\newcommand\draftGrayScale{0.75}
\renewcommand\SetDraftGrayScale[1]{%
\renewcommand\draftGrayScale{#1}}
% Draft Content
\newcommand\DraftContent{%
\hspace*{\fill}
\Large
\textcolor[gray]{\draftGrayScale}{%
{\drafttext}\space-\space{\draftVersion}\hspace{\stretch{1}}{\PHD@daytime}
\hspace*{\fill}}}
% Adding watermark in draft mode with time stamp
\RequirePackage{everypage}
\RequirePackage[absolute]{textpos}
% Default values for draft watermark
\newcommand\draftposition{top}
\newcommand\draftnodeanchor{1in+\voffset-\topmargin}
\AddEverypageHook{%
\begin{textblock*}{\paperwidth}[0.,2.5](0\paperwidth,\draftnodeanchor)
\DraftContent
\end{textblock*}
}
% Conditional evaluation to position the draft water mark (top / bottom)
\renewcommand\SetDraftWMPosition[1]{%
\renewcommand\draftposition{#1}
\ifthenelse{\equal{\draftposition}{bottom}}
{\renewcommand\draftnodeanchor{\paperheight-\voffset}} %Bottom
{\ifthenelse{\equal{\draftposition}{top}}
{\renewcommand\draftnodeanchor{1in+\voffset-\topmargin}} %Top
{\ClassWarning{PDThesisPSnPDF}{Unrecognised draft position
using default value of top}
\renewcommand\draftnodeanchor{1in+\voffset-\topmargin}}} %Top
\AddEverypageHook{%
\begin{textblock*}{\paperwidth}[0.,2.5](0\paperwidth,\draftnodeanchor)
\DraftContent
\end{textblock*}
}
}
% If NOT Draft Mode
\else
\renewcommand\SetDraftText[1]{\ClassWarning{PhDThesisPSnPDF}{DraftMode is
inactive, to use SetDraftText include `draftmode' in the document
class options.}}
% Draft Version
\renewcommand\SetDraftVersion[1]{\ClassWarning{PhDThesisPSnPDF}{DraftMode is
inactive, to use SetDraftVersion include `draftmode' in the document
class options.}}
% Draft Content
\renewcommand\SetDraftWMPosition[1]{\ClassWarning{PhDThesisPSnPDF}{DraftMode
is inactive, to use SetDraftWMPosition include `draftmode' in the document
class options.}}
\renewcommand\SetDraftGrayScale[1]{\ClassWarning{PhDThesisPSnPDF}{DraftMode is
inactive, to use SetDraftWMPosition include `draftmode' in the document
class options.}}
\fi
% ******************************* Bibliography *********************************
\ifPHD@authoryear
\ifPHD@biblatex
\RequirePackage[backend=biber, style=authoryear, citestyle=alphabetic, sorting=nty, natbib=true]{biblatex}
\setBiBLaTeXtrue
\else
\RequirePackage[round, sort, numbers, authoryear]{natbib} %author year
\fi
\setBibtrue
\ifPHD@biblatex
\RequirePackage[backend=biber, style=authoryear, citestyle=alphabetic,
sorting=nty, natbib=true]{biblatex}
\setBiBLaTeXtrue
\else
\RequirePackage[round, sort, numbers, authoryear]{natbib} %author year
\fi
\else
\ifPHD@numbered
\ifPHD@biblatex
\RequirePackage[backend=biber, style=numeric-comp, citestyle=numeric, sorting=none, natbib=true]{biblatex}
\RequirePackage[backend=biber, style=numeric-comp,
citestyle=numeric, sorting=none, natbib=true]{biblatex}
\setBiBLaTeXtrue
\else
\RequirePackage[numbers,sort&compress]{natbib} % numbered citation
\fi
\setBibtrue
\else
\ifPHD@custombib
\ifuseCustomBib
\AtBeginDocument{
\@ifpackageloaded{natbib}{true}{
\@ifpackageloaded{biblatex}{true}{
\ClassWarning{PhDThesisPSnPDF}{%
Custom bibliography is chosen, but no corresponding package
(biblatex/natbib) has been loaded. Please load the
appropriate bibliography package in the preamble.}
}
}
}
\else % set default to numbered
\ifPHD@biblatex
\RequirePackage[backend=biber, style=numeric-comp,
citestyle=numeric, sorting=none, natbib=true]{biblatex}
\setBiBLaTeXfalse
\else
\RequirePackage[numbers,sort&compress]{natbib}
\fi % default
\setBibfalse
\ifPHD@biblatex
\setBiBLaTeXtrue
\fi
\else
\ifPHD@biblatex
\RequirePackage[backend=biber, 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 natbib package or biblatex package with required style in the Preamble.tex file}
\fi
\fi
\fi
\fi % custombib
\fi % numbered
\fi % author year
\ifsetBib
\else
\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 natbib package or
biblatex package with required style in the Preamble.tex file}
\fi
% *********************** To copy ligatures and Fonts **************************
\RequirePackage{textcomp}
% Font Selection
\ifPHD@times
\RequirePackage{mathptmx} % times roman, including math (where possible)
\setFonttrue
\RequirePackage{mathptmx} % times roman, including math (where possible)
\setFonttrue
\message{PhDThesisPSnPDF: Using Times Roman font}
\else
\ifPHD@fourier
\RequirePackage{fourier} % Fourier
\setFonttrue
\message{PhDThesisPSnPDF: Using Fourier font}
\else
\ifPHD@customfont
\setFontfalse
\else
\ClassWarning{PhDThesisPSnPDf}{Using default font Latin Modern. If you
would like to use other pre-defined fonts use `times' (The Cambridge University
PhD thesis guidelines recommend using Times font) or `fourier' or load a custom
font in the preamble.tex file by specifying `customfont' in the class options}
\RequirePackage{lmodern}
\ifsetCustomFont
\setFonttrue
\fi
\fi
\message{PhDThesisPSnPDF: Using custom font}
\else
\setFontfalse
\message{PhDThesisPSnPDF: No font is set}
\fi % custom font
\fi % Fourier font
\fi % Times font
% If Font is not set throw a warning.
\ifsetFont
\else
\ClassWarning{PhDThesisPSnPDF}{Using default font Latin Modern. If you
would like to use other pre-defined fonts use `times' (The Cambridge
University PhD thesis guidelines recommend using Times font) or `fourier'
or load a custom font in the preamble.tex file by specifying `customfont'
in the class options}
\RequirePackage{lmodern}
\fi
\RequirePackage[utf8]{inputenc}
@ -355,6 +499,99 @@ font in the preamble.tex file by specifying `customfont' in the class options}
\pdfgentounicode=1
%******************************* Print / Online ********************************
% Defines a print / online version to define page-layout and hyperrefering
% Moved below other usepackage definitions to fix PDFLaTeX footnote warning
% Based on the suggestion by John Plaice
\ifsetDVI
\special{papersize=\the\paperwidth,\the\paperheight}
\RequirePackage[dvips,unicode=true]{hyperref}
\else
\RequirePackage[unicode=true]{hyperref}
\pdfpagewidth=\the\paperwidth
\pdfpageheight=\the\paperheight
\fi
\if@print
% For Print version
\hypersetup{
final=true,
plainpages=false,
pdfstartview=FitV,
pdftoolbar=true,
pdfmenubar=true,
bookmarksopen=true,
bookmarksnumbered=true,
breaklinks=true,
linktocpage,
colorlinks=true,
linkcolor=black,
urlcolor=black,
citecolor=black,
anchorcolor=black
}
\ifsetCustomMargin
% Margin to be define in preamble using geometry package
\else
\ifsetDVI
% Odd and Even side Margin for binding and set viewmode for PDF
\RequirePackage[dvips,paper=\PHD@papersize,hmarginratio=1:1,
vmarginratio=1:1,scale=0.75,bindingoffset=5mm]{geometry}
\else
\RequirePackage[pdftex,paper=\PHD@papersize,hmarginratio=1:1,
vmarginratio=1:1,scale=0.75,bindingoffset=5mm]{geometry}
\fi
\fi
\if@twoside
\hypersetup{pdfpagelayout=TwoPageRight}
\else
\hypersetup{pdfpagelayout=OneColumn}
\fi
\else
% For PDF Online version
\hypersetup{
final=true,
plainpages=false,
pdfstartview=FitV,
pdftoolbar=true,
pdfmenubar=true,
bookmarksopen=true,
bookmarksnumbered=true,
breaklinks=true,
linktocpage,
colorlinks=true,
linkcolor=blue,
urlcolor=blue,
citecolor=blue,
anchorcolor=green
}
\ifsetCustomMargin
% Margin to be define in preamble using geometry package
\else
% No Margin staggering on Odd and Even side
\ifsetDVI
\RequirePackage[dvips,paper=\PHD@papersize,hmarginratio=1:1,
vmarginratio=1:1,scale=0.75]{geometry}
\else
\RequirePackage[pdftex,paper=\PHD@papersize,hmarginratio=1:1,
vmarginratio=1:1,scale=0.75]{geometry}
\fi
\fi
\hypersetup{pdfpagelayout=OneColumn}
\fi
% Backward compatibility - setMargin is now replaced with customMargin
\ifsetCustomMargin
\setMarginfalse
\else
\setMargintrue
\fi
% ************************ URL Package and Definition **************************
\RequirePackage{url}
% Redefining urlstyle to use smaller fontsize in References with URLs
@ -370,6 +607,7 @@ font in the preamble.tex file by specifying `customfont' in the class options}
\RequirePackage{breakurl} % to split the url over multiple lines
\fi
% ******************************************************************************
% **************************** Pre-defined Settings ****************************
% ******************************************************************************
@ -386,6 +624,19 @@ font in the preamble.tex file by specifying `customfont' in the class options}
}
\fi
% ******************************** Line Spacing ********************************
% Set spacing as 1.5 line spacing for the PhD Thesis
% In practice, fortunately, nobody knows really what one-and-a-half spaced
% type means exactly (in terms of millimetres baseline distance). The following
% LaTeX setting has routinely been considered perfectly acceptable:
\renewcommand\baselinestretch{1.2}
% ******************************** Justification *******************************
% Left aligned as per University identity guidelines
\AtBeginDocument{
\raggedright
}
% ************************** TOC and Hide Sections *****************************
\newcommand{\nocontentsline}[3]{}
@ -411,8 +662,10 @@ font in the preamble.tex file by specifying `customfont' in the class options}
\renewcommand{\chaptermark}[1]{\markboth{##1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ ##1\ }}
\fancyhf{}
\fancyhead[RO]{\nouppercase \rightmark\hspace{0.25em} | \hspace{0.25em} \bfseries{\thepage}}
\fancyhead[LE]{ {\bfseries\thepage} \hspace{0.25em} | \hspace{0.25em} \nouppercase \leftmark}
\fancyhead[RO]{\nouppercase \rightmark\hspace{0.25em} |
\hspace{0.25em} \bfseries{\thepage}}
\fancyhead[LE]{ {\bfseries\thepage} \hspace{0.25em} |
\hspace{0.25em} \nouppercase \leftmark}
\else
@ -438,7 +691,6 @@ font in the preamble.tex file by specifying `customfont' in the class options}
\fi
\fi
}
\setlength{\headheight}{14.5pt}
@ -450,7 +702,12 @@ font in the preamble.tex file by specifying `customfont' in the class options}
}
% If Margin has been set (default margin print/online version)
\ifsetMargin
\ifsetCustomMargin
\AtBeginDocument{
\@ifpackageloaded{geometry}{true}{\ClassWarning{PhDThesisPSnPDF}{%
Custom margin is chosen, but geometry package is not loaded. Please load the
`geometry' package in the preamble.}}}
\else
\setFancyHdr % Apply fancy header settings otherwise apply it in preamble
\fi
@ -490,7 +747,7 @@ font in the preamble.tex file by specifying `customfont' in the class options}
% construction of the title page and other preamble.
% The year and term the degree will be officially conferred
\newcommand{\@degreedate}{}
\newcommand{\@degreedate}{\monthname[\the\month]\space\the\year}
\newcommand{\degreedate}[1]{\renewcommand{\@degreedate}{#1}}
% The full (unabbreviated) name of the degree
@ -740,13 +997,10 @@ font in the preamble.tex file by specifying `customfont' in the class options}
}
% ******************************** Line Spacing ********************************
% Set spacing as 1.5 line spacing for the PhD Thesis
\onehalfspace
% ******************** To compute empty space in title page ********************
% Boxes below are used to space differt contents on the title page
% Boxes below are used to space different contents on the title page
% Based on https://github.com/cambridge/thesis
\newcommand{\computeTitlePageSpacing}{

View File

@ -4,9 +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
\ifsetCustomMargin
\RequirePackage[left=37mm,right=30mm,top=35mm,bottom=30mm]{geometry}
\setFancyHdr % To apply fancy header after geometry package is loaded
\fi
@ -16,11 +14,9 @@
% Add `customfont' in the document class option to use this section
\ifsetFont
\else
\ifsetCustomFont
% Set your custom font here and use `customfont' in options. Leave empty to
% load computer modern font (default LaTeX font).
\RequirePackage{libertine}
\fi
@ -28,6 +24,7 @@
% **************************** Custom Packages ********************************
% ************************* Algorithms and Pseudocode **************************
%\usepackage{algpseudocode}
@ -41,23 +38,22 @@
\RequirePackage[labelsep=space,tableposition=top]{caption}
\renewcommand{\figurename}{Fig.} %to support older versions of captions.sty
% ************************ Formatting / Footnote *******************************
%\usepackage[perpage]{footmisc} %Range of footnote options
% ****************************** Line Numbers **********************************
%\RequirePackage{lineno}
%\linenumbers
% *************************** Graphics and figures *****************************
%\usepackage{rotating}
%\usepackage{wrapfig}
%\usepackage{float}
\usepackage{subfig} %note: subfig must be included after the `caption` package.
% Uncomment the following two lines to force Latex to place the figure.
% Use [H] when including graphics. Note 'H' instead of 'h'
%\usepackage{float}
%\restylefloat{figure}
% Subcaption package is also available in the sty folder you can use that by
% uncommenting the following line
% This is for people stuck with older versions of texlive
%\usepackage{sty/caption/subcaption}
\usepackage{subcaption}
% ********************************** Table *************************************
@ -72,7 +68,22 @@
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
%\usepackage{siunitx} % use this package module for SI units
\usepackage{siunitx} % use this package module for SI units
% ******************************* Line Spacing *********************************
% Choose linespacing as appropriate. Default is one-half line spacing as per the
% University guidelines
% \doublespacing
% \onehalfspacing
% \singlespacing
% ************************ Formatting / Footnote *******************************
%\usepackage[perpage]{footmisc} %Range of footnote options
% *****************************************************************************
@ -81,9 +92,7 @@
%\usepackage{cleveref} %Referencing without need to explicitly state fig /table
% 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
\ifuseCustomBib
\RequirePackage[square, sort, numbers, authoryear]{natbib} % CustomBib
% If you would like to use biblatex for your reference management, as opposed to the default `natbibpackage` pass the option `custombib` in the document class. Comment out the previous line to make sure you don't load the natbib package. Uncomment the following lines and specify the location of references.bib file
@ -100,6 +109,7 @@
% *****************************************************************************
% *************** Changing the Visual Style of Chapter Headings ***************
% This section on visual style is from https://github.com/cambridge/thesis
% Uncomment the section below. Requires titlesec package.
@ -132,6 +142,7 @@
\setcounter{secnumdepth}{2}
\setcounter{tocdepth}{2}
% ******************************* Nomenclature *********************************
% To change the name of the Nomenclature section, uncomment the following line
@ -145,3 +156,22 @@
%\renewcommand{\appendixtocname}{List of appendices}
%\renewcommand{\appendixname}{Appndx}
% ******************************** Draft Mode **********************************
% Uncomment to disable figures in `draftmode'
%\setkeys{Gin}{draft=true} % set draft to false to enable figures in `draft'
% These options are active only during the draft mode
% Default text is "Draft"
%\SetDraftText{DRAFT}
% Default Watermark location is top. Location (top/bottom)
%\SetDraftWMPosition{bottom}
% Draft Version - default is v1.0
%\SetDraftVersion{v1.1}
% Draft Text grayscale value (should be between 0-black and 1-white)
% Default value is 0.75
%\SetDraftGrayScale{0.8}

View File

@ -1,6 +1,6 @@
CUED PhD Thesis Template
CUED PhD thesis template
========================
> A PhD thesis LaTeX template for Cambridge University Engineering Department.
> A LaTeX PhD thesis template for Cambridge University Engineering Department.
## Author(s)
* Krishna Kumar
@ -51,12 +51,27 @@ THE SOFTWARE.
* 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
* A LyX Template is now available at [https://github.com/kks32/PhDThesisLyX/](https://github.com/kks32/PhDThesisLyX/)
## Building your thesis
### Using the Make File (Unix/Linux)
### Using latexmk (Unix/Linux/Windows)
This template supports `latexmk`. To generate DVI, PS and PDF run
latexmk -dvi -ps -pdf thesis.tex
### Using ARARA (Unix/Linux/Windows)
This template supports `arara`. You can edit the arara commands in `thesis.tex` to suit your needs. Default is set to LATEX >> DVI >> PS2PDF with nomenclature and make index support.
arara -v thesis.tex
### Using the make file (Unix/Linux)
The template supports PDF, DVI and PS formats. All three formats can be generated
with the provided `Makefile`.
@ -93,7 +108,7 @@ Usage: `sh ./compile-thesis.sh [OPTIONS] [filename]`
[option] clean: removes temporary files - no filename required
### Using the Batch file on Windows (PDFLaTeX)
### Using the batch file on Windows OS (PDFLaTeX)
* Open command prompt and navigate to the directory with the tex file. Run:
@ -107,7 +122,7 @@ Usage: `sh ./compile-thesis.sh [OPTIONS] [filename]`
Thesis information such as title, author, year, degree, etc., and other meta-data can be modified in `thesis-info.tex`
### Class Options
### Class options
The class file, `PhDThesisPSnPDF`, is based on the standard `book` class
@ -127,13 +142,13 @@ It supports the following custom options in the documentclass in thesis.tex:
* `custommargin`: You can alter the margin dimension for both print and online version by using the keyword `custommargin` in the options. Then you can define the dimensions of the margin in the `preamble.tex` file:
\ifsetMargin
\else
\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.
@ -145,6 +160,13 @@ It supports the following custom options in the documentclass in thesis.tex:
* `chapter`: This option enables only the specified chapter and it's references. Useful for review and corrections.
* `draft`: This mode is similar to the default draft mode in the book class.
* `draftmode`: Special draft mode with line numbers, images, and water mark with
timestamp and custom text. Position of the text can also be modified.
* `lineno`: Enables pagewise line numbering on the outer edge. You can switch-off line numbering by specifying `nolineno` in the options.
### Abstract separate
@ -154,10 +176,9 @@ It supports the following custom options in the documentclass in thesis.tex:
\ifdefineAbstract
\includeonly{Abstract/abstract}
\else
\fi
### Chapter Mode
### 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).
@ -165,11 +186,26 @@ It supports the following custom options in the documentclass in thesis.tex:
\ifdefineChapter
\includeonly{Chapter3/chapter3}
\else
\fi
### Draft mode
### Choosing the Fonts
`draftmode` 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. `draftmode` settings can be tweaked in the `preamble.tex`
* 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}
### Choosing the fonts
`PhDThesisPSnPDF` currently supports three fonts `Times`, `Fourier` and `Latin Modern (default)`.
@ -178,12 +214,11 @@ It supports the following custom options in the documentclass in thesis.tex:
* `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 using `customfont` option in the document class. Then the custom font can be loaded in preamble.tex in the line:
\ifsetFont
\else
\ifsetCustomFont
\RequirePackage{Your_Custom_Font}
\fi
### Choosing the Bibliography style
### 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 and customise the bibliography.
@ -199,7 +234,7 @@ It supports the following custom options in the documentclass in thesis.tex:
* If you would like to use biblatex instead of natbib. Pass the option `custombib` in the documentclass. In the `preamble.tex` file, edit the custombib section. Make sure you don't load the natbib package and you can specify the layout of your references in `thesis.tex` in the reference section. If you are using `biber` as backend, run `pdflatex 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.
### Choosing the Page Style
### Choosing the page style
`PhDThesisPSnPDF` defines 3 different page styles (header and footer). The following definition is for `twoside` layout.
@ -243,7 +278,7 @@ The visual style of chapter headings can be modified using the `titlesec` packag
\newcommand{\PostContentTitleFormat}{\PreContentTitleFormat}
\PreContentTitleFormat
### Custom Settings
### Custom settings
* The depth for the table of contents can be set using:
@ -257,12 +292,19 @@ The visual style of chapter headings can be modified using the `titlesec` packag
\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. Use `H` when including graphics. Note `H` instead of `h`.
\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
### Nomenclature Definition
### Nomenclature definition
* To use nomenclature in your chapters:
@ -286,6 +328,7 @@ The visual style of chapter headings can be modified using the `titlesec` packag
\renewcommand\nomname{Symbols}
## General guidelines
[Why is it important to follow good practices and not get killed by a Velociraptor ;)](http://www.xkcd.com/292/)
@ -339,6 +382,9 @@ You can run the following command (Linux/Unix):
or
`pdftotext thesis.pdf | wc thesis.txt -w` (eg., result 2690 words)
or
`texcount -inc *.tex` (eg., result 2341 words)
### _Q5_: I found a bug in the template. Where do I report bugs?
You can report issues at
@ -349,7 +395,7 @@ You can also mail
--------------------------------------------------------------------------------
## Troubleshooting Warnings
## Troubleshooting warnings
### _W1_: I get the LaTeX Warning: You have requested document class Classes/PhDThesisPSnPDF, but the document class provides PhDThesisPSnPDF, should I be concerned?
@ -376,7 +422,7 @@ If you are generating a separate abstract for your thesis submission, ignore thi
--------------------------------------------------------------------------------
## Known Issue(s) / Bugs
## Known issue(s) / Bugs
* 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.
@ -395,10 +441,14 @@ 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
## Change log
### 2014/06/09 - Version 1.3
> Commit 93723653eef19b8ca81d57df389b3a8efa652203
* Draftmode - watermark text, line numbering, version numbering
* Better error checking for documentclass options and log messages
* arara/LaTeX-mk support
### 2014/03/24 - Version 1.2
> Commit 4b709fed6cdfd5b3796152f9c59b619c72df491f
@ -498,3 +548,5 @@ If you are generating a separate abstract for your thesis submission, ignore thi
* Steven Kaneti - code concepts
* Tina Schwamb - testing and bug reports
* John Plaice - Bug fixes

314
sty/breakurl.sty Normal file
View File

@ -0,0 +1,314 @@
%%
%% This is file `breakurl.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% breakurl.dtx (with options: `package')
%%
%% This is a generated file.
%%
%% Copyright (C) 2005 by Vilar Camara Neto.
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.2 of this license or (at your option) any later
%% version. The latest version of this license is in:
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.2 or later is part of all distributions of
%% LaTeX version 1999/12/01 or later.
%%
%% Currently this work has the LPPL maintenance status "maintained".
%%
%% The Current Maintainer of this work is Vilar Camara Neto.
%%
%% This work consists of the files breakurl.dtx and
%% breakurl.ins and the derived file breakurl.sty.
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{breakurl}
[2013/04/10 v1.40 Breakable hyperref URLs]
\RequirePackage{xkeyval}
\RequirePackage{ifpdf}
\ifpdf
% Dummy package options
\DeclareOptionX{preserveurlmacro}{}
\DeclareOptionX{hyphenbreaks}{}
\DeclareOptionX{anythingbreaks}{}
\DeclareOptionX{vertfit}{}
\ProcessOptionsX\relax
\PackageWarning{breakurl}{%
You are using breakurl while processing via pdflatex.\MessageBreak
\string\burl\space will be just a synonym of \string\url.\MessageBreak}
\DeclareRobustCommand{\burl}{\url}
\DeclareRobustCommand*{\burlalt}{\hyper@normalise\burl@alt}
\def\burl@alt#1#2{\hyper@linkurl{\Hurl{#1}}{#2}}
\expandafter\endinput
\fi
\@ifpackageloaded{hyperref}{}{%
\PackageError{breakurl}{The breakurl depends on hyperref package}%
{I can't do anything. Please type X <return>, edit the source file%
\MessageBreak
and add \string\usepackage\string{hyperref\string} before
\string\usepackage\string{breakurl\string}.}
\endinput
}
\newif\if@preserveurlmacro\@preserveurlmacrofalse
\newif\if@burl@fitstrut\@burl@fitstrutfalse
\newif\if@burl@fitglobal\@burl@fitglobalfalse
\newif\if@burl@anythingbreaks\@burl@anythingbreaksfalse
\newtoks\burl@toks
\let\burl@charlistbefore\empty
\let\burl@charlistafter\empty
\def\burl@addtocharlistbefore{\g@addto@macro\burl@charlistbefore}
\def\burl@addtocharlistafter{\g@addto@macro\burl@charlistafter}
\bgroup
\catcode`\&=12\relax
\hyper@normalise\burl@addtocharlistbefore{%}
\hyper@normalise\burl@addtocharlistafter{:/.?#&_,;!}
\egroup
\def\burl@growmif#1#2{%
\g@addto@macro\burl@mif{\def\burl@ttt{#1}\ifx\burl@ttt\@nextchar#2\else}%
}
\def\burl@growmfi{%
\g@addto@macro\burl@mfi{\fi}%
}
\def\burl@defifstructure{%
\let\burl@mif\empty
\let\burl@mfi\empty
\expandafter\@tfor\expandafter\@nextchar\expandafter:\expandafter=%
\burl@charlistbefore\do{%
\expandafter\burl@growmif\@nextchar\@burl@breakbeforetrue
\burl@growmfi
}%
\expandafter\@tfor\expandafter\@nextchar\expandafter:\expandafter=%
\burl@charlistafter\do{%
\expandafter\burl@growmif\@nextchar\@burl@breakaftertrue
\burl@growmfi
}%
}
\AtEndOfPackage{\burl@defifstructure}
\def\burl@setvertfit#1{%
\lowercase{\def\burl@temp{#1}}%
\def\burl@opt{local}\ifx\burl@temp\burl@opt
\@burl@fitstrutfalse\@burl@fitglobalfalse
\else\def\burl@opt{strut}\ifx\burl@temp\burl@opt
\@burl@fitstruttrue\@burl@fitglobalfalse
\else\def\burl@opt{global}\ifx\burl@temp\burl@opt
\@burl@fitstrutfalse\@burl@fitglobaltrue
\else
\PackageWarning{breakurl}{Unrecognized vertfit option `\burl@temp'.%
\MessageBreak
Adopting default `local'}
\@burl@fitstrutfalse\@burl@fitglobalfalse
\fi\fi\fi
}
\DeclareOptionX{preserveurlmacro}{\@preserveurlmacrotrue}
\DeclareOptionX{hyphenbreaks}{%
\bgroup
\catcode`\&=12\relax
\hyper@normalise\burl@addtocharlistafter{-}%
\egroup
}
\DeclareOptionX{anythingbreaks}{%
\@burl@anythingbreakstrue
}
\DeclareOptionX{vertfit}[local]{\burl@setvertfit{#1}}
\ProcessOptionsX\relax
\def\burl@hyper@linkurl#1#2{%
\begingroup
\hyper@chars
\burl@condpdflink{#1}%
\endgroup
}
\def\burl@condpdflink#1{%
\literalps@out{
/burl@bordercolor {\@urlbordercolor} def
/burl@border {\@pdfborder} def
}%
\if@burl@fitstrut
\sbox\pdf@box{#1\strut}%
\else\if@burl@fitglobal
\sbox\pdf@box{\burl@url}%
\else
\sbox\pdf@box{#1}%
\fi\fi
\dimen@\ht\pdf@box\dimen@ii\dp\pdf@box
\sbox\pdf@box{#1}%
\ifdim\dimen@ii=\z@
\literalps@out{BU.SS}%
\else
\lower\dimen@ii\hbox{\literalps@out{BU.SS}}%
\fi
\ifHy@breaklinks\unhbox\else\box\fi\pdf@box
\ifdim\dimen@=\z@
\literalps@out{BU.SE}%
\else
\raise\dimen@\hbox{\literalps@out{BU.SE}}%
\fi
\pdf@addtoksx{H.B}%
}
\DeclareRobustCommand*{\burl}{%
\leavevmode
\begingroup
\let\hyper@linkurl=\burl@hyper@linkurl
\catcode`\&=12\relax
\hyper@normalise\burl@
}
\DeclareRobustCommand*{\burlalt}{%
\begingroup
\let\hyper@linkurl=\burl@hyper@linkurl
\catcode`\&=12\relax
\hyper@normalise\burl@alt
}
\newif\if@burl@breakbefore
\newif\if@burl@breakafter
\newif\if@burl@prevbreakafter
\bgroup
\catcode`\&=12\relax
\gdef\burl@#1{%
\def\burl@url{#1}%
\def\burl@urltext{#1}%
\burl@doit
}
\gdef\burl@alt#1{%
\def\burl@url{#1}%
\hyper@normalise\burl@@alt
}
\gdef\burl@@alt#1{%
\def\burl@urltext{#1}%
\burl@doit
}
\gdef\burl@doit{%
\burl@toks{}%
\let\burl@UrlRight\UrlRight
\let\UrlRight\empty
\@burl@prevbreakafterfalse
\@ifundefined{@urlcolor}{\Hy@colorlink\@linkcolor}{\Hy@colorlink\@urlcolor}%
\expandafter\@tfor\expandafter\@nextchar\expandafter:\expandafter=%
\burl@urltext\do{%
\if@burl@breakafter\@burl@prevbreakaftertrue
\else\@burl@prevbreakafterfalse\fi
\if@burl@anythingbreaks\@burl@breakbeforetrue\else\@burl@breakbeforefalse\fi
\@burl@breakafterfalse
\expandafter\burl@mif\burl@mfi
\if@burl@breakbefore
% Breakable if the current char is in the `can break before' list
\burl@flush\linebreak[0]%
\else
\if@burl@prevbreakafter
\if@burl@breakafter\else
% Breakable if the current char is not in any of the `can break'
% lists, but the previous is in the `can break after' list.
% This mechanism accounts for sequences of `break after' characters,
% where a break is allowed only after the last one
\burl@flush\linebreak[0]%
\fi
\fi
\fi
\expandafter\expandafter\expandafter\burl@toks
\expandafter\expandafter\expandafter{%
\expandafter\the\expandafter\burl@toks\@nextchar}%
}%
\let\UrlRight\burl@UrlRight
\burl@flush
\literalps@out{BU.E}%
\Hy@endcolorlink
\endgroup
}
\egroup
\def\the@burl@toks{\the\burl@toks}
\def\burl@flush{%
\expandafter\def\expandafter\burl@toks@def\expandafter{\the\burl@toks}%
\literalps@out{/BU.L (\burl@url) def}%
\hyper@linkurl{\expandafter\Hurl\expandafter{\burl@toks@def}}{\burl@url}%
\global\burl@toks{}%
\let\UrlLeft\empty
}%
\if@preserveurlmacro\else\let\url\burl\let\urlalt\burlalt\fi
\AtBeginDvi{%
\headerps@out{%
/burl@stx null def
/BU.S {
/burl@stx null def
} def
/BU.SS {
currentpoint
/burl@lly exch def
/burl@llx exch def
burl@stx null ne {burl@endx burl@llx ne {BU.FL BU.S} if} if
burl@stx null eq {
burl@llx dup /burl@stx exch def /burl@endx exch def
burl@lly dup /burl@boty exch def /burl@topy exch def
} if
burl@lly burl@boty gt {/burl@boty burl@lly def} if
} def
/BU.SE {
currentpoint
/burl@ury exch def
dup /burl@urx exch def /burl@endx exch def
burl@ury burl@topy lt {/burl@topy burl@ury def} if
} def
/BU.E {
BU.FL
} def
/BU.FL {
burl@stx null ne {BU.DF} if
} def
/BU.DF {
BU.BB
[ /H /I /Border [burl@border] /Color [burl@bordercolor]
/Action << /Subtype /URI /URI BU.L >> /Subtype /Link BU.B /ANN pdfmark
/burl@stx null def
} def
/BU.BB {
burl@stx HyperBorder sub /burl@stx exch def
burl@endx HyperBorder add /burl@endx exch def
burl@boty HyperBorder add /burl@boty exch def
burl@topy HyperBorder sub /burl@topy exch def
} def
/BU.B {
/Rect[burl@stx burl@boty burl@endx burl@topy]
} def
/eop where {
begin
/@ldeopburl /eop load def
/eop { SDict begin BU.FL end @ldeopburl } def
end
} {
/eop { SDict begin BU.FL end } def
} ifelse
}%
}
\endinput
%%
%% End of file `breakurl.sty'.

View File

@ -1,6 +1,6 @@
% ************************ Thesis Information & Meta-data **********************
%% The title of the thesis
\title{Writing your PhD Thesis in \texorpdfstring{\\ \LaTeX2e}{LaTeX2e}}
\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}
@ -27,9 +27,9 @@
\college{King's College}
%% Submission date
\degreedate{2013}
% Default is set as {\monthname[\the\month]\space\the\year}
%\degreedate{2014}
%% Meta information
\subject{LaTeX} \keywords{{LaTeX} {PhD Thesis} {Engineering} {University of
Cambridge}}

Binary file not shown.

Binary file not shown.

2584
thesis.ps

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,13 @@
% arara: clean: { files: [thesis.aux, thesis.bbl, thesis.blg, thesis.dvi, thesis.fdb_latexmk, thesis.fls, thesis.idx, thesis.ilg, thesis.ind, thesis.lof, thesis.log, thesis.lot, thesis.nlo, thesis.nls, thesis.out, thesis.pdf, thesis.ps, thesis.toc]}
% arara: latex: { shell: yes }
% arara: bibtex
% arara: nomencl
% arara: latex
% arara: makeindex
% arara: latex: { shell: yes }
% arara: dvips
% arara: ps2pdf
% ******************************* PhD Thesis Template **************************
% Please have a look at the README.md file for info on how to use the template
@ -25,6 +35,9 @@
%
% `draft': For draft mode without loading any images (same as draft in book)
%
% `draftmode': Special draft mode with line numbers, images, and water mark with
% timestamp and custom text. Position of the text can also be modified.
%
% `abstract': To generate only the title page and abstract page with
% dissertation title and name, to submit to the Student Registry
%
@ -151,6 +164,7 @@
% To use the conventional natbib style referencing
% Bibliography style previews: http://nodonn.tipido.net/bibstyle.php
% Reference styles: http://sites.stat.psu.edu/~surajit/present/bib.htm
\bibliographystyle{apalike}
%\bibliographystyle{plainnat} % use this to have URLs listed in References