because LaTeX matters

Writing a thesis in latex.

Writing a thesis is a time-intensive endeavor. Fortunately, using LaTeX, you can focus on the content rather than the formatting of your thesis. The following article summarizes the most important aspects of writing a thesis in LaTeX, providing you with a document skeleton (at the end) and lots of additional tips and tricks.

Document class

The first choice in most cases will be the report document class:

See here for a complete list of options. Personally, I use draft a lot. It replaces figures with a box of the size of the figure. It saves you time generating the document. Furthermore, it will highlight justification and hyphenation errors ( Overfull \hbox ).

Check with your college or university. They may have an official or unofficial template/class-file to be used for writing a thesis.

Again, follow the instructions of your institution if there are any. Otherwise, LaTeX provides a few basic command for the creation of a title page.

maketitle

Use \today as \date argument to automatically generate the current date. Leave it empty in case you don’t want the date to be printed. As shown in the example, the author command can be extended to print several lines.

For a more sophisticated title page, the titlespages package has a nice collection of pre-formatted front pages. For different affiliations use the authblk package, see here for some examples.

Contents (toc/lof/lot)

Nothing special here.

The tocloft package offers great flexibility in formatting contents. See here for a selection of possibilities.

Often, the page numbers are changed to roman for this introductory part of the document and only later, for the actual content, arabic page numbering is used. This can be done by placing the following commands before and after the contents commands respectively.

LaTeX provides the abstract environment which will print “Abstract” centered as a title.

abstract

The actual content

The most important and extensive part is the content. I strongly suggest to split up every chapter into an individual file and load them in the main tex-file.

In thesis.tex:

In chapter1.tex:

This way, you can typeset single chapters or parts of the whole thesis only, by commenting out what you want to exclude. Remember, the document can only be generated from the main file (thesis.tex), since the individual chapters are missing a proper LaTeX document structure.

See here for a discussion on whether to use \input or \include .

Bibliography

The most convenient way is to use a bib-tex file that contains all your references. You can download bibtex items for articles, books, etc. from Google scholar or often directly from the journal websites.

Two packages are commonly used to personalize bibliographies, the newer biblatex and the natbib package, which has been around for many years. These packages offer great flexibility in customizing the look of a bibliography, depending on the preference in the field or the author.

Other commonly used packages

  • graphicx : Indispensable when working with figures/graphs.
  • subfig : Controlling arrangement of several figures (e.g. 2×2 matrix)
  • minitoc : Adds mini table of contents to every chapter
  • nomencl : Generate and format a nomenclature
  • listings : Source code printer for LaTeX
  • babel : Multilingual package for standard document classes
  • fancyhdr : Controlling header and footer
  • hyperref : Hypertext links for LaTeX
  • And many more

Minimal example code

I’m aware that this short post on writing a thesis only covers the very basics of a vast topic. However, it will help you getting started and focussing on the content of your thesis rather than the formatting of the document.

Share this:

16 comments.

' src=

8. June 2012 at 7:09

I would rather recommend a documentclass like memoir or scrreprt (from KOMA-Script), since they are much more flexible than report.

' src=

8. June 2012 at 8:12

I agree, my experience with them is limited though. Thanks for the addendum. Here is the documentation: memoir , scrreprt (KOMA script)

' src=

8. June 2012 at 8:02

Nice post Tom. I’m actually writing a two-part (or three) on Writing the PhD thesis: the tools . Feel free to comment, I hope to update it as I write my thesis, so any suggestions are welcome.

8. June 2012 at 8:05

Thanks for the link. I just saw your post and thought I should really check out git sometimes :-). Best, Tom.

8. June 2012 at 8:10

Yes, git is awesome. It can be a bit overwhelming with all the options and commands, but if you’re just working alone, and probably on several machines, then you can do everything effortlessly with few commands.

11. June 2012 at 2:15

That’s what has kept me so far. But I’ll definitely give it a try. Thanks!

' src=

8. June 2012 at 8:08

What a great overview. Thank you, this will come handy… when I finally get myself to start writing that thesis 🙂

8. June 2012 at 14:12

Thanks and good luck with your thesis! Tom.

' src=

9. June 2012 at 4:08

Hi, I can recommend two important packages: lineno.sty to insert linenumbers (really helpful in the debugging phase) and todonotes (allows you to insert todo-notes for things you still have to do.)

11. June 2012 at 0:48

Thanks Uwe! I wrote an article on both, lineno and todonotes . Here is the documentation: lineno and todonotes for more details.

' src=

12. June 2012 at 15:51

Thanks for the post, i’m currently writing my master thesis 🙂

A small note: it seems that subfig is deprecated for the subcaption package: https://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Subfloats

12. June 2012 at 16:05

Hey, thanks for the tip. Too bad they don’t say anything in the documentation apart from the fact that the packages are not compatible.

' src=

1. August 2012 at 21:11

good thesis template can be also found here (free): http://enjobs.org/index.php/downloads2

including living headers, empty pages, two-sided with front and main matter as well as a complete structure

2. August 2012 at 11:03

Thanks for the link to the thesis template!

' src=

15. November 2012 at 22:21

Hi Tom, I’m writing a report on spanish in LaTex, using emacs, auctex, aspell (~170pags. ~70 files included by now) and this blog is my savior every time because I’m quite new with all these.

The question: Is there anyway (other than \- in every occurrence) to define the correct hyphenation for accented words (non english characters like é)? I have three o four accented words, about the subject of my report, that occur near 100 times each, across several files, and the \hyphenation{} command can’t handle these.

20. November 2012 at 3:47

I was wondering what packages you load in your preamble. For a better hyphenation (and easier typing), you should use these packages:

See here for more details.

If this doesn’t help, please provide a minimal working example to illustrate the problem.

Thanks, Tom.

Leave a Reply Cancel reply

home | writing | TIL | now | about

Writing a thesis in latex.

This article is a guide to constructing a decent parent file for a thesis or dissertation compiled in Latex. The specific details implemented here, and included in the example files, are those set out by the guidelines for submission to the University of Nottingham, but can be easily amended to suit any sensible requirements.

