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

MSU Libraries

  • Need help? Ask a Librarian

Starting a LaTeX Document

Cross references.

  • Managing Citations in LaTeX
  • Creating Accessible LaTeX Documents
  • Additional Help
  • LaTeX Templates

Basic Commands

All LaTeX documents start with a preamble. If you open up a new document in Overleaf, it will auto-populate much of this information for you. The preamble allows you to define the type of document, author, date, language, and load in LaTex packages that you want to use in the document.

\documentclass[12pt, letter paper]{article} \usepackage[utf8]{inputenc}

\title{Practice} \author{Erika Weir} \date{November 2019}

After we have included a preamble, we can go ahead and start the main text of our document. We can add things like a title, abstract, and table of contents.

\begin{abstract}     This is an introduction to using LaTex. It will show how to format a paper, insert equations, figures, and tables. LaTex can also be used to create lab reports, CV's, bibliographies, and other documents. \end{abstract}

\tableofcontents

We can then add sections that will automatically be added to the Table of Contents:

\section{Introduction}

We can also create lists: \begin{itemize}     \item llamas     \item donkeys     \item goats \end{itemize} And numbered lists: \begin{enumerate}     \item oranges     \item bananas     \item apples \end{enumerate}

First, add this package to your preamble to complete this section:

\usepackage{amsmath}

One of the most useful features of LaTex is the ability to easily write mathematical equations. We can do this inline ($E=mc^2$) or in display mode: \begin{equation}     E=\frac{mc^2}{\surd(1-v^2/c^2)} \end{equation}

You can also display equations without numbering. \[E^2=p^2c^2+m^2c^4\]

You can reference the following list to lookup many mathematical symbols and operators:

  • Overleaf's List of Greek letters and math symbols

Add the following packages to your preamble to add images and tables:

\usepackage{graphicx}

\usepackage[table,xcdraw]{xcolor}

To add images, you will need to first upload the images in Overleaf to your document:

Screenshot of the upload button in Overleaf

If you add your images in a folder, you must first add the file path.

\graphicspath{{images/}}

We can then add the image.

\includegraphics{hubble.jpg}

However, depending on the size of the image, it might not fully display on the page. We can edit the image to define the size.

\includegraphics[width=4cm]{hubble.jpg}

When writing academic papers, we may also want to label our figures so that we can refer back to them.

\begin{figure}[h]     \centering     \includegraphics[width=4cm]{aminoacids.jpg}     \caption{an amino acid info-graphic}     \label{fig:amino} \end{figure}

More information on formatting images can be found here:

  • Including images on Overleaf

Formatting and stylistic changes to LaTex tables can be extremely complicated. The following web resource allows you to create a table and then creates the corresponding LaTeX code.

  • LaTex Table Generator

LaTeX allows you to easily cross-reference anything that has been labeled in your document. This can include figures, tables, equations, or sections.

To create a label, use the label command: \label{ marker } . LaTeX users also typically include a short (3 letter) descriptor for the type of object they are labeling. For example, the following label command is for an amino acids figure:

\label{fig:amino}

To refer back to any labeled object, we can use the reference command: \pageref{ marker } . We can also use the page reference ( \pageref{ marker } ) command to print the page number the object originally appears on. For example, the following LaTeX code references our original figure:

See Figure \ref{fig:amino} on page \pageref{fig:amino}.

  • << Previous: Home
  • Next: Managing Citations in LaTeX >>
  • Last Updated: Oct 14, 2022 7:57 PM
  • URL: https://libguides.lib.msu.edu/latex

A Basic LaTeX Preamble

The preamble is the place where one lays a document’s fundaments. It is used to include additional packages, set options, define new macros (commands), add PDF information and more. Even though one can define commands and set certain options within the document, it is preferred to set options globally. Otherwise we start smearing these definitions over the entire document, which makes finding things harder. This makes setting up the preamble a vital part of every document that is often overlooked.

In addition to adding more structure to the document, sometimes unexpected behaviour occurs when things are not done in the correct order. Writing a preamble is not very hard for simple documents, but for larger documents (i.e. package heavy documents), complications can occur.

Getting Started: Absolute Basics

Specifying the compiler.

Most (La)TeX documents have the .tex extension. This makes it hard to differentiate between different compilation engines because there is no such thing as a makefile for regular projects (TeX makefiles do exist, but they mainly serve the package writers, not document writers). Thus we will need some other way to define the compiler and encoding of the document. This is something that is editor dependent, but most editors will recognize the TeXShop way of doing this:

In this example, the XeLaTeX compiler is used with a unicode encoding. This way, our editor will know it needs to use the XeLaTeX compiler, and not the default compiler ( pdflatex on most systems). If we compile using the command line, these two lines will just be ignored. More info about options that can be set this way can be found here .

Defining the Document Class and Adding Packages

After setting these compiler options, we need to define the type of document (typically book , report or article ) and some additional information about the document and language. It is important to set the language in the \documentclass command to make sure all packages use the correct language.

It is typically a good idea to try and make groups of packages (e.g. general, scientific, plotting). This will once again create more structure in this (plaintext) document. This is of course not required for the compiler to work properly, but makes finding things a lot easier. Now we can really start including packages, setting options, defining commands etc.

Setting big global options such as page margins is best done after loading the packages. However, sometimes we need to define some of these options before we can include subsequent packages. This is for instance needed when using \numberwithin . This needs to be set before loading the hyperref package. Otherwise, unexpected results might occur.

An extremely basic example is:

The more packages we include, the slower compilation will become. However, for most documents (especially those including TikZ figures), the time spent to process the preamble will remain less than the actual document, but it is good to keep the number of packages to a minimum, especially during production.

The Actual Document

After finishing the preamble, the actual document follows. Open the document environment, add everything and finally close the document. Commands that are present after finishing the document will not be executed, so they will not have any effect on the PDF that is produced.

For our example the final result is:

More Elaborate Example and Useful Packages

General and layout oriented packages.

I usually load a set of about 30 packages in all basic documents. These provide most of the basic functionality expected in modern LaTeX documents and some room for customisation of the layout.

A good set of general packages is the following:

