<p>
LaTeX is a typesetting software to produce high-quality documents<br />
like articles, books, letters, and also presentations.<br />
It allows the writer to focus on the content rather than its formatting.
</p>

<h3>Contents</h3>
<ul>
<li><a href="#install">Installation</a></li>
<li><a href="#pdflatex">Generating PDFs</a></li>
<li><a href="#docs">Document Classes</a>
<ul>
<li><a href="#doc_article">Article</a></li>
<li><a href="#doc_presentation">Presentation</a></li>
<li><a href="#doc_letter">Letter</a></li>
</ul>
</li>
<li><a href="#links">External Links</a></li>
</ul>

<h3 id="install">Installation</h3>
<p>
Different LaTeX distributions exist. Debian includes TeX Live.<br />
To install TeX Live and LaTeX packages, execute the following command:
</p>
<pre><code class="language-bash">sudo apt install texlive texlive-latex-recommended texlive-latex-extra
</code></pre>
<p>
To add support for specific languages, install corresponding packages:
</p>
<pre><code class="language-bash">sudo apt install texlive-lang-english texlive-lang-german
</code></pre>
<p>
Kile is a user-friendly LaTeX editor:
</p>
<pre><code class="language-bash">sudo apt install kile
</code></pre>

<h3 id="pdflatex">Generating PDFs</h3>
<p>
Given a TeX file, <code>pdflatex</code> generates a PDF file:
</p>
<pre><code class="language-bash">pdflatex document.tex
</code></pre>
<p>
To get all cross-references right, <code>pdflatex</code> needs to be invoked multiple times.
</p>

<h3 id="docs">Document Classes</h3>
<p>
Here are a few examples of various types of documents.<br />
These examples can be used as templates.
</p>
<p>
The generated output (PDF) is found below each example.
</p>

<h4 id="doc_article">Article</h4>
<dl class="file" id="article.tex">
<dt><code class="filename">article.tex</code></dt>
<dd>
<pre class="file"><code class="language-latex">\documentclass[a4paper]{scrartcl}

\usepackage[utf8]{inputenc}
\usepackage[english,ngerman]{babel}
\usepackage{hyperref}

\title{My Article}
\author{John Doe}
\date{2020-10-20}

\begin{document}
\selectlanguage{english}

\maketitle
\tableofcontents

\section{Introduction}
\label{sec:introduction}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At
vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
no sea takimata sanctus est Lorem ipsum dolor sit amet.

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At
vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
no sea takimata sanctus est Lorem ipsum dolor sit amet.

\begin{equation}
  \label{eq:pythagoras}
  a^2 + b^2 = c^2
\end{equation}

\end{document}
</code></pre>
</dd>
</dl>
<p>Output: <a href="./article.pdf">article.pdf</a></p>

<h4 id="doc_presentation">Presentation</h4>
<dl class="file" id="presentation.tex">
<dt><code class="filename">presentation.tex</code></dt>
<dd>
<pre class="file"><code class="language-latex">\documentclass{beamer}

\usepackage[utf8]{inputenc}
\usepackage[english,ngerman]{babel}

\usetheme{Warsaw}

\title{My Presentation}
\author{John Doe}
\date{2020-10-20}

\begin{document}
\selectlanguage{english}

\maketitle

\begin{frame}{Contents}
  \tableofcontents
\end{frame}

\section{Introduction}

\begin{frame}{First Slide}
  \begin{block}{Important things}
    \begin{itemize}
      \item First
      \item Second
      \item Third
    \end{itemize}
  \end{block}
  \begin{block}{Pythagorean theorem}
    \begin{equation*}
      a^2 + b^2 = c^2
    \end{equation*}
  \end{block}
\end{frame}

\end{document}
</code></pre>
</dd>
</dl>
<p>Output: <a href="./presentation.pdf">presentation.pdf</a></p>

<h4 id="doc_letter">Letter</h4>
<dl class="file" id="letter.tex">
<dt><code class="filename">letter.tex</code></dt>
<dd>
<pre class="file"><code class="language-latex">\documentclass[a4paper,fromalign=right]{scrlttr2}

\usepackage[utf8]{inputenc}
\usepackage[english,ngerman]{babel}

\setkomavar{fromname}{Max Mustermann}
\setkomavar{fromaddress}{%
  Hauptstraße 1\\
  8020 Graz\\
  Austria%
}
\setkomavar{place}{Graz}
\setkomavar{date}{2020-10-20}
\setkomavar{subject}{Lorem Ipsum}

\begin{document}
\selectlanguage{english}

\begin{letter}{%
  John Doe\\
  123 Maple Street\\
  Anytown, PA 17101\\
  United States%
}

\opening{Dear John,}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At
vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
no sea takimata sanctus est Lorem ipsum dolor sit amet.

\closing{Best regards,}

\encl{Instructions}

\end{letter}
\end{document}
</code></pre>
</dd>
</dl>
<p>Output: <a href="./letter.pdf">letter.pdf</a></p>

<h3 id="links">External Links</h3>
<ul>
<li><a href="https://www.latex-project.org/" target="_blank">
https://www.latex-project.org/</a></li>
<li><a href="https://www.tug.org/texlive/" target="_blank">
https://www.tug.org/texlive/</a></li>
<li><a href="https://ctan.org/" target="_blank">
https://ctan.org/</a></li>
<li><a href="https://kile.sourceforge.io/" target="_blank">
https://kile.sourceforge.io/</a></li>
</ul>