Considerable attention has been paid to presenting the final document as a PDF file, which keeps the file size manageable (compared to postscript) and allows groovy add-ons such as hyperlinks and back-referencing. However, several hacks are required to attain good functionality from your PDF file and these can give the latex code a mysterious (and messy) appearance in places. While I highly recommend the inclusion of the PDF-related commands, they are not strictly necessary and can be ignored especially if you are new to Latex.

Note for Windows users

The code outlined below was designed and implemented on the unix system at Nottingham. For those of you unfortunate enough to be running a Windows box, a number of problems may arise when using the below code:

First off, not all the packages used will be present and will need to be installed. Probably the easiest way to do this is to google the package name with the extension .sty and save this file in the C:\VTEX\l2e\\ directory of your machine. Note that for the natbib package, you will also need to download the relevant .bst file, which in this case is unsrtnat.bst .

Also, many of the packages that are installed locally may need updating. For instance, the computers I have tested on both have old versions of the geometry and caption packages, which cause Latex to return errors. To resolve these problems, either download the latest versions, or remove the includefoot option from the geometry package and set the bottom margin to 1.4in.

Also, the code for compiling to PDF does not work so well in Windows, and so it is recommended that Windows users use the template without PDF code.

Requirements

The guidelines for theses to be submitted to the University of Nottingham specify that:

  • the document should be presented on single-sided a4 paper and typeset in a double-spaced size 10-12 font;
  • the left-hand margin should be at least 1.5 inches (4cm) to allow for binding;
  • the other three margins should be at least 1 inch (2.5cm).

Other settings such as the way chapter headings are formatted, and whether headers are included, are not specified and are up to the user. In this case, we’ll install headers and tinker with the chapter formatting.

Template files

Here are the template files which this page explains:

  • thesis_without_pdfcode.tex
  • thesis_with_pdfcode.tex

The appearance of both these files on the printed page will be identical; however after compilation into PDF (see the section below) and opening in Adobe Acrobat (or a similar PDF reader), the advantages that come with the PDF format will be apparent.

  • thesis_without_pdfcode.pdf
  • thesis_with_pdfcode.pdf

The rest of this page is devoted to explaining the code in these files.

Document structure

The document begins in a standard and entirely self-explanatory manner.

Preamble: essential packages

Next, the essential packages are loaded:

where the geometry package has been loaded to allow the margins to be set in a neat and consistent way. The non-obvious option includefoot ensures that the footer (which only contains the pagenumber) is included in the page and is thus 1 inch above the bottom of the page. Note that this option is only available in recent versions of the package: if you’re using an old version and can’t/won’t upgrade, then remove the offending option and extend the bottom margin to 1.4in. headheight=13.6pt is included due to to ensure compatibility with the fancyhdr package (and is not required if you don’t use the fancyhdr package). Also quite essential is the natbib package:

where the various options ensure that references appear in the document as:

…boiled dog can do maths claims experimenter [10,12,15-18].

Alternative referencing styles are easily implemented, see the natbib help file for more details. In fact, to use the natbib package, you’ll have to read at least a few lines of the help file so you understand the difference between \citet and \citep , and I insist you do that now.

Preamble: custom captions (optional)

We now set the figure captions to be elegant and dignified:

Note that early versions of this package don’t support the margin= and tableposition= options; in this case, these trimmings will have to be ignored.

Preamble: custom fonts (optional)

You can also choose an alternative font for both the text and the mathematical characters. This can be achieved by:

Aside from mathpazo , there are several other fonts available, such as chancery , palatino and times (all loaded in the same way).

Preamble: fancy headers (optional)

Feeling a little devil-may-care? If so, you’ll probably want to install some elegant headers along each page. This is easily achieved through the fancyhdr package:

The final complicated-looking three lines simply ensure that the headings for appendices are formatted correctly. (Without these lines, what should read “Appendix A” is set as “Chapter A”.)

Preamble: customised chapter/section headings (optional)

We now make use of several customisation options that are bundled with the sectsty package.

These alter the appearance of the first page of each chapter to have a centred title, with the word “chapter” set in small capitals immediately above. Feel free to employ your own individual and highly refined tastes here in choosing your own chapter/section settings.

Preamble: pdf options (optional)

If you want to publish your thesis on the internet, or even just to email it to someone, then you’ll want to store it in the ubiquitous PDF format. Doing so offers some neat facilities, such as hyperlinking, which are implemented by the hyperref package:

There are various other options you can pass to your favourite PDF reader via the \hypersetup command, such as pdftitle , pdfauthor and pdfsubject ; however, they’re not really essential. Note that the hyperlink colours have all been set to black for consistent printing. Should you want to distribute your thesis over the web, then it would be advisable to set these colours to red or something similarly vibrant and exciting.

Things get a little messy now as a hack is required to ensure the hyperlinks actually jump to the right place.

No need to worry about this code, let’s just move straight on.

Preamble: page layout

We now set various parameters to alter the general page layout:

The first two of these commands alter the paragraph formatting so that new paragraphs are not indented but separated from the previous one by a small amount of whitespace; the third sets the line spacing. The sharp-eyed among you will notice the discrepancy between our chosen line-spacing and that dictated by the university guidelines. However, no matter how poor your eyesight is, you’ll quickly appreciate that true double line-spacing (set with \renewcommand(\baselinestretch}{2} ) looks rubbish. In addition, Nottingham University are perfectly happy to accept theses set with the above line-spacing, which is more pleasing to the eye.

Some final settings:

Set which chapters to include when Latex is next run. The advantage of this method is that all your cross-references are remembered and Latex does not spit out loads of warnings.

Main matter

We now begin the document in earnest and define a suitable title:

followed by a dedication:

We now construct an abstract:

some acknowledgements:

and a contents page:

Now, we alter the pagenumbering to arabic and point to the relevant chapter files:

All your chapter files should be included here; to save time when editing, use the \includeonly command to specify which chapters to compile.

Finally, we make sure there is a link to the references section in the table of contents and reference the correct bibiography file (which in this case is called bibliography.bib ).

And there we have it: a complete thesis parent file that not only looks good on the printed page, but is fully functional and hyperlinked in PDF format.

Compiling to PDF

Whether you’ve included all the red PDF commands or not, you can convert your TEX file to PDF by running (in unix):

The additional argument to ps2pdf is required as the default paper size is US Letter. Note that you will probably need to bibtex your thesis file before running latex for the final time.

