To make a section you write
\section{How to latex}

To make subsections:
\subsection{Figurer og tabeller}

And subsubsections
\subsubsection{Figures}
This is how you do figures:
\begin{figure}[h!] %Here you can write h, t, b, p or a combination of these in order of priority. They say where the figure should be placed and stand for "here, top, bottom, page" where the latter says that it should stand on a separate page. The exclamation mark tells the latex that you are a little more strict than usual and really mean what you say 
    \centering
    \includegraphics[width=.3\textwidth]{how_to/how_to_figur.png}%no spaces in the figure name!
    \caption{An interesting book}
    \label{fig:a_testfigure}%no spaces in the label either!
\end{figure}

A book that can be nice to have in project work is shown in Figure  \ref{fig:a_testfigure}.

You can force a new page by typing 
\newpage

It does not always work as well, and it can be just as good to not be so picky with formatting before you have finished writing, latex is good at sorting out formatting along the way while writing. If a figure is not "completely correct", write on and fix it at the end if it still does not look good. 

\subsubsection{Tables}
Tables are made like this

\begin{table}[h!]
    \centering
    \begin{tabular}{l c r | c} %letters indicate centering in the columns, spaces and | indicates whether there should be a blank or a line between the columns 
    \toprule
         this & is & a & pretty  \\
    \midrule     
          horrible & Table &. & but \\
          that & is & because & it \\
          is just & meant to & demonstrate a little & stuff. \\ 
    \bottomrule
    \end{tabular}
    \caption{En demo-tabell}
    \label{tab:tablename_for_referencing}%No spaces!
\end{table}

In the same way as for figures, one can refer to Table  \ref{tab:tablename_for_referencing} like this.

\subsubsection{lists}
An enumerated list
\begin{enumerate}
    \item is
    \item made 
    \item like
    \item this
\end{enumerate}

an itemized list
\begin{itemize}
    \item is
    \item made 
    \item like
    \item this
\end{itemize}

\subsubsection{Fænsi tekst}
Now I'll show some \textbf {bold} and \textit {italic}. In addition, you can type $ \gamma \rho \epsilon \sigma \kappa \epsilon $ letters. They can be both $ \Sigma \tau \Omega \rho \epsilon $ and $ \sigma \mu \alpha \alpha $. Note that special characters such as \\, \_, \&, \%, \{and \} must have a backslash in front as an escape character for latex to understand that we mean the \textit{character} \% and not the \textit{command} \% (creating comments) 

\subsection{The 4 commandments}

\begin{enumerate}
    \item Create a new .tex file! Do not write too much in each file, it is easier to find if you divide the project (just like when you program)
     \item Use folders! One folder for each section, which contains a dedicated folder for figures, is a great way to keep things organized.
     \item Do not use spaces or Norwegian letters in folder and file names
     \item Do not stress with formatting, latex (almost) always knows best. If necessary, fix details at the end. 
\end{enumerate}

\subsection{To compile this}
In order for this file to be included in the document, you just write
\\input \{how\_to\_latex\\how\_to\_latex\} (i.e. \\input\{file\_path\})
in the main.tex file and press recompile. Protip: You can click the arrows in the upper right corner to get the pdf in full screen.