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

\section{Common problems}
\LaTeX\ is sometimes a little unpredictable. Some common causes of problems are:
\begin{itemize}
	\item Spaces in filenames.
	\item Text encoding: always use utf-8. When using |pdflatex| add |\usepackage[utf8]{inputenc}| to your preamble. |xelatex| (see section~\ref{sec:latex3engines}) solves this problem.
\end{itemize}

Another thing to look out for is \emph{gobble}:
\LaTeX\ commands without an argument ‘eat’ the next space.
This can be avoided by ending the command with a backslash (\texttt{\textbackslash}) or two brackets (\texttt{\{\}}).

\begin{multicols}{2}
\begin{lstlisting}[aboveskip=-10pt]
\LaTeX is awesome, \\
\LaTeX\ is awesome, \\
\LaTeX{} is awesome, \\
{\LaTeX} is awesome.
\end{lstlisting}
\columnbreak
\LaTeX is awesome, \\
\LaTeX\ is awesome, \\
\LaTeX{} is awesome, \\
{\LaTeX} is awesome.
\end{multicols}

What you should also look out for are some reserved characted, some of them are shown in table~\ref{tab:sym}.

\begin{table}[ht]
	\centering
	\begin{tabular}{c c c}
		Symbol & Command & Ouput \\
		|^| & |\^{}| & \^{} \\
		|_| & |\_| & \_ \\
		|&| & |\&| & \& \\
		|\| & |\textbackslash| & \textbackslash \\
		|{| & |\{| & \{ \\
		|}| & |\}| & \} \\
		|$| & |\$| & \$ \\
		|%| & |\%| & \% \\
		|~| & |\~{}| & \~{} \\
		|#| & |\#| & \# \\
	\end{tabular}
	\caption{Troublesome symbols}
	\label{tab:sym}
\end{table}

For more common mistakes please look at \fnhref{http://tex.stackexchange.com/q/139873}{this question on stackexchange}.