For Windows, first open a command window by going Start->Run and entering cmd . Provided MiKTeX and GhostScript are correctly installed then the necessary commands are:

The syntax for ps2pdf is slightly different in Windows compared to Unix - and note that the output pdf filename MUST be specified, else the ps file is overwritten and corrupted.

Something wrong? Suggest an improvement or add a comment (see article history ) Tagged with: latex Filed in: guides

Previous: Tutorial: the complex Ginzburg-Landau equation Next: Following log files with tail -f

Copyright © 2005-2024 David Winterbottom Content licensed under CC BY-NC-SA 4.0 .

Banner

Overleaf for LaTeX Theses & Dissertations: Home

  • Using Templates on Overleaf
  • Reference Managers and Overleaf
  • Adding Tables, Images, and Graphs

Tips and tools for writing your LaTeX thesis or dissertation in Overleaf, including templates, managing references , and getting started guides.

Managing References

BibTeX is a file format used for lists of references for LaTeX documents. Many citation management tools support the ability to export and import lists of references in .bib format. Some reference management tools can generate BibTeX files of your library or folders for use in your LaTeX documents.

LaTeX on Wikibooks has a Bibliography Management page.

Find list of BibTeX styles available on Overleaf here

View a video tutorial on how to include a bibliography using BibTeX  here

Collaborate with Overleaf

Collaboration tools

  • One version of your project accessible to collaborators via a shared link or email invitation
  • Easily select the level of access for collaborators (view, edit, or owner access)
  • Real-time commenting speeds up the review process
  • Tracked changes and full history view help to see contributions from collaborators
  • Labels help to organize and compare different versions
  • Chat in real time with collaborators right within the project

How to get started writing your thesis in LaTeX

Writing a thesis or dissertation in LaTeX can be challenging, but the end result is well worth it – nothing looks as good as a LaTeX-produced PDF, and for large documents it's a lot easier than fighting with formatting and cross-referencing in MS Word. Review this video from Overleaf to help you get started writing your thesis in LaTeX, using a standard thesis template from the Overleaf Gallery .

You can upload your own thesis template to the Overleaf Gallery if your university provides a set of LaTeX template files or you may find your university's thesis template already in the Overleaf Gallery.

This video assumes you've used LaTeX before and are familiar with the standard commands (see other tutorial videos  if not), and focuses on how to work with a large project split over multiple files.

Add Institutional Library contact info here.

Contact Overleaf   or email [email protected]

5-part Guide on How to Write a Thesis in LaTeX

5-part LaTeX Thesis Writing Guide

Part 1: Basic Structure corresponding  video

Part 2: Page Layout corresponding  video

Part 3: Figures, Subfigures and Tables   corresponding video

Part 4: Bibliographies with Biblatex corresponding video

Part 5: Customizing Your Title Page and Abstract corresponding video

Link your ORCiD ID

Link your ORCiD account to your Overleaf account.

See Overleaf news   on  our blog.

  • Next: Using Templates on Overleaf >>
  • Last Updated: Aug 20, 2024 5:29 PM
  • URL: https://overleaf.libguides.com/Thesis

TeX Directory Structure

The TeX Directory Structure (TDS) specifies a convention for organizing the files of TeX-related packages in a directory tree. The root of this tree, which is called the TEXMF root directory , usually contains one ore more of the following sub-directories:

  • fonts/opentype
  • fonts/source
  • fonts/type1
  • tex/generic
  • tex/lualatex
  • tex/xelatex

For example, the LaTeX input files of package foo are expected to be found in tex/latex/foo/ .

More information:

  • What is the TDS?
  • TDS specification

Writing a thesis in LaTeX - part 1

October 30, 2022

2022   ·   LaTeX     ·   research  

In this article I will share my lessons learned about writing a thesis in LaTeX. During my PhD, I have been collecting a lot of information about how to write a thesis from the internet and from my colleagues at the TUM. Probably everyone, who decides to write a thesis in LaTeX, has to go through this tedious process but maybe I can spare you some effort by sharing my favorite LaTeX features in a series of shorter blog posts.

First of all, I have to state that I am not a LaTeX expert, at all, and a very exhaustive guide for writing a thesis in LaTeX can be found here . Nevertheless, I can imagine that some of the routines and packages I ended up using are useful for others, too. In a series of shorter blog posts I will share them. This first part we will establish a minimal working example (i.e., a very basic LaTeX thesis document) that the following blog posts will be based upon. Hence, the content will be

  • An exemplary LaTeX project and folder structure
  • The main.tex file
  • Integrating references with bibtex and Zotero
  • Some useful, additional packages and the title page of a thesis

But before we start, why should you chose LaTeX in the first place?

According to this answer on stackexchange using LaTeX is recommended if you want your documents to be of high typographical quality (i.e., beautiful), have a lot of mathematical expressions in your document or just want to separate the content from the format of your document (i.e. if you do not want to waste time thinking about how the document looks but rather what its content is).

Personally, I found that writing large documents in LaTeX is more stable than writing it with a what-you-see-is-what-you-get (WYSIWYG) text editor such as Word or LibreOffice . For me large texts are more difficult to control in WYSIWYG editors (e.g., I change something on page 4 and that change has negative impacts on the format of the following pages) and I also prefer the typographical quality of LaTeX.

However, since LaTeX is not a proprietary software, there are different distributions and ways to install and use it. Below, an exemplary way of working with LaTeX on a Windows computer is explained.

LaTeX installation and text editor

I wrote my thesis using a MikTeX distribution together with the TeXstudio text editor. The following examples are based on this setup. In case you have not installed the software, yet, install MikTeX first and install TeXstudio afterwards.

There are other LaTeX distributions for other operation systems, such as TeX Live and MacTeX . Alternatively, you can write LaTeX documents online using overleaf , for example. You can find further information about the different possibilities to use LaTeX on the website of the LaTeX project

Project Structure

The structure of the project folder thesis looks like this and can be downloaded as a zipped version here :

The folder has two files (the main LaTeX file main.tex and refs.bib , which holds the references) and two folders ( source and figures ) which contain four LaTeX files and one picture, respectively. The content of the main LaTeX file files and the bib file will be discussed below.

Document Structure