I do need to mention that the inputenc package is a rather dirty hack that tries to add some unicode support. By including this package you can type the umlaut as you do in regular WYSIWYG editors (opposed to typing \"o for ö ). Do not expect that it will allow you to type Korean in your text.

By default, LaTeX’s column widths are calculated to make them just wide enough for the contents. However, sometimes we have multiline cells or want to have equal cell width. This is possible when using these extra column definitions:

More information can be found in my tables in LaTeX post .

Whitespace and Margins

The default margins and paragraph spacing is OK, but I find the text width to be rather small by default. The paragraph indent is also something that is not really needed. To fix this, we can use the geometry package. It provides several useful options that allow to change the margins (widths and other whitespace distances) quite easily:

Remember the a4paper option we set in \documentclass ? This is passed by this command to the geometry package to set appropriate parameters. Additionally, we centre the text, remove space reserved for header and footer and set all margins to 1 inch.

Paragraph whitespace cannot be set this way. We need to define the lengths ourselves (the two successive \setlength commands). We can also change the whitespace in the table of contents, as is illustrated above.

In place of using \setlength to redefine paragraphy whitespace, we can also just include the parskip package:

This will effectively remove all paragraph whitespace, and in addition also modify space between list items.

Two final remarks: avoid using the fullpage package (use the geometry package instead) and if we use (more) modern document classes (i.e. KOMA-Script classes or memoir ), we should set the paragraph indentetion and skip using their respective options.

Title Layout

The default layout for \maketitle is also fine, but I prefer the title, author and date to stand out a little more. One way to do this, is by changing the font and font size using the following set of commands:

Something strange happens here: sometimes we open an environment, but don’t close it and vice versa. This is intended because of the call order. Before typesetting the title, the commands in \pretitle are executed. Then, the title is inserted and finally the commands in \posttitle are executed. As a consequence we open and close the environments in the correct way.

Because TeX was designed before standard font encodings such as OpenType were invented, it has a rather special way of defining font sizes. What we do, is set the size we want with \fontsize and then make LaTeX search for the size in its mapping that is closest to the desired value with \selectfont . We can also specify text size using default LaTeX macros that do not require \selectfont because they use a value that is defined in the mapping. \large is one of them. A complete list is provided on Wikipedia .

The font encoding is also a bit different depending on our needs. If we only use plain English (i.e. no letters with accents) then the default OT1 encoding will suffice. It provides (approximately) all characters in the ASCII table. However, if additional characters are needed, switching to T1 might be useful (just replace OT1 with T1 in the above commands). If we need to typeset non-western characters (read: languages such as Greek, Chinese and Arabic), we should use XeTeX (with a font that supports the target language). A list of available fonts (for LaTeX users) that are installed by default can be found font list .

If we want an entire page for the title, author, date… We can of course use the titlepage environment in out document:

Using a Different Font

In the previous section, we changed the font of the title, author and date. Let’s go a bit further and change the font of the entire document. In LaTeX, using system fonts is not possible, but we can always load additional fonts by including packages. For example:

After loading the appropriate package, we need to redefine the font family. To use Latin Modern, we need to execute:

If we want to apply styling to the headings, this is done using:

Changing the math font in LaTeX is not very easy, and might need a lot of command redefinitions, so we will skip this. If we want to have more font control, we should really use Xe(La)TeX.

Xe(La)TeX users can use system fonts, providing users with a much bigger font library at their fingertips! Before loading these fonts, the fontspec package needs to be included:

After loading this package, we can use commands such as \setmainfont to load a specific system font. To redefine the main and mono spaced fonts for example, we can use:

If we want to redefine the math font, we should load the mathspec package in place of the fontspec package. However, most fonts do not have a complete math table (read: not all symbols are defined). If a symbol is not defined in the selected font, it will fall back to Computer Modern (LaTeX default).

If full font consistency is required, we can load the unicode-math package. This will only work with fonts that have a complete math table. An list can be found on tex.stackexchange .

Scientific Packages

LaTeX is very well suited for mathematics and science in general, having packages for advanced mathematics, chemical formulas and more. The list below is a must-have addition to the built-in possibilities:

Only the first two packages are really required for most users. However, if we need monospaced text (read: computer code), listings is a very good package. minted is a good alternative, but requires Python to be installed for syntax highlighting. SIunits provides the \unit command, which adds a thin space between the value and unit. Some examples:

Almost all units are predefined as LaTeX commands. The squaren option is the only required one for compatibility with amsmath .

One might expect an absolute value command to be defined by amsmath , but it is not. The list below tries to define several missing commands and make things easier to read. Usage of \left and \right is needed to make brackets scale according to their contents. The final command forces fractions and integrals within fractions to have a normal size. By default, LaTeX will scale them down, but this often leads to less beautiful math expressions in my opinion.

If the listings package is loaded, we need to activate these options to have monospaced code, avoid hbox overflows and more. The options are quite straightforward. More information can be found in the tips and tricks post .

Referencing, Annotating and Citing

One of the great powers of LaTeX is its referencing system. The default combination of \label and \ref works very well, but it could benefit from a few additions.

If we want to have numbering within each section for example, we need to use \numberwithin . We specify the numbered environment followed by the heading in which the counter will be reset. This can be useful for lengthy articles.

Let’s get to the actual packages. A good default list for annotating and referencing is the following:

More information about usage and what each individual package does, can be found in the references in LaTeX post .

We can also add some custom colours to hyperlinks with the following code:

Adding a bibliography is usually done with bibtex . There also is the default thebibliography environment, but it is not very flexible. More about adding a bibliography and bibtex in a future blog post.

Drawing and Plotting

LaTeX is not only good for mathematics, there are also very powerful drawing libraries available in LaTeX documents. My personal favourite is TikZ. Packages such as pgfplots build on TikZ to add even more functionality to the already huge TikZ framework. A possible list of packages:

More information on usage of these packages can be found in the creating Tikz figures and tables in LaTeX posts.

Misc: Todo Notes, EPS Support, Floats, Headers…

If we want to add things such as TODO notes, EPS support (there is none by default!), floats (images, tables…) and a header/footer, these are the go-to packages:

After these packages, it might be useful to add the definitions for new macros. Defining new macros is every useful if we need to repeat certian aspects of the document, without needing to copy and past everything. More on this in a future blog post.

More often than not, we need to include figures in our documents. These are usually located in a subdirectory of our LaTeX project. Specifying this directory every time when inserting a figure is cumbersome. We can predefine where LaTeX needs to look using this command:

If we have multiple directories, specify them like this: \graphicspath{{figures_ch1/}{figures_ch2/}} . Notice the use of {} . No spaces are allowed and values are not separated with commas.

To conclude this section, we will add a header and footer (we loaded the fancyhdr package, so let’s use it). LaTeX has a set of predefined header/footer styles: plain (only page number), empty , headings (depends on document style, usually includes additional info on where we are in the document) and myheadings (page number top left/right, the rest can be modified using \markright and \markboth ).

However, using the default options can be limiting, that’s why we loaded the fancyhdr package. It provides flexibility and is easy to use. First, set the page style to fancy . Then, we usually clear all header and footer fields (this is good practice). Now we can define what is contained in the header or footer of our page using \rhead , \chead , \lhead , \rfoot , \cfoot and \lfoot . The example below adds the page number in the centre of the footer, not very creative, but it is illustrative though. Notice we also redefined the \headrulewidth , which cases a horizontal line to be inserted after the header.

If we need to specify left and right pages for two-sided printing (default in the book document class), we should use the fancyhead and fancyfoot commands. More information is provided in the fancyhdr documentation .

Some Side Notes

Some packages need to be loaded in a specific order. A common example is the following set: hyperref , cleveref and autonum . These need to be loaded in that exact order, otherwise very ugly things can occur. We also need to set how references are created and stored before we can load these packages (hence the \numberwithin commands need to be executed before the above set can be loaded).

One package that deserves a special mention is nag . nag is only used to force the usage of newer commands and to output some warnings if we do not add a caption and label to a float. It is essential in contemporary texts to reference a float, otherwise it adds no meaning to the text and thus is useless.

If we are compiling a larger document, we may want to add the draft option to the \documentclass command. This speeds up compilation by not including external sources (such as images). And is very useful if we are looking for syntax errors or just compiling an unfinished document.

Writing a LaTeX preamble is not the easiest nor the hardest thing about LaTeX. Writing a good preamble for most documents takes some time. However, it is well worth it since we can avoid common mistakes and pitfalls.

University of Rhode Island

  • Future Students
  • Parents and Families

College of Engineering

  • Research and Facilities
  • Departments

Guide to Writing Your Thesis in LaTeX

Frequently asked questions, 1. general use, 1.1 how can i use single-spacing, 2. bibliography and references.

2.1 My bibliography or list of references is missing. 2.2 How do I refer to a web page in a bibliographic reference? 2.3 How do I include a source in the bibliography, but not specifically reference it in the thesis?

3. Submitting to the Graduate School

3.1 How do I add my name to the short abstract for the dissertation? 3.2 How do I add typed signatures to the electronic copy?

4. Package information

4.1 What packages are not compatible with this class? 4.2 What does the hyperref package do? 4.3 What options should be used with the hyperref package?

You can use single-spacing with the \singlespace command. There is also a \doublespace command if needed to restore the default spacing. Note that single-spacing is only allowed in a few contexts. See the Graduate School documentation for details.

2.1 My bibliography or list of references is missing.

Run the script genbib.bat

2.2 How do I refer to a web page in a bibliographic reference?

Use the Electronic type in your references.bib file.

2.3 How do I include a source in the bibliography, but not specifically reference it in the thesis?

Use the \nocite{} command. This works the same as the \cite{} command, but will only include the reference in the bibliography, not in the list of references.

3.1 How do I add my name to the short abstract for the dissertation?

Use the command

at the top of your abstract.tex file.

3.2 How do I add typed signatures to the electronic copy?

Add the options electronic to the documentclass command, as in

then make sure the \signature{} and \deansignature{} statements are correct in the file thesis.tex .

4.1 What packages are not compatible with this class?

The only known incompatible package is chapterbib by Donald Arseneau. The reason for this incompatibility is that the support for references at the end of each chapter comes from inserting code from this package into appropriate places in the urithesis class file.

4.2 What does the hyperref package do?

When using pdflatex to create a pdf version of the thesis, the hyperref package will do the following:

  • create a pdf table of contents in the pdf document
  • all citations and references in the thesis will be hyperlinks that will go to the referenced equation, figure, bibliographic citation, etc…
  • the table of contents in the thesis will be hyperlinks to the corresponding section in the thesis

4.3 What options should be used with the hyperref package?

  • pdfborder={0 0 0} – this option makes the boxes that would appear around hyperlinks in the pdf document white, therefore they will be invisible
  • plainpages=false – this option says to use the page numbers as they appear on the pages, instead of the Arabic equivalent. This will make the roman page numbers in the preliminary material have different numbers from the chapters of the thesis.
  • pdfpagelabels – this option puts the page number as it appears on the page in the pdf file, therefore the first page of the first chapter will be page 1.
  • Grand Valley State University

latex preamble thesis

University Libraries

Search the Library for Articles, Books, and More Find It!

More research tools:

  • Subject Guides
  • Find Materials
  • LaTeX: Getting started
  • Writing in LaTeX

LaTeX: Getting started: Writing in LaTeX

  • Managing Citations in LaTeX
  • Creating Accessible LaTeX Documents
  • Additional Help
  • LaTeX Templates

Basic Commands

Starting a latex document.

All LaTeX documents start with a preamble. If you open up a new document in Overleaf, it will auto-populate much of this information for you. The preamble allows you to define the type of document, author, date, and language, and to load in LaTeX packages that you want to use in the document.

\documentclass[12pt, letter paper]{article} \usepackage[utf8]{inputenc}

\title{Practice} \author{Erika Weir} \date{November 2019}

After we have included a preamble, we can go ahead and start the main text of our document. We can add things like a title, abstract, and table of contents.

\begin{abstract}     This is an introduction to using LaTeX. It will show how to format a paper, insert equations, figures, and tables. LaTeX can also be used to create lab reports, CVs, bibliographies, and other documents. \end{abstract}

\tableofcontents

We can then add sections that will automatically be added to the Table of Contents:

\section{Introduction}

We can also create lists: \begin{itemize}     \item llamas     \item donkeys     \item goats \end{itemize} And numbered lists: \begin{enumerate}     \item oranges     \item bananas     \item apples \end{enumerate}

First, add this package to your preamble to complete this section:

\usepackage{amsmath}

One of the most useful features of LaTeX is the ability to easily write mathematical equations. We can do this inline ($E=mc^2$) or in display mode: \begin{equation}     E=\frac{mc^2}{\surd(1-v^2/c^2)} \end{equation}

You can also display equations without numbering. \[E^2=p^2c^2+m^2c^4\]

You can reference the following list to lookup many mathematical symbols and operators:

  • Overleaf's List of Greek letters and math symbols

Add the following packages to your preamble to add images and tables:

\usepackage{graphicx}

\usepackage[table,xcdraw]{xcolor}

To add images, you will need to first upload the images into Overleaf, in the same area as your document:

Screenshot of the upload button in Overleaf

Or, you may store your images in another Overleaf folder, e.g. 'images'. In that case, you must first add the file path.

\graphicspath{{images/}}

We can then add the image.

\includegraphics{hubble.jpg}

However, depending on the size of the image, it might not fully display on the page. We can edit the image to define the size.

\includegraphics[width=4cm]{hubble.jpg}

When writing academic papers, we may also want to label our figures so that we can refer back to them.

\begin{figure}[h]     \centering     \includegraphics[width=4cm]{aminoacids.jpg}     \caption{an amino acid info-graphic}     \label{fig:amino} \end{figure}

More information on formatting images can be found here:

  • Including images in Overleaf

Formatting and stylistic changes to LaTeX tables can be extremely complicated. The following web resource allows you to create a table and then creates the corresponding LaTeX code.

  • LaTex Table Generator

Cross References

LaTeX allows you to easily cross-reference anything that has been labeled in your document. This can include figures, tables, equations, or sections.

To create a label, use the label command: \label{ marker } . LaTeX users also typically include a short (3 letter) descriptor for the type of object they are labeling. For example, the following label command is for an amino acids figure:

\label{fig:amino}

To refer back to any labeled object, we can use the reference command: \pageref{ marker } . We can also use the page reference ( \pageref{ marker } ) command to print the page number the object originally appears on. For example, the following LaTeX code references our original figure:

See Figure \ref{fig:amino} on page \pageref{fig:amino}.

  • << Previous: Home
  • Next: Managing Citations in LaTeX >>
  • Last Updated: Jan 22, 2024 12:29 PM
  • URL: https://libguides.gvsu.edu/LaTeX

Login to LibApps

Text Us! (616) 818-0219

Mary Idema Pew Library (616) 331-3500 [email protected]

Steelcase Library (616) 331-6799

Frey Foundation Learning Commons (616) 331-5933

Social Media

latex preamble thesis

Committed to Equality

ACRL Diversity Alliance Logo

Federal Depository Library Program

Federal Depository Library Program Logo

  • GVSU is an AA/EO Institution
  • Privacy Policy
  • Disclosures
  • Copyright © 2018 GVSU

Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications

A LaTeX Preamble for theses at the University of Birmingham

badge/bham-latex-preamble

Folders and files, repository files navigation, bham-latex-preamble.

This project holds the LaTeX preamble file of my PhD thesis, for submission at the University of Birmingham. It is a work in progress, but is largely complete. Its features include:

  • The Linux Libertine font, in place of Computer Modern, to make things look nicer
  • Old-style (aka text) figures for more readable numbers
  • Sans-serif font (currently Helvetica Neue) for headings
  • New theorem styles, example and algorithm, for mathematical examples and computer algorithms respectively
  • Separate PDF and Print versions of your document; the PDF version will have equal borders and coloured links for references, citations and external links
  • Packages for beautifying tables

preamble.tex uses the fontspec package that is not supported by vanilla LaTeX. To typeset using this package enabled, LuaLaTeX or XeLaTeX is required.

Downloading

Click on the Downloads tab to the top-right of this page, then click Download as zip or Download as tar.gz . This gives you the preamble.tex file, along with the examples files and this readme.

To import the preamble.tex file, use

after the document class. Immediately before that line, include the line

This line tells the file whether you want the PDF or print version. If changing this (the other option is 'false'), be sure to trash all auxillary (.aux, .synctex, etc.) files before rebuilding the file.

Future Plans

I'm currently in the process of packaging things up into a class file, to make life easier and more consistent.

  • Basic remarks
  • Bitmap fonts
  • Page layout

Bibliography

  • Footnote citing

Tips on Writing a Thesis in LaTeX

latex preamble thesis

A typical scientific document contains a number of references, and this leads to the problem of organizing and presentation of the references in the document. The problem can be subdivided into several parts: store of the reference information, later retrieval of this information while preparing the document, and presentation (formatting) of the reference information in the document and in the bibliography according to a particular format.

A widely-used approach to deal with references in LaTeX documents is to employ BibTeX reference management software. In BibTeX reference information is stored in format-independent plain text file(s) (usually with .bib extension), which can be modified with almost any text editor. Such a text file contains BibTeX entries , and each entry, formed by several text lines, has

  • unique ID or key , needed to identify and refer to the particular entry, for instance Author2001 ;
  • entry type , which can be article , book , thesis , etc.;
  • entry fields (such as year , publisher , journal , etc.), corresponding to the particular type.

Here is an example of the article type entry from the .bib file I used while typesetting thesis:

The command \bibliography { reference_list } placed before \begin { document } is used to specify a plain text input file ( reference_list.bib here) containing information on references.

References can be "cited" during editing the LaTeX document using, for example, \cite { key } command, and later at the document compilation step LaTeX input files must be processed with LaTeX and BibTeX .

The most popular approaches to indicate a reference appearing in the text can be classified as "numeric" and "author–year". The former uses sequential number of a reference in the document

while "author–year" is based on the extended reference information and may appear like this:

Each indication has particular advantages and drawbacks. For example, numeric is more compact (i.e., require less space in a text line), and a group of references can be "compressed" into a range in the case they have sequential numbering (i.e., [1,2,3,5] will be shown as [1–3,5]). On the other hand, author–year indication shows more information on the cited document (typically, first one or two author names, and a year of a publication), but requires more space compared to the numeric one. The space consumed by reference may become important if your document has high density of references (and you care about in-line space "wasted" by references :).

In my thesis I have decided to use "numeric" indication, but contrary to the example above reference numbers appear in the text as a footnote: reference number by itself has script size ,

and each number has associated script-sized text at the bottom of the page (where the reference appeared) containing extended information on the cited reference:

This citation scheme improves in-line space saving compared to the plain numeric indication due to the reduced size of numbers, and at the same time allows the reader to see what exactly was cited without looking in the bibliography (which is typically located at the end of a document or chapter). The drawback of the footnote citation scheme follows from the space consumed at the bottom of the page: if there are too many citations on the page, footnote text will occupy a lot of space. For example:

To create citations in my thesis, I employed the biblatex package, which is one of the most notable packages I have used with LaTeX. The package provides a highly customizable interface for the creation and edit of the presentation of bibliographic data in the document. Compared to the plain BibTeX, biblatex enables relatively easy customization of the appearance of bibliographic data. Below I provide customizations I used to modify the default biblatex output. The detailed description of the biblatex commands is available in the package documentation .

The two basic commands to enable biblatex and output citation list are

While preparing the thesis I activated biblatex with the following options compiling the document using biblatex with the options below will need custom-numeric-comp.bbx and custom-numeric-comp.cbx files (see next sections, "Biblatex customization" and "Footnote citation") :

Option hyperref=true was specified to transform various citation elements (like citation number, page number where citation appears, hyperlink to the web page where cited document can be found, etc.) into clickable hyperlinks. This option requires hyperref package (see also notes on hyperref ).

With options url=false,isbn=false I disabled printing the URLs and ISBNs in the bibliography.

Back references

Option backref=true enables generation of the back references to the citation, which are usually number(s) of the page where citation appears:

The back reference text preceding the page number ("see p.") can be modified using the following command:

Just a note on the back references. When you are reading a .pdf document, encounter a reference, and click on it, .pdf viewer will change view to the record of this reference in the bibliography. Now, if you want to return to the main text and continue reading, you may find it difficult to do using back reference when the reference was cited on several pages (back reference will contain several page numbers and you have to bear in mind the original page number you came to the bibliography), and a good solution here is to use " Alt + ← " instead of the back reference itself. On the other hand, back references are useful to indicate how often and where a particular reference was cited in the document.

Citation style

Option style=custom-numeric-comp determines the citation style. As seen from its name, the chosen citation style uses numbers ( numeric ) to indicate citations in text, and consequent numbers are compressed ( comp ) into a range: [1,2,3,5] is printed as [1–3,5]. Above it was mentioned that I used footnote version of the standard biblatex numeric-comp style — as a result, each citation has i) its number typeset as superscript, and ii) short and extended reference information located at the bottom of the page ("footnote text") and in the bibliography, respectively:

Option citereset=chapter defines biblatex behavior for the reference footnote text in a typical situation when a citation appears several times in the document: footnote text for the particular citation is printed only once per document chapter ( citereset=chapter ), where chapter is defined according to the LaTeX sectioning commands . In my thesis a typical chapter includes about 20 pages, and I assumed citereset=chapter to be quite acceptable. However, one of my colleagues was confused by such a rule for printing the footnote text (i.e., he did not get the logic behind the rule until I have explained it). I was thinking about resetting footnote text as "once-per-page" (not "once-per-chapter") but decided to avoid this due to high density of the references in my thesis. If you are interested in such a behavior some useful information can be found here .

Number of displayed author names

Options maxcitenames=3 and maxbibnames=100 limit number of authors of the cited document to be printed in the document body and in the bibliography, respectively. If the number of authors exceeds maxcite(bib)names , the author list is truncated according to biblatex settings, and usually printed as "Author1 et al." In my case I have very short authors lists in the footnote text (document body) to reduce space occupied by footnote citations,

and virtually all authors are displayed in the bibliography:

I note that I have prepared my thesis with biblatex v. 0.9a (19.03.2010), while this on-line document was prepared and tested on biblatex v. 1.6 (29.07.2011). Options maxcitenames and maxbibnames were not available in v. 0.9a, and the described biblatex behavior (with maxcitenames=3 and maxbibnames=100 ) was obtained using maxnames=3 while loading the biblatex package, and maxnames=100 while printing the bibliography, i.e.

