% !TEX root = ../manual.tex
% !TEX program = xelatexmk
% !TEX spellcheck = en_GB

\section{Tables}
One of the drawbacks of \LaTeX's plain-text format is entering tables.
Entering tables is simple enough, but can become convoluted quickly.
\begin{lstlisting}
\begin{table}[ht]
	\centering
	\begin{tabular}{r | c l}
		Left & Center & Right \\ \hline
		1 & 2 & 3 \\
		3 & 6 & 9 \\
	\end{tabular}
	\caption{This is a table}
	\label{tab:table}
\end{table}
\end{lstlisting}

\begin{table}[ht]
	\centering
	\begin{tabular}{r | c l}
		Left & Center & Right \\ \hline
		1 & 2 & 3 \\
		3 & 6 & 9 \\
	\end{tabular}
	\caption{This is a table}
	\label{tab:table}
\end{table}

Let’s look at all parts of the table we haven’t seen before.

\begin{multicols}{2}
\begin{lstlisting}
\begin{tabular}{r | c l}
\end{tabular}
\end{lstlisting}
\columnbreak
Start a table with three columns: one right aligned, one centered and one left aligned.
Add a separator after the first column.
\end{multicols}
\begin{multicols}{2}
\begin{lstlisting}
&
\\
\hline
\end{lstlisting}
End a column. \\
End a line. \\
Add a horizontal bar after the line.
\end{multicols}

When having to enter a large table,
it might be convenient to use a converter like
\fnhref{http://www.tablesgenerator.com/}{this online tables generator} or
\fnhref{http://truben.no/table/}{this one}.