In the main.tex file, the preamble of the thesis is defined and the single chapters, that are stored in the source folder, are integrated. The code looks like this:

The main.tex file integrates the single chapters with the \include{<path/to/file.tex>} command (e.g., \include{source/introduction} ). It is best practice to split the document into several smaller LaTeX files and combine them in a main file. This avoids a single large and diffcult to handle document and can save you precious time when you want to compile only smaller parts of the thesis. Compiling the entire project results in the following document:

Document Class

Let’s walk through the document step by step. First, the doument uses the scrbook documentclass provided by the Koma-script project. This is a pretty powerful template that has many of the handy things recommended for a thesis already implemented and is flexibly adjustable. In fact, the number of options the documentclass has can be overwhelming and this blog post will only focus on the very basic ones.

In the options many different aspects of the document can be defined, for example the paper size ( paper=a4 ), the font size ( fontsize=11pt ) and whether period should follow after a chapter or section name ( numbers=noendperiod disables this option). See the scrbook documentation for details.

Bibtex and Zotero

The bibtex is a way to integrate references into the thesis document and automatically build a sorted bibliography at the end of the document. In order to use bibtex we integrate the package with:

This is also a powerful tool with many available options but we will only set a few: the style is set to autoryear , the backend, that actually generates the bibliography, is set to be biber (make sure to set biber as your backend in TeXstudio) and the et al. cut-off is set to three (i.e., a maximum of two names will be displayed for refereces in text). The content of refs.bib contains only two references and looks as follows:

This file can be created manually or automatically. Personally, I recommend using the free reference management software Zotero for storing and organizing references. It strongly supports managing, reading and annotating references. When it comes to writing a thesis, the references can then automatically be exported to a bib file with the Better BibTeX plugin for Zotero. It is even possible to automatically keep the bib file in sync with your Zotero collection, which even further simplifies writing a thesis.

In the document, we can cite the references from the bib file by their keys and the commands \parencite{key} and \textcite{key} commands. This is exemplarily shown in the introduction chapter with the \parencite{bishopPatternRecognitionMachine2006} and \textcite{rumelhartLearningRepresentationsBackpropagating1986} commands:

Additional packages

Some additional packages are already integrated in the minimal working example:

is used for quickly adding blindtext, which can be deleted for a thesis, of course. In order to make links in the pdf work,

is used. The hidelinks option makes the links only invisible, they are still there, however (feel free to compile with \usepackage{hyperref} to see the difference). For the integration of pictures in the document

is used. By setting the path of the figures, LaTeX knows where to search for them. Finally,

is used for nicer tables in our document.

The last building block of the minimal working example is the titlepage. The scrbook already provides functionality that can be used. By setting the different variables below and adding the command \maketitle , the titlepage is generated automatically:

This is only basic functionalyity and you might want to design your own title page with a logo of your university. In that case you can use

At this point the first part of my lessons learned about writing a thesis in LaTeX comes to an end. To wrap up, the main takeways are

  • LaTeX is a great alternative to a WYSIWYG editor for writing a thesis.
  • By using a pre-defined document class such as scrbook one can quickly start writing a thesis in LaTeX.
  • LaTeX integrates nicely with the free referece management software Zotero and enables a smooth and easy worklfow for adding references.

In the next part we will look at further LaTeX packages that make writing a thesis in LaTeX even more convenient.

LaTeX Resources for Graduate Students: Formatting of theses and dissertations

  • BibTeX reference format
  • BibTeX command
  • LaTeX bibliography file
  • LaTeX editors and compilers
  • Sample LaTeX file with bibliography
  • Sample LaTeX file without bibliography
  • Formatting of theses and dissertations

Formatting and structure

The Cornell Graduate School has become increasingly flexible about the formatting of theses and dissertations.  There now are only seven core requirements . For the structure of theses and dissertations here is a list of required and recommended sections .

Latex template

Among the available thesis and dissertation templates provided by the Graduate School is also a LaTeX template (ZIP archive). This template has been uploaded to Overleaf and placed in the Cornell template directory . This template contains a small fix to avoid an error message about \ifpdf .

  • << Previous: Sample LaTeX file without bibliography
  • Last Updated: Oct 25, 2022 5:12 PM
  • URL: https://guides.library.cornell.edu/latex

Template for a Masters or Doctoral Thesis

This LaTeX template is used by many universities as the basis for thesis and dissertation submissions, and is a great way to get started if you haven't been provided with a specific version from your department.

This version of the template is provided by Vel at LaTeXTemplates.com , and is already loaded in Overleaf so you can start writing immediately.

Checkout this short video to see how to easily create and edit new chapters as your thesis develops.

Please read the unofficial quick guide to the template; it contains some tips and suggestions on how to modify certain things.

(Updated 27/08/17)

Template for a Masters or Doctoral Thesis

Get in touch

Have you checked our knowledge base ?

Message sent! Our team will review it and reply by email.

Email: 

University of Rhode Island

  • Future Students
  • Parents and Families

College of Engineering

  • Research and Facilities
  • Departments

Guide to Writing Your Thesis in LaTeX

Step 4: configure the options specific to your thesis.

At this point, it is assumed that you have a working LaTeX distribution, an editor, have downloaded and installed the necessary template files, and confirmed that you can build this sample thesis . If not, do that first. Now we will explain how to set things like the title, the author name, and whether it is a masters thesis or a doctoral dissertation.

Start by opening the file thesis.tex in your editor.

Setting the Class Options

The first line of the file will be:

This tells LaTeX to use the urithesis document class with all default options. There are many options that that can be given, but for now we will only concern ourselves with one.

If this is a Ph.D. dissertation, change the first line to be:

Setting the Title and Author

To set the title, you use the command:

Make sure to use proper capitalization.

Since you will be the author, set your name using the command:

The tilde between the middle initial and the last name tells LaTeX that the period does not indicate the end of a sentence, and to use a normal interword space.

The Bibliography Source File

The references will come from one or more .bib files that you create. This is the only type of file without a .tex extension that you will need to edit. The line:

tells BibTeX to look in the file references.bib for references cited in the thesis. The argument to the \reffile command can be a comma separated list of files (without the .bib extension), and it will look in all of those files.

The Preliminary Material

The pages that come before the first chapter are called the preliminary material. See the page Guidelines for the Format of Theses and Dissertations , on the Graduate School’s web site, for more information about the preliminary material. The preliminary material includes, in this order:

Title Page automatic
Approval Page automatic
Abstract required
Acknowledgments optional
Dedication optional
Preface optional
Table of Contents automatic
List of Figures automatic
List of Tables automatic

The automatic sections will be generated automatically, and you need not worry about them. The List of Tables and List of Figures sections will only be generated if the thesis contains any tables or figures, respectively. The argument to the command to include the four manual sections, is the name of the .tex file that contains the content for that section, without the .tex extension. For example the abstract is included with the command:

which means it will us the contents of the file abstract.tex as the abstract. The file abstract.tex should contain only the text of the abstract, as the title will be generated automatically.

The Chapters

Chapters are included with the command:

which will include the file chapterN.tex in the thesis. There should be one \newchapter{} command for each chapter of the thesis.

The chapter source files should each begin with the command

followed by the contents of the chapter.

The Appendices

Appendices are optional, but if present, they are included with the command:

which will include the file appendixN.tex in the thesis. There should be a \newappendix{} command for each appendix of the thesis.

The main difference between appendices and chapters, are that chapters are numbered starting with 1, while appendices start with the letter A. The contents of an appendix is identical to that of a chapter. Each appendix source file should begin with the command:

command, just like with chapters.

Additional Considerations

By default, the department named on the title page is Electrical Engineering, but that can be changed by using the command:

before any of the chapters are included.

The year that the thesis is generated is displayed on the title page and approval page, but the Graduate School requires that year must be the year of your official graduation. To set that date to a specific year, other than the current year, use the command:

before the \begin{document} command.

utl home

Research Guides

Submit and publish your thesis.

  • The Graduate Thesis: What is it?
  • Thesis Defences
  • Deadlines and Fees
  • Formatting in MS Word

Formatting in LaTeX

  • Making Thesis Accessible
  • Thesis Embargo
  • Review and Release
  • Your Rights as an Author
  • Re-using Third Party Materials
  • Creative Commons Licenses for Theses
  • Turning Thesis into an Article
  • Turning Thesis into a Book
  • Other Venues of Publication

For formatting instructions and requirements see the Formatting section of the School of Graduate Studies website. The thesis style template for LaTeX ( ut-thesis ) implements these requirements. You are not required to use the template, but using it will make most of the formatting requirements easier to meet.

►► Thesis template for LaTeX .

Below are some general formatting tips for drafting your thesis in LaTeX.  In addition, there are other supports available:

  • Regular LaTeX workshops are offered via the library, watch the library workshop calendar at https://libcal.library.utoronto.ca/
  • With questions about LaTeX formatting, contact Map and Data Library (MDL) using this form
  • There are also great resources for learning LaTeX available via Overleaf

Many common problems have been solved on the TeX - LaTeX Stack Exchange Q & A Forum

LaTeX Template

To use the LaTeX and ut-thesis , you need two things: a LaTeX distribution (compiles your code), and an editor (where you write your code). Two main approaches are:

  • Overleaf : is a web-based platform that combines a distribution (TeX Live) and an editor. It is beginner-friendly (minimal set-up) and some people prefer a cloud-based platform. However, manually uploading graphics and managing a bibliographic database can be tedious, especially for large projects like a thesis.
  • A LaTeX distribution can be installed as described here . ut-thesis can then be installed either: a) initially, with the distribution; b) automatically when you try to compile a document using \usepackage{ut-thesis} ; or manually via graphical or terminal-based package manager for the distribution.
  • The LaTeX distribution allows you to compile code, but provides no tools for writing (e.g. syntax highlighting, hotkeys, command completion, etc.). There are many editor options that provide these features. TeXstudio is one popular option.

Occasionally, the version of ut-thesis on GitHub  may be more up-to-date than the popular distributions (especially yearly TeX Live), including small bug fixes. To use the GitHub version, you can download the file ut-thesis.cls (and maybe the documentation ut-thesis .pdf ) and place it in your working directory. This will take priority over any other versions of ut-thesis on your system while in this directory.

LaTeX Formatting Tips

Here are a few tips & tricks for formatting your thesis in LateX.

Document Structure

Using the ut-thesis document class, a minimal example thesis might look like:

\documentclass{ut-thesis} \author {Your Name} \title {Thesis Title} \degree {Doctor of Philosophy} \department {LaTeX} \gradyear {2020} \begin {document}   \frontmatter   \maketitle   \begin {abstract}     % abstract goes here   \end {abstract}   \tableofcontents   \mainmatter   % main chapters go here   % references go here   \appendix   % appendices go here \end {document}

►►  A larger example is available on GitHub here .

You may want to consider splitting your code into multiple files. The contents of each file can then be added using \input{filename} .

The usual commands for document hierarchy are available like \chapter , \section , \subsection , \subsubsection , and \paragraph . To control which appear in the \tableofcontents , you can use \setcounter{tocdepth}{i} , where i = 2 includes up to \subsection , etc. For unnumbered sections, use \section* , etc. No component should be empty, such as \section{...} immediately followed by \subsection{...} .

Note: In the examples below, we denote the preamble vs body like:

preamble code --- body code

Tables & Figures

In LaTeX, tables and figures are environments called “floats”, and they usually don’t appear exactly where you have them in the code. This is to avoid awkward whitespace. Float environments are used like \begin{env} ... \end{env} , where the entire content ... will move with the float. If you really need a float to appear exactly “here”, you can use:

\usepackage{float} --- \begin{ figure}[H] ... \end {figure}

Most other environments (like equation) do not float.

A LaTeX table as a numbered float is distinct from tabular data. So, a typical table might look like:

\usepackage{booktabs} --- \begin {table}   \centering   \caption {The table caption}   \begin {tabular}{crll}     i &   Name & A &  B \\     1 &  First & 1 &  2 \\     2 & Second & 3 &  5 \\     3 &  Third & 8 & 13   \end {tabular} \end {table}

The & separates cells and \\ makes a new row. The {crll} specifies four columns: 1 centred, 1 right-aligned, and 2 left-aligned.

Fancy Tables

