Git Product home page Git Product logo

kks32 / phd-thesis-template Goto Github PK

View Code? Open in Web Editor NEW
803.0 45.0 380.0 29.43 MB

A LaTeX / XeLaTeX / LuaLaTeX PhD thesis template for Cambridge University Engineering Department (CUED)

Home Page: http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/ThesisStyle/

License: MIT License

TeX 64.85% Shell 0.90% Makefile 34.01% Batchfile 0.24%
phd-thesis-template latex latex-template cambridge lualatex xelatex

phd-thesis-template's Introduction

CUED PhD thesis template

Join the chat at https://gitter.im/kks32/phd-thesis-template

A LaTeX / XeLaTeX / LuaLaTeX PhD thesis template for Cambridge University Engineering Department.

Build Status License MIT Version

Author(s)

  • Krishna Kumar

Features

  • Conforms to the Student Registry PhD dissertation guidelines and CUED PhD guidelines

  • Supports LaTeX, XeLaTeX and LuaLaTeX

  • Adaptive Title Page: Title page adapts to title length

  • Title page with both College and University crests.

  • Print / On-line version: Different layout and hyper-referencing styles

  • Pre-defined and custom fonts (Times / Fourier / Latin Modern) with math support

  • Supports system fonts (XeLaTeX)

  • Pre-defined and custom bibliography style support (authoryear / numbered / custom)

  • Custom page styles: 3 Different Header / Footer styles

  • Pre-defined and custom margin size

  • 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.

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

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

  • A LyX Template is now available at https://github.com/kks32/PhDThesisLyX/


Building your thesis - XeLaTeX

Using latexmk (Unix/Linux/Windows)

This template supports XeLaTeX compilation chain. To generate PDF run

latexmk -xelatex thesis.tex
makeindex thesis.nlo -s nomencl.ist -o thesis.nls
latexmk -xelatex -g thesis.tex

Building your thesis - LuaLaTeX

Using latexmk (Unix/Linux/Windows)

This template supports LuaLaTeX compilation chain. To generate PDF run

latexmk -pdflatex=lualatex -pdf thesis.tex

Building your thesis - LaTeX / PDFLaTeX

Using latexmk (Unix/Linux/Windows)

This template supports latexmk. To generate DVI, PS and PDF run

latexmk -dvi -ps -pdf 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.

To build the PDF version of your thesis, run:

make

This build procedure uses pdflatex with bibtex and will produce thesis.pdf. To use pdflatex with biblatex, you should run:

make BIB_STRATEGY=biblatex

To use XeLaTeX, you should run:

make BUILD_STRATEGY=xelatex

or with biblatex

make BUILD_STRATEGY=xelatex BIB_STRATEGY=biblatex

To use LuaLaTeX, you should run:

make BUILD_STRATEGY=lualatex

or with biblatex

make BUILD_STRATEGY=lualatex BIB_STRATEGY=biblatex

To produce DVI and PS versions of your document, you should run:

make BUILD_STRATEGY=latex

This will use the latex command to build the document and will produce thesis.dvi, thesis.ps and thesis.pdf documents. You will need psutils installed

Clean unwanted files

To clean unwanted clutter (all LaTeX auto-generated files), run:

make clean

Note: the Makefile itself is take from and maintained at here.

Shell script for PDFLaTeX (Unix/Linux)

Usage: sh ./compile-thesis.sh [OPTIONS] [filename]

[option] compile: Compiles the PhD Thesis

[option] clean: removes temporary files - no filename required

Using the batch file on Windows OS (PDFLaTeX)

  • Open command prompt and navigate to the directory with the tex file. Run:
`compile-thesis-windows.bat`.
  • Alternatively, double click on compile-thesis-windows.bat

Usage details

Thesis information such as title, author, year, degree, etc., and other meta-data can be modified in thesis-info.tex

Class options

The class file, PhDThesisPSnPDF, is based on the standard book class

It supports the following custom options in the documentclass in thesis.tex:

(Usage \documentclass[a4paper,11pt,print]{PhDThesisPSnPDF})

  • a4paper (default as per the University guidelines) or a5paper: Paper size

  • 11pt or 12pt: The University of Cambridge guidelines recommend using a minimum font size of 11pt (12pt is preferred) and 10pt for footnotes. This template also supports 10pt.

  • oneside or twoside (default): This is especially useful for printing double side (twoside) or single side.

  • print: Supports Print and Online Version with different page margins and hyperlink styles. Use print 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 keyword custommargin in the options. Then you can define the dimensions of the margin in the preamble.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.

  • 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.

  • 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 in preamble.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 specifying nolineno in the options.

  • flushleft: The University recommends using ragged right or flush left alignment for texts. The reason behind this is left justifying a text may exclude a certain readers. Dyslexic people find it hard to read justified text. You can enable raggedright option in the document class by passing flushleft argument. Default is flush left and right.

Title page

The front page (title page) resizes to fit your title length. You can modify the options in thesis-info.tex.

  • \subtitle (optional): Adds a subtitle to your thesis.

  • \college (optional): This option adds the name of your college on the bottom left.

If \college is defined, the bottom of the title page will look like this:

    King's College 			                                         2014

If \college is undefined or blank, the degreedate will be centered.

                                    2014

The template offers support to having both the college and university crests or just one of the crests.

  • \collegeshield (optional): Includes college crest in addition to the university crest. This reformats the front page layout.

Abstract separate

  • A separate abstract with the title of the PhD and the candidate name has to be submitted to the Student Registry. This can be generated using abstract option in the document class. Ignore subsequent warnings about skipping sections (if any).

  • To generate the separate abstract and the title page, make sure the following commands are in the preamble section of thesis.tex file:

     \ifdefineAbstract
     \includeonly{Abstract/abstract}
     \fi
    

Chapter mode

  • The chapter mode allows user to only print specific chapters along with references. By default, it excludes everything else in the front matter and appendices. This can done by using chapter option in the document class in thesis.tex. Ignore subsequent warnings about skipping sections (if any).

  • To generate the separate abstract and the title page, make sure the following commands are in the preamble section of thesis.tex file:

     \ifdefineChapter
     	\includeonly{Chapter3/chapter3}
     \fi
    

Draft

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}

Choosing the fonts