The next section continues the discussion of the biblatex customization.

Some Quarto PDF formatting tips, with particular reference to thesis writing

Cameron Patrick

17 July, 2023

I’ve just spent most of a day faffing around trying to get Quarto to produce a nice PDF file that I like the look of and which meets my university’s formatting requirements for a PhD thesis. Maybe my pain and suffering can help reduce yours.

I decided to write my PhD thesis in Quarto . Between my idiosyncratic standards for the PDF output and the university’s rigid requirements for what a PhD thesis ought to look like, I knew that some degree of tweaking the formatting settings would be required. I’ve never really used Quarto for PDF output before, but since I’m fairly confident using LaTeX, I figured “how hard could it possibly be”.

This post is a slightly elaborated version of the notes I made for myself during the process, shared in the hope that it may be useful for others who want to use Quarto to write reports or theses with idiosyncratic styling.

The one piece of this post that I haven’t seen spelled out anywhere else on the web is the section on additional front matter before and after the table of contents , which took a bit of LaTeX trickery to achieve. The solution I found is better than the other alternatives I’ve seen (for my purposes, anyway), because it allows you to write the front matter in Markdown instead of LaTeX and have it present in the HTML output as well as PDF.

Basic principles

  • Start by creating a “Quarto book project” using your favourite IDE (RStudio)
  • It’s probably a good idea to use git and periodically commit as you mess with stuff, but I just YOLO’ed it until I had something I was happy with
  • You should probably set up renv so your package versions are tracked and reproducible. renv::init()
  • Most of the configuration begins in editing the YAML file, _quarto.yml
  • The most basic but also most important options are documented in the Quarto PDF Options section of the Quarto manual
  • Achieving more complex goals requires writing chunks of LaTeX code which you reference in the YAML (or sometimes include inline in your chapter .qmd files)
  • Some of what I’m explaining here wasn’t documented and required reading the Quarto source code. I am not to be held responsible for any voided warranty or code that stops working with the next release of Quarto
  • I’m assuming you have some familiarity with YAML, Markdown, and LaTeX; but not necessarily with Quarto. In other words, I’m writing for me-last-week. Good luck