Some helpful packages for creating more advanced tabular data:

  • booktabs : provides the commands \toprule , \midrile , and \bottomrule , which add horizontal lines of slightly different weights.
  • multicol : provides the command \multicolumn{2}{r}{...} to “merge” 2 cells horizontally with the content ... , centred.
  • multirow : provides the command \multirow{2}{*}{...} , to “merge” 2 cells vertically with the content ... , having width computed automatically (*).

A LaTeX figure is similarly distinct from graphical content. To include graphics, it’s best to use the command \includegraphics from the graphicx package. Then, a typical figure might look like:

\usepackage{graphicx} --- \begin {figure}   \centering   \includegraphics[width=.6 \textwidth ]{figurename} \end {figure}

Here we use .6\textwidth to make the graphic 60% the width of the main text.

By default, graphicx will look for figurename in the same folder as main.tex ; if you need to add other folders, you can use \graphicspath{{folder1/}{folder2/}...} .

The preferred package for subfigures is subcaption ; you can use it like:

\usepackage{subcaption} --- \begin {figure} % or table, then subtable below   \begin {subfigure}{0.5 \textwidth }     \includegraphics[width= \textwidth ]{figureA}     \caption {First subcaption}   \end {subfigure}   \begin {subfigure}{0.5 \textwidth }     \includegraphics[width= \textwidth ]{figureB}     \caption {Second subcaption}   \end {subfigure}   \caption {Overall figure caption} \end {figure}

This makes two subfigures each 50% of the text width, with respective subcaptions, plus an overall figure caption.

Math can be added inline with body text like $E = m c^2$ , or as a standalone equation like:

\begin {equation}   E = m c^2 \end {equation}

A complete guide to math is beyond our scope here; again, Overleaf provides a great set of resources to get started.

Cross References

We recommend using the hyperref package to make clickable links within your thesis, such as the table of contents, and references to equations, tables, figures, and other sections.

A cross-reference label can be added to a section or float environment using \label{key} , and referenced elsewhere using \ref{key} . The key will not appear in the final document (unless there is an error), so we recommend a naming convention like fig:diagram , tab:summary , or intro:back for \section{Background} within \chapter{Intro} , for example. We also recommend using a non-breaking space ~ like Figure~\ref{fig:diagram} , so that a linebreak will not separate “Figure” and the number.

You may need to compile multiple times to resolve cross-references (and citations). However, this occurs by default as needed in most editors.

The LaTeX package tikz provides excellent tools for drawing diagrams and even plotting basic math functions. Here is one small example:

\usepackage{tikz} --- \begin {tikzpicture}   \node [red,circle]  (a) at (0,0) {A};   \node [blue,square] (b) at (1,0) {B};   \draw [dotted,->]   (a) -- node[above]{ $ \alpha $ } (b); \end {tikzpicture}

Don’t forget semicolons after every command, or else you will get stuck while compiling.

There are several options for managing references in LaTeX. We recommend the most modern package: biblatex , with the biber backend.  A helpful overview is given here .

Assuming you have a file called references.bib that looks like:

@article{Lastname2020,   title = {The article title},   author = {Lastname, First and Last2, First2 and Last3 and First3},   journal = {Journal Name},   year = {2020},   vol = {99},   no = {1} } ...

then you can cite the reference Lastname2020 using biblatex like:

\usepackage[backend=biber]{biblatex} \addbibresource {references.bib} --- \cite {Lastname2020} ... \printbibliography

Depending on what editor you’re using to compile, this may work straight away. If not, you may need to update your compiling command to:

pdflatex main && biber main && pdflatex main && pdflatex main

Assuming your document is called main.tex . This is because biber is a separate tool from pdflatex . So in the command above, we first identify the cited sources using pdflatex , then collect the reference information using biber , then finish compiling the document using pdflatex , and then we compile once more in case anything got missed.

There are many options when loading biblatex to configure the reference formatting; it’s best to search the CTAN documentation for what you want to do.

Windows users may find that biber.exe or bibtex.exe get silently blocked by some antivirus software. Usually, an exception can be added within the antivirus software to allow these programs to run.

  • << Previous: Formatting in MS Word
  • Next: Making Thesis Accessible >>
  • Last Updated: Sep 15, 2023 3:23 PM
  • URL: https://guides.library.utoronto.ca/thesis

Library links

  • Library Home
  • Renew items and pay fines
  • Library hours
  • Engineering
  • UT Mississauga Library
  • UT Scarborough Library
  • Information Commons
  • All libraries

University of Toronto Libraries 130 St. George St.,Toronto, ON, M5S 1A5 [email protected] 416-978-8450 Map About web accessibility . Tell us about a web accessibility problem . About online privacy and data collection .

© University of Toronto . All rights reserved. Terms and conditions.

Connect with us

  • Starting out with T e X...
  • CTAN Background
  • T e X user groups
  • Upload basics
  • Upload addendum
  • T e X Directory Structure
  • T e X Archive
  • Contributors
  • Announcements
  • Extended search
  • File search

Directory macros/latex/contrib/edmaths

Edmaths report & thesis class.

A report and thesis stylesheet for easier compliance with the university’s typesetting rules . See also the documentation and a compiled example . To use, place the files and store them either with your .tex file(s) or in any directory that's findable by L a T e X (e.g. $TEXINPUTS ).

For more information on the wider project, including the beamer theme, see GitHub . The stylesheet edmaths.sty is provided under the L a T e X Project Public License v1.3c (LPPL) while the example example-report.tex is provided under the BSD Zero Clause License (0BSD).

Download the contents of this package in one zip archive (152.3k).

edmaths – A report and thesis class file for the University of Edinburgh (UoE)

A report and thesis class file for The School of Mathematics, Scotland at the University of Edinburgh (UoE) . When working on a report or thesis, an easy way to implement the University's typesetting rules in L a T e X is provided by edmaths.sty . It sets the page margins as required and defines commands to create the correct cover page and standard declaration. A compiled version of the included example can be found here .

It also loads the amsmath , amsthm , amscd , and amssymb packages, which are required by almost all mathematical publications. Through setspace line spacing settings are available that only affect the body text and not footnotes and captions. Additional in-built options can be found in more detail in the project's documentation.

Package
Home page
Bug tracker
Announcements
Repository
Developers
Version0.98
Licenses TeX Project Public License 1.3c
Copyright2024 Josh Fogg
Maintainer
Contained in X Live as edmaths
Topics


Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Folders in a latex project/thesis