PhDThesisPSnPDF currently supports three fonts Times, Fourier and Latin Modern (default).

  • times: (The University of Cambridge guidelines recommend using Times). Specifying times option in the document class will use mathptpx or Times font with Math Support.

  • fourier: fourier font with math support

  • 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:

    \ifsetCustomFont
      \RequirePackage{Your_Custom_Font}
    \fi
    

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.

  • 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 the preamble.tex file.

      \RequirePackage[square, sort, numbers, authoryear]{natbib}
    
  • (Overview of Bibtex-Styles with preview)[http://nodonn.tipido.net/bibstyle.php?]

  • 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

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
    

Changing the visual style of chapter headings

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

Custom settings

  • 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. 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

  • 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 or a: Roman Symbols

    • G or g: Greek Symbols

    • Z or z: Acronyms/Abbreviations

    • R or r: Superscripts

    • S or s: Subscripts

    • X or x: 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.

Alternatively, you can use the compile-thesis-windows.bat file or run make on Unix / Linux / MacOS

To-do Notes

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

Git hooks

You rarely want to commit changes to your TeX files which are not reflected in the PDF included in the repo. You can automate this process, among other things, with a git hook. Install the hook with make hooks (or see how to do it in ./hooks/install.sh). Now every time you commit, if any files affecting your build have changed in this commit and those changes are more recent than the last modification of thesis.pdf, the default make target will be run and changes to thesis.pdf will be git added.

Currently, changes to any tex/pdf/eps/png/cls files are picked up. This can be changed in ./hooks/pre-commit.

Skip the hook with git commit --no-verify.

bash-only.

General guidelines

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 symbol pi.


Frequently Asked Questions

Q1: Where can I find the thesis formatting guidelines this class is based on?

https://www.admin.cam.ac.uk/students/studentregistry/exams/submission/phd/format.html

Q2: Where can I find newer versions of the University of Cambridge crest/logos?

The university updates its crest every now and then. You can find up-to-date logos on this page (subject to change without notice).

Download and exchange the new logos with University_Crest.eps and/or University_Crest.pdf. I'll try to keep the crest up to date.

Q3: Where can I find the guidelines to submit my thesis and requirements?

Preparing to submit:

Formatting styles:

Submitting the dissertation

Q4: How can I count the number of words in my thesis?

You can run the following command (Linux/Unix): ps2ascii thesis.pdf | wc -w (eg., result 2713 words)

or pdftotext thesis.pdf | wc thesis.txt -w (eg., result 2690 words)

or texcount -inc *.tex (eg., result 2341 words)

Q5: How do I use a system font (libertine)?

To use a system font (open type) font with XeLaTeX, please select customfont option in the documentclass in thesis.tex. Add the path and font name to the custom font definition in preamble.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.

Q6: I found a bug in the template. Where do I report bugs?

You can report issues at our GitHub repository.

You can also mail the developer directly or contact Tim Love, CUED


Troubleshooting warnings

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.

W3: I get LaTeX Warning: Unused global option(s):[something].

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.

W5: I get blank pages between chapters

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.

W6: My references aren't listed in the ordered in which I cite them

This is controlled by the bibliography style. Please use \bibliographystyle{unsrt} in thesis.tex instead of apalike. This applicable only for numerically sorted references.


Known issue(s) / Bugs / Feature requests

  • 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 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.

  • Please fork me on github and create a pull request, if you would like to contribute to the repo.

ChangeLog

The history of releases can be viewed at ChangeLog


Inspirations/Based on

Acknowlegments

  • Alex Ridge - original idea, code concepts & testing

  • Steven Kaneti - code concepts

  • Tina Schwamb - testing and bug reports

  • John Plaice - Bug fixes

phd-thesis-template's People

Contributors

abroekhof avatar adrianjav avatar bitdeli-chef avatar cbsimmons99 avatar clbarnes avatar devhell avatar gitter-badger avatar hananhindy avatar holgern avatar kks32 avatar mabuimo avatar muzimuzhi avatar tabias avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phd-thesis-template's Issues

Enhancement: FAQ Q4

texcount can be found in some distributions packaged together with TeXlive, but is also separately available at http://app.uio.no/ifi/texcount/.

It breaks down documents rather nicely (including figure, table, equation count etc.) even if these follow a structure similar to this PhD thesis template (see texcount --help for details). Therefore, I would like to suggest to add texcount to Q4 of the FAQ for this template.

Define custom paper size

This is great work!

I am struggling defining a custom paper size (i.e. not a4, a5,letter etc.). Whatever is defined it will jump back to A4. How would I set a custom paper size?
Thanks!

How to use it with differents language?

Hi there, this template it's really amazing and I'm starting to doing my thesis based on this awesome template.

I was wondering how can I work with spanish language? Maybe I need to configure in the class part but I'm not sure what should be the best way to do that.

I need to translate the title in the envoriments, e.g: dedicatoria instead dedication and so on. Any help is worthy :D thanks in advance

Oneside hyperref pagenumbering issue

When using oneside option the following warning appears .../dedication.tex)pdfTeX warning (ext4): destination with the same identifier (name{page.i}) has been already used, duplicate ignored

The title page and subsequent page are both numbered as i

Not able to include .pdf_tex?

I was using Inkscape to generate graphs as .pdf and .pdf_tex which would allow latex to place the same fonts into the graph. But as soon as I try to make the project it gives me the error

make: ***No rule to make target 'architecture.pdf_tex.tex', needed by 'thesis.d'. Stop

Figures - good practices

  • Centre figures using \centering and not \begin{center} environment
  • Include graphics scale/width as a relative value and not absolute value
  • Caption at the top.
  • subcaption package for subfigures
  • General guidelines in making plots
    • Charlotte - colour blindness guideliness
  • continuedfloat

How to print list of abbreviations using \nomenclature

Hi,
I am trying to add the list of abbreviation in the thesis. I can see the \nomenclature command in chapter 1 of the template. But when I execute the thesis.tex file, list of abbreviations is missing from the pdf file. \printnomenclature and \nomenclature command is highlighted with " unrecognized command". Could anyone please tell me how to add nomenclature in the thesis.

