# My thesis template for LaTeX now freely editable online with Overleaf

Submitted by Nicola Rainiero on 2017-02-28 (last updated on 2017-03-13)

After many years I have written and published my first article on a thesis template in LaTeX, I verify that it still keeps on being visited and shared daily. So I decided to translate in English the original comments and notes and to improve and update it. Now it has the analytical index and the instructions to print it but above all you can edit, publish and share it on-line with Overleaf.

In my opinion LaTeX is the best solution to write an well-structured and huge document like the thesis, considering also that has a wonderful system for inserting the maths formulas, table of contents, bibliography and so on. Once you have setted the environment and loaded the packages, you have only to start writing, like in a simple text editor, while LaTeX takes care of the boring typesetting techniques. After studying some LaTeX Mauals1 or the documentation of the packages included with my template2, you can write a thesis or book without thinking to the structure or pagination but only focusing on contents.

Today thanks to Overleaf3 or ShareLaTeX, two advanced online editors, you can try LaTeX in your browser and load many templates ready to use as in this case. I usually use the first and I publish my templates in it and GitHub for those who want to copy and try it in the own computer.

Alternatively it is possible to download it as zip (as the upper image suggests) or clone with GitHub, but remember that you need an almost complete installation of LaTeX into your computer, in my case for example I had to install the TeX Live: Generic additional packages too, because the glossaries package returned me the error "File tracklang.sty not found".

## The Template

It is very similar to the original version, published here: Thesis template with LaTeX, but this time I have translated into English all the instructions and notes. Besides I have removed the obsolete packages and added one to print draft in every page and another to insert the analytic index. Without any effort, it is possible to change the paper size, the number of columns, the margins of the pages (both sides or single) and above all the sequence of items that you want to write and print. I have also forced the title page to display the main image exactly at the center and other useful adjustements. I think that you can use it to write your thesis or many others kind of documents such as books and articles.

## Layout

The image below describes the structure of the document and shows the TEX files that appear in it, many of them are included in main.tex, the file that is loaded as first and links all the contents. The packages and styles are in packages.sty instead. In Overleaf you can change file simply clicking on it, and on contrary of the classical editors your modifications in any files change the final result, without the necessity to return to the main one.

In main.tex the files included are the following (some of them are put in sub-folders):

• frontmatter, contains:
• frontispecie.tex
• credits.tex
• abstract.tex
• tocs.tex
• glossary.tex
• simbols.tex
• introduction
• chapters and appendices followed by an increasing number: a folder for every chapter and appendix (inside there is chapter"number".tex or appendix"number".tex and 2 folders for figures and tables if necessary)
• backmatter contains:
• bibliography.tex
• index.tex

Remember that in packages.sty you have to define in the Images and TikZ section the folders of your pictures, in this manner:

% Folders with high quality pictures
\graphicspath{{frontmatter/images/},{chapter1/images/},{chapter8/images/}}

## Editor

As illustrated in the image above, Overleaf provides a rich-text editor so you don't need to know any code to get started - you can just edit the text, add images, and see the typeset document automatically created for you as you type. Their tutorial provides a quick three-step introduction to the main features. If you're familiar with LaTeX, using Overleaf couldn't be simpler as it provides full support for direct LaTeX editing, and automatically compile your document for you on their servers (so there's nothing to install). All you need to do is create a document and choose source mode in the editor to edit the LaTeX code for your paper.

## Real Time Preview

The preview updates every time you change whatever files of your project, it changes also the tocs and every connection inside (tables, images, citations, etc.). In a few words it saves you by jumping the compiling of your document. Generally in a typical session that involves a bibliography, indeces and the various correlations, you have to execute from the command-line:

pdflatex main
makeindex -s main.ist -t main.alg -o main.acr main.acn
makeindex -s main.ist -t main.glg -o main.gls main.glo
bibtex main
pdflatex main
pdflatex main
makeindex main
makeindex -s main.ist -t main.alg -o main.acr main.acn
makeindex -s main.ist -t main.glg -o main.gls main.glo
pdflatex main
pdflatex main


## Conclusion

I had started to study and use LaTeX because the classical WYSWYG word processors (Microsoft Word, LibreOffice Writer, etc.) did not satisfy me in the advanced writing documents such as reports and exercitations. In Particular I had many problems with formulas, placement of contents and the reference of the items (figures, sections, bibliography, etc.). With LaTeX I get the ability to change every part of my texts and I have gone beyond this issues. My template is the result of my past efforts and with the last cleaning and upgrading represent a reliable solution for thesis and more than that!

• 1. You can start from LaTeX on Wikibooks, The Free Textbook Project
• 2. Check CTAN or better The Com­pre­hen­sive TEX Archive Net­work, it is the cen­tral place for all kinds of ma­te­rial around TEX. CTAN has cur­rently 5280 pack­ages. 2414 con­trib­u­tors have con­tributed to it. Most of the pack­ages are free and can be down­loaded and used im­me­di­ately
• 3. Overleaf is the new collaborative writing and publishing system developed by the team behind the popular writeLaTeX editor. Overleaf is designed to make the whole process of writing, editing and producing scientific papers much quicker for both authors and publishers. Overleaf: Real-time Collaborative Writing and Publishing Tools with Integrated PDF Preview. Here is my sign up link to Overleaf.

## Related Content:

### Nicola Rainiero

A civil geotechnical engineer with the ambition to facilitate own work with free software for a knowledge and collective sharing. Also, I deal with green energy and in particular shallow geothermal energy. I have always been involved in web design and 3D modelling.