How do you make folders in a latex project ? I created a folder inside my main folder but my structure window doesn't show it. I am using OSX and Texmaker latest version?

This is the folder that I created (figure 1), and I am trying to add UniversityLogo.png on my main text file but I get this error (figure 2).

The code that I am using is

enter image description here

  • external-files

Torbjørn T.'s user avatar

  • Hi, welcome. Do you mean Texmaker? I think it only shows files that are included in your main file with \include or \input . –  Torbjørn T. Commented Mar 15, 2018 at 12:52
  • Yes I mean textmaker. I created a folder inside my main folder called Images. I tried to call this folder from the preamble graphicspath{{Images/}} then i use \insertgraphics{logo.png} and there is a message that saying that the file is not being found. :/ –  Martin Liza Commented Mar 15, 2018 at 12:57
  • Texmaker != Textmaker. What you describe should work I think, and indeed it does work here (Linux). Can you edit your question with more detail about your file and folder structure, and perhaps also include a minimal working example to make it clear what you did in the code. –  Torbjørn T. Commented Mar 15, 2018 at 13:03
  • Hard to say, that setup works fine here. The only thing that catches my eye is that there seems to be a space at the end of the name of the Thesis folder, i.e. Thesis<space> . Spaces in paths have a tendency to not work well, though I cannot say if it would be a problem in this case. –  Torbjørn T. Commented Mar 15, 2018 at 21:55
  • Fixed the spaced and still didnt work :/ its good no worries! I will figured it out! thanks though –  Martin Liza Commented Mar 16, 2018 at 0:55

I do not have enough reputation to comment so I write it into an answer. Maybe it works if you use \graphicspath{{./Images/}} as in this post .

