# Short and sweet tutorial on LaTeX

### What is LaTeX?

LaTeX is a high-quality typesetting system; it includes features designed for the production of technical and scientific documentation. LaTeX is the de facto standard for the communication and publication of scientific documents.

https://www.latex-project.org/

Simply put, latex is a markup language for generating documents. It is way more powerful than a markup language like Markdown, supporting things like complex equations. Latex is great for writing a scientific paper or thesis.

### Why use LaTeX?

Comparing Word to a latex editor is like comparing a terminal to a GUI interface. If you are interested in latex, you are probably an IT person. And us computer nerds usually prefer a terminal over a GUI, for the simple reason that typing will always be faster than using a mouse.

Also if you’ve used Word before, you know how much of a hassle it can be to get everything fitting in the right place. One random newline somewhere and the whole document shifts to another dimension. This is something that doesn’t happen in latex, as it is more consistent.

A latex editor is not a WYSIWYG (What You See Is What You Get) – type of editor like Word, so there is a learning curve. This post will help to get you started.

### How do I install LaTeX?

To start writing latex, you need 2 things. The latex distritbution and a latex editor of your choice. I personally use MikTeX (https://miktex.org/) together with Texmaker (https://www.xm1math.net/texmaker/).

### Starting a simple document

Every document needs to start with a \documentclass{type}. Based on the type of document, this will change up the style of things. Popular documents are article, report or book. For my bachelor thesis I use report, since it is well suited for larger documents.

The contents of your document needs to be wrapped with \begin{document} and \end{document}. Everything inbetween will be displayed on the page.

Putting it all together:

\documentclass{report}
\begin{document}
This is my first LaTeX document!
\end{document}

From here on you can add things like titles, table of contents, chapters, sections, … There is an enormous amount of content you can fill your pages with, and everything should fit together nicely.

### A more complex example

For my bachelor thesis, I received a template in Word (I know, booo!). Since the cover page was rather nice, I thought I’d remake it in LaTeX. Here’s a side by side of my attempt to remake it in latex and the original:

To make this I overwrote the \maketitle command with the following code:

\makeatletter
\renewcommand\maketitle{
\begin{titlepage}

\vspace*{50px}

\Huge\raggedright\textbf{BACHELOR THESIS}

\vspace{20px}
\line(1,0){140}

\vspace{30px}

\Large\textbf{Internal Penetration Testing as a Service}\\
\smallskip
\large{A thesis on how security companies can offer additional services to its customers}

\vspace{50px}

\begin{center}
\bgroup
\def\arraystretch{1.5}%
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}ll}
Bachelor & Applied Informatics \\
\hline
Pathway & Computer \& Cyber Crime Professional \\
\hline
Academic year & 2019 - 2020 \\
\hline
Student & Koen Van Hauwe \\
\hline
Interal mentor & name \\
\hline
External promotor & name \\
\end{tabular*}
\egroup

\vspace{50px}

\begin{center}
\rule{\textwidth}{2pt}
\end{center}

\vspace{10px}
\includegraphics[width=.3\textwidth,right]{howest}

\end{center}
\end{titlepage}
}
\makeatother

### Conclusion

Latex is a fun and consistent way of writing documents. While it is a bit much at first, I just got started with it as well and am already getting the hang of it. I’d say it is definitely worth learning if you dislike Word as much as I do!