Regards,
Javed

Appendix sty.

When I try to compile the file, latex is telling me this:

./Classes/PhDThesisPSnPDF.cls:292: LaTeX Error: File `appendix.sty' not found.
./Classes/PhDThesisPSnPDF.cls:292: ==> Fatal error occurred, no output PDF file produced!
Error: failed to create thesis.aux

suggestions?

Add multiple supervisors names (up to four) on the title page front cover on their thesis

In response to

http://tex.stackexchange.com/questions/196629/adding-supervisor-to-thesis

The following is a means to add multiple supervisors names (up to four) on the title page front cover on their thesis based upon version 2.0 of “PhD Thesis Template for Cambridge University Engineering Department (CUED) - LaTeX, XeLaTeX and LuaLaTeX support”

(see link below)

https://www.overleaf.com/latex/templates/phd-thesis-template-for-cambridge-university-engineering-department-cued-latex-xelatex-and-lualatex-support/kgfqybfnqkdf

The earlier post provides some is very useful place to start, however, under version 2.0 of the CUED thesis template a bit more work is required.

This is broken into five steps, the first four are in the class file, with the last on thesis-info.tex:

  1. Add new macros to contain the supervisor names
  2. Set position where these new macros are suppose to appear with spacing
  3. Set how they will appear in terms of font size
  4. Inform title page spacing that total height includes these new supervisor named macros
  5. In thesis-info.tex add macro names as required

Please note that the spacing may require adjusting to ones preference.
Also this solution can be optimised with if statements to avoid undue vertical space being added if less than four supervisor names are declared.

Step 1) Add new macros

As stated go to the class file find the macro definitions section and add new macros
Please note that macro name do not like numbers.

% **************************** Macro Definitions *******************************

% The full (unabbreviated) name of the degree
\newcommand{@degreetitle}{}
\newcommand{\degreetitle}[1]{\renewcommand{@degreetitle}{#1}}

%%%%%%
%% YGJ Fri 18th Dec 2015
%% Added to print out supervisors on title page
% http://tex.stackexchange.com/questions/196629/adding-supervisor-to-thesis

% Main Supervisor
\newcommand{@Supervisor}{}
\newcommand{\supervisor}[1]{\renewcommand{@Supervisor}{#1}}

% Second Supervisor
\newcommand{@supervisorSecond}{}
\newcommand{\supervisorSecond}[1]{\renewcommand{@supervisorSecond}{#1}}

% Third Supervisor
\newcommand{@supervisorThird}{}
\newcommand{\supervisorThird}[1]{\renewcommand{@supervisorThird}{#1}}

% Forth Supervisor
\newcommand{@supervisorForth}{}
\newcommand{\supervisorForth}[1]{\renewcommand{@supervisorForth}{#1}}

%%%%%%

% The name of your department(eg. Engineering, Maths, Physics)
\newcommand{@DEPT}{}
\newcommand{\dept}[1]{\renewcommand{@DEPT}{#1}}

Step 2) Set position where these new macros are suppose to appear with spacing

Under the section called “Title Page” is where the order the macros are positioned.
Here as suggested in the earlier post, the macro names are placed between author and department.

% ******************************** Title Page **********************************

% Author
{\usebox{\PHD@author}}
\vspace*{1em}

%%% Added Supervisor(s) on title page

%% Main Supervisor
{\usebox{\PHD@supervisor}}
\vspace*{0.0625em}

% Second Supervisor
{\usebox{\PHD@supervisorSecond}}
\vspace*{0.0625em}

% Third Supervisor
{\usebox{\PHD@supervisorThird}}
\vspace*{0.0625em}

% Forth Supervisor
{\usebox{\PHD@supervisorForth}}
\vspace*{0.0625em}

%%%%%

% Department and University
{\usebox{\PHD@dept}}
\vspace{.2\PHD@titlepagespacing}

Step 3) Set how they will appear in terms of font size
Here the chosen font size is large and bold, an in between choice from author of Large bold and dept large only.

% ******************** To compute empty space in title page *******************

% Author Box
\newsavebox{\PHD@author}
\begin{lrbox}{\PHD@author}
\begin{minipage}[c]{\textwidth}
\centering \Large \bfseries{@author}
\end{minipage}
\end{lrbox}

%%%% Added to print out supervisors on title page

% Main Supervisor Box
\newsavebox{\PHD@supervisor}
\begin{lrbox}{\PHD@supervisor}
\begin{minipage}[c]{\textwidth}
\centering \large \bfseries{@Supervisor}
\end{minipage}
\end{lrbox}

% Seocnd Supervisor Box
\newsavebox{\PHD@supervisorSecond}
\begin{lrbox}{\PHD@supervisorSecond}
\begin{minipage}[c]{\textwidth}
\centering \large \bfseries{@supervisorSecond}
\end{minipage}
\end{lrbox}

% Third Supervisor Box
\newsavebox{\PHD@supervisorThird}
\begin{lrbox}{\PHD@supervisorThird}
\begin{minipage}[c]{\textwidth}
\centering \large \bfseries{@supervisorThird}
\end{minipage}
\end{lrbox}

% Forth Supervisor Box
\newsavebox{\PHD@supervisorForth}
\begin{lrbox}{\PHD@supervisorForth}
\begin{minipage}[c]{\textwidth}
\centering \large \bfseries{@supervisorForth}
\end{minipage}
\end{lrbox}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Department Box
\newsavebox{\PHD@dept}
\begin{lrbox}{\PHD@dept}
\begin{minipage}[c]{\textwidth}
\centering {\large @DEPT \par}
{\large @university \par}
\end{minipage}
\end{lrbox}

Step 4) Inform title page spacing that total height includes these new supervisor named macros

% Now to compute the free vertical space

        - \totalheightof{\usebox{\PHD@author}}
        %% Added to print out supervisors on title page
        - \totalheightof{\usebox{\PHD@supervisor}}
        - \totalheightof{\usebox{\PHD@supervisorSecond}}
        - \totalheightof{\usebox{\PHD@supervisorThird}}
        - \totalheightof{\usebox{\PHD@supervisorForth}}
        %%%%%%%
        - \totalheightof{\usebox{\PHD@dept}}

Step 5) In thesis-info.tex add macro names as required

\supervisor{Dr. Jane Smith}
\supervisorSecond{Dr. Joe Bloggs}
\supervisorThird{Dr. Alice Foo}
\supervisorForth{Dr. Bob Bar}

margin issue

Hi
I am using lyx thesis templet and I would like to customize the margins but the chages applied for some pages not all of them (page after page).
Thanks

Where to add RequirePackage[german]{babel} ?

Hi,

i would like to print the german month - for example Februrar, instead of February - on the frontpage, but i am not quite sure where to start. I' ve added \RequirePackage[german]{babel} in the PhDThesisPSnPDF.cls file but without any changes.

Thank you for your help!

Issue with Bibliography in version 1.4.2

I have downloaded the lastest version 1.4.2 and I am facing issues with setting the Bibliography style to author year, In _thesis.tex_ my document class is defined as

\documentclass[a4paper,12pt,times,authoryear,oneside,print,index,custommargin]{Classes/PhDThesisPSnPDF}

and in the preamble.tex file the default values for bibliography have been left unchanged.

In the output PDF file I am getting citations and references being printed in numbered format.
Some reference have author name in place of numbers.. Please see reference 3 and 6 in the attached image.

latex-error

Please advise me on how to fix this issue and get _proper author-year_ style of refrencing again, as I was it was working in the previous version.

references

Hi
I am using the PhD template for writing up my thesis and I have a problem in seeing the refernces in the pdf previwe file eventhough I am using the template as it is.
I am using Winedt 9 for my compilation.
capture
Best,
Mohd

Class location and definition.

I found it necessary to move the class and change the thesis.tex files document class from Classes/PhDThesisPSnPD to PhDThesisPSnPD as I kept seeing this warning.

LaTeX Warning: You have requested document class `Classes/PhDThesisPSnPDF',
           but the document class provides `PhDThesisPSnPDF'.

Everything seemed to work alright though so not sure what the issue is?
Thought I'd highlight it to you anyway.

CUED?

I get a question concerning the template every other week it seems, many users around the world seem to use the template (and much more the previous version :-().

Are other users encouraged to use the template, or should it be university only?

Is there anything you can do to get the old template offline?

Compiling the thesis with LuaLaTex

I'm need to use LuaLaTex to compile because of memory issues with the graphs. I create the graphs with pfgplots and I have so many that they required too much space. LuaLaTex seems to solve the problem. When I try to compile the PhDThesisPSnPDF I get the error message: "LaTeX Error: \pdfshellescape undefined."

Are you planning to support LuaLaTex in version 2.0? When is the release of this version expected? Would it be difficult to make the changes in the actual version?

Thank you for your time.

Hide contents from TOC, but should be present in the bookmarks

The table of contents should not have contents listed (obviously!). Although using \tochide\tableofcontents does the job, it also removes the table of contents from the bookmarks. It will be handy to have it listed in the bookmarks but not in the TOC page.

font size

Hi, Is there a possibility to have font 14pt size? My university guidelines suggest larger font. I tried to change this in PhDThesisPSnPDF.cls but it seems to be overwritten by some other setting
edit: \large after \begin{document} seems to work

Custom margins and includepdf

I think this is a bug but it might be my lack of LaTeX skill!

I am using the custommargin option with the following margins:
\RequirePackage[left=38mm,right=25mm,top=25mm,bottom=25mm]{geometry}

In addition to this I am including a multiple page PDF document using:
\includepdf[pages=-,scale=0.65,pagecommand={},frame=true]{doc.pdf}

For some reason the PDF is not centred according to the new margins but is centred in the page (ignoring the uneven margins on the left/right).

Any help would be greatly appreciated. Cheers.

support for inserting title and abstract in multi-language

Hi,

Is it possible to add support for adding multi-language for Title and abstract for the template. Right now it gives errors when inserting other languages. I am not sure how to change the cls file for additional language support. My professor wants to give the title and abstract in two languages(English and Japanese).

Thanks
Alex

How to build with AUCTeX/XeLaTeX?

Hello I'm using XeLaTeX with AUCTeX in Emacs to write and compile my dissertation, and I was wondering what command I should use to build. I assume it is some variation on what you have listed under latexmk, but I would like to run the command from within AUCTeX instead of from the CLI. Thank you for your time.

Overfull chapter title.

I was creating a chapter title that doesn't look very nice, please see the figure.
Fortunately, in TOC section the chapter title is working properly adding a hyphenation and move the rest of the words to the line below, see figure.

Is there a way to fix this?
Thanks
captura de tela de 2015-11-26 11-12-29
captura de tela de 2015-11-26 11-11-42

Update pdf files from eps images.

I'm using eps images for several chapters on my thesis and I always have troubles whem I need to update them. It looks like when I do "make" the process don't really care about if has been changed eps file to generate a new one.

I tried to clean using "make clean" and erase the pdf file to generate a new one after "make" and I got this error:

./Chapter2/chapter2.tex:162: Package pdftex.def Error: File `Diagrams/led_psd-eps-converted-to.pdf' not found.