EuklidAlexandria's user avatar

  • Welcome to TeX.SX ! –  Bobyandbob Commented Mar 15, 2018 at 22:25
  • Hi EuklidAlexandria I tried this too and it didnt work :( –  Martin Liza Commented Mar 16, 2018 at 12:29
  • Hm, does it work with \includegraphics{Images/UniversityLogo} ? –  EuklidAlexandria Commented Mar 16, 2018 at 13:22
  • @MartinLiza See above comment. (EuklidAlexandria: Hi, welcome. Note that other users are in general not notified of comments, so use an at-sign followed by the username to ping them, as I did with Martin here. Only other commenters can be pinged though, and maximum one user per comment. You as the owner of the post are always notified of comments.) –  Torbjørn T. Commented Mar 16, 2018 at 20:04
  • @EuklidAlexandria, I tried that too and it didnt work :( –  Martin Liza Commented Mar 17, 2018 at 14:50

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged graphics external-files ..

  • The Overflow Blog
  • From PHP to JavaScript to Kubernetes: how one backend engineer evolved over time
  • Featured on Meta
  • We've made changes to our Terms of Service & Privacy Policy - July 2024
  • Bringing clarity to status tag usage on meta sites

Hot Network Questions

  • Which Cards Use -5V and -12V in IBM PC Compatible Systems?
  • The work-energy theorem in a resistor
  • Why are the titles of certain types of works italicized?
  • If physics can be reduced to mathematics (and thus to logic), does this mean that (physical) causation is ultimately reducible to implication?
  • Why did Jesus choose to pray after they tried making him king?
  • Multi Wire Branch Circuit for Kitchen Small Appliances Circuit, AFCI and GFCI required
  • Name of engineering civil construction device for flattening tarmac
  • Fast circular buffer
  • Numbering system of equations and specific lines therein
  • Meaning of capacitor "× 2" symbol on data sheet schematic
  • Calculate the sum of numbers in a rectangle
  • 1970s? Novel, a man is stuck/trapped? in a city where the other people are fooled/conned into believing things are better than they are
  • Why if gravity were higher, designing a fully reusable rocket would be impossible?
  • How can I address my colleague communicating with us via chatGPT?
  • How to justify a ban on exclusivist religions?
  • Idiomatic alternative to “going to Canossa”
  • Visualizing histogram of data on unit circle?
  • Print tree of uninstalled dependencies and their filesizes for apt packages
  • Are there any virtues in virtue ethics that cannot be plausibly grounded in more fundamental utilitarian principles?
  • Capitalization and Proper Nouns
  • Can a "sharp turn" on a trace with an SMD resistor also present a risk of reflection?
  • Is the error in translation of Genesis 19:5 deliberate?
  • What is the difference between an `.iso` OS for a network and an `.iso` OS for CD?
  • How to determine if a set is countable or uncountable?

latex thesis directory structure

IMAGES

  1. Academic Proofreading

    latex thesis directory structure

  2. Sample LaTeX Thesis Template

    latex thesis directory structure

  3. How to write a thesis using LaTeX **full tutorial**

    latex thesis directory structure

  4. How to Write a Thesis in LaTeX (Part 1): Basic Structure

    latex thesis directory structure

  5. LaTeX-template/BIT-Thesis使用指南v1.1.pdf at master · BIT-thesis/LaTeX

    latex thesis directory structure

  6. how to write your thesis in latex.pdf

    latex thesis directory structure

COMMENTS

  1. How to Write a Thesis in LaTeX (Part 1): Basic Structure

    The preamble. In this example, the main.tex file is the root document and is the .tex file that will draw the whole document together. The first thing we need to choose is a document class. The article class isn't designed for writing long documents (such as a thesis) so we'll choose the report class, but we could also choose the book class.. We can also change the font size by adding square ...

  2. Making a (simple) directory tree

    Following @cfr's lead: a rewrite of one of Gonzalo Medina's trees but with an option to put files inside the tree as well. Just call the option is file for the file nodes. Also the folder pic now takes one argument which is the folder icon size, making possible to emphasize a specific folder by calling this folder size=<dim>.The key folder tree indent=<dim> sets how much the icon goes inside ...

  3. Folder structure of your work

    A folder for scripts and programs. Don't write directly to the data folder! However, each paper is a very simple document. For something much larger like my thesis I had an elaborate directory structure, with each chapter in its own folder. The master .tex file sat in a special folder called build rather than at the top of the structure. Each ...

  4. include

    For my bachelor thesis I am going to structure the files for my LaTeX document in a more sophisticated way, which means I would like to use different folders for different file types. Is there a directory structure for reports in LaTeX which is recommended to follow? Currently I have the following folders:

  5. Writing a thesis in LaTeX

    The following article summarizes the most important aspects of writing a thesis in LaTeX, providing you with a document skeleton (at the end) and lots of additional tips and tricks. Document class. The first choice in most cases will be the report document class: 1. \documentclass[options]{report} See here for a complete list of options.

  6. Writing a Thesis in LaTeX

    Overview. This article is a guide to constructing a decent parent file for a thesis or dissertation compiled in Latex. The specific details implemented here, and included in the example files, are those set out by the guidelines for submission to the University of Nottingham, but can be easily amended to suit any sensible requirements.

  7. LibGuides: Overleaf for LaTeX Theses & Dissertations: Home

    5-part LaTeX Thesis Writing Guide. Part 1: Basic Structure corresponding video. Part 2: Page Layout corresponding video. Part 3: Figures, Subfigures and Tables corresponding video. Part 4: Bibliographies with Biblatex corresponding video. Part 5: Customizing Your Title Page and Abstract corresponding video

  8. TeX Directory Structure

    The TeX Directory Structure (TDS) specifies a convention for organizing the files of TeX-related packages in a directory tree. The root of this tree, which is called the TEXMF root directory, usually contains one ore more of the following sub-directories: For example, the LaTeX input files of package foo are expected to be found in tex/latex/foo/.

  9. Writing a thesis in LaTeX

    Writing a thesis in LaTeX - part 1. October 30, 2022. 2022 · LaTeX · research In this article I will share my lessons learned about writing a thesis in LaTeX. During my PhD, I have been collecting a lot of information about how to write a thesis from the internet and from my colleagues at the TUM. ... The structure of the project folder ...

  10. PDF Writing a thesis with LATEX

    Managing a complex document, such as a book or a thesis, can be complicated and so it is advisable to divide it into several files. LATEX lets you work with several files, but a main file should control them with \include or \input com-mands. On the one hand, the \input{filename} command can be used to call a file.

  11. PDF LATEX Thesis Class for University of Colorado

    The overall structure of a thesis main *.tex file, using the thesis class, should be like this: \documentclass[ options ]{thesis} prologue commands \begin{document} main text in chapters, then bibliography, then appendix \end{document} Thesis Class is a variation of the basic report class of LaTeX 2ε, so it takes many of the same options. The ...

  12. How to get started writing your thesis in LaTeX

    Here we provide a guide to getting started on writing your thesis in LaTeX, using a standard template which is pre-loaded into Overleaf. We have a large number of thesis templates in our online library, and you can upload your own if your university provides a set of LaTeX template files. We'll assume you've used LaTeX before and so are ...

  13. Formatting of theses and dissertations

    For the structure of theses and dissertations here is a list of required and recommended sections. Latex template Among the available thesis and dissertation templates provided by the Graduate School is also a LaTeX template (ZIP archive).

  14. A Guide to Writing Your Thesis Using Latex

    In WinEdt, open the thesis.tex. This is the only file which you will need to run LaTeX on. To update and display the thesis.pdf file. press the button ``PDF TeXify''. This will run pdflatex on the thesis, and start or reload the .pdf viewer. Whenever you make changes to any of the .tex files, you still only run ``PDF TeXify'' on the file thesis ...

  15. Latex Best Practices

    Assuming you already have package control installed install the LaTeX Tools package. Now, after editing a LaTeX document, simply hit cmd+b to build the file and launch it in Skim. Make sure you ...

  16. PDF A Directory Structure for TEX Files

    1. A completely separate tree which is a TDS structure itself; for example, /usr/local/umbtex at the University of Massachusetts at Boston. This is another example of the multiple texmf hierarchies mentioned in the previous section. 2. A directory named 'local' at any appropriate level, for example, in the hformati, hpackagei,

  17. Template for a Masters or Doctoral Thesis

    Abstract. This LaTeX template is used by many universities as the basis for thesis and dissertation submissions, and is a great way to get started if you haven't been provided with a specific version from your department. This version of the template is provided by Vel at LaTeXTemplates.com, and is already loaded in Overleaf so you can start ...

  18. Writing thesis in overleaf. How to create a sub-folder?

    @Sile_Li When you create the empty folder chapters/chapter02 on Overleaf, it shows up as a "flat" folder directly under the main folder. But if you add a file to this new folder, the file hierarchy would then fall into place correctly. Alternatively, you can also add a blank file in the chapters folder, but give it the name chapter02/chap02.tex.That would also immediately make the file ...

  19. Guide to Writing Your Thesis in LaTeX

    Now we will explain how to set things like the title, the author name, and whether it is a masters thesis or a doctoral dissertation. Start by opening the file thesis.tex in your editor. Setting the Class Options. The first line of the file will be: \documentclass{urithesis} This tells LaTeX to use the urithesis document class with all default ...

  20. Formatting in LaTeX

    To use the LaTeX and ut-thesis, you need two things: a LaTeX distribution (compiles your code), and an editor (where you write your code). Two main approaches are: Overleaf: is a web-based platform that combines a distribution (TeX Live) and an editor. It is beginner-friendly (minimal set-up) and some people prefer a cloud-based platform.

  21. chapters

    For example texmaker, change to main.tex, select options and check: Make current file the master file. You can now compile while editing a specific chapter. - Johannes_B. Jan 6, 2016 at 17:49. 1. Tools like latexmk or (for Windows) latexdaemon allow for a 'continuous' preview of the document you work on: each time a modification is saved ...

  22. Directory macros/latex/contrib/edmaths

    Download the contents of this package in one zip archive (152.3k).. edmaths - A report and thesis class file for the University of Edinburgh (UoE) A report and thesis class file for The School of Mathematics, Scotland at the University of Edinburgh (UoE).When working on a report or thesis, an easy way to implement the University's typesetting rules in L a T e X is provided by edmaths.sty.

  23. Folders in a latex project/thesis

    I think it only shows files that are included in your main file with \include or \input. Yes I mean textmaker. I created a folder inside my main folder called Images. I tried to call this folder from the preamble graphicspath { {Images/}} then i use \insertgraphics {logo.png} and there is a message that saying that the file is not being found. :/.