As anyone who has written a thesis will tell you: Like it or not, at some point in the writing process, you will spend far too much time tweaking a minor formatting issue. Thankfully, typesetting tools like LaTeX can minimize this headache by providing consistent, structured formatting.
LaTeX and similar tools follow a “what you see is what you mean” model, unlike Microsoft Word, which is “what you see is what you get”. When you’re starting a new section in a LaTeX document, you don’t click bold and increase the font size. Instead, you type \section
, and the engine automatically assigns a section number and format, updates the table of contents, and even adds within-document links. This all sounds complicated, but if you’ve written HTML, you know the idea. (Word power-users will reply that Word has similar tricks up its sleeve. This is true, but LaTeX explicitly separates text from layout, preventing a lot of the “gremlins” that creep into Word documents.)
Of course, this paradigm creates a significant disconnect between the text you type and the beautiful PDF document that results. This is where a good template comes in. It defines everything from how the title page is laid out to what the page header looks like in the bibliography. For a LaTeX user (and anyone writing a document as long as a thesis should be), a good template is everything. I was lucky enough to find a template that Sam Evans adapted for social sciences use based on the original maths template by Keith Gillow. I wound up making my own modifications, and re-packaged the template for posterity.
Download the Oxford thesis template here.
If you prefer, you can also view on GitHub.
Some of the features of this template are:
- The template includes chapter title pages with optional mini-ToC, epigraph, etc.
- The template includes a carefully refined table of contents.
- The template includes the ability to add a list of abbreviations, glossary, etc.
- The thesis template can optionally highlight corrections for your examiners.
- Optionally format your title page more appropriately for a master’s degree submission.
Fantastic chapter pages. The template retains Sam Evans’s use of the quotchap and minitoc packages to (optionally) include an epigraph and brief table of contents at the beginning of each chapter. I found this a great way to inject a bit of personality into the thesis (via the epigraph) and ensure that my reader wasn’t getting lost (table of contents). My modifications cleaned up some of the spacing, ensuring single-spaced tables and slightly more compact chapter headings.
Table of Contents refinements. Careful attention was paid to spacing and page headings in the table of contents as well as other heading sections. This can get tricky in documents using lots of packages. This template also inserts an “Appendices” page (and ToC entry) between chapters and appendices.
Table of abbreviations. Many science and engineering theses use lots of abbreviations. Humanities and social sciences theses often need glossaries. While there are some dedicated LaTeX classes that meet these needs in complex cases, I decided to create a simple list environment to handle the routine cases.
Highlighted corrections. Most Oxford theses go through a round of corrections, as time-honored a tradition as the viva itself. Minor corrections generally just involve sending a PDF of your revised thesis to your internal examiner. (Major corrections often require a more exacting process.) This class allows you to designate text (or figures, etc) as a correction. You can then toggle between generating a document in which these corrections are highlighted in blue (ideal for sending to your examiner for a quick read-through) and just printing them without any adornment (for generating your final copy).
Page layout, draft, and spacing options. In a few keystrokes, you can switch between a double-spaced, single-sided, binding-margin document (ideal for submission), a 1.5-spaced, double-sided document (for your parents’ copy), or a version with equal left and right margins (for submitting as a PDF). An optional draft notice (with date) can be included in the footer — just remember to turn it off before submitting!
Master’s thesis title page. Some masters’ degrees require title pages with a candidate number and word count rather than a name and college, to ensure anonymity for the examinees. They also require a statement of authenticity / originality on the title page. This template has a quick option to switch to this master’s submission format. And, just as importantly, it can be turned off when you want to print a version for yourself.
Thanks very much to you and Sam Evans for developing this! I’m hoping to use it (or a slightly modified version) for my MSc thesis this year.
Fantastic! I wonder if it would be worth putting this on GitHub or similar, so that as people make/suggest modifications, others can make use of it… Out of curiosity, what did you decide to modify?
Did this ever go on github or no?
After much delay, it has been uploaded to GitHub at mcmanigle/OxThesis.
Thanks very much for this. it’s amazing. I am trying to change the titles of the chapters though to align left rather than right..how do I do that? I have been trying all day!
Hi Anne, So unfortunately left-aligning chapter titles isn’t an option that the
quotchap
package (which my class uses to format chapter titles) contains by default. Which doesn’t mean what you’re asking for is impossible, just that it’s a little clumsy.Probably the easiest way is to insert the following block of code in
Oxford_Thesis.tex
just above the line that says%%%%% THE ACTUAL DOCUMENT STARTS HERE
(ie on line 97).This should redefine the chapter-heading command to move both the grey number and the chapter title to the left side of the page. Hope it helps!
Hi John,
Thanks very much for this. With a bit of a clumsier tweak from me the script did exactly what I wanted as I also needed the “Chapter” word before the number.
Pingback: Structure your thesis – thesismathblog
It is the most beautiful template which I have referred. But I would like to use “Chapter 1” instead of only number. HOW can I do, please? I am the beginner in Latex
Hi Le, Probably the easiest way is to insert the following block of code in
Oxford_Thesis.tex
just above the line that says%%%%% THE ACTUAL DOCUMENT STARTS HERE
(ie on line 97).Hi John, great code! I’m having difficulty changing the position of the page numbers. I would like for the number to always be at the bottom centre of the page…
Thanks in advance!
Hi Sandra, So sorry for the delay in responding! Add the following lines to
Oxford_Thesis.tex
just beforeTHE ACTUAL DOCUMENT STARTS HERE
(ie line 97):Hi John, thanks a lot! Well, the only problem for me is that my computer doesn’t seem to be able to find the figures/beltcrest.pdf file, so it’s always an empty square where the logo is supposed to be inserted..
Interesting… Is the
figures/beltcrest.pdf
file in the directory with the rest of your thesis? If you just download the thesis file, unzip it, and compile it, does the logo appear? I’m afraid this is one of those problems that’s probably specific to how the files are laid out on your computer, so you might be better off bribing a technically-minded friend to figure it out. I can’t debug it well without being at your computer…Hi John, thank you for sharing this brilliant template, I’ll be using it for my MSc dissertation. I have removed the quote and want the Section header i.e ‘Chapter 1’ to start where the quote started instead of mid page, can you assist ?
Hi William, Apologies for the late reply! There are no doubt more “correct” answers to this question in terms of modifying the chapter headings entirely, but the simplest answer to your question is to insert the following line:
into
Oxford_Thesis.tex
just above the line that readsTHE ACTUAL DOCUMENT STARTS HERE
(ie on line 97 in the template version). You can adjust the “-80pt” to your heart’s content. For your reference, setting it to (+) 40pt will match how the template already is. Setting it to 0 will leave a generous top margin that you might find looks appropriate even without a quote. But do play with it!Hello John, thanks for the template.
How do I add my bibtex database i.e the reference list to my document?
I’m afraid there are so many different ways to configure BibTeX and other reference managers for LaTeX that I’m not able to provide help on any in particular. It also tends to involve pretty individual help depending on your setup. This template should work with whatever your preferred LaTeX referencing setup is, so I suggest getting in-person help from someone at your uni who has done it before.
Hi John,
I was wondering how I could decrease the upper margin of the title page so that there is more space for additional subtitles below. Thank you for the amazing template!
Apologies for the late reply! Assuming you are writing a DPhil thesis, add a line to
ociamthesis.cls
after line 217 (\begin{center}
) that adds a negative vertical space. Try:\vspace*{-3cm}
That section of the file would then look like:If you are writing a master’s thesis, you should instead change line 201 (
\vspace*{-3ex}
) to have a larger space. Try-3cm
.Thank you; and how do I then add a subtitle in a smaller font?
There are “better” ways to do this in order to actually modify the template to expect a subtitle, but for quick results you can modify the line where the title goes (line 76 in Oxford_Thesis.tex) to instead be two lines:
Hi, thanks so much for publishing this!
I can’t figure some things out, though:
1. I was wondering is there a way for the examples not to start from 1 with the beginning of every chapter? This seems to be happening because of the chapters being in their separate .tex files.
2. There seems to be something weird happening with some of the formatting when I have a figure, a table or a big example. The text gets spread out. The LaTeX community online suggests adding \raggedbottom to the preamble but it does not seem to work. Any suggestions?
Thanks!!
1. I didn’t use Examples myself; can you show me what your command is to start an example? That will help me answer this question.
2. Yes, raggedbottom will fix this, at the expense of not having the bottoms of your pages line up neatly. Instead of adding it to the preamble, change line 193 of Oxford_Thesis.tex (just before chapters are included) from \flushbottom to \raggedbottom
Dear John, thanks so much for your answer.
It’s a linguistics thesis so I’m using \ex. and \exg.
Hi, thanks for the template. I am using the original maths template.
Can you please help me to figure out to add a Glossary and a List of Publications in the preamble before ending the Roman pages?
Thanks,
Rahman
Hi Rahman, I’m afraid that providing individual help for someone working with a different template is something the hospital keeps me too busy to do. I would suggest that looking at the relevant code in my template (specifically the
text/abbreviations.tex
file and lines 354 to 368 ofociamthesis.cls
), which will hopefully set you on the right track!Hello there,
Just wanted to know what the font style was called for your thesis?
Thanks!
The template uses the Computer Modern font, which is the default in LaTeX and is widely used in technical publishing (partially for this reason).
GRACIAS TIBI VALDE
Hi John,
Thank you for the great template. I guess the font size that is used is 12. How can I change it? I tried to pass the parameter to \documentclass as follows: \documentclass[a4paper,twoside,12pt]{ociamthesis} but it does not seem to be working.
Salah
Hi Salah, You’ll need to change that on line 13 of ociamthesis.cls
Hope it helps!
I am a bit confused as google returned to me another file with the same name first. https://www.maths.ox.ac.uk/members/it/faqs/latex/thesis-class
Why is the same material distributed at different places, with different versions and a clear copyright and license note? As there is no copyright and license, people in most jurisdictions are not allowed to make any changes to ociamthesis.cls.
Hi Johannes,
You are of course absolutely right; without a clear license it is very difficult to confidently make and distribute changes. I have had personal communication with Keith Gillow (author of the original maths template) who said “From my perspective you are very welcome to use and adjust this as the others have done before you, and also feel free to put it on github etc.” and Sam Evans (who modified it for social sciences use) who said “I’m also totally fine for this code to be as open as possible and live freely on the net.”
With that permission, Diego Vitali has adapted the same to suit the Roehampton University standard, which he published under a GNU license. Danny Price has developed a LyX version which is on Github with a statement stating “use responsibly” without specifying a license.
Given Keith Gillow and Sam Evans’ statements, I feel comfortable releasing this under an MIT license, and will update the files accordingly. Will also take this opportunity to upload to Github so that people can suggest updates and pull requests more easily.
John
Running BibTex, i consistently get an error:
“I found no \bibstyle command—while reading Oxford_Thesis.aux”
Any advice?
There are a couple of different processing programs that “do” bibliographies in LaTeX. Some of the more popular are with bibtex and biber. Some of the differences are described here: https://tex.stackexchange.com/questions/25701/bibtex-vs-biber-and-biblatex-vs-natbib
This template is currently designed to use biber, since it is growing in popularity and is easier to make custom changes to without learning a whole new language. Most LaTeX packages should have an option to run biber, but more technical advice can be found here: https://tex.stackexchange.com/questions/26516/how-to-use-biber
Of course, if you prefer natbib (the older / more traditional way of doing things) feel free to modify the template as necessary, particularly around lines 47-57.
Hello, I have an issue, I am not able to find how to display the bibliography in this oxford template, how can I display it?
Besides, I have citation but it is just like “nih_ct_2017” how can I add the [].
There are a couple of different processing programs that “do” bibliographies in LaTeX. Some of the more popular are with bibtex and biber. Some of the differences are described here: https://tex.stackexchange.com/questions/25701/bibtex-vs-biber-and-biblatex-vs-natbib
This template is currently designed to use biber, since it is growing in popularity and is easier to make custom changes to without learning a whole new language. Most LaTeX packages should have an option to run biber, but more technical advice can be found here: https://tex.stackexchange.com/questions/26516/how-to-use-biber
Of course, if you prefer natbib (the older / more traditional way of doing things) feel free to modify the template as necessary, particularly around lines 47-57.
Hi John! Thank you very much for opening up this template for others but I seem to have an error from it when trying to compile the bibtex as it is from the download, that says
– no \citation commands
– no \bibdata commands
– no \bibstyle commands
These usually come up if end \end{document} was too early, but I can see that is not the case. I just wondered if this problem had come up for anyone else and whether you might know what has gone wrong / what I am doing wrong? I am running it from texmaker.
There are a couple of different processing programs that “do” bibliographies in LaTeX. Some of the more popular are with bibtex and biber. Some of the differences are described here: https://tex.stackexchange.com/questions/25701/bibtex-vs-biber-and-biblatex-vs-natbib
This template is currently designed to use biber, since it is growing in popularity and is easier to make custom changes to without learning a whole new language. Most LaTeX packages should have an option to run biber, but more technical advice can be found here: https://tex.stackexchange.com/questions/26516/how-to-use-biber
Of course, if you prefer natbib (the older / more traditional way of doing things) feel free to modify the template as necessary, particularly around lines 47-57.
Further to my last message, I discovered that it’s a problem with the preset compile commands I was using in TexMaker. Thanks!
Hi John, I’m having the same issue. What did you change?
Hi, this is a great template! My only question is how do I adjust the font to Times New Roman and the line spacing of all text to 1.5x line spacing? Also, is there a way to include the Supervisor Name on the Title Page?
Thank you in advance,
Henry
Hi,
I have stumbled across this having already written my masters dissertation. I would like to make my title page the same as the one in yours, but I have not managed to figure out how to do so. Any help would be appreciated! :)
Hi John,
Just wanted to say thank you for sharing this template with the wider community. I’ve used a modified version of yours and I’ll be submitting my thesis next week.
I hope this message isn’t considered as spam.
Really! Thanks a lot! Much appreciated. Keep up the good work.
Cheers,
Deyan
Hi John, thank you so much for this brilliant template which is making my PhD life much easier! I’m stuck with trying to compile individual chapters (e.g. for submitting a chapter to a supervisor etc). I’m trying \includeonly{chaptername} after the documentclass but for some reason that is giving me only the bibliography! I’ve also tried commenting out the \include commands for individual chapters but that would typeset, e.g., chapter 5 as chapter 1. Can you assist?
Hi John, I managed to solve the problem in my last post – please ignore! I was wondering, however, how one could add in a `part’ structure above the chapter structure (i.e. Part 1 / chapter 1, 2, 3, Part 2 / chapter 4 5 6 or similar) – assistance would be greatly appreciated!
Hi,
Thank you so much for this template.
May I ask how to change the option of double space and 1.5 space please?
Thanks
Hi John,
Many thanks for this! I’m having trouble with the Bibtex as John Ylang had written previously. However, I’ve checked my preset compilers and all seems to be correct, yet I’m still getting error messages with bibtex:
– no \citation commands
– no \bibdata commands
– no \bibstyle commands
Help? :(
Amy
There are a couple of different processing programs that “do” bibliographies in LaTeX. Some of the more popular are with bibtex and biber. Some of the differences are described here: https://tex.stackexchange.com/questions/25701/bibtex-vs-biber-and-biblatex-vs-natbib
This template is currently designed to use biber, since it is growing in popularity and is easier to make custom changes to without learning a whole new language. Most LaTeX packages should have an option to run biber, but more technical advice can be found here: https://tex.stackexchange.com/questions/26516/how-to-use-biber
Of course, if you prefer natbib (the older / more traditional way of doing things) feel free to modify the template as necessary, particularly around lines 47-57.
Hi there,
Many, many thanks for this template, it is so helpful. I am submitting my thesis in the form of journal articles for the different chapters. I was wondering if you could advise how I can create a small reference list per chapter (including only those references cited in that chapter)? Is it possible to also change the sub-section numbering within different chapters?
Thank you so very much,
Isabel
Hi John, is the template still working?
I installed TexWorks today and most of the template works apart from the bibliography/references – this is when trying to compile leaving everything unchanged from when it was unzipped.
The log shows:
I found no \citation commands—while reading file Oxford_Thesis.aux
I found no \bibdata command—while reading file Oxford_Thesis.aux
I found no \bibstyle command—while reading file Oxford_Thesis.aux
…and all the citations are undefined. Not sure what’s going on here.
There are a couple of different processing programs that “do” bibliographies in LaTeX. Some of the more popular are with bibtex and biber. Some of the differences are described here: https://tex.stackexchange.com/questions/25701/bibtex-vs-biber-and-biblatex-vs-natbib
This template is currently designed to use biber, since it is growing in popularity and is easier to make custom changes to without learning a whole new language. Most LaTeX packages should have an option to run biber, but more technical advice can be found here: https://tex.stackexchange.com/questions/26516/how-to-use-biber
Of course, if you prefer natbib (the older / more traditional way of doing things) feel free to modify the template as necessary, particularly around lines 47-57.
Update: I fixed the referencing problem using the following. You need to select Biber instead of Bibtex. From stackexchange:
“I’m a TeXstudio user and whenever I receive this error message, it’s because I’ve changed the default bibliography tool from biber to bibtex.
To change it back, I have to do Options > Configure TeXstudio > Build > Default Bibliography Tool and the process works again.
Even if this answer never helps anyone else ever, it’ll at least be good for me to have this here as a aide memoire next times this happens!”
Hi John,
Thanks so much for making this available, I really like it! I’m new to latex and am trying to work out the best way of adding a list of equations. This seems like the kind of thing people would do all the time but I can’t seem to get anything to work. Any suggestions?
Cheers,
Suzanne
Thank you for the template, great job! However, as many complained about it, the refences page is missing. Is there anyone who can display the references page? I have experience with Latex, I worked on it a lot but still no results.
There are a couple of different processing programs that “do” bibliographies in LaTeX. Some of the more popular are with bibtex and biber. Some of the differences are described here: https://tex.stackexchange.com/questions/25701/bibtex-vs-biber-and-biblatex-vs-natbib
This template is currently designed to use biber, since it is growing in popularity and is easier to make custom changes to without learning a whole new language. Most LaTeX packages should have an option to run biber, but more technical advice can be found here: https://tex.stackexchange.com/questions/26516/how-to-use-biber
Of course, if you prefer natbib (the older / more traditional way of doing things) feel free to modify the template as necessary, particularly around lines 47-57.
Hi and thank you very much for this template.
I wonder how I could fit in a subheading below the title on the front page, in a slightly smaller fonts size?
Thank you
The template is great, but I can’t seem to change the font size to 14, where do I control this?
Thanks
On line 19 of ociamthesis.cls, change “12pt” to “14pt”.
Thanks for this amazing template!
However what can I do to remove the empty page that occurs before each new chapter?
Masters are page count constrained so everyone counts!
I believe the “empty page that occurs before each new chapter” is added automatically to make sure each new chapter starts on the right-hand page in double-sided page layouts. So it will only be added if the new chapter would otherwise start on a left-facing page. In Oxford_Thesis.tex, look at lines 25-30. Specifically, you should probably add a percent sign at the beginning of line 26 and remove the one at the beginning of line 28 to change to one-sided binding, like so:
If you do want two-sided binding, but with chapters allowed to start on either side, change line 26 to:
Hi John,
Again, thank you for your continued help.
I am mostly using \parencite and \textcite for my citations. I am wondering when using multiple citations within the same parentheses, can I tell latex to order them? I would want them to be ordered, starting with the oldest publication.
Thank you,
JOD
Hi, sorting of citations, and especially sorting them differently in the bibliography vs the in-text citations, is a big rabbit hole that you can dive down here if your resolve is firm.
Probably / hopefully the easiest solution (if you are using biblatex/biber for your bibliography, which is currently the default in the template) is:
\usepackage[style=
, that does not have a % starting itsorting=none
orsorting=nyt
or some other option controls how the bibliography is sorted. (‘nyt’ means first by author Name, then by Year, then by Title. ‘none’ means in order of appearance in your text.)sortcites=false
. This will continue sorting the bibliography as described above, but will order the in-text multiple citation groups in whatever order you type them in the latex file.The advantage of this solution is that it’s simple enough to type out here. The disadvantage is that it doesn’t really sort your in-text citations by year, it just doesn’t sort them, so whatever order you type is what you get.
Hi John,
first of all thanks a lot for this amazing template. I’m using it currently for my master thesis in physics.
I have tinkered around and modified some things to my needs, but I am struggeling with one modification: I want a “List of Symbols” in my thesis. You already provided a list of abbrevations with two rows. For my List of Symbols I want an additional row, i.e. Symbol, Description, Unit. It should look like this:
h . . . . . Hight of tower [m]
Is there a way to modify the existing mclistof environment to achieve that, i.e. just add a row to the right?
Best regards,
Tom
I make no promises, but try adding to ociamthesis.cls (I suggest around line 375, after the mclistof environment):
Then, you should be able to make the kind of list you’re asking for with a block like this in one of your text files:
Let me know how it goes!
Thanks a lot for your quick response. The proposed code works just as I wanted it to work. Thanks a lot for your help.
Hi John,
I am currently trying to cut words in my thesis; is it possible to change the references to
example: (Weber, 2010:5) ?
That would save me two words for each citation.
Thank you and best regards.
Also, currently my compiler (Overleaf) recognises this
urldate = {2019-05-01}
as citing it as (visited on 05/01/2019), while I want it to be
(visited on 01/05/2019)
Can I change that?
Hi JD,
Yes, that is possible, but I don’t have any special knowledge on it. Assuming you are using biblatex (the default bibliography formatter used in the template), there are examples of many pre-defined styles here.
Basic ideas about customizing styles in more detail (which can get pretty complicated) are here, with one example here. If you decide to go this route, this cheatsheet might help.
Good luck!
John
Hello,
Thanks so much for the amazing template. I’m currently struggling with recurrent Overfull \hbox errors in my section and subsection headers. If I insert a hypen or line break then this looks odd in my mini-toc. Is there a away to get round this? Perhaps by reducing the size of the section and subsection font?
Many thanks!
Cat
Hi Cat,
So I can get an idea of what kind of errors you’re seeing, would you give an example or two of section or subsection headers you are using? (I’m trying to figure out if they are just long phrases, or very long single words, or what?)
John
Hi John, thank you so much for the template! Just prepping for hard copy bod submission and wondering how to remove page numbers from the blank pages between chapters? Thanks in advance!
The blank pages between chapters are there to make sure that chapters open on right-hand facing pages when printing a two-sided thesis. If you want to remove them entirely, you can change “openright” on line 19 of ociamthesis.cls to “openany” (best if you are doing two-sided printing but want to be able to start a chapter on either side of the book), or switch to one of the one-sided binding options around line 25-30 of Oxford_Thesis.tex.
If you want the blank pages to be there, but want them to be truly blank, insert the following code to Oxford_Thesis.tex. I suggest adding it right after
\begin{document}
(around line 106):For more details, look here and here.
Brilliant, that’s worked, thank you John! Really appreciate your help :-)
Hi John – thank you for the template! I have an issue with some very long captions which run off the bottom boundary of the page. I would like to split them onto the next page (ideally on the page facing the figure, but overleaf would be fine too). I have tried putting the caption in a separate float but this doesn’t always appear immediately after the figure and it disrupts the figure numbering. Any suggestions would be great – thanks in advance!
Hi Max,
There are a few different types of solution to this problem; I assume you’ve done a bit of googling already. The two I would suggest trying are:
Option 1, adapted from here, is to forego the float environment entirely and just do everything inline. The
caption
package (whichOxford_Thesis
already includes) provides the\captionof
command to facilitate this. The disadvantage is that without a float environment, you’ll have to put the figure exactly where you want it in text, so if you change the text around the figure, or change page layout or line spacing, you may have to move the picture manually to put it in the correct place on the page. Code to insert a figure would look like this:Option 2, adapted from here, is to split the image/caption across two floats like you’ve been trying to do. I think that by using the
[h]
,[t]
, and/or[b]
options to the float environment judiciously you would be able to get good luck at where things appear. Try this to place your image:If you want to be super fancy, you can throw this into
Oxford_Thesis.tex
, ideally just before\begin{document}
:Hi John – this is great. Thank you very much! Option 2 worked for me with some careful placement parameters. I really appreciate it :)
Is there any experience using the glossaries or acronym package together with this template?
Adding to oriamthesis.cls:
\usepackage[acronym,]{glossaries}
and to Oxford_Thesis.tex:
\makeglossaries
\loadglsentries{text/frontmatter/glossary}
, then implementing glossary items in the chapters seems to break the PDFLateX compilation process. It gives a ” File ended while scanning use of \field.” error.
I don’t personally have any experience using these packages, but usually that error means that either you are missing a closing brace
}
somewhere, or that you have a percent sign%
in your text, possibly hiding in a bibliography file. Remember that in LaTeX, a percent sign begins a comment, so if you have a line like:\newglossaryentry{spec}{name={specificity},description={a measure of false positive rate, expressed in %}}
The
%
sign will prevent LaTeX from seeing the closing braces (as they will be a comment). You need to “escape” the percent sign by using\%
instead.Hi again, John.
I am trying to remove hyphenation from my section and sub-section titles. Nearly all the titles longer than one line are hyphenated, often very awkwardly.
I tried adding \usepackage[raggedright]{titlesec} to the preamble. This works but it breaks the chapter pages: instead of the nice grey number, it outputs eg., “Chapter 1”. I guess this is something to do with quotchap.
Is there a way to make section and subsection left flush (or at least change the tolerance) without affecting the chapter pages?
Thanks very much!
I’m a bit embarrassed to admit this, but after trying for a few minutes, I can’t figure out a chapter title that will made my version hyphenate. Would you tell me an example chapter title and page size so I can start testing? I think there should be a reasonably straightforward solution.
Thanks very much indeed. I haven’t changed any of the page size or font settings from your template.
For example,
\sec{Homeobox genes and miRNAs: key regulators in MLLr leukemia} %hyphenates ‘regula- tors’
\subsec{MLL-rearranged leukemia is associated with poor treatment outcomes} %hyphenates ‘treat- ment’
Thanks; sorry I misread your original post and thought it was chapter titles, rather than section titles, that were being hyphenated.
You’re right both in that
\usepackage[raggedright]{titlesec}
fixes the problem, and breaks the quotchap package. The easiest solution is to add this not in the preamble, but toociamthesis.cls
at line 403 (immediately before\usepackage[grey,utopia]{quotchap}
). That way quotchap will override titlesec for chapters only.It seems to work for me in brief testing; let me know if you encounter any issues!
Fantastic – thanks, John. This seems to work perfectly!
For some reason, my minitoc is double-spaced, and I’m not quite sure why this is happening. I tried forcing it with single-spacing which seems okay. But in either case the minitoc spans across two pages when really it seems in your version the chapter title page is quite compact with even text beginning directly after. Any help would be so greatly appreciated.
Interesting. The version of this template that I modified had the minitoc double spaced, and one of my changes was to single space it. My biggest suggestion is that maybe your first paragraph just after the minitoc is a length that the system thinks would look bad without that extra spacing.
LaTeX does this weird thing where it judges the “badness” of different layouts — leaving one line of a paragraph dangling on a page, vs increasing line spacing in other places, vs overflowing a line beyond the margin, etc. If your (single spaced) minitoc would end in a place where the next paragraph would fall in a very odd place (ie with only one line on the page, or one line dangling off the next), LaTeX might have decided that it “knows best” and to fix the “issue” instead increased spacing on your minitoc.
One way to test this is to add \raggedbottom before that chapter, and see if that changes anything. Another way would be to compile the thesis with the example text that came with the template and see if that is single or double spaced.
If all of this doesn’t seem like the problem, feel free to email me your thesis and I’ll take a look.
Hi John, thanks very much for your input. I am very sorry, but it doesn’t seem to work. I toyed around with the following in the cls file
\renewcommand{\chapterheadstartvskip}{\vspace*{-30pt}}
\renewcommand{\chapterheadendvskip}{\vspace{30pt}}
which seems to pull the chapter title pages up, so that the text starts immediately after the minitoc (which I ended up having to force into single with \setstretch) but what I didn’t realize was that changing this messed with the toc, list of figures, and list of tables. Basically all of these start way at the top of the page (including one of the chapters).
I think the easiest thing might be to make a copy of your whole thesis directory, remove all but one chapter and all figures, compile it to make sure it still has the problem, and then and email the directory to me (john@oxfordechoes.com) as a zip file. I’m happy to take a look. Unfortunately trying to debug something like this that depends on changes to multiple files is too hard to do on this kind of forum.
Hi John,
Hopefully a quick question for you here – I’m trying to change the section level numbering in the minitocs to reflect what it is in the main toc. The maintoc section level is set in the main text fairly straightforwardly but i’m finding it hard to figure out what to amend to make the minitoc depth match it? Main TOC successfully shows numbers to subsubsection but minitoc stops at subsection. Thanks very much in advance!
Hi Abby,
Try
\mtcsetdepth{minitoc}{3}
in Oxford_Thesis.tex just before\begin{document}
(around line 104). Let me know if it doesn’t work. For excruciating detail on minitocs, see here.This worked a treat! Thanks so much John :)
Hi John,
Is there any way the font can be changed with the current TeX?
Thank you so much for this, been a massive help!
Hi Lee,
This is surprisingly a more complicated question than it should be. For a first try, add to Oxford_Thesis.tex just before
\begin{document}
(around line 104) the command\renewcommand{\rmdefault}{phv}
where “phv” is replaced by the code for the font you want. A list of codes is here, but a short list is: ptm for Times, ppl for Palatino, pbk for Bookman, phv for Helvetica, pcr for Courier.If that doesn’t work for whatever font you’d like, my next step would be to add, just before that line, a
\usepackage{helvet}
to make sure the font is loaded. The list of font packages (in the same order as above) is mathptmx, palatino, bookman, helvet, courier.Hope this helps!
Hi John,
Thank you for the excellent template. I could not figure out how to change the colour of the chapter number headings to black instead of grey, and how to make chapter title to bold. Hope to hear from you soon.
Thanks in advance.
Replace line 404 (the one that mentions quotchap) of ociamthesis.cls with these two lines:
You will get a few errors on compiling about “Undefined color ‘chaptergrey'” but that is expected and it should still compile fine.
Thanks John. This seems to work. But instead of using nogrey I redefined chaptergrey with a new color with a new command.
Hi John,
To create a glossary the template uses \item to produce a list. Most of my terms are very long. It is possible to make the item automatically set a new line in their own space for glossary in the mclistof environment?
My little glossary area was designed to be a relatively quick-and-easy template for my minimal glossary. For a more “full-featured” glossary, look into the official glossary package in LaTeX. I’ll also take a look at how to modify my template to do what you’re asking, but it might take me a couple of days. What exactly do you mean by “make the item automatically set a new line in their own space”? Have the term on one line and the definition below?
I looked at most of the glossary style, there are mainly two ways to do for the long terms. First, the terms are combined with the definition lines but separated with a spacing (https://www.dickimaw-books.com/gallery/index.php?label=long-descriptions). The other one is like you said, term on one line and definition below. I am happy with either one. But I think I prefer the first one with an adjustment which is when a term longer than a certain length the definition start a new line below.