Bibliography workflow

Thanks to Brenton Wiernik and Matthijs Hollanders on Twitter for pointing me in the right direction here.

  • Use Zotero and the Better BibTeX for Zotero plugin
  • (Aside: the ZotFile plugin may also be useful if/when I exceed my free Zotero PDF storage limit, although I like Zotero enough I may well just give them cash for cloud storage.)
  • Set a sensible schema for naming your reference keys in the Better BibTeX settings. I’m using auth.lower + year + shorttitle.lower which generates keys like @rubin1974estimatingcausaleffects
  • Set Zotero “quick copy” format to Better BibTeX Citation Key and set it to use Markdown, so you can hit Command-Shift-C to copy the citation in Markdown format
  • Export using the Better CSL YAML plugin (you can also set it to automatically update when your Zotero library changes), or use the R Better BibTeX package to get an automatically updated bibliography export every time you knit your document (I haven’t tried this yet)
  • Grab a CSL file for your preferred bibliography and citation format and copy it into your Quarto project
  • Add bibliography and csl top-level keys to your YAML:

I’ve also edited my references.qmd Markdown file which generates the bibliography so it has a ragged right margin (i.e. left justified, not full justified):

Yeeting the RStudio visual editor

If you’re like me, and can’t stand the RStudio visual Markdown editor but accidentally clicked the “Visual editor” check box when creating the project, change your YAML to say:

Instead of editor: visual . Or vice versa, if you prefer the visual editor.

Easy PDF tweaks (only YAML needed)

All of these go inside the format: → pdf: chunk of the YAML. They’re documented in the Quarto manual but that’s very long and sometimes unclear (partly because Quarto can produce PDF output both via LaTeX and via HTML, and different options apply to each). Here’s what I cared about enough to mess with:

  • LaTeX document class: Quarto’s default templates will take advantage of the KOMA Script classes if you use those, and they seem to make some customisation nicer than the LaTeX packages I’ve used previously. So documentclass: scrbook for two-sided or documentclass: scrreprt for single-sided (note the lack of “o” in “scrreprt”)
  • You can change the name of the PDF file produced, e.g.  output-file: "FirstnameLastname_thesis.pdf" (this one goes under the book: top-level YAML section, not under format: pdf: )
  • Set keep-tex: true so you can take a squiz at the generated TeX file. I found this helped when figuring out what I needed to change to bend the output to my whims
  • Enable Table of Contents, List of Figures, List of Tables; toc-depth of three means that the Table of Contents will show up to \subsection (or ### headings in Markdown):
  • Section numbering: number-depth appears to count differently from toc-depth , so the below will have numbered \subsection ( ### ) but not \subsubsection ( #### ):
  • Paper size: papersize: a4 or you’ll get US Letter
  • Margins: you can either use the KOMA Script options (see below) which use some kind of fancy formula to derive margins, or you can specify options to the LaTeX geometry package in your YAML. Below is what I’m currently using, copied from my MSc thesis LaTeX preamble. I can’t remember what the header and footer bits do exactly. heightrounded helps prevent “underfull vbox” warnings by making sure the text height is a multiple of the line height
  • Indented paragraphs vs space between paragraphs: indent: true or indent: false . You can use KOMA Script options for greater control over the indent or skip distances but the defaults look fine to me
  • Spacing between lines: you can use e.g.  linestretch: 1.25 or linestretch: 1.5 to get increased line spacing
  • As far as I can tell, you can’t choose between full justified and ragged right (left justified) in the YAML, you’ll need to add LaTeX commands to the preamble (see below)
  • Font size: set the base font size used for body text, e.g.  fontsize: 11pt
  • I prefer the XeLaTeX engine: pdfengine: xelatex because…
  • If you’re using the XeLaTeX engine, you can specify any (Unicode, TrueType/OpenType) system font if you don’t like the standard Computer Modern Roman look that screams “my document was made with TeX”. The TeX Gyre Math font families provide OpenType math fonts compatible with XeLaTeX that fit well with Times and Palatino, amongst others. Here’s an example of using Times New Roman and other common Microsoft fonts, alongside TeX Gyre Termes Math which provides mathematical symbols which blend in nicely with these fonts:

KOMA Script options: fonts, headings, headers, and footers

The KOMA Script manual is comprehensive but inscrutable, and it takes a bit of messing around to find out where to put the options anyway.

To set these options, you’ll need to add them to what Quarto calls the LaTeX header (which I’ve always known as the LaTeX preamble). That means you need to add a line like include-in-header: include-in-header.tex to the PDF format options in your YAML, and then add the code here to a file called include-in-header.tex .

Here are a few things I did here:

  • Make the headings the same font as the rest of the document, instead of sans serif: \addtokomafont{disposition}{\rmfamily}
  • Restore the classic LaTeX chapter headings that are two lines, the first saying e.g. “Chapter 2” on a line before the chapter title: \KOMAoptions{chapterprefix=true,appendixprefix=true}
  • Smaller fonts for headings: \KOMAoptions{headings=small}
  • If you’re fussy about the size of the indent or spacing between paragraphs, you would do that here too
  • If you prefer left-justified (ragged right margin) instead of full-justified, you can do that here: \raggedright
  • Header and footer fonts: normal upright font (instead of slanted, the KOMA Script default) and a smaller size. See this handy web site for more info on LaTeX relative font size commands like \footnotesize .
  • Headers and footers! For this we’ll need the scrlayer-scrpage package, and commands like \lefoot[]{} where “l” starts for left (there’s also “c” and “r”), “e” starts for even page (there’s also “o”), “foot” for footer (there’s also “head”). Inside the square brackets you put what you want on “plain” pages (start of chapter) and inside the curly braces you put what want on pages with a running-head (inside chapters). Here’s an example that gives output similar to many technical books: (1) centred page numbers ( \pagemark ) in the footer on the first page of a chapter; (2) page numbers on the outside edge of the header inside chapters; (3) chapter and section titles (“running heads”, \leftmark and \rightmark ) on the inside margins:
  • Headers and footers! If you’re using single-sided output, beware: all of your pages will be considered “odd”, for some odd reason.

My university has a specific requirement for the formatting of title pages, and even if it didn’t I’d still want to change the default Quarto title page because it’s kind of ugly.

To do this, we will once again need to write some LaTeX code. This time, rather than just adding extra code to the preamble, we’ll be replacing some of the built-in Quarto Pandoc templates . You can see what templates are available and what they contain by looking at the Quarto source code (!). Ignore the seductively-named title.tex because to edit the title page you will need to replace before-body.tex . Start by adding before-body.tex to the template-partials list under format: pdf: in your YAML (yeesh).

Then, in before-body.tex , we’ll add the code to create the title page. You’ll notice that this isn’t quite normal LaTeX, there’s some kind of crazy templating language going on, with directives inside pairs of $ signs. I’m not aware of any documentation on this, I just pieced it together from reading other Quarto templates.

The first few lines (copied from the standard Quarto template ) enable front matter mode in LaTeX, which causes pages to be numbered in roman numerals instead of normal (arabic) digits. Later on, \mainmatter will cause the page numbering to restart from 1. The remainder of the code is LaTeX code to generate the title page, with a bit of cleverness to pull the title and author information out of the YAML. Instead of just using \maketitle built into LaTeX, we’ll make our own title page from scratch.

To go along with this, you’ll also need to provide appropriate information in the book: section of the YAML:

latex preamble thesis

Additional front matter before and after the table of contents

According to my university, a PhD thesis needs to contain the following items, in this order: title page, abstract, authorship declaration, preface, acknowledgements, table of contents, list of tables, list of figures, abbreviations; the body of the thesis; references; and finally appendices.

Unfortunately, the default Quarto template places the table of contents immediately after the title page. To change this, we’ll need to edit another “template partial”, this time toc.tex . In the YAML:

Then in toc.tex :

If you compare the above to the standard Quarto toc.tex template you’ll see that I’ve removed a heap of code. Some of that code was for presentations but most importantly I removed the \tableofcontents , \listoffigures and \listoftables commands which actually produce the table of contents and lists of figures and tables. (I’ve also added some bonus code to make the “List of figures” and “List of tables” headings in sentence case instead of title case, all modern-like.)

We’ll also need to stop Quarto from switching from \frontmatter to \mainmatter at around this point. I couldn’t find the partial template that was responsible for this, so instead I added these two lines of LaTeX to the end of before-body.tex :

The above code effectively neuters the \mainmatter command, until we’re ready to bring it back to life.

Now we can write the ‘chapters’ that make our extra front matter. These can be written just like normal Quarto chapters, though I added {.unnumbered .unlisted} to the end of the chapter headings so they don’t get chapter numbers and aren’t included in the table of contents.

At the end of the last section before the table of contents should appear — acknowledgements.qmd in my case — add the following LaTeX code to generate table of contents (and list of tables and list of figures, if desired):

Finally, at the end of the last front matter section — abbreviations.qmd in my case — add this code to return the \mainmatter command to life and run it, causing the main section of the document to have ordinary page numbers, starting from 1 again:

HTML output

One nice thing about Quarto is that it can produce multiple output formats from the same input. I find the HTML output particularly convenient for on-screen previewing. I haven’t messed with the appearance of the HTML output much, but here’s the YAML chunk I’m using at the moment:

I will probably end up writing a CSS stylesheet at some point as a form of procrastination.

Setting the output directory

You can change the directory that the HTML and other outputs are saved to. This may be useful if, for example, you want to use GitHub Pages to publish your document as a web site. GitHub Pages expects the HTML to either be in the repository root or a “docs” subdirectory:

No Search Results

LaTeX Error: Can be used only in preamble

This error appears when you have included a package or class in the main body of your document, instead of in the preamble. The preamble to the document consists of everything written before \begin{document} . In the preamble you define the type of document you are writing, the language and several other elements. For instance, a normal document preamble would look like this:

If you write \usepackage{...} in the main body of the document (after \begin{document} ) instead of in the preamble, you will generate the error message shown below.

main.tex, line 7

LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.4 \usepackage {amsmath} Your command was ignored. Type I <command> <return> to replace it with another command, or <return> to continue without it. [1

To fix this error, make sure that all \usepackage{...} commands, as well as \documentclass[...]{...} , are written before \begin{document} . To learn more about how to structure a document in L a T e X , check out our documentation .

  • Documentation Home
  • Learn LaTeX in 30 minutes

Overleaf guides

  • Creating a document in Overleaf
  • Uploading a project
  • Copying a project
  • Creating a project from a template
  • Using the Overleaf project menu
  • Including images in Overleaf
  • Exporting your work from Overleaf
  • Working offline in Overleaf
  • Using Track Changes in Overleaf
  • Using bibliographies in Overleaf
  • Sharing your work with others
  • Using the History feature
  • Debugging Compilation timeout errors
  • How-to guides
  • Guide to Overleaf’s premium features

LaTeX Basics

  • Creating your first LaTeX document
  • Choosing a LaTeX Compiler
  • Paragraphs and new lines
  • Bold, italics and underlining

Mathematics

  • Mathematical expressions
  • Subscripts and superscripts
  • Brackets and Parentheses
  • Fractions and Binomials
  • Aligning equations
  • Spacing in math mode
  • Integrals, sums and limits
  • Display style in math mode
  • List of Greek letters and math symbols
  • Mathematical fonts
  • Using the Symbol Palette in Overleaf

Figures and tables

  • Inserting Images
  • Positioning Images and Tables
  • Lists of Tables and Figures
  • Drawing Diagrams Directly in LaTeX
  • TikZ package

References and Citations

  • Bibliography management with bibtex
  • Bibliography management with natbib
  • Bibliography management with biblatex
  • Bibtex bibliography styles
  • Natbib bibliography styles
  • Natbib citation styles
  • Biblatex bibliography styles
  • Biblatex citation styles
  • Multilingual typesetting on Overleaf using polyglossia and fontspec
  • Multilingual typesetting on Overleaf using babel and fontspec
  • International language support
  • Quotations and quotation marks

Document structure

  • Sections and chapters
  • Table of contents
  • Cross referencing sections, equations and floats
  • Nomenclatures
  • Management in a large project
  • Multi-file LaTeX projects
  • Lengths in L a T e X
  • Headers and footers
  • Page numbering
  • Paragraph formatting
  • Line breaks and blank spaces
  • Text alignment
  • Page size and margins
  • Single sided and double sided documents
  • Multiple columns
  • Code listing
  • Code Highlighting with minted
  • Using colours in LaTeX
  • Margin notes
  • Font sizes, families, and styles
  • Font typefaces
  • Supporting modern fonts with X Ǝ L a T e X

Presentations

  • Environments

Field specific

  • Theorems and proofs
  • Chemistry formulae
  • Feynman diagrams
  • Molecular orbital diagrams
  • Chess notation
  • Knitting patterns
  • CircuiTikz package
  • Pgfplots package
  • Typesetting exams in LaTeX
  • Attribute Value Matrices

Class files

  • Understanding packages and class files
  • List of packages and class files
  • Writing your own package
  • Writing your own class

Advanced TeX/LaTeX

  • In-depth technical articles on TeX/LaTeX

Have you checked our knowledge base ?

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

IMAGES

  1. Report and Thesis formatting in LaTeX Service

    latex preamble thesis

  2. Marcel Thomas

    latex preamble thesis

  3. Creating a document

    latex preamble thesis

  4. LaTeX-AMC-PhD-Thesis-Template/README.md at master · SeaShadow/LaTeX-AMC

    latex preamble thesis

  5. [Tex/LaTex] Help designing a Title Page for thesis

    latex preamble thesis

  6. How to Write a Thesis in LaTeX (Part 2): Page Layout

    latex preamble thesis

VIDEO

  1. L06: Using the Stellenbosch thesis LaTeX template in Overleaf

  2. Hot to use the LaTeX package xymtex with Lyx

  3. Research paper writing using LaTeX Overleaf

  4. Sample Thesis in LaTeX (UMS)

  5. Introduction for writing a Thesis documents using LaTeX *Full Tutorial*

  6. Write mathematical equation using LaTex software

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. Good LaTeX preambles for math thesis

    12. The best preamble is the preamble, that does contain only these packages and definitions you are using. BTW: You should read l2tabu to avoid obsolete packages like t1enc (use \usepackage[T1]{fontenc} instead). And it would be better to use packages like geometry or typearea to setup text area and margins.

  3. How to write a clean and organized preamble in LaTeX?

    My solution: Make a .sty file, where you put the preamble. Then you just have to import that .sty to your Code. When you start a new project you just have to copy and paste that .sty. I made a folder with different .sty, each .sty has a different style.

  4. Standard preamble for theses

    "An example thesis design", pp. 357-375) to explain how to design a thesis style. There might be a few clues about additional features one might want to incorporate into the own preamble. However, it should also be said that this manual focuses on the thesis style from a package/class designer point of view.

  5. PDF LATEX Thesis Class for University of Colorado

    package in the preamble, so that bitmap images (PNG, JPG) and vector images (PDF) can be inserted using the \includegraphics macro. (Convert EPS files to PDF using ps2pdf.) ... thesis can use all LaTeX macros just as described in the references (2, 3). The εfigure on page 2 shows the contents of a fictitious thesis file, mythesis.tex, that ...

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

  7. PDF How to Write a Doctoral Dissertation with LATEX

    3.1. Preamble 21 3.2. Document 23 Part 2. Further Instructions 27 Chapter 4. Making the bibliography with BiBTEX 28 Chapter 5. Tables and Figures 31 Chapter 6. An example of Mathematical writing 38 6.1. Generalized Fatou's Lemma 38 6.2. Other examples of Mathematical writing 42 References 44 Appendix A. The source LATEX le for this document ...

  8. Writing in LaTeX

    All LaTeX documents start with a preamble. If you open up a new document in Overleaf, it will auto-populate much of this information for you. The preamble allows you to define the type of document, author, date, language, and load in LaTex packages that you want to use in the document. \documentclass[12pt, letter paper]{article}

  9. A Basic LaTeX Preamble

    A Basic LaTeX Preamble. The preamble is the place where one lays a document's fundaments. It is used to include additional packages, set options, define new macros (commands), add PDF information and more. Even though one can define commands and set certain options within the document, it is preferred to set options globally.

  10. Basic thesis template

    This LaTeX template includes a title page, a declaration, an abstract, acknowledgements, table of contents, list of figures/tables, a dedication, and example chapters and sections. This template was originally published on ShareLaTeX and subsequently moved to Overleaf in November 2019. This Thesis LaTeX template is an ideal starting point for ...

  11. PDF Writing a thesis with LATEX

    typical problems that arise while writing a thesis with LaTeX and suggests improved solutions by handling easy packages. Many suggestions can be ... is necessary to define the abstract in the preamble (the code that follows is the definition used by the reportclass).6 6. Instructions on how to use the fancyhdrpackage can be found in sec.6.3.1.

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

  13. Guide to Writing Your Thesis in LaTeX

    Step 1: Install LaTeX and a LaTeX Aware Editor. LaTeX is not a word processor, it is a document preparation system for high-quality typesetting. It is most often used for medium-to-large technical or scientific documents, but it can be used for almost any form of publishing. LaTeX encourages authors not to worry too much about the appearance of ...

  14. Guide to Writing Your Thesis in LaTeX: FAQ

    When using pdflatex to create a pdf version of the thesis, the hyperref package will do the following: create a pdf table of contents in the pdf document. all citations and references in the thesis will be hyperlinks that will go to the referenced equation, figure, bibliographic citation, etc…. the table of contents in the thesis will be ...

  15. Easy thesis template

    License. Other (as stated in the work) Abstract. Easy LaTeX thesis template prepared by Simon Ternsja, based on Graduate Thesis template written by Sunil Patel. This template was originally published on ShareLaTeX and subsequently moved to Overleaf in November 2019.

  16. Subject Guides: LaTeX: Getting started: Writing in LaTeX

    All LaTeX documents start with a preamble. If you open up a new document in Overleaf, it will auto-populate much of this information for you. The preamble allows you to define the type of document, author, date, and language, and to load in LaTeX packages that you want to use in the document. \documentclass[12pt, letter paper]{article}

  17. GitHub

    bham-latex-preamble. This project holds the LaTeX preamble file of my PhD thesis, for submission at the University of Birmingham. It is a work in progress, but is largely complete. Its features include: The Linux Libertine font, in place of Computer Modern, to make things look nicer. Old-style (aka text) figures for more readable numbers.

  18. Bibliography using Biblatex

    The detailed description of the biblatex commands is available in the package documentation. The two basic commands to enable biblatex and output citation list are. \usepackage{biblatex} % place in the document preamble \printbibliography % place in the document body where list of citations has to appear. While preparing the thesis I activated ...

  19. Econometrics/Economics Thesis/Paper template

    This is a template for writing papers, theses, etc., specifically for economics. A presentation file is also included to show how to use LaTex for presentations. This is a simplified document with complicated referencing. If you write complicated documents, I recommend this structure. -Descriptions- includes mathmatical specifications -files ...

  20. How to make a standard preamble into a package

    Putting your preamble in a .sty file, and changing \usepackage statements to RequirePackage, and closing off the file with \endinput is the most straightforward way.. It is important to realize that in a style file @ is a letter, meaning that it can be used in commands. So if you have code in your preamble between a \makeatletter and \makeatother pair, you can leave out these two commands in ...

  21. Some Quarto PDF formatting tips, with particular reference to thesis

    To set these options, you'll need to add them to what Quarto calls the LaTeX header (which I've always known as the LaTeX preamble). That means you need to add a line like include-in-header: include-in-header.tex to the PDF format options in your YAML, and then add the code here to a file called include-in-header.tex.

  22. preamble

    Convert your chapters in complete documents (with the same preample that the main document) and then go to CTAN to known about the topic subdoc: in­clude com­plete doc­u­ments in other doc­u­ments.In particular, docmute or standalone packages is what your are looking for. It is a simple as add one of these packages to the preamble of the main document (there are many examples of use of ...

  23. LaTeX Error: Can be used only in preamble

    LaTeX Error: Can be used only in preamble. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.4 \usepackage {amsmath} Your command was ignored. Type I <command> <return> to replace it with another command, or <return> to continue without it. [1