Which carry me to think that the make file is not updating correctly the eps-to-pdf files.

Any suggestions about this?

Is it possible to hide nomenclature group name?

Hi, I use nomenclature to create a list of acronyms only. Is it possible to hide the nomenclature group name? I tried to use 'x - Other Symbols' but displaying Other Symbols as the only group does not look good.

Change spacing between equation and text.

I would like to change the spacing between the equation and text.

I've read in several sources that I need to set this parameters after \begin{document}

\setlength\abovedisplayskip{0pt}
\setlength\belowdisplayskip{10pt}
\setlength\abovedisplayshortskip{10pt}
\setlength\belowdisplayshortskip{10pt}

But no results.

Suggestions?

Best regards!

Considering using latexmk

latexmkrc is available in the repository and can be configured using a simple file such as :

$pdf_mode = "1";
$pdflatex = "pdflatex";
$makeindex = "splitindex";
$makeindex = "makeindex;splitindex;";

and makefile would be simplier too :)

Biblatex Error: undefined control sequnce printbibliography

I tried to use biblatex instead of bibtex for printing my bibliography.

So, I changed the following things:

  1. Change the option in document class,added custombib
 \documentclass[a4paper,12pt,times,numbered,print,index,custombib]{Classes/PhDThesisPSnPDF}
  1. in the preamble.tex I changed
 \ifuseCustomBib
 \RequirePackage[backend=biber, style=numeric-comp, citestyle=numeric, sorting=nty,    natbib=true]{biblatex}
 %\bibliography{References/references} %Location of references.bib only for biblatex
 \addbibresrouce{References/references}
 \fi
  1. In the thesis.tex in the Bibliography section I commented out everything kept only
    \printbibliography[heading=bibintoc, title={References}]

I got the following errors

   Undefined control sequence.
  l.170  \printbibliography

one important warning

     Class PhDThesisPSnPDF Warning: Bibliography selection conflict: A bibliography 
     style aleady specified. Please check the document class options in case you hav
    e defined two bibliography styles. on input line 178.

I could not figure out the reason. It would be great if you help me out.

Title page not aligned properly

The title page is not aligned properly. The main text is not centered with respect to the date and college name at the bottom. Also, issue with the alignment with regards to online and print versions.

Adding annotations in LaTeX - PDF output

Create textbox annotations in PDF output with author initials.

\usepackage{todonotes}
\newcounter{mycomment}
\newcommand{\mycomment}[2][]{%
% initials of the author (optional) + note in the margin
\refstepcounter{mycomment}%
{%
%\setstretch{0.7}% spacing
\todo[color={red!100!green!33},size=\small,inline]{%
\textrm{Comment [\uppercase{#1}\themycomment]:}~#2}%
}}

Issue with encoding

Hi I have an encoding issue I am trying to write "Salpêtrière" and other accents I cannot get it to work. My file is UTF8 and everything else seems ok. Googling has not helped and compline my tex in other compliers seems to work.

I've tried adding

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

but get a clash.

Compiling the thesis with XeLaTeX

How difficult would it be to implement XeLaTeX support in the template? This would enable easy use of arbitrary languages, OpenType fonts and a host of other features.

Currently, trying to use the XeLaTeX+MakeIndex+BibTeX option in TeXworks gives the following error: "LaTeX Error: \pdfshellescape undefined.". Unfortunately, my knowledge of the compiler toolchain isn't sufficient to discern whether fixing this is feasible without major changes.

Conflicting command \degree

The command \degree is defined in siunitx package. This conflicts with the degree title \degree defined in the class file. The issue is not observed when using it inside \SI or \si, for eg., \SI{5}{\degree} or 5\si{\degree}. However, when using it like 10\degree, LaTeX prints out only 10, because \degree defined in the class file prints nothing, if the required argument is empty.

How to modify correctly TOC?

I was trying to modify only the vertical space between chapter items inside the TOC, however when I add the tocloft package to the thesis, all the style in TOC get lost. At least, list of figure and list of tables come together and default margins between items dissapear.

I was wondering how can I achieve that without change the default style of the TOC. I've see that the phd-thesis-template is using tocbibind but not sure about if this package is used to TOC itself.

Additionality, I would like to add a point after every chapter title in TOC. I discover a way to do it but it applies to all the entries and I really like to have just only for chapter titles in TOC.

The results should look something like this:

  1. Introduction
    1.2 Justification
  2. Overview of optical wireless communications
    2.1 Advantages and disvantages

Thanks in advance,

Nomenclature page numbering issue

If you increase the number of entries in the nomenclature until it needs two pages, the page numbering becomes wrong. Instead of the page number of the first nomenclature page it shows the number of the second one.

The nomenclature starts on page 'ix' but in the TOC it shows 'x'. Although, if you click on 'x' in the TOC it jumps to 'ix'.

continue page numbering, from roman to arabic

I would like the arabic page numbers to continue the counting from the roman numerals. This way the printed page numbers should match the PDF page numbering. I've figured out that the 'romanpages' environment isn't actually used, but can't work out where the counter is being reset.
Thanks for your help. If you could point me in the right direction, I could try to fix it myself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.