Skip to content

LaTeX

LaTeX installation

Online environment: Overleaf

To start, the geogeek-in-chief recommends you use the online LaTeX environment Overleaf since it has a full installation of LaTeX and there is nothing to install. If you login with your TUDelft email, you get extra features (TUDelft pays for it).

Local installation

If you want to use LaTeX locally (it's faster to compile) then you need either:

You can also combine the best of both worlds (overleaf and local), by using either the Git Integration to treat your Overleaf project as a remote repository or by using GitHub synchronisation linking your project to a GitHub repository. Check the recommendations for local editors below.

Warning

For small documents Overleaf is great. But it becomes rather slow for medium to large documents, and then using LaTeX locally is probably a better idea.

Beware that pushes from Git/GitHub can result in the loss or displacement of track changes and comments, so make sure you don't mix the two (and make your supervisors aware).

Getting started

Test yourself with an exercise

  1. Register at https://overleaf.com with your @tudelft.nl email (for an account with more options, TUDelft pays for it)
  2. Start with the template below and discover/try some features. Notice that this won't compile correctly because of the reference on line 26: the file myreferences.bib should be in the same folder
  3. copy the content of the second file to a file myreferences.bib and add it to the same folder
  4. check this demo template to know the best way to make complex things (tables, code, etc.)
  5. when all this works, try to replicate this PDF

SOLUTION

A better starting template for simple LaTeX

\documentclass[a4paper,11pt]{scrartcl}

\usepackage{graphicx}
\usepackage[utf8]{inputenc} %-- pour utiliser des accents en français
\usepackage{amsmath,amssymb,amsthm} 
\usepackage[round]{natbib}
\usepackage{url}
\usepackage{mathpazo}
\usepackage{booktabs}
\usepackage{hyperref}

\title{My great title}
\author{Jan Smit\\ \url{j.smit@tudelft.nl}}
\date{\today}

\begin{document}

\maketitle

\section{Introduction}

Lemongrass frosted gingerbread bites banana bread orange crumbled lentils sweet potato black bean burrito green pepper springtime. 
Strawberry ginger lemongrass agave green tea smoky maple tempeh glaze enchiladas couscous. 
Cranberry spritzer Malaysian cinnamon pineapple salsa apples spring cherry bomb bananas blueberry pops scotch bonnet pepper.

Bento box roasted peanuts pasta Sicilian~\citep{DeVries20}.

\bibliographystyle{abbrvnat}
\bibliography{references.bib}

\end{document}
@article{DeVries20,
  author = {De Vries, Piet},
  doi = {10.1016/j.scs.2022.104225},
  journal = {Sustainable Cities and Society},
  pages = {102222},
  title = {Understanding the relationship between urban morphology and other things},
  year = {2021}
}

Figures

Important

Make sure your figures are vector when possible, and not raster. This will make them of greater quality, especially for text.

Vector formats: PDF, SVG.

Raster formats: PNG, JPG, JPEG, GIF.

Best vector graphics drawing tools:

  • Affinity Designer (€€ but way less than Adobe)
  • Inkscape
  • IPE (integrates LaTeX text; great for triangulation and geometric stuff)
  • Adobe Illustrator (nice, but €€€)

Tables

Tables are notoriously difficult to make in LaTeX.

Tip

LaTeX package booktabs is strongly recommended!

The package \texttt{booktabs} permits you to make nicer tables than the basic ones in \LaTeX.
See for instance \autoref{tab:example}.

\usepackage{booktabs}
...
\begin{table}
  \centering
  \begin{tabular}{@{}lrrcrrc@{}} \toprule
    & \multicolumn{2}{c}{3D model} && \multicolumn{2}{c}{input} \\
    \cmidrule{2-3}  \cmidrule{5-6} 
    & solids & faces && vertices & constraints  \\ 
    \toprule
    \textbf{campus}  & 370   & 4~298  && 5~970  & 3~976   \\
    \textbf{kvz}     & 637   & 6~549  && 8~951  & 13~571  \\
    \textbf{engelen} & 1~629 & 15~870 && 23~732 & 15~868 \\ 
    \bottomrule
   \end{tabular}
  \caption{Details concerning the datasets used for the experiments.}%
\label{tab:example}
\end{table}

Flowcharts

  • draw.io (free, simple, all you probably need)
  • OmniGraffle (nice, but €€€)

Tips and tricks for LaTeX

this simple demo gives you tips and tricks to do most of the useful things in LaTeX.

Use it as the template for submitting your homework for instance.

Info

LaTeX is great but there are often 37 ways to accomplish something... The simple demo shows you what we think is "the best to do X".

Which software to use?

Editors (if you don't use Overleaf, or use Git/GitHub to edit your Overleaf project locally)

Info

For some of these editors, you can also add local grammar/spell checking, e.g. LTeX for Visual Studio Code or LanguageTool for Sublime Text.

Managing references

Drawing figures

  • IPE (integrates LaTeX text; great for triangulation and geometric stuff)
  • Affinity Designer (€€ but way less than Adobe)
  • Inkscape
  • Adobe Illustrator (nice, but €€€)

Drawing flowcharts

Equation writers

  • Grapher (graphical interface to write equations that offers the option to copy them as LaTeX expression)
  • LaTeXiT (utility to write equations in LaTeX and export them for use in other software)
  • Mathpix Snip (many cool things with equations)

Help to make tables

  • Tables Generator (LaTeX tables are tough to type and align, this helps greatly to start)