Version 1.1 Biblatex - bibtex backed and chapter mode
This commit is contained in:
parent
9a1dd6c602
commit
656778e413
@ -83,6 +83,15 @@ If not, please remove the option `abstract' from the document class and
|
|||||||
recompile. Good luck with your writing!}
|
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%
|
\ProcessOptions\relax%
|
||||||
|
|
||||||
% *************************** Pre-defined Options ******************************
|
% *************************** Pre-defined Options ******************************
|
||||||
@ -278,7 +287,7 @@ supported!}
|
|||||||
% ******************************* Bibliography *********************************
|
% ******************************* Bibliography *********************************
|
||||||
\ifPHD@authoryear
|
\ifPHD@authoryear
|
||||||
\ifPHD@biblatex
|
\ifPHD@biblatex
|
||||||
\RequirePackage[backend=biber, style=authoryear, citestyle=alphabetic, sorting=nty, natbib=true]{biblatex}
|
\RequirePackage[backend=bibtex8, style=authoryear, citestyle=alphabetic, sorting=nty, natbib=true]{biblatex}
|
||||||
\setBiBLaTeXtrue
|
\setBiBLaTeXtrue
|
||||||
\else
|
\else
|
||||||
\RequirePackage[round, sort, numbers, authoryear]{natbib} %author year
|
\RequirePackage[round, sort, numbers, authoryear]{natbib} %author year
|
||||||
@ -287,7 +296,7 @@ supported!}
|
|||||||
\else
|
\else
|
||||||
\ifPHD@numbered
|
\ifPHD@numbered
|
||||||
\ifPHD@biblatex
|
\ifPHD@biblatex
|
||||||
\RequirePackage[backend=biber, style=numeric-comp, citestyle=numeric, sorting=none, natbib=true]{biblatex}
|
\RequirePackage[backend=bibtex8, style=numeric-comp, citestyle=numeric, sorting=none, natbib=true]{biblatex}
|
||||||
\setBiBLaTeXtrue
|
\setBiBLaTeXtrue
|
||||||
\else
|
\else
|
||||||
\RequirePackage[numbers,sort&compress]{natbib} % numbered citation
|
\RequirePackage[numbers,sort&compress]{natbib} % numbered citation
|
||||||
@ -301,7 +310,7 @@ supported!}
|
|||||||
\fi
|
\fi
|
||||||
\else
|
\else
|
||||||
\ifPHD@biblatex
|
\ifPHD@biblatex
|
||||||
\RequirePackage[backend=biber, style=numeric-comp, citestyle=numeric, sorting=none, natbib=true]{biblatex}
|
\RequirePackage[backend=bibtex8, style=numeric-comp, citestyle=numeric, sorting=none, natbib=true]{biblatex}
|
||||||
\setBiBLaTeXtrue
|
\setBiBLaTeXtrue
|
||||||
\else
|
\else
|
||||||
\RequirePackage[numbers,sort&compress]{natbib} % Default - numbered
|
\RequirePackage[numbers,sort&compress]{natbib} % Default - numbered
|
||||||
@ -319,7 +328,8 @@ and define the natbib package or biblatex package with required style in the Pre
|
|||||||
|
|
||||||
% *********************** To copy ligatures and Fonts **************************
|
% *********************** To copy ligatures and Fonts **************************
|
||||||
\RequirePackage{textcomp}
|
\RequirePackage{textcomp}
|
||||||
\RequirePackage[utf8]{inputenc}
|
%[utf8] was used - removed for biblatex - biber backend required
|
||||||
|
\RequirePackage{inputenc}
|
||||||
\RequirePackage[T1]{fontenc}
|
\RequirePackage[T1]{fontenc}
|
||||||
|
|
||||||
% Font Selection
|
% Font Selection
|
||||||
@ -663,6 +673,24 @@ font in the preamble.tex file by specifying `customfont' in the class options}
|
|||||||
\newcommand{\printthesisindex}{}
|
\newcommand{\printthesisindex}{}
|
||||||
\fi
|
\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 ************************************
|
% ******************************** Abstract ************************************
|
||||||
% The abstract environment puts a large, bold, centered "Abstract" label at
|
% The abstract environment puts a large, bold, centered "Abstract" label at
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
\ifsetBib % True, Bibliography option is chosen in class options
|
\ifsetBib % True, Bibliography option is chosen in class options
|
||||||
\else % If custom bibliography style chosen then load bibstyle here
|
\else % If custom bibliography style chosen then load bibstyle here
|
||||||
\ifsetBiBLaTeX
|
\ifsetBiBLaTeX
|
||||||
\RequirePackage[backend=biber, style=numeric-comp, citestyle=numeric, sorting=nty, natbib=true]{biblatex}
|
\RequirePackage[backend=bitex8, style=numeric-comp, citestyle=numeric, sorting=nty, natbib=true]{biblatex}
|
||||||
\else
|
\else
|
||||||
\RequirePackage[square, sort, numbers, authoryear]{natbib} % CustomBib
|
\RequirePackage[square, sort, numbers, authoryear]{natbib} % CustomBib
|
||||||
\fi
|
\fi
|
||||||
|
37
README.md
37
README.md
@ -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.
|
* 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
|
## Building your thesis
|
||||||
|
|
||||||
@ -101,11 +107,15 @@ Usage: `sh ./compile-thesis.sh [OPTIONS] [filename]`
|
|||||||
|
|
||||||
## Usage details
|
## Usage details
|
||||||
|
|
||||||
|
Thesis information (title, author, year, degree) and other meta-data can be found in `thesis-info.tex`
|
||||||
|
|
||||||
### Class Options
|
### Class Options
|
||||||
|
|
||||||
The class file, `PhDThesisPSnPDF`, is based on the standard `book` class
|
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
|
* `a4paper` (default as per the University guidelines) or `a5paper`: Paper size
|
||||||
|
|
||||||
@ -135,6 +145,9 @@ 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.
|
* `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
|
### 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).
|
* 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).
|
||||||
@ -146,10 +159,21 @@ It supports the following custom options:
|
|||||||
\else
|
\else
|
||||||
\fi
|
\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.tex` file:
|
||||||
|
|
||||||
|
\ifdefineChapter
|
||||||
|
\includeonly{Chapter3/chapter3}
|
||||||
|
\else
|
||||||
|
\fi
|
||||||
|
|
||||||
|
|
||||||
### Choosing the Fonts
|
### 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.
|
* `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
|
* `fourier`: fourier font with math support
|
||||||
@ -163,7 +187,7 @@ It supports the following custom options:
|
|||||||
|
|
||||||
### 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
|
`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. The bibtex is the backend for `biblatex` at the moment.
|
||||||
|
|
||||||
* `authoryear`: For author-year citation eg., Krishna (2013)
|
* `authoryear`: For author-year citation eg., Krishna (2013)
|
||||||
|
|
||||||
@ -371,9 +395,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.
|
* Make example thesis a document on how to use the template and include general guidelines and good practices.
|
||||||
|
|
||||||
|
* Biber backend support with Makefile
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
## ChangeLog
|
## 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
|
### 2014/01/11 - Version 1.0
|
||||||
> Commit 2f6918863e3c9d0a7e95bd2651ce7ef8ae38f90a
|
> Commit 2f6918863e3c9d0a7e95bd2651ce7ef8ae38f90a
|
||||||
* Fixed an issue with the headers in Nomenclature section
|
* Fixed an issue with the headers in Nomenclature section
|
||||||
|
40
thesis-info.tex
Normal file
40
thesis-info.tex
Normal 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
|
||||||
|
|
BIN
thesis.dvi
BIN
thesis.dvi
Binary file not shown.
BIN
thesis.pdf
BIN
thesis.pdf
Binary file not shown.
70
thesis.tex
70
thesis.tex
@ -1,7 +1,7 @@
|
|||||||
% ******************************* PhD Thesis Template **************************
|
% ******************************* PhD Thesis Template **************************
|
||||||
% Please have a look at the README.md file for info on how to use the template
|
% Please have a look at the README.md file for info on how to use the template
|
||||||
|
|
||||||
\documentclass[a4paper,12pt,times, print,index,biblatex]{Classes/PhDThesisPSnPDF}
|
\documentclass[a4paper,12pt,times,numbered,print,index]{Classes/PhDThesisPSnPDF}
|
||||||
|
|
||||||
% ******************************************************************************
|
% ******************************************************************************
|
||||||
% ******************************* Class Options ********************************
|
% ******************************* Class Options ********************************
|
||||||
@ -28,6 +28,9 @@
|
|||||||
% `abstract': To generate only the title page and abstract page with
|
% `abstract': To generate only the title page and abstract page with
|
||||||
% dissertation title and name, to submit to the Student Registry
|
% 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 ********************************
|
% ************************* Custom Page Margins ********************************
|
||||||
%
|
%
|
||||||
% `custommargin`: Use `custommargin' in options to activate custom page margins,
|
% `custommargin`: Use `custommargin' in options to activate custom page margins,
|
||||||
@ -48,6 +51,8 @@
|
|||||||
%
|
%
|
||||||
% ********************** Choosing the Bibliography style ***********************
|
% ********************** Choosing the Bibliography style ***********************
|
||||||
%
|
%
|
||||||
|
% `biblatex`: To enable BibLaTeX Support
|
||||||
|
%
|
||||||
% `authoryear': For author-year citation eg., Krishna (2013)
|
% `authoryear': For author-year citation eg., Krishna (2013)
|
||||||
%
|
%
|
||||||
% `numbered': (Default Option) For numbered and sorted citation e.g., [1,5,2]
|
% `numbered': (Default Option) For numbered and sorted citation e.g., [1,5,2]
|
||||||
@ -71,65 +76,34 @@
|
|||||||
% Preamble: Contains packages and user-defined commands and settings
|
% Preamble: Contains packages and user-defined commands and settings
|
||||||
\input{Preamble/preamble}
|
\input{Preamble/preamble}
|
||||||
|
|
||||||
|
|
||||||
% ***************************** BiBLaTeX Reference *****************************
|
|
||||||
\ifsetBiBLaTeX
|
|
||||||
\bibliography{References/references}
|
|
||||||
\fi
|
|
||||||
|
|
||||||
% ************************ Thesis Information & Meta-data **********************
|
% ************************ Thesis Information & Meta-data **********************
|
||||||
%% The title of the thesis
|
% Thesis title and author information, refernce file for biblatex
|
||||||
\title{Writing your PhD Thesis in \texorpdfstring{\\ \LaTeX2e}{LaTeX2e}}
|
\input{thesis-info}
|
||||||
%\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}}
|
|
||||||
|
|
||||||
% ***************************** Abstract Separate ******************************
|
% ***************************** Abstract Separate ******************************
|
||||||
% To printout only the titlepage and the abstract with the PhD title and the
|
% 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.
|
% the document class.
|
||||||
|
|
||||||
\ifdefineAbstract
|
\ifdefineAbstract
|
||||||
\includeonly{Abstract/abstract}
|
\includeonly{Abstract/abstract}
|
||||||
\else
|
|
||||||
\fi
|
\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 ********************************
|
% ******************************** Front Matter ********************************
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
|
|
||||||
\frontmatter
|
\frontmatter
|
||||||
|
|
||||||
|
|
||||||
\begin{titlepage}
|
\begin{titlepage}
|
||||||
|
|
||||||
\maketitle
|
\maketitle
|
||||||
@ -167,20 +141,22 @@ Cambridge}}
|
|||||||
|
|
||||||
|
|
||||||
% ********************************** Back Matter *******************************
|
% ********************************** Back Matter *******************************
|
||||||
% Backmatter should be turned off, if you are using appendices after References
|
% Backmatter should be commented out, if you are using appendices after References
|
||||||
%\backmatter
|
%\backmatter
|
||||||
|
|
||||||
% ********************************** Bibliography ******************************
|
% ********************************** Bibliography ******************************
|
||||||
\begin{spacing}{0.9}
|
\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
|
\ifsetBiBLaTeX % BiBLaTeX
|
||||||
% Bibfile is specified in Line 77 in thesis.tex
|
|
||||||
\printbibliography[heading=bibintoc, title={References}]
|
\printbibliography[heading=bibintoc, title={References}]
|
||||||
|
|
||||||
|
% To use the conventional natbib style referencing
|
||||||
|
% Bibliography style previews: http://nodonn.tipido.net/bibstyle.php
|
||||||
\else % NatBiB
|
\else % NatBiB
|
||||||
|
|
||||||
% Bibliography style previews: http://nodonn.tipido.net/bibstyle.php
|
|
||||||
\bibliographystyle{apalike}
|
\bibliographystyle{apalike}
|
||||||
%\bibliographystyle{plainnat} % use this to have URLs listed in References
|
%\bibliographystyle{plainnat} % use this to have URLs listed in References
|
||||||
\cleardoublepage
|
\cleardoublepage
|
||||||
|
Loading…
Reference in New Issue
Block a user