\documentclass{article}

%-----------------------------------------------------------------------
% LaTeX packages
%-----------------------------------------------------------------------

\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{booktabs}
\usepackage{hyperref}
\usepackage{xspace}

%-----------------------------------------------------------------------
% Theorems
%-----------------------------------------------------------------------

\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition}
\theoremstyle{remark}
\newtheorem{rem}[thm]{Remark}

%-----------------------------------------------------------------------
% Macros
%-----------------------------------------------------------------------

\newcommand{\eg}{e.g.,\xspace}
\newcommand{\encrypt}[1]{\ensuremath{E(#1)}\xspace}
\newcommand{\decrypt}[1]{\ensuremath{D(#1)}\xspace}

%-----------------------------------------------------------------------

\begin{document}

%-----------------------------------------------------------------------
% Title
%-----------------------------------------------------------------------

\title{Template for a solution}
\author{Max Mustermann and Maxi Mustermann\\
  \normalsize Matrikelnummern: 123456, 123654\\
  \vspace{3mm}
  \normalsize Bauhaus-Universit\"at Weimar\\
}

\maketitle

%-----------------------------------------------------------------------
% Content
%-----------------------------------------------------------------------

\section{First section}
Here goes some text. Here goes \textbf{bold text}. Here goes \emph{emphasized
text}, and here \texttt{typewriter text}.
\begin{equation}
  \label{eq:area}
  S = \pi r^2
\end{equation}
One can refer to equations like this: see Equation~\ref{eq:area}. One can also
refer to sections in the same way: see Section~\ref{sec:nothing}. Or to the
bibliography like this: \cite{Cd94}. Note that you may have to compile twice
when your references changed.

To write formulas that do not have to be cited, one can use single dollars: $1
+ 1 + 2 + 3 = 7$ or double dollars for equations:
$$
1 + 1 + 2 + 3 = 7.
$$
For multi-line equations, there are the \texttt{align} or \texttt{array}
environments:
\begin{align*}
  \encrypt{x} &= k + x \bmod 26, \\
  \decrypt{x} &= k - x \bmod 26.
\end{align*}

Beautiful tables can be created very easily with the tabular and booktabs
packages.
\begin{table}[!ht]
  \centering
  \begin{tabular}{lcr} % c = centered, l = left-aligned, r = right-aligned
  \toprule
  Links & Mitte & Rechts \\
  \midrule
  1 & 2 & 3 \\
  4 & 5 & 6 \\
  \bottomrule
  \end{tabular}
\end{table}


\subsection{Subsection}
\label{sec:nothing}
More text.


\paragraph{Subsubsection.}
More more text. There are subsections, subsubsections and paragraphs. But one
can discuss whether 1.1.1 looks well, so this text stands in a paragraph.


\section{Links}
For many linux distributions, latex can be installed easily using the package
management system. On Windows, \href{http://miktex.org/download}{MiKTeX} is a
good all-in-one solution, including the latex programs and a comfortable
package manager. 

A very good starting point on How-to-Use LaTeX is, \eg the
\href{http://en.wikibooks.org/wiki/LaTeX}{Wikibook}. However, there are
millions of documentations. 

\url{http://tex.stackexchange.com/} is the stackoverflow equivalent for LaTeX-
related questions. A good link is also
\href{http://detexify.kirelabs.org/classify.html}{Detexify}, which allows you
to draw a symbol and get a list of potentially matching latex commands.

%-----------------------------------------------------------------------
% Bibliography
%-----------------------------------------------------------------------

\begin{thebibliography}{99}
  \bibitem{Cd94} Author, \emph{Title}, Journal/Editor, (year)
\end{thebibliography}

%-----------------------------------------------------------------------

\end{document}
