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

\section{Mathematics}
Maybe one of the best features \LaTeX\ has is it's extensive support of mathematics.
\fnhref{http://en.wikibooks.org/wiki/LaTeX/Mathematics}{The \LaTeX\ Wikibook} has an extensive page on it, along with all characters.

The \LaTeX\ notation for mathematics is quite widespread, in the latest versions of Microsoft Word simple \LaTeX\ mathematic notation can almost be copied verbatim into MS Word equations.

The most important thing about mathematics in \LaTeX\ is that there are two styles:
\begin{itemize}
	\item Inline style mathematics are entered between |$| and |$|. The height of all mathematics is reduces so it fits more comfortably in a line of text.
	\item Display style mathematics are entered between |\[| and |\]|. The height of the mathematics is unrestricted, which allows for quite convoluted mathematics to be displayed properly.
\end{itemize}

\begin{multicols}{2}
\begin{lstlisting}
This equation can be displayed as
$\int_0^\infty \frac{1}{\sqrt{2}}\mathrm{e}^
{-x}\, \mathrm{d}x$, or as:
\[ \int_0^\infty \frac{1}{\sqrt{2}}\mathrm{e}^
{-x}\, \mathrm{d}x \]
\end{lstlisting}
\columnbreak
This equation can be displayed as
$\int_0^\infty \frac{1}{\sqrt{2}}\mathrm{e}^{-x}\,\mathrm{d}x$,
or as:
\[ \int_0^\infty \frac{1}{\sqrt{2}}\mathrm{e}^{-x}\,\mathrm{d}x \]
\end{multicols}

When working with complex mathematics, the |amsmath| package provides more characters and some environments. The most important environments are |equation| (which allows numbered and labeled equations) and |align| (which allows aligned mathematics):

\begin{multicols}{2}
\begin{lstlisting}
\begin{equation}
	v_C = \frac{1}{sC}\cdot i_C
\end{equation}
\begin{align}
	v_C &= \frac{1}{sC}\cdot i_C \\
	&=\frac{1}{sRC}\cdot v_R
\end{align}
\end{lstlisting}
\columnbreak
\begin{equation}
	v_C = \frac{1}{sC}\cdot i_C
\end{equation}
\begin{align}
	v_C &= \frac{1}{sC}\cdot i_C \\
	    &= \frac{1}{sRC}\cdot v_R
\end{align}
\end{multicols}

Numbering can be turned off by using the |equation*| and |align*| environments.
