renumber chapters

This commit is contained in:
Fradtschuk 2022-10-17 11:12:40 +02:00
parent 08ad3e9900
commit 9f96b5e6b9
23 changed files with 2442 additions and 2454 deletions

View File

@ -15,5 +15,5 @@
- chapter-13
- chapter-14
- chapter-15
- chapter-16

View File

@ -199,3 +199,55 @@ Text hervorheben
* Macht die **URL** im Text anklickbar.
* Probiert euch gerne auch an den anderen Textauszeichnungs-Möglichkeiten, die ihr kennengelernt habt. Löscht diese aber wieder, wenn ihr ein sauberes Dokument haben wollt.
@slide(layout=extra-content-and-preview)
@title
Flattersatz
@content
Standardmäßig setzt LaTeX Fließtext im Blocksatz, aber auch Flattersatz ist möglich.
``` {.lang-tex .hljs}
\raggedright … \raggedleft …
\centering …
```
Alternativ einsetzbare Umgebungen:
``` {.lang-tex .hljs}
\begin{flushleft} Text \end{flushleft}
\begin{flushright} Text \end{flushright}
\begin{center} Text \end{center}
```
<p data-category="Achtung!">Guter Flattersatz ist noch schwieriger als guter Blocksatz, daher lieber vermeiden!</p>
@preview
![](svg/chapter-07/ausrichtung-crop.svg)
@slide(layout=extra-content-and-preview)
@title
Einzüge und Abstände
@content
* Absätze werden standardmäßig durch Erstzeileneinzüge (`\parindent`) verdeutlicht
* Stattdessen (!) können auch Abstände (`\parskip`) verwendet werden
* Die beiden Parameter sind beliebig einstellbar:
``` {.lang-tex .hljs}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1em
plus .5em % erlaubte Dehnung
minus .5em % erlaubte Stauchung
}
```
* Mit `\noindent` kann für nur einen Absatz der Einzug abgeschaltet werden
@preview
![](./svg/chapter-07/einzüge-abstände-orig.svg)

View File

@ -197,3 +197,55 @@ Emphasising text
* Of course, you can also experiment with the other **text markup** possibilities. However, remove them afterwards, if you want to have a clean document.
@slide(layout=extra-content-and-preview)
@title
Ragged alignment
@content
By default, LaTeX sets text in full justification, but it is possible to activate ragged alignment.
``` {.lang-tex .hljs}
\raggedright … \raggedleft …
\centering …
```
Alternatively, we can use dedicated environments:
``` {.lang-tex .hljs}
\begin{flushleft} Text \end{flushleft}
\begin{flushright} Text \end{flushright}
\begin{center} Text \end{center}
```
<p data-category="Caution!">Proper ragged alignment is even more difficult than good justification, so better avoid it.</p>
@preview
![](svg/chapter-07/ausrichtung-crop.svg)
@slide(layout=extra-content-and-preview)
@title
Indentation and spacing
@content
* paragraphs are usually indicated by first-line indentation (`\parindent`)
* we can decide to use paragraph spacing (`\parskip`) instead (!)
* both parameters are customisable:
``` {.lang-tex .hljs}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1em
plus .5em % permitted stretch
minus .5em % permitted compression
}
```
* `\noindent` allows us to disable first-line indentation for a given paragraph
@preview
![](./svg/chapter-07/indentation-spacing-orig.svg)

View File

@ -4,55 +4,161 @@
7
@title
Absatz&shy;formatierung
Aufzählungen
@slide(layout=content-and-preview)
@title
Flattersatz
Ungeordnete Listen 📜
@content
Standardmäßig setzt LaTeX Fließtext im Blocksatz, aber auch Flattersatz ist möglich.
``` {.lang-tex .hljs}
\raggedright … \raggedleft …
\centering …
\begin{itemize}
\item Nudelplatten
\item Passierte Tomaten, % …
\item Oregano, Basilikum, % …
\item Mozzarella
\item Mehl
\item Milch
\end{itemize}
```
Alternativ einsetzbare Umgebungen:
``` {.lang-tex .hljs}
\begin{flushleft} Text \end{flushleft}
\begin{flushright} Text \end{flushright}
\begin{center} Text \end{center}
```
<p data-category="Achtung!">Guter Flattersatz ist noch schwieriger als guter Blocksatz, daher lieber vermeiden!</p>
Die einzelnen Stichpunkte werden in jeder Aufzählungsumgebung durch den Befehl `\item` gekennzeichnet.
@preview
![](svg/chapter-07/ausrichtung-crop.svg)
![](svg/chapter-08/itemize-crop.svg)
@slide(layout=content-and-preview)
@title
Einzüge und Abstände
Geordnete Listen und Definitionslisten
@content
* Absätze werden standardmäßig durch Erstzeileneinzüge (`\parindent`) verdeutlicht
* Stattdessen (!) können auch Abstände (`\parskip`) verwendet werden
* Die beiden Parameter sind beliebig einstellbar:
``` {.lang-tex .hljs}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1em
plus .5em % erlaubte Dehnung
minus .5em % erlaubte Stauchung
}
\begin{enumerate}
\item die Zwiebeln in einem Topf % …
\item passierte Tomaten, Möhren % …
\item mit Kräutern und Gewürzen % …
% \item …
\end{enumerate}
```
* Mit `\noindent` kann für nur einen Absatz der Einzug abgeschaltet werden
``` {.lang-tex .hljs .fragment}
\begin{description}
\item [Béchamelsauce] Béchamel % …
\item [Lasagne] Als Lasagne % …
\end{description}
```
@preview
![](./svg/chapter-07/einzüge-abstände-orig.svg)
<img class="thin-padding" src="svg/chapter-08/enumerate-crop.svg" style="margin-bottom: 0;"/>
<img class="thin-padding fragment" src="svg/chapter-08/definition-crop.svg"/>
@slide(layout=content-and-preview)
@title
Verschachtelte Listen
@content
``` {.lang-tex .hljs}
\begin{itemize}
% …
\item Gemüse \begin{itemize}
\item Passierte Tomaten
\item Möhren
\end{itemize}
\item Kräuter \begin{enumerate}
\item Oregano
\item Basilikum
\end{enumerate}
% …
\end{itemize}
```
@preview
![](svg/chapter-08/nested-lists-crop.svg)
@slide(layout=task)
@task-number
7
@title
Aufzählungen einfügen
@content
* Formatiert das Rezept in `lists.tex` im Ordner `exercises/lists` als **ungeordnete Liste** mit den Elementen *Ingredients* und *Instructions*. Nutzt dafür den Befehl `\itemize`.
* Benutzt innerhalb dieser Liste für die Zutaten eine **ungeordnete Liste** und für die Arbeitsschritte eine **geordnete Liste**.
@slide(layout=extra-content-and-preview)
@title
Kompakte Listen
@content
Das Paket `paralist` stellt Aufzählungen ohne riesige Zwischenräume zur Verfügung.
``` {.lang-tex .hljs}
\section{Zutaten}
\begin{compactitem}
% \item …
\end{compactitem}
\section{Zubereitung}
\begin{compactenum}
% \item …
\end{compactenum}
\section{Glossar}
\begin{compactdesc}
% \item …
\end{compactdesc}
```
@preview
![](svg/chapter-08/compact-crop.svg)
@slide(layout=extra-content-and-preview)
@title
Aufzählungen im Absatz
@content
Neben den kompakten Listen stellt `paralist` auch Listen zur Verfügung, die in einem Absatz stehen.
``` {.lang-tex .hljs}
Folgende Kräuter sind für % …
\begin{inparaitem}
\item Liebstöckel
\item Petersilie
\item Schnittlauch
\end{inparaitem}
```
Natürlich gibt es auch hier ein Pendant namens `inparaenum` für geordnete Listen.
@preview
<img class="thin-padding" src="svg/chapter-08/paralist-extended-crop.svg"/>
@slide(layout=extra-content-and-preview)
@title
Aufzählungsarten
@content
Die Art der Aufzählung lässt sich über den optionalen Parameter `label` ändern. Hierfür ist das Paket `enumitem` notwendig.
``` {.lang-tex .hljs}
% Römische Zahlen
\begin{enumerate}[label=\roman*]
% …
% Arabische Zahlen
\begin{enumerate}[label=\arabic*]
% …
% Alphabetisch
\begin{enumerate}[label=\alph*]
% …
```
@preview
![](svg/chapter-08/list-style-types-crop.svg)

View File

@ -4,55 +4,164 @@
7
@title
Formatting paragraphs
Enumerations
@slide(layout=content-and-preview)
@title
Ragged alignment
Unordered lists 📜
@content
By default, LaTeX sets text in full justification, but it is possible to activate ragged alignment.
``` {.lang-tex .hljs}
\raggedright … \raggedleft …
\centering …
\begin{itemize}
\item lasagna noodles
\item crushed tomatoes, % …
\item oregano, basil, % …
\item mozzarella cheese
\item flour
\item milk
\end{itemize}
```
Alternatively, we can use dedicated environments:
``` {.lang-tex .hljs}
\begin{flushleft} Text \end{flushleft}
\begin{flushright} Text \end{flushright}
\begin{center} Text \end{center}
```
<p data-category="Caution!">Proper ragged alignment is even more difficult than good justification, so better avoid it.</p>
We mark each bullet point with `\item`.
This pattern is the same for all kinds of enumerations.
@preview
![](svg/chapter-07/ausrichtung-crop.svg)
![](svg/chapter-08/itemize-english-crop.svg)
@slide(layout=content-and-preview)
@title
Indentation and spacing
Ordered and definition lists
@content
* paragraphs are usually indicated by first-line indentation (`\parindent`)
* we can decide to use paragraph spacing (`\parskip`) instead (!)
* both parameters are customisable:
``` {.lang-tex .hljs}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1em
plus .5em % permitted stretch
minus .5em % permitted compression
}
\begin{enumerate}
\item cook onions over medium % …
\item add crushed tomatoes, carrots % …
\item add herbs and spices % …
% \item …
\end{enumerate}
```
* `\noindent` allows us to disable first-line indentation for a given paragraph
``` {.lang-tex .hljs .fragment}
\begin{description}
\item [Béchamel sauce] Béchamel % …
\item [Lasagne] Lasagne (singular % …
\end{description}
```
@preview
![](./svg/chapter-07/indentation-spacing-orig.svg)
<img class="thin-padding" src="svg/chapter-08/enumerate-english-crop.svg" style="margin-bottom: 0;"/>
<img class="thin-padding fragment" src="svg/chapter-08/definition-english-crop.svg"/>
@slide(layout=content-and-preview)
@title
Nested lists
@content
``` {.lang-tex .hljs}
\begin{itemize}
% …
\item vegetables \begin{itemize}
\item crushed tomatoes
\item carrots
\end{itemize}
\item herbs \begin{enumerate}
\item oregano
\item basil
\end{enumerate}
% …
\end{itemize}
```
@preview
![](svg/chapter-08/nested-lists-english-crop.svg)
@slide(layout=task)
@task-number
7
@title
Adding enumerations
@content
* Turn the recipe in `lists.tex` into an **unordered list** consisting of the elements *Ingredients* and *Instructions*. You can find the file in the directory `exercises/lists`. Use the `itemize` command.
* Within this list, create a **unordered list** for the ingredients and a **ordered list** for the instructions.
@slide(layout=extra-content-and-preview)
@title
Compact lists
@content
The package `paralist` offers enumerations with less line spacing.
``` {.lang-tex .hljs}
\section{Ingredients}
\begin{compactitem}
% \item …
\end{compactitem}
\section{Preparation}
\begin{compactenum}
% \item …
\end{compactenum}
\section{Glossary}
\begin{compactdesc}
% \item …
\end{compactdesc}
```
@preview
![](svg/chapter-08/compact-english-crop.svg)
@slide(layout=extra-content-and-preview)
@title
In-line enumerations
@content
Another feature provided by `paralist` enables us to integrate enumerations into paragraphs.
``` {.lang-tex .hljs}
The following herbs are % …
\begin{inparaitem}
\item lovage
\item parsley
\item chives
\end{inparaitem}
```
Of course, there is an accompanying list type called `inparaenum` for ordered lists.
@preview
<img class="thin-padding" src="svg/chapter-08/paralist-extended-english-crop.svg"/>
@slide(layout=extra-content-and-preview)
@title
List styles
@content
The list style type can be set using the optional parameter `label`.
To accomplish this, we need to include the package `enumitem` first.
``` {.lang-tex .hljs}
% Roman numerals
\begin{enumerate}[label=\roman*]
% …
% Arabic numerals
\begin{enumerate}[label=\arabic*]
% …
% Alphabetical
\begin{enumerate}[label=\alph*]
% …
```
@preview
![](svg/chapter-08/list-style-types-english-crop.svg)

View File

@ -4,161 +4,225 @@
8
@title
Aufzählungen
Mathematische Formeln
@slide(layout=content-and-preview)
@title
Ungeordnete Listen 📜
Formel-Umgebungen 🧮
@content
``` {.lang-tex .hljs}
\begin{itemize}
\item Nudelplatten
\item Passierte Tomaten, % …
\item Oregano, Basilikum, % …
\item Mozzarella
\item Mehl
\item Milch
\end{itemize}
$2 \sqrt{\frac{\pi^2}{3} \cdot c_2}$
```
Die einzelnen Stichpunkte werden in jeder Aufzählungsumgebung durch den Befehl `\item` gekennzeichnet.
Mathematische Formeln können **nur im sogenannten Mathmode** gesetzt werden, der inline durch zwei Dollarzeichen aktiviert wird. Außerdem gibt es eine Blockumgebung:
``` {.lang-tex .hljs}
\begin{equation}
2 \sqrt{\frac{\pi^2}{3} \cdot c_2}
\end{equation}
```
Pakete: `amsmath`, `amsthm`, `amssymb`, `mathtools`
@preview
![](svg/chapter-08/itemize-crop.svg)
![](svg/chapter-09/simple-maths-crop.svg)
@slide(layout=content-only)
@title
Einige Beispiele
@content
<table>
<tr>
<th>Quelltext</th>
<th>Ergebnis</th>
</tr>
<tr class="fragment">
<td>`\sum_{i=1}^{n}x^2`</td>
<td>$\sum_{i=1}^{n} x^2$</td>
</tr>
<tr class="fragment">
<td>`12 \leq 4 x^2 + 13`</td>
<td>$12 \leq 4 x^2 + 13$</td>
</tr>
<tr class="fragment">
<td>`{n \choose k}`</td>
<td>${n \choose k}$</td>
</tr>
</table>
@slide(layout=content-and-preview)
@title
Geordnete Listen und Definitionslisten
Ausrichtung von mehreren Gleichungen
@content
Die Umgebung `align` erlaubt es, Gleichungen zum Beispiel am &hairsp;=&hairsp; auszurichten.
``` {.lang-tex .hljs}
\begin{enumerate}
\item die Zwiebeln in einem Topf % …
\item passierte Tomaten, Möhren % …
\item mit Kräutern und Gewürzen % …
% \item …
\end{enumerate}
\begin{align}
13 \cdot (4a - 3)^2 &= 13 … \\
&= 208a^2 - 312a + 117
\end{align}
```
``` {.lang-tex .hljs .fragment}
\begin{description}
\item [Béchamelsauce] Béchamel % …
\item [Lasagne] Als Lasagne % …
\end{description}
```
* ++ Ausgerichtet wird am `&`-Zeichen.
* ++ Zeilenumbrüche werden mit `\\` markiert.
* ++ Die Nummerierung kann bei `align` und `equation` durch durch ein Sternchen nach dem Umgebungsnamen (z.&thinsp;B. `\begin{align*}` und `\end{align*}`) unterdrückt werden.
@preview
<img class="thin-padding" src="svg/chapter-08/enumerate-crop.svg" style="margin-bottom: 0;"/>
<img class="thin-padding fragment" src="svg/chapter-08/definition-crop.svg"/>
![](svg/chapter-09/alignment-crop.svg)
@slide(layout=content-and-preview)
@title
Verschachtelte Listen
@content
``` {.lang-tex .hljs}
\begin{itemize}
% …
\item Gemüse \begin{itemize}
\item Passierte Tomaten
\item Möhren
\end{itemize}
\item Kräuter \begin{enumerate}
\item Oregano
\item Basilikum
\end{enumerate}
% …
\end{itemize}
```
@preview
![](svg/chapter-08/nested-lists-crop.svg)
@slide(layout=task)
@slide(layout=task-without-number)
@task-number
8
8a
@title
Aufzählungen einfügen
Formeln setzen
@content
* Formatiert das Rezept in `lists.tex` im Ordner `exercises/lists` als **ungeordnete Liste** mit den Elementen *Ingredients* und *Instructions*. Nutzt dafür den Befehl `\itemize`.
* Benutzt innerhalb dieser Liste für die Zutaten eine **ungeordnete Liste** und für die Arbeitsschritte eine **geordnete Liste**.
Setzt die folgenden Formeln in der Datei `exercises/maths/math-formulas.tex`.
| Bedeutung | Ergebnis |
|-----------|----------|
| Fallbeschleunigung (Deutschland) | $9,81\,\frac{m}{s^2}$ |
| pq-Formel | $x_{1,2} = - \frac{p}{2} \pm \sqrt{\left(\frac{p}{2}\right)^2 - q}$ |
| Mitternachtsformel | $x_{1,2} = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$ |
| Catalansche Zahlen | $C_n = \frac{1}{n+1} {2n \choose n} = \frac{(2n)!}{(n+1)!n!}$ |
@slide(layout=task-without-number)
@task-number
8b
@title
Formeln setzen
@content
Setzt die folgenden Formeln in der Datei `exercises/maths/math-formulas.tex`.
| Bedeutung | Ergebnis |
|-----------|----------|
| Definition der Fakultät | $n! = \prod_{i=1}^{n} i$ |
| Menge aller ungeraden natürlichen Zahlen | $\{ x \mid x \in \mathbb{N}, \mathrm{ungerade}(x) \}$ |
| Elimination $\neg\exists x$ | $\neg\exists x . p(x) \Leftrightarrow \forall x . \neg p(x)$ |
@slide(layout=extra-content-only)
@title
Weitere Beispiele
@content
<table>
<tr>
<th>Quelltext</th>
<th>Ergebnis</th>
</tr>
<tr>
<td>`(x)`, `[x]`, `\lbrace x \rbrace`, `\lvert x \rvert`</td>
<td>$(x), [x], \lbrace x\rbrace, \lvert x\rvert$</td>
</tr>
<tr>
<td>`\exists`, `\forall`, `\in`, <br />`\notin`, `\infty`</td>
<td>$\exists,\forall,\in,\notin,\infty$</td>
</tr>
<tr>
<td>`\alpha`, `\beta`, `\Gamma`, <br />`\Delta`, `\varepsilon`, `\pi`</td>
<td>$\alpha, \beta, \Gamma, \Delta, \varepsilon, \pi$</td>
</tr>
<tr>
<td>`\rightarrow`, `\leftarrow`, `\Rightarrow`, `\Leftarrow`, `\Leftrightarrow`</td>
<td>$\rightarrow, \leftarrow, \Rightarrow, \Leftarrow, \Leftrightarrow$</td>
</tr>
<tr>
<td>`(A \cup B) \cap C`</td>
<td>$(A \cup B) \cap C$</td>
</tr>
<tr>
<td>`(A \lor B) \land C`</td>
<td>$(A \lor B) \land C$</td>
</tr>
<tr>
<td>`(A \cdot B) \times C`</td>
<td>$(A \cdot B) \times C$</td>
</tr>
</table>
@slide(layout=extra-content-only)
@title
Mitwachsende Klammern
@content
<table>
<tr>
<th>Quelltext</th>
<th>Ergebnis</th>
</tr>
<tr>
<td>`\left( \frac{1}{2} \right)`</td>
<td>$\left( \frac{1}{2} \right)$</td>
</tr>
<tr>
<td>`\left[ \frac{1}{2} \right]`</td>
<td>$\left[ \frac{1}{2} \right]$</td>
</tr>
<tr>
<td>`\left\lbrace \frac{1}{2} \right\rbrace`</td>
<td>$\left\lbrace \frac{1}{2} \right\rbrace$</td>
</tr>
</table>
``` {.lang-tex .hljs}
$4 \cdot \left( \frac{1}{2} % …
```
<p style="text-align: center;">$4 \cdot \left(\frac{1}{2} +\frac{3}{ 12 \cdot \left( 2 + \frac{1}{86 \cdot \left(\frac{1}{2} + 24 \right)} \right)} \right)$</p>
@slide(layout=extra-content-and-preview)
@title
Kompakte Listen
Darstellung von Grenzen
@content
Das Paket `paralist` stellt Aufzählungen ohne riesige Zwischenräume zur Verfügung.
Mit dem Befehl `\limits` lassen sich die Grenzen von Integralen unter und über dem Integralzeichen darstellen. Bei Summen, Produkten und Grenzwerten geschieht das automatisch.
``` {.lang-tex .hljs}
\section{Zutaten}
\begin{compactitem}
% \item …
\end{compactitem}
\section{Zubereitung}
\begin{compactenum}
% \item …
\end{compactenum}
\section{Glossar}
\begin{compactdesc}
% \item …
\end{compactdesc}
\sum_{i=1}^{n^2}(x+2)
\prod_{j=1}^{100}(3 \cdot x)
\lim_{x \rightarrow \infty}(14x^3 - 12)
\int\limits_{-12}^{4}(14x^3 - 12)
```
@preview
![](svg/chapter-08/compact-crop.svg)
<p data-category="Achtung!">Der Einsatz von `\limits` sollte im Fließtext vermieden werden.</p>
@slide(layout=extra-content-and-preview)
@preview
![](svg/chapter-09/limits-crop.svg)
@slide(layout=extra-content-only)
@title
Aufzählungen im Absatz
Mengenschreibweise
@content
Neben den kompakten Listen stellt `paralist` auch Listen zur Verfügung, die in einem Absatz stehen.
Manchmal ist es notwendig, im Zusammenhang mit der Mengenschreibweise Prädikate unter Verwendung von textuellen Beschreibungen oder längeren Funktionsnamen zu definieren.
Für diesen Fall gibt es den Befehl `\mathrm{}`.
<p style="text-align: center;">$\left\lbrace x \mid tiefe(x) \geq 20\right\rbrace$</p>
<p style="text-align: center;">$\left\lbrace x \mid \mathrm{tiefe}(x) \geq 20\right\rbrace$</p>
``` {.lang-tex .hljs}
Folgende Kräuter sind für % …
\begin{inparaitem}
\item Liebstöckel
\item Petersilie
\item Schnittlauch
\end{inparaitem}
```
Natürlich gibt es auch hier ein Pendant namens `inparaenum` für geordnete Listen.
@preview
<img class="thin-padding" src="svg/chapter-08/paralist-extended-crop.svg"/>
@slide(layout=extra-content-and-preview)
@title
Aufzählungsarten
@content
Die Art der Aufzählung lässt sich über den optionalen Parameter `label` ändern. Hierfür ist das Paket `enumitem` notwendig.
``` {.lang-tex .hljs}
% Römische Zahlen
\begin{enumerate}[label=\roman*]
% …
% Arabische Zahlen
\begin{enumerate}[label=\arabic*]
% …
% Alphabetisch
\begin{enumerate}[label=\alph*]
% …
```
@preview
![](svg/chapter-08/list-style-types-crop.svg)
$\left\lbrace x \mid \mathrm{tiefe}(x) …
```

View File

@ -4,164 +4,230 @@
8
@title
Enumerations
Typesetting mathematics
@slide(layout=content-and-preview)
@title
Unordered lists 📜
Formula environments 🧮
@content
``` {.lang-tex .hljs}
\begin{itemize}
\item lasagna noodles
\item crushed tomatoes, % …
\item oregano, basil, % …
\item mozzarella cheese
\item flour
\item milk
\end{itemize}
$2 \sqrt{\frac{\pi^2}{3} \cdot c_2}$
```
We mark each bullet point with `\item`.
This pattern is the same for all kinds of enumerations.
Mathematical formulas are only accepted in the so-called **math mode.**
In-line formulas must therefor be guarded by two dollar signs.
We can also use the `equation` block environment:
``` {.lang-tex .hljs}
\begin{equation}
2 \sqrt{\frac{\pi^2}{3} \cdot c_2}
\end{equation}
```
Packages: `amsmath`, `amsthm`, `amssymb`, `mathtools`
@preview
![](svg/chapter-08/itemize-english-crop.svg)
![](svg/chapter-09/simple-maths-crop.svg)
@slide(layout=content-only)
@title
Examples
@content
<table>
<tr>
<th>source code</th>
<th>result</th>
</tr>
<tr class="fragment">
<td>`\sum_{i=1}^{n}x^2`</td>
<td>$\sum_{i=1}^{n} x^2$</td>
</tr>
<tr class="fragment">
<td>`12 \leq 4 x^2 + 13`</td>
<td>$12 \leq 4 x^2 + 13$</td>
</tr>
<tr class="fragment">
<td>`{n \choose k}`</td>
<td>${n \choose k}$</td>
</tr>
</table>
@slide(layout=content-and-preview)
@title
Ordered and definition lists
Aligning a group of equations
@content
The `align` environment permits us to align equations at certain positions like the &hairsp;=&hairsp; character.
``` {.lang-tex .hljs}
\begin{enumerate}
\item cook onions over medium % …
\item add crushed tomatoes, carrots % …
\item add herbs and spices % …
% \item …
\end{enumerate}
\begin{align}
13 \cdot (4a - 3)^2 &= 13 … \\
&= 208a^2 - 312a + 117
\end{align}
```
``` {.lang-tex .hljs .fragment}
\begin{description}
\item [Béchamel sauce] Béchamel % …
\item [Lasagne] Lasagne (singular % …
\end{description}
```
* ++ The equations will be aligned with respect to the ampersands (`&`).
* ++ We can mark a new line using `\\`.
* ++ `align` and `equation` will not be numbered if we add an asterisk after their names (e.&thinsp;g. `\begin{align*}` and `\end{align*}`).
@preview
<img class="thin-padding" src="svg/chapter-08/enumerate-english-crop.svg" style="margin-bottom: 0;"/>
<img class="thin-padding fragment" src="svg/chapter-08/definition-english-crop.svg"/>
@slide(layout=content-and-preview)
@title
Nested lists
@content
``` {.lang-tex .hljs}
\begin{itemize}
% …
\item vegetables \begin{itemize}
\item crushed tomatoes
\item carrots
\end{itemize}
\item herbs \begin{enumerate}
\item oregano
\item basil
\end{enumerate}
% …
\end{itemize}
```
@preview
![](svg/chapter-08/nested-lists-english-crop.svg)
![](svg/chapter-09/alignment-crop.svg)
@slide(layout=task)
@slide(layout=task-without-number)
@task-number
8
8a
@title
Adding enumerations
Typesetting mathematics
@content
* Turn the recipe in `lists.tex` into an **unordered list** consisting of the elements *Ingredients* and *Instructions*. You can find the file in the directory `exercises/lists`. Use the `itemize` command.
* Within this list, create a **unordered list** for the ingredients and a **ordered list** for the instructions.
Code up the following formulas in the file `exercises/maths/math-formulas.tex`.
| Meaning | Result |
|---------|--------|
| Gravitational acceleration | $9,81\,\frac{m}{s^2}$ |
| Formula to solve quadratic equations | $x_{1,2} = - \frac{p}{2} \pm \sqrt{\left(\frac{p}{2}\right)^2 - q}$ |
| Another formula to solve quadratic equations | $x_{1,2} = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$ |
| Catalan numbers | $C_n = \frac{1}{n+1} {2n \choose n} = \frac{(2n)!}{(n+1)!n!}$ |
@slide(layout=task-without-number)
@task-number
8b
@title
Typesetting mathematics
@content
Code up the following formulas in the file `exercises/maths/math-formulas.tex`.
| Meaning | Result |
|---------|--------|
| Definition of factorial | $n! = \prod_{i=1}^{n} i$ |
| Set of all odd natural numbers | $\{ x \mid x \in \mathbb{N}, \mathrm{odd}(x) \}$ |
| Elimination $\neg\exists x$ | $\neg\exists x . p(x) \Leftrightarrow \forall x . \neg p(x)$ |
@slide(layout=extra-content-only)
@title
More examples
@content
<table>
<tr>
<th>source code</th>
<th>result</th>
</tr>
<tr>
<td>`(x)`, `[x]`, `\lbrace x \rbrace`, `\lvert x \rvert`</td>
<td>$(x), [x], \lbrace x\rbrace, \lvert x\rvert$</td>
</tr>
<tr>
<td>`\exists`, `\forall`, `\in`, <br />`\notin`, `\infty`</td>
<td>$\exists,\forall,\in,\notin,\infty$</td>
</tr>
<tr>
<td>`\alpha`, `\beta`, `\Gamma`, <br />`\Delta`, `\varepsilon`, `\pi`</td>
<td>$\alpha, \beta, \Gamma, \Delta, \varepsilon, \pi$</td>
</tr>
<tr>
<td>`\rightarrow`, `\leftarrow`, `\Rightarrow`, `\Leftarrow`, `\Leftrightarrow`</td>
<td>$\rightarrow, \leftarrow, \Rightarrow, \Leftarrow, \Leftrightarrow$</td>
</tr>
<tr>
<td>`(A \cup B) \cap C`</td>
<td>$(A \cup B) \cap C$</td>
</tr>
<tr>
<td>`(A \lor B) \land C`</td>
<td>$(A \lor B) \land C$</td>
</tr>
<tr>
<td>`(A \cdot B) \times C`</td>
<td>$(A \cdot B) \times C$</td>
</tr>
</table>
@slide(layout=extra-content-only)
@title
Height-adapting braces
@content
<table>
<tr>
<th>source code</th>
<th>result</th>
</tr>
<tr>
<td>`\left( \frac{1}{2} \right)`</td>
<td>$\left( \frac{1}{2} \right)$</td>
</tr>
<tr>
<td>`\left[ \frac{1}{2} \right]`</td>
<td>$\left[ \frac{1}{2} \right]$</td>
</tr>
<tr>
<td>`\left\lbrace \frac{1}{2} \right\rbrace`</td>
<td>$\left\lbrace \frac{1}{2} \right\rbrace$</td>
</tr>
</table>
``` {.lang-tex .hljs}
$4 \cdot \left( \frac{1}{2} % …
```
<p style="text-align: center;">$4 \cdot \left(\frac{1}{2} +\frac{3}{ 12 \cdot \left( 2 + \frac{1}{86 \cdot \left(\frac{1}{2} + 24 \right)} \right)} \right)$</p>
@slide(layout=extra-content-and-preview)
@title
Compact lists
Depicting boundaries
@content
The package `paralist` offers enumerations with less line spacing.
The bounds of an integral can be enforced to appear above and below the integral symbol using the `\limits` command.
This is the standard behaviour for sums, products and limits.
``` {.lang-tex .hljs}
\section{Ingredients}
\begin{compactitem}
% \item …
\end{compactitem}
\section{Preparation}
\begin{compactenum}
% \item …
\end{compactenum}
\section{Glossary}
\begin{compactdesc}
% \item …
\end{compactdesc}
\sum_{i=1}^{n^2}(x+2)
\prod_{j=1}^{100}(3 \cdot x)
\lim_{x \rightarrow \infty}(14x^3 - 12)
\int\limits_{-12}^{4}(14x^3 - 12)
```
@preview
![](svg/chapter-08/compact-english-crop.svg)
<p data-category="Caution!">Don't use `\limits` inline.</p>
@slide(layout=extra-content-and-preview)
@preview
![](svg/chapter-09/limits-crop.svg)
@slide(layout=extra-content-only)
@title
In-line enumerations
Set-builder notation
@content
Another feature provided by `paralist` enables us to integrate enumerations into paragraphs.
In certain situations, it is more adequate to use textual predicates or long function names within the set builder notation.
``` {.lang-tex .hljs}
The following herbs are % …
\begin{inparaitem}
\item lovage
\item parsley
\item chives
\end{inparaitem}
```
This is where `\mathrm{}` comes into play.
Of course, there is an accompanying list type called `inparaenum` for ordered lists.
<p style="text-align: center;">$\left\lbrace x \mid frequency(x) \geq 20\right\rbrace$</p>
<p style="text-align: center;">$\left\lbrace x \mid \mathrm{frequency}(x) \geq 20\right\rbrace$</p>
@preview
<img class="thin-padding" src="svg/chapter-08/paralist-extended-english-crop.svg"/>
@slide(layout=extra-content-and-preview)
@title
List styles
@content
The list style type can be set using the optional parameter `label`.
To accomplish this, we need to include the package `enumitem` first.
``` {.lang-tex .hljs}
% Roman numerals
\begin{enumerate}[label=\roman*]
% …
% Arabic numerals
\begin{enumerate}[label=\arabic*]
% …
% Alphabetical
\begin{enumerate}[label=\alph*]
% …
```
@preview
![](svg/chapter-08/list-style-types-english-crop.svg)
``` {.lang-tex .hljs .fragment}
$\left\lbrace x \mid \mathrm{frequency} …
```

View File

@ -4,225 +4,110 @@
9
@title
Mathematische Formeln
Grafiken
@slide(layout=content-and-preview)
@title
Formel-Umgebungen 🧮
@content
``` {.lang-tex .hljs}
$2 \sqrt{\frac{\pi^2}{3} \cdot c_2}$
```
Mathematische Formeln können **nur im sogenannten Mathmode** gesetzt werden, der inline durch zwei Dollarzeichen aktiviert wird. Außerdem gibt es eine Blockumgebung:
``` {.lang-tex .hljs}
\begin{equation}
2 \sqrt{\frac{\pi^2}{3} \cdot c_2}
\end{equation}
```
Pakete: `amsmath`, `amsthm`, `amssymb`, `mathtools`
@preview
![](svg/chapter-09/simple-maths-crop.svg)
@slide(layout=content-only)
@title
Einige Beispiele
Grafiken abbilden <span class="emoji">🖼️</span>
@content
Um Grafiken darzustellen, muss das Paket `graphicx` eingebunden werden.
``` {.lang-tex .hljs}
\begin{figure}
\includegraphics{<dateipfad>}
\caption[<kurztitel (abbildungsver-
zeichnis)>]{<bildunterschrift>}
\end{figure}
```
Bildgröße angeben:
``` {.lang-tex .hljs}
\includegraphics[width=0.5\textwidth,
height=5cm]{<dateipfad>}
```
@slide(layout=content-only)
@title
Positionierung auf der Seite
@content
``` {.lang-tex .hljs}
\begin{figure}[<positionskürzel>]
```
LaTeX positioniert Grafiken automatisch. Durch Kürzel können wir unsere Präferenzen (auch in Kombination) angeben.
<table>
<tr>
<th>Quelltext</th>
<th>Ergebnis</th>
</tr>
<tr class="fragment">
<td>`\sum_{i=1}^{n}x^2`</td>
<td>$\sum_{i=1}^{n} x^2$</td>
</tr>
<tr class="fragment">
<td>`12 \leq 4 x^2 + 13`</td>
<td>$12 \leq 4 x^2 + 13$</td>
</tr>
<tr class="fragment">
<td>`{n \choose k}`</td>
<td>${n \choose k}$</td>
</tr>
<tr>
<th style="min-width:4em">Kürzel</th>
<th>Position</th>
</tr>
<tr class="fragment">
<td>h</td>
<td>hier, wenn es dir recht ist</td>
</tr>
<tr class="fragment">
<td>t</td>
<td>oberer Seitenrand (top)</td>
</tr>
<tr class="fragment">
<td>b</td>
<td>unterer Seitenrand (bottom)</td>
</tr>
<tr class="fragment">
<td>p</td>
<td>auf einer eigenen Seite (page)</td>
</tr>
<tr class="fragment">
<td>H</td>
<td>Hier, verdammt noch mal! <br />(benötigt Paket `float`)</td>
</tr>
</table>
@slide(layout=content-and-preview)
@slide(layout=content-only)
@title
Ausrichtung von mehreren Gleichungen
Zentrierte Anordnung
@content
Die Umgebung `align` erlaubt es, Gleichungen zum Beispiel am &hairsp;=&hairsp; auszurichten.
``` {.lang-tex .hljs}
\begin{align}
13 \cdot (4a - 3)^2 &= 13 … \\
&= 208a^2 - 312a + 117
\end{align}
\begin{figure}[<position>]
\begin{center}
\includegraphics{<dateipfad>}
\end{center}
\end{figure}
```
* ++ Ausgerichtet wird am `&`-Zeichen.
* ++ Zeilenumbrüche werden mit `\\` markiert.
* ++ Die Nummerierung kann bei `align` und `equation` durch durch ein Sternchen nach dem Umgebungsnamen (z.&thinsp;B. `\begin{align*}` und `\end{align*}`) unterdrückt werden.
Alternativ:
@preview
![](svg/chapter-09/alignment-crop.svg)
``` {.lang-tex .hljs}
\begin{figure}[<position>]
\centering
\includegraphics{<dateipfad>}
\end{figure}
```
@slide(layout=task-without-number)
@slide(layout=task)
@task-number
9a
9
@title
Formeln setzen
Grafiken einfügen
@content
Setzt die folgenden Formeln in der Datei `exercises/maths/math-formulas.tex`.
| Bedeutung | Ergebnis |
|-----------|----------|
| Fallbeschleunigung (Deutschland) | $9,81\,\frac{m}{s^2}$ |
| pq-Formel | $x_{1,2} = - \frac{p}{2} \pm \sqrt{\left(\frac{p}{2}\right)^2 - q}$ |
| Mitternachtsformel | $x_{1,2} = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$ |
| Catalansche Zahlen | $C_n = \frac{1}{n+1} {2n \choose n} = \frac{(2n)!}{(n+1)!n!}$ |
@slide(layout=task-without-number)
@task-number
9b
@title
Formeln setzen
@content
Setzt die folgenden Formeln in der Datei `exercises/maths/math-formulas.tex`.
| Bedeutung | Ergebnis |
|-----------|----------|
| Definition der Fakultät | $n! = \prod_{i=1}^{n} i$ |
| Menge aller ungeraden natürlichen Zahlen | $\{ x \mid x \in \mathbb{N}, \mathrm{ungerade}(x) \}$ |
| Elimination $\neg\exists x$ | $\neg\exists x . p(x) \Leftrightarrow \forall x . \neg p(x)$ |
@slide(layout=extra-content-only)
@title
Weitere Beispiele
@content
<table>
<tr>
<th>Quelltext</th>
<th>Ergebnis</th>
</tr>
<tr>
<td>`(x)`, `[x]`, `\lbrace x \rbrace`, `\lvert x \rvert`</td>
<td>$(x), [x], \lbrace x\rbrace, \lvert x\rvert$</td>
</tr>
<tr>
<td>`\exists`, `\forall`, `\in`, <br />`\notin`, `\infty`</td>
<td>$\exists,\forall,\in,\notin,\infty$</td>
</tr>
<tr>
<td>`\alpha`, `\beta`, `\Gamma`, <br />`\Delta`, `\varepsilon`, `\pi`</td>
<td>$\alpha, \beta, \Gamma, \Delta, \varepsilon, \pi$</td>
</tr>
<tr>
<td>`\rightarrow`, `\leftarrow`, `\Rightarrow`, `\Leftarrow`, `\Leftrightarrow`</td>
<td>$\rightarrow, \leftarrow, \Rightarrow, \Leftarrow, \Leftrightarrow$</td>
</tr>
<tr>
<td>`(A \cup B) \cap C`</td>
<td>$(A \cup B) \cap C$</td>
</tr>
<tr>
<td>`(A \lor B) \land C`</td>
<td>$(A \lor B) \land C$</td>
</tr>
<tr>
<td>`(A \cdot B) \times C`</td>
<td>$(A \cdot B) \times C$</td>
</tr>
</table>
@slide(layout=extra-content-only)
@title
Mitwachsende Klammern
@content
<table>
<tr>
<th>Quelltext</th>
<th>Ergebnis</th>
</tr>
<tr>
<td>`\left( \frac{1}{2} \right)`</td>
<td>$\left( \frac{1}{2} \right)$</td>
</tr>
<tr>
<td>`\left[ \frac{1}{2} \right]`</td>
<td>$\left[ \frac{1}{2} \right]$</td>
</tr>
<tr>
<td>`\left\lbrace \frac{1}{2} \right\rbrace`</td>
<td>$\left\lbrace \frac{1}{2} \right\rbrace$</td>
</tr>
</table>
``` {.lang-tex .hljs}
$4 \cdot \left( \frac{1}{2} % …
```
<p style="text-align: center;">$4 \cdot \left(\frac{1}{2} +\frac{3}{ 12 \cdot \left( 2 + \frac{1}{86 \cdot \left(\frac{1}{2} + 24 \right)} \right)} \right)$</p>
@slide(layout=extra-content-and-preview)
@title
Darstellung von Grenzen
@content
Mit dem Befehl `\limits` lassen sich die Grenzen von Integralen unter und über dem Integralzeichen darstellen. Bei Summen, Produkten und Grenzwerten geschieht das automatisch.
``` {.lang-tex .hljs}
\sum_{i=1}^{n^2}(x+2)
\prod_{j=1}^{100}(3 \cdot x)
\lim_{x \rightarrow \infty}(14x^3 - 12)
\int\limits_{-12}^{4}(14x^3 - 12)
```
<p data-category="Achtung!">Der Einsatz von `\limits` sollte im Fließtext vermieden werden.</p>
@preview
![](svg/chapter-09/limits-crop.svg)
@slide(layout=extra-content-only)
@title
Mengenschreibweise
@content
Manchmal ist es notwendig, im Zusammenhang mit der Mengenschreibweise Prädikate unter Verwendung von textuellen Beschreibungen oder längeren Funktionsnamen zu definieren.
Für diesen Fall gibt es den Befehl `\mathrm{}`.
<p style="text-align: center;">$\left\lbrace x \mid tiefe(x) \geq 20\right\rbrace$</p>
<p style="text-align: center;">$\left\lbrace x \mid \mathrm{tiefe}(x) \geq 20\right\rbrace$</p>
``` {.lang-tex .hljs}
$\left\lbrace x \mid \mathrm{tiefe}(x) …
```
* Im Ordner `exercises/graphics` findet ihr eine Bilddatei namens `latex-logo.png`.
* Fügt sie **genau** unterhalb dieser Aufgabenstellung im Skript ein.
* Das Bild soll **zentriert** auf der Seite eingebunden werden.
* Fügt außerdem eine **Bildunterschrift** ein.
* Passt die **Größe** des Bildes an Breite der Seite (`\textwidth`) an.

View File

@ -4,230 +4,110 @@
9
@title
Typesetting mathematics
Graphics
@slide(layout=content-and-preview)
@title
Formula environments 🧮
@content
``` {.lang-tex .hljs}
$2 \sqrt{\frac{\pi^2}{3} \cdot c_2}$
```
Mathematical formulas are only accepted in the so-called **math mode.**
In-line formulas must therefor be guarded by two dollar signs.
We can also use the `equation` block environment:
``` {.lang-tex .hljs}
\begin{equation}
2 \sqrt{\frac{\pi^2}{3} \cdot c_2}
\end{equation}
```
Packages: `amsmath`, `amsthm`, `amssymb`, `mathtools`
@preview
![](svg/chapter-09/simple-maths-crop.svg)
@slide(layout=content-only)
@title
Examples
Including graphics <span class="emoji">🖼️</span>
@content
To display graphics, we need the `graphicx` package.
``` {.lang-tex .hljs}
\begin{figure}
\includegraphics{<file path>}
\caption[<short caption (table of
figures)>]{<full caption>}
\end{figure}
```
Specifying the size:
``` {.lang-tex .hljs}
\includegraphics[width=0.5\textwidth,
height=5cm]{<file path>}
```
@slide(layout=content-only)
@title
Layout on the page
@content
``` {.lang-tex .hljs}
\begin{figure}[<position code>]
```
LaTeX places graphics automatically. With position codes, we can express our preferences (they can be combined as well).
<table>
<tr>
<th>source code</th>
<th>result</th>
</tr>
<tr class="fragment">
<td>`\sum_{i=1}^{n}x^2`</td>
<td>$\sum_{i=1}^{n} x^2$</td>
</tr>
<tr class="fragment">
<td>`12 \leq 4 x^2 + 13`</td>
<td>$12 \leq 4 x^2 + 13$</td>
</tr>
<tr class="fragment">
<td>`{n \choose k}`</td>
<td>${n \choose k}$</td>
</tr>
<tr>
<th style="min-width:4em">code</th>
<th>position</th>
</tr>
<tr class="fragment">
<td>h</td>
<td>here, if you dont mind</td>
</tr>
<tr class="fragment">
<td>t</td>
<td>top of the page</td>
</tr>
<tr class="fragment">
<td>b</td>
<td>bottom of the page</td>
</tr>
<tr class="fragment">
<td>p</td>
<td>on its own page</td>
</tr>
<tr class="fragment">
<td>H</td>
<td>Here, for Gods sake! <br />(`float` package required)</td>
</tr>
</table>
@slide(layout=content-and-preview)
@slide(layout=content-only)
@title
Aligning a group of equations
Centred alignment
@content
The `align` environment permits us to align equations at certain positions like the &hairsp;=&hairsp; character.
``` {.lang-tex .hljs}
\begin{align}
13 \cdot (4a - 3)^2 &= 13 … \\
&= 208a^2 - 312a + 117
\end{align}
\begin{figure}[<position>]
\begin{center}
\includegraphics{<path-to-file>}
\end{center}
\end{figure}
```
* ++ The equations will be aligned with respect to the ampersands (`&`).
* ++ We can mark a new line using `\\`.
* ++ `align` and `equation` will not be numbered if we add an asterisk after their names (e.&thinsp;g. `\begin{align*}` and `\end{align*}`).
Alternatively:
@preview
![](svg/chapter-09/alignment-crop.svg)
``` {.lang-tex .hljs}
\begin{figure}[<position>]
\centering
\includegraphics{<path-to-file>}
\end{figure}
```
@slide(layout=task-without-number)
@slide(layout=task)
@task-number
9a
9
@title
Typesetting mathematics
Inserting graphics
@content
Code up the following formulas in the file `exercises/maths/math-formulas.tex`.
| Meaning | Result |
|---------|--------|
| Gravitational acceleration | $9,81\,\frac{m}{s^2}$ |
| Formula to solve quadratic equations | $x_{1,2} = - \frac{p}{2} \pm \sqrt{\left(\frac{p}{2}\right)^2 - q}$ |
| Another formula to solve quadratic equations | $x_{1,2} = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$ |
| Catalan numbers | $C_n = \frac{1}{n+1} {2n \choose n} = \frac{(2n)!}{(n+1)!n!}$ |
@slide(layout=task-without-number)
@task-number
9b
@title
Typesetting mathematics
@content
Code up the following formulas in the file `exercises/maths/math-formulas.tex`.
| Meaning | Result |
|---------|--------|
| Definition of factorial | $n! = \prod_{i=1}^{n} i$ |
| Set of all odd natural numbers | $\{ x \mid x \in \mathbb{N}, \mathrm{odd}(x) \}$ |
| Elimination $\neg\exists x$ | $\neg\exists x . p(x) \Leftrightarrow \forall x . \neg p(x)$ |
@slide(layout=extra-content-only)
@title
More examples
@content
<table>
<tr>
<th>source code</th>
<th>result</th>
</tr>
<tr>
<td>`(x)`, `[x]`, `\lbrace x \rbrace`, `\lvert x \rvert`</td>
<td>$(x), [x], \lbrace x\rbrace, \lvert x\rvert$</td>
</tr>
<tr>
<td>`\exists`, `\forall`, `\in`, <br />`\notin`, `\infty`</td>
<td>$\exists,\forall,\in,\notin,\infty$</td>
</tr>
<tr>
<td>`\alpha`, `\beta`, `\Gamma`, <br />`\Delta`, `\varepsilon`, `\pi`</td>
<td>$\alpha, \beta, \Gamma, \Delta, \varepsilon, \pi$</td>
</tr>
<tr>
<td>`\rightarrow`, `\leftarrow`, `\Rightarrow`, `\Leftarrow`, `\Leftrightarrow`</td>
<td>$\rightarrow, \leftarrow, \Rightarrow, \Leftarrow, \Leftrightarrow$</td>
</tr>
<tr>
<td>`(A \cup B) \cap C`</td>
<td>$(A \cup B) \cap C$</td>
</tr>
<tr>
<td>`(A \lor B) \land C`</td>
<td>$(A \lor B) \land C$</td>
</tr>
<tr>
<td>`(A \cdot B) \times C`</td>
<td>$(A \cdot B) \times C$</td>
</tr>
</table>
@slide(layout=extra-content-only)
@title
Height-adapting braces
@content
<table>
<tr>
<th>source code</th>
<th>result</th>
</tr>
<tr>
<td>`\left( \frac{1}{2} \right)`</td>
<td>$\left( \frac{1}{2} \right)$</td>
</tr>
<tr>
<td>`\left[ \frac{1}{2} \right]`</td>
<td>$\left[ \frac{1}{2} \right]$</td>
</tr>
<tr>
<td>`\left\lbrace \frac{1}{2} \right\rbrace`</td>
<td>$\left\lbrace \frac{1}{2} \right\rbrace$</td>
</tr>
</table>
``` {.lang-tex .hljs}
$4 \cdot \left( \frac{1}{2} % …
```
<p style="text-align: center;">$4 \cdot \left(\frac{1}{2} +\frac{3}{ 12 \cdot \left( 2 + \frac{1}{86 \cdot \left(\frac{1}{2} + 24 \right)} \right)} \right)$</p>
@slide(layout=extra-content-and-preview)
@title
Depicting boundaries
@content
The bounds of an integral can be enforced to appear above and below the integral symbol using the `\limits` command.
This is the standard behaviour for sums, products and limits.
``` {.lang-tex .hljs}
\sum_{i=1}^{n^2}(x+2)
\prod_{j=1}^{100}(3 \cdot x)
\lim_{x \rightarrow \infty}(14x^3 - 12)
\int\limits_{-12}^{4}(14x^3 - 12)
```
<p data-category="Caution!">Don't use `\limits` inline.</p>
@preview
![](svg/chapter-09/limits-crop.svg)
@slide(layout=extra-content-only)
@title
Set-builder notation
@content
In certain situations, it is more adequate to use textual predicates or long function names within the set builder notation.
This is where `\mathrm{}` comes into play.
<p style="text-align: center;">$\left\lbrace x \mid frequency(x) \geq 20\right\rbrace$</p>
<p style="text-align: center;">$\left\lbrace x \mid \mathrm{frequency}(x) \geq 20\right\rbrace$</p>
``` {.lang-tex .hljs .fragment}
$\left\lbrace x \mid \mathrm{frequency} …
```
* In the directory `exercises/graphics` you can find an image file named `latex-logo.png`.
* **Include** the figure in `exercises/graphics/graphics.tex` and place it **exactly** where you include it.
* The image shall be **centered**.
* Additionally, add a **caption** for the figure.
* Adapt the **width** of the image to the width of the text (`\textwidth`).

View File

@ -4,110 +4,230 @@
10
@title
Grafiken
Tabellen
@slide(layout=content-only)
@title
Grafiken abbilden <span class="emoji">🖼</span>
Grundstruktur <span class="emoji">🗒</span>
@content
Um Grafiken darzustellen, muss das Paket `graphicx` eingebunden werden.
Für typografisch schöne Tabellen nutzen wir das Paket `booktabs`.
``` {.lang-tex .hljs}
\begin{figure}
\includegraphics{<dateipfad>}
\caption[<kurztitel (abbildungsver-
zeichnis)>]{<bildunterschrift>}
\end{figure}
``` {.hljs .lang-tex}
\usepackage{booktabs}
```
Bildgröße angeben:
``` {.lang-tex .hljs}
\includegraphics[width=0.5\textwidth,
height=5cm]{<dateipfad>}
``` {.hljs .lang-tex}
\begin{table}[<position>]
\begin{tabular}{<spaltendefinition>}
% Tabelleninhalt
\end{tabular}
\caption{<tabellenunterschrift>}
\end{table}
```
Die Positionierung erfolgt analog zu Grafiken.
@slide(layout=content-only)
@slide(layout=content-and-preview)
@title
Positionierung auf der Seite
Spaltendefinitionen
@content
``` {.lang-tex .hljs}
\begin{figure}[<positionskürzel>]
``` {.hljs .lang-tex}
\begin{tabular}{lrcl}
% Tabelleninhalt
\end{tabular}
```
LaTeX positioniert Grafiken automatisch. Durch Kürzel können wir unsere Präferenzen (auch in Kombination) angeben.
<table>
<tr>
<th style="min-width:4em">Kürzel</th>
<th>Position</th>
<th>Kürzel</th>
<th>Bedeutung</th>
</tr>
<tr class="fragment">
<td>h</td>
<td>hier, wenn es dir recht ist</td>
<td>l</td>
<td>linksbündige Spalte</td>
</tr>
<tr class="fragment">
<td>t</td>
<td>oberer Seitenrand (top)</td>
<td>c</td>
<td>zentrierte Spalte</td>
</tr>
<tr class="fragment">
<td>b</td>
<td>unterer Seitenrand (bottom)</td>
</tr>
<tr class="fragment">
<td>p</td>
<td>auf einer eigenen Seite (page)</td>
</tr>
<tr class="fragment">
<td>H</td>
<td>Hier, verdammt noch mal! <br />(benötigt Paket `float`)</td>
<td>r</td>
<td>rechtsbündige Spalte</td>
</tr>
</table>
++ Vertikale Trennlinien und doppelte horizontale Linien sind unter Typograph\*innen nicht gern gesehen und sollten vermieden werden.
@preview
![](svg/chapter-12/tabelle-beispiel-crop.svg){.thin-padding}
@slide(layout=content-and-preview)
@title
Tabelleninhalt
@content
``` {.hljs .lang-tex}
\begin{tabular}{lll}
\toprule
Spalte 1 & Spalte 2 & Spalte 3 \\
\midrule
Inhalt a & Inhalt b & Inhalt c \\
Inhalt e & Inhalt f & Inhalt g \\
Inhalt i & Inhalt j & Inhalt k \\
\bottomrule
\end{tabular}
```
* ++ Zellen werden durch `&` abgetrennt.
* ++ Reihen werden durch `\\` beendet.
* ++ `\toprule`, `\midrule` und `\bottomrule` strukturieren die Tabelle.
@preview
![](svg/chapter-12/tabelle-inhalt-beispiel-crop.svg){.thin-padding}
@slide(layout=wide-content)
@title
Die gesamte Tabelle
@content
``` {.hljs .lang-tex}
\begin{table}[h]
\begin{tabular}{lrcl}
\toprule
Sprache & Autor & Erscheinungsjahr & Dateiendung \\
\midrule
C++ & Bjarne Stroustrup & 1985 & .cpp \\
Java & James Gosling & 1998 & .java \\
Python & Guido van Rossum & 1991 & .py \\
\bottomrule
\end{tabular}
\caption{Bekannte Programmiersprachen}
\end{table}
```
<p data-category="Hinweis">Mit `@{}` vor und nach einer Spaltendefinition wird der umgebende Weißraum unterdrückt.</p>
<p data-category="Beispiel">`\begin{tabular}{@{}lrcl@{}}` beschränkt die Linien auf die Breite des Tabelleninhalts.</p>
@slide(layout=content-only)
@title
Zentrierte Anordnung
Mehr Komfort
@content
``` {.lang-tex .hljs}
\begin{figure}[<position>]
\begin{center}
\includegraphics{<dateipfad>}
\end{center}
\end{figure}
```
Der [Tables Generator](https://tablesgenerator.com/) ist ein wunderbares Werkzeug, um schnell Tabellen verschiedener Formate zu erstellen.
Alternativ:
``` {.lang-tex .hljs}
\begin{figure}[<position>]
\centering
\includegraphics{<dateipfad>}
\end{figure}
```
[![](svg/chapter-12/tables-generator.png)](https://tablesgenerator.com/)
@slide(layout=task)
@task-number
11
10
@title
Grafiken einfügen
Tabellen setzen
@content
* Im Ordner `exercises/graphics` findet ihr eine Bilddatei namens `latex-logo.png`.
* Fügt sie **genau** unterhalb dieser Aufgabenstellung im Skript ein.
* Das Bild soll **zentriert** auf der Seite eingebunden werden.
* Fügt außerdem eine **Bildunterschrift** ein.
* Passt die **Größe** des Bildes an Breite der Seite (`\textwidth`) an.
* Die Liste in der Datei `exercises/tables/tables.tex` enthält Infos zu ein paar Lehrveranstaltung an der Fakultät WIAI.
* Wandelt die Liste in eine **Tabelle** um.
* Die Tabelle soll Spalten für den *Namen*, das *Kürzel* und das *Semester* der Vorlesungen haben.
* Fügt außerdem eine **zentrierte Spalte** ganz links in der Tabelle hinzu, in der ihr die Lehrveranstaltungen **nummeriert**.
@slide(layout=extra-content-only)
@title
Besonders lange Tabellen
@content
Tabellen, die über eine Seite hinaus gehen, werden von `tabular` einfach abgeschnitten. Die Lösung bietet hier das Paket `longtable`:
``` {.hljs .lang-tex}
\usepackage{longtable}
```
``` {.hljs .lang-tex}
\begin{longtable}{<spaltendefinition>}
% Tabelleninhalt
\caption{<tabellenunterschrift>}
\label{<label>}
\end{longtable}
```
@slide(layout=extra-content-only)
@title
Hinweise zu `longtable`
@content
``` {.hljs .lang-tex}
\begin{longtable}{<spaltendefinition>}
% Tabelleninhalt
\caption{<tabellenunterschrift>}
\label{<label>}
\end{longtable}
```
* Die `longtable`-Umgebung vereint die `tabular`-Umgebung und die `table`-Umgebung.
* Titel und Label können deshalb direkt unter dem Tabelleninhalt stehen.
* Sofern das Paket `booktabs` eingebunden ist, stehen seine Features auch in `longtable` zur Verfügung.
@slide(layout=extra-content-only)
@title
Besonders breite Tabellen
@content
Sollte die Tabelle einmal zu breit für eine Seite werden, kann sie auch im Querformat dargestellt werden:
``` {.hljs .lang-tex}
\usepackage{rotating}
```
``` {.hljs .lang-tex}
\begin{sidewaystable}[<position>]
\begin{tabular}{<spaltendef.>}
% Tabelleninhalt
\end{tabular}
\end{sidewaystable}
```
@slide(layout=extra-content-and-preview)
@title
Weiterführendes Beispiel
@content
``` {.hljs .lang-tex}
\begin{table}[h]
\begin{tabular}{llr}
\toprule
Struktur & \multicolumn{2}{l}{Zeitkomplexität für Zugriff} \\ \cmidrule(r){2-3}
& Average & Worst \\
\midrule
Stack & $\mathcal{O}(n)$ & $\mathcal{O}(n)$ \\
Binärbaum & $\mathcal{O}(log(n))$ & $\mathcal{O}(log(n))$ \\
AVL-Baum & $\mathcal{O}(log(n))$ & $\mathcal{O}(log(n))$ \\
\bottomrule
\end{tabular}
\end{table}
```
[<span class="emoji">🔗</span> Dokumentation zu Booktabs](http://packages.oth-regensburg.de/ctan/macros/latex/contrib/booktabs/booktabs.pdf)
@preview
![](svg/chapter-12/tabelle-fortgeschritten-beispiel-crop.svg){.thin-padding}

View File

@ -4,110 +4,233 @@
10
@title
Graphics
Tables
@slide(layout=content-only)
@title
Including graphics <span class="emoji">🖼</span>
Basic structure <span class="emoji">🗒</span>
@content
To display graphics, we need the `graphicx` package.
For typographically pleasing tables, we use the `booktabs` package.
``` {.lang-tex .hljs}
\begin{figure}
\includegraphics{<file path>}
\caption[<short caption (table of
figures)>]{<full caption>}
\end{figure}
``` {.hljs .lang-tex}
\usepackage{booktabs}
```
Specifying the size:
``` {.lang-tex .hljs}
\includegraphics[width=0.5\textwidth,
height=5cm]{<file path>}
``` {.hljs .lang-tex}
\begin{table}[<position>]
\begin{tabular}{<column definition>}
% table content
\end{tabular}
\caption{<caption>}
\end{table}
```
Positioning works just like with graphics.
@slide(layout=content-only)
@slide(layout=content-and-preview)
@title
Layout on the page
Column definitions
@content
``` {.lang-tex .hljs}
\begin{figure}[<position code>]
``` {.hljs .lang-tex}
\begin{tabular}{lrcl}
% table content
\end{tabular}
```
LaTeX places graphics automatically. With position codes, we can express our preferences (they can be combined as well).
<table>
<tr>
<th style="min-width:4em">code</th>
<th>position</th>
<th>letter</th>
<th>meaning</th>
</tr>
<tr class="fragment">
<td>h</td>
<td>here, if you dont mind</td>
<td>l</td>
<td>left-justified column</td>
</tr>
<tr class="fragment">
<td>t</td>
<td>top of the page</td>
<td>c</td>
<td>centred column</td>
</tr>
<tr class="fragment">
<td>b</td>
<td>bottom of the page</td>
</tr>
<tr class="fragment">
<td>p</td>
<td>on its own page</td>
</tr>
<tr class="fragment">
<td>H</td>
<td>Here, for Gods sake! <br />(`float` package required)</td>
<td>r</td>
<td>right-justified column</td>
</tr>
</table>
++ Vertical separator lines and double horizontal lines are frowned upon by typographers and should be avoided.
@preview
![](svg/chapter-12/table-example-crop.svg){.thin-padding}
@slide(layout=content-and-preview)
@title
Table content
@content
``` {.hljs .lang-tex}
\begin{tabular}{lll}
\toprule
Column 1 & Column 2 & Column 3 \\
\midrule
Content a & Content b & Content c \\
Content e & Content f & Content g \\
Content i & Content j & Content k \\
\bottomrule
\end{tabular}
```
* ++ Columns are separated by `&`.
* ++ Rows are ended by `\\`.
* ++ `\toprule`, `\midrule` and `\bottomrule` structure the table.
@preview
![](svg/chapter-12/table-content-example-crop.svg){.thin-padding}
@slide(layout=wide-content)
@title
The entire table
@content
``` {.hljs .lang-tex}
\begin{table}[h]
\begin{tabular}{lrcl}
\toprule
Language & Author & Year & Filename extension \\
\midrule
C++ & Bjarne Stroustrup & 1985 & .cpp \\
Java & James Gosling & 1998 & .java \\
Python & Guido van Rossum & 1991 & .py \\
\bottomrule
\end{tabular}
\caption{Well-known programming languages}
\end{table}
```
<p data-category="Note">`@{}` to the left and right of a column definition removes the padding of the corresponding column.</p>
<p data-category="Example">`\begin{tabular}{@{}lrcl@{}}` limits the row separators to the width of the table content</p>
@slide(layout=content-only)
@title
Centred alignment
More comfort
@content
``` {.lang-tex .hljs}
\begin{figure}[<position>]
\begin{center}
\includegraphics{<path-to-file>}
\end{center}
\end{figure}
```
The [Tables Generator](https://tablesgenerator.com/) is a wonderful tool to quickly create tables of different formats.
Alternatively:
``` {.lang-tex .hljs}
\begin{figure}[<position>]
\centering
\includegraphics{<path-to-file>}
\end{figure}
```
[![](svg/chapter-12/tables-generator.png)](https://tablesgenerator.com/)
@slide(layout=task)
@task-number
11
10
@title
Inserting graphics
Typesetting tables
@content
* In the directory `exercises/graphics` you can find an image file named `latex-logo.png`.
* **Include** the figure in `exercises/graphics/graphics.tex` and place it **exactly** where you include it.
* The image shall be **centered**.
* Additionally, add a **caption** for the figure.
* Adapt the **width** of the image to the width of the text (`\textwidth`).
* The list in file `exercises/tables/tables.tex` stores information on a few modules of the WIAI faculty.
* Transform the list into a **table**.
* The table shall have colums for the *name*, the *abbreviation* (Kürzel) and the *semester* of the lectures.
* Add a **column** with **center-aligned text** on the left side of the table in order to **number** the lectures.
* Add a **caption** for the table.
@slide(layout=extra-content-only)
@title
Particularly long tables
@content
Tables that exceed one page are simply cut off by `tabular`. A solution is offered by the `longtable` package:
``` {.hljs .lang-tex}
\usepackage{longtable}
```
``` {.hljs .lang-tex}
\begin{longtable}{<column definition>}
% table content
\caption{<caption>}
\label{<label>}
\end{longtable}
```
@slide(layout=extra-content-only)
@title
Notes on `longtable`
@content
``` {.hljs .lang-tex}
\begin{longtable}{<column definition>}
% table content
\caption{<caption>}
\label{<label>}
\end{longtable}
```
* The `longtable` environment merges the `tabular` and `table` environments.
* Caption and label can therefore be inserted directly under the table content.
* As long as the `booktabs` package is used, its features are also provided in `longtable`.
@slide(layout=extra-content-only)
@title
Particularly wide tables
@content
If you need a table to be wider than a page, you can display it in landscape orientation:
``` {.hljs .lang-tex}
\usepackage{rotating}
```
``` {.hljs .lang-tex}
\begin{sidewaystable}[<position>]
\begin{tabular}{<column def.>}
% table content
\end{tabular}
\end{sidewaystable}
```
@slide(layout=extra-content-and-preview)
@title
An advanced example
@content
``` {.hljs .lang-tex}
\begin{table}[h]
\begin{tabular}{llr}
\toprule
Structure & \multicolumn{2}{l}{Access time complexity} \\ \cmidrule(r){2-3}
& Average & Worst \\
\midrule
Stack & $\mathcal{O}(n)$ & $\mathcal{O}(n)$ \\
Binary tree & $\mathcal{O}(log(n))$ & $\mathcal{O}(n)$ \\
AVL tree & $\mathcal{O}(log(n))$ & $\mathcal{O}(log(n))$ \\
\bottomrule
\end{tabular}
\end{table}
```
[<span class="emoji">🔗</span> Booktabs documentation](http://packages.oth-regensburg.de/ctan/macros/latex/contrib/booktabs/booktabs.pdf)
@preview
![](svg/chapter-12/table-advanced-example-crop.svg){.thin-padding}

View File

@ -4,230 +4,105 @@
11
@title
Tabellen
@slide(layout=content-only)
@title
Grundstruktur <span class="emoji">🗒️</span>
@content
Für typografisch schöne Tabellen nutzen wir das Paket `booktabs`.
``` {.hljs .lang-tex}
\usepackage{booktabs}
```
``` {.hljs .lang-tex}
\begin{table}[<position>]
\begin{tabular}{<spaltendefinition>}
% Tabelleninhalt
\end{tabular}
\caption{<tabellenunterschrift>}
\end{table}
```
Die Positionierung erfolgt analog zu Grafiken.
Quelltext-Listings
@slide(layout=content-and-preview)
@title
Spaltendefinitionen
Code im LaTeX-Quelltext
@content
``` {.hljs .lang-tex}
\begin{tabular}{lrcl}
% Tabelleninhalt
\end{tabular}
In einer eigenen Umgebung:
``` {.lang-tex .hljs}
\section*{Haskell-Magie}
Quadrate aller geraden % …
\begin{lstlisting}[language=Haskell]
[x^2 | x <- [1..200], even x]
\end{lstlisting}
```
<table>
<tr>
<th>Kürzel</th>
<th>Bedeutung</th>
</tr>
<tr class="fragment">
<td>l</td>
<td>linksbündige Spalte</td>
</tr>
<tr class="fragment">
<td>c</td>
<td>zentrierte Spalte</td>
</tr>
<tr class="fragment">
<td>r</td>
<td>rechtsbündige Spalte</td>
</tr>
</table>
++ Vertikale Trennlinien und doppelte horizontale Linien sind unter Typograph\*innen nicht gern gesehen und sollten vermieden werden.
@preview
![](svg/chapter-12/tabelle-beispiel-crop.svg){.thin-padding}
![](svg/chapter-10/listings-haskell-crop.svg)
@slide(layout=content-and-preview)
@title
Tabelleninhalt
Externer Code
@content
``` {.hljs .lang-tex}
\begin{tabular}{lll}
\toprule
Spalte 1 & Spalte 2 & Spalte 3 \\
\midrule
Inhalt a & Inhalt b & Inhalt c \\
Inhalt e & Inhalt f & Inhalt g \\
Inhalt i & Inhalt j & Inhalt k \\
\bottomrule
\end{tabular}
Praktischerweise bietet `listings` einen Befehl zum Einfügen externen Codes:
``` {.lang-tex .hljs}
\section*{Einfache Java-Anwendung}
\lstinputlisting[language=Java]{Test.java}
```
``` {.lang-java .hljs data-sourcefile="Test.java"}
public class Test {
public static void main(/*…*/) {
System.out.println(/*…*/);
}
}
```
* ++ Zellen werden durch `&` abgetrennt.
* ++ Reihen werden durch `\\` beendet.
* ++ `\toprule`, `\midrule` und `\bottomrule` strukturieren die Tabelle.
@preview
![](svg/chapter-12/tabelle-inhalt-beispiel-crop.svg){.thin-padding}
@slide(layout=wide-content)
@title
Die gesamte Tabelle
@content
``` {.hljs .lang-tex}
\begin{table}[h]
\begin{tabular}{lrcl}
\toprule
Sprache & Autor & Erscheinungsjahr & Dateiendung \\
\midrule
C++ & Bjarne Stroustrup & 1985 & .cpp \\
Java & James Gosling & 1998 & .java \\
Python & Guido van Rossum & 1991 & .py \\
\bottomrule
\end{tabular}
\caption{Bekannte Programmiersprachen}
\end{table}
```
<p data-category="Hinweis">Mit `@{}` vor und nach einer Spaltendefinition wird der umgebende Weißraum unterdrückt.</p>
<p data-category="Beispiel">`\begin{tabular}{@{}lrcl@{}}` beschränkt die Linien auf die Breite des Tabelleninhalts.</p>
![](svg/chapter-10/listings-java-crop.svg)
@slide(layout=content-only)
@title
Mehr Komfort
Themen und Stile
@content
Der [Tables Generator](https://tablesgenerator.com/) ist ein wunderbares Werkzeug, um schnell Tabellen verschiedener Formate zu erstellen.
`listings` stellt keine eigenen Themes zur Verfügung. Dies kann aber durch die vielen Konfigurationsoptionen ausgeglichen werden.
[![](svg/chapter-12/tables-generator.png)](https://tablesgenerator.com/)
``` {.lang-tex .hljs}
\begin{lstlisting}[
language=Java,
basicstyle=\footnotesize\ttfamily,
breaklines=true,
keywordstyle=\color{ForestGreen},
commentstyle=\color{DarkGray},
literate={ö}{{\"o}}
]
% …
\end{lstlisting}
```
Für die Erstellung eigener Themes ist der Befehl `\lstset` nützlich.
@slide(layout=content-only)
@title
Weitere Materialien
@content
* [Einführung](https://www.overleaf.com/learn/latex/Code_listing#Reference_guide) in das Paket
* offizielle [Dokumentation](https://www.overleaf.com/learn/latex/Code_listing#Reference_guide)
* das Paket [`xcolor`](https://www.overleaf.com/learn/latex/Using_colours_in_LaTeX) für Farben
* zwei [Themes](https://github.com/jez/latex-solarized) im solarized-Stil für `listings`
@slide(layout=task)
@task-number
12
11
@title
Tabellen setzen
Listings
@content
* Die Liste in der Datei `exercises/tables/tables.tex` enthält Infos zu ein paar Lehrveranstaltung an der Fakultät WIAI.
* Wandelt die Liste in eine **Tabelle** um.
* Die Tabelle soll Spalten für den *Namen*, das *Kürzel* und das *Semester* der Vorlesungen haben.
* Fügt außerdem eine **zentrierte Spalte** ganz links in der Tabelle hinzu, in der ihr die Lehrveranstaltungen **nummeriert**.
* Im Ordner `exercises/source-code-listings` findet ihr eine Datei namens `Source.java`.
* **Bindet** den Java-Quelltext in der Datei `source-code-listings.tex` **ein**. (Beachtet, dass der Dateipfad relativ zu `main.tex` ist.)
* Aktiviert das **Syntax-Highlighting** durch Angabe der Sprache Java.
* **Nummeriert** die Zeilen und aktiviert **Umbrüche**.
* Setzt mit dem Parameter `basicstyle` eine dicktengleiche Schrift (`\ttfamily \small`).
* Ändert die Schlüsselwortfarbe zu Blau.
* Verbergt die Sonderzeichen, die **Leerzeichen in Zeichenketten** markieren.
@slide(layout=extra-content-only)
@title
Besonders lange Tabellen
@content
Tabellen, die über eine Seite hinaus gehen, werden von `tabular` einfach abgeschnitten. Die Lösung bietet hier das Paket `longtable`:
``` {.hljs .lang-tex}
\usepackage{longtable}
```
``` {.hljs .lang-tex}
\begin{longtable}{<spaltendefinition>}
% Tabelleninhalt
\caption{<tabellenunterschrift>}
\label{<label>}
\end{longtable}
```
@slide(layout=extra-content-only)
@title
Hinweise zu `longtable`
@content
``` {.hljs .lang-tex}
\begin{longtable}{<spaltendefinition>}
% Tabelleninhalt
\caption{<tabellenunterschrift>}
\label{<label>}
\end{longtable}
```
* Die `longtable`-Umgebung vereint die `tabular`-Umgebung und die `table`-Umgebung.
* Titel und Label können deshalb direkt unter dem Tabelleninhalt stehen.
* Sofern das Paket `booktabs` eingebunden ist, stehen seine Features auch in `longtable` zur Verfügung.
@slide(layout=extra-content-only)
@title
Besonders breite Tabellen
@content
Sollte die Tabelle einmal zu breit für eine Seite werden, kann sie auch im Querformat dargestellt werden:
``` {.hljs .lang-tex}
\usepackage{rotating}
```
``` {.hljs .lang-tex}
\begin{sidewaystable}[<position>]
\begin{tabular}{<spaltendef.>}
% Tabelleninhalt
\end{tabular}
\end{sidewaystable}
```
@slide(layout=extra-content-and-preview)
@title
Weiterführendes Beispiel
@content
``` {.hljs .lang-tex}
\begin{table}[h]
\begin{tabular}{llr}
\toprule
Struktur & \multicolumn{2}{l}{Zeitkomplexität für Zugriff} \\ \cmidrule(r){2-3}
& Average & Worst \\
\midrule
Stack & $\mathcal{O}(n)$ & $\mathcal{O}(n)$ \\
Binärbaum & $\mathcal{O}(log(n))$ & $\mathcal{O}(log(n))$ \\
AVL-Baum & $\mathcal{O}(log(n))$ & $\mathcal{O}(log(n))$ \\
\bottomrule
\end{tabular}
\end{table}
```
[<span class="emoji">🔗</span> Dokumentation zu Booktabs](http://packages.oth-regensburg.de/ctan/macros/latex/contrib/booktabs/booktabs.pdf)
@preview
![](svg/chapter-12/tabelle-fortgeschritten-beispiel-crop.svg){.thin-padding}
Seht bei Fragen in der Dokumentation des Paketes `listings` nach.

View File

@ -4,233 +4,105 @@
11
@title
Tables
@slide(layout=content-only)
@title
Basic structure <span class="emoji">🗒️</span>
@content
For typographically pleasing tables, we use the `booktabs` package.
``` {.hljs .lang-tex}
\usepackage{booktabs}
```
``` {.hljs .lang-tex}
\begin{table}[<position>]
\begin{tabular}{<column definition>}
% table content
\end{tabular}
\caption{<caption>}
\end{table}
```
Positioning works just like with graphics.
Source code listings
@slide(layout=content-and-preview)
@title
Column definitions
In-situ listings
@content
``` {.hljs .lang-tex}
\begin{tabular}{lrcl}
% table content
\end{tabular}
Within a dedicated environment:
``` {.lang-tex .hljs}
\section*{Haskell Magic}
Squares of all even % …
\begin{lstlisting}[language=Haskell]
[x^2 | x <- [1..200], even x]
\end{lstlisting}
```
<table>
<tr>
<th>letter</th>
<th>meaning</th>
</tr>
<tr class="fragment">
<td>l</td>
<td>left-justified column</td>
</tr>
<tr class="fragment">
<td>c</td>
<td>centred column</td>
</tr>
<tr class="fragment">
<td>r</td>
<td>right-justified column</td>
</tr>
</table>
++ Vertical separator lines and double horizontal lines are frowned upon by typographers and should be avoided.
@preview
![](svg/chapter-12/table-example-crop.svg){.thin-padding}
![](svg/chapter-10/listings-haskell-english-crop.svg)
@slide(layout=content-and-preview)
@title
Table content
External source code
@content
``` {.hljs .lang-tex}
\begin{tabular}{lll}
\toprule
Column 1 & Column 2 & Column 3 \\
\midrule
Content a & Content b & Content c \\
Content e & Content f & Content g \\
Content i & Content j & Content k \\
\bottomrule
\end{tabular}
Conveniently, `listings` offers an import command:
``` {.lang-tex .hljs}
\section*{Simple Java Application}
\lstinputlisting[language=Java]{Test.java}
```
``` {.lang-java .hljs data-sourcefile="Test.java"}
public class Test {
public static void main(/*…*/) {
System.out.println(/*…*/);
}
}
```
* ++ Columns are separated by `&`.
* ++ Rows are ended by `\\`.
* ++ `\toprule`, `\midrule` and `\bottomrule` structure the table.
@preview
![](svg/chapter-12/table-content-example-crop.svg){.thin-padding}
@slide(layout=wide-content)
@title
The entire table
@content
``` {.hljs .lang-tex}
\begin{table}[h]
\begin{tabular}{lrcl}
\toprule
Language & Author & Year & Filename extension \\
\midrule
C++ & Bjarne Stroustrup & 1985 & .cpp \\
Java & James Gosling & 1998 & .java \\
Python & Guido van Rossum & 1991 & .py \\
\bottomrule
\end{tabular}
\caption{Well-known programming languages}
\end{table}
```
<p data-category="Note">`@{}` to the left and right of a column definition removes the padding of the corresponding column.</p>
<p data-category="Example">`\begin{tabular}{@{}lrcl@{}}` limits the row separators to the width of the table content</p>
![](svg/chapter-10/listings-java-english-crop.svg)
@slide(layout=content-only)
@title
More comfort
Themes and styles
@content
The [Tables Generator](https://tablesgenerator.com/) is a wonderful tool to quickly create tables of different formats.
`listings` does not provide any themes by default, but can be configured extensively.
[![](svg/chapter-12/tables-generator.png)](https://tablesgenerator.com/)
``` {.lang-tex .hljs}
\begin{lstlisting}[
language=Java,
basicstyle=\footnotesize\ttfamily,
breaklines=true,
keywordstyle=\color{ForestGreen},
commentstyle=\color{DarkGray},
literate={ö}{{\"o}}
]
% …
\end{lstlisting}
```
Have a look at the `\lstset` command for creating your own themes.
@slide(layout=content-only)
@title
Further resources
@content
* [introduction](https://www.overleaf.com/learn/latex/Code_listing#Reference_guide) to the package
* official [documentation](https://www.overleaf.com/learn/latex/Code_listing#Reference_guide)
* [`xcolor` package](https://www.overleaf.com/learn/latex/Using_colours_in_LaTeX) for colors
* two [solarized themes](https://github.com/jez/latex-solarized) for `listings`
@slide(layout=task)
@task-number
12
11
@title
Typesetting tables
Listings
@content
* The list in file `exercises/tables/tables.tex` stores information on a few modules of the WIAI faculty.
* Transform the list into a **table**.
* The table shall have colums for the *name*, the *abbreviation* (Kürzel) and the *semester* of the lectures.
* Add a **column** with **center-aligned text** on the left side of the table in order to **number** the lectures.
* Add a **caption** for the table.
* In the directory `exercises/source-code-listings` you can find a file named `Source.java`.
* **Include** it in the file `source-code-listings.tex`. (Keep in mind that the file path is relative to the main LaTeX document, i.&thinsp;e., to `main.tex`.)
* Activate **syntax highlighting** by stating the programming language Java.
* **Number** the code lines.
* Set the `basicstyle` to a proper mono-spaced font (`\ttfamily \small`)
* Change the **keyword color** to blue.
* Don't show special characters for **spaces in strings**.
@slide(layout=extra-content-only)
@title
Particularly long tables
@content
Tables that exceed one page are simply cut off by `tabular`. A solution is offered by the `longtable` package:
``` {.hljs .lang-tex}
\usepackage{longtable}
```
``` {.hljs .lang-tex}
\begin{longtable}{<column definition>}
% table content
\caption{<caption>}
\label{<label>}
\end{longtable}
```
@slide(layout=extra-content-only)
@title
Notes on `longtable`
@content
``` {.hljs .lang-tex}
\begin{longtable}{<column definition>}
% table content
\caption{<caption>}
\label{<label>}
\end{longtable}
```
* The `longtable` environment merges the `tabular` and `table` environments.
* Caption and label can therefore be inserted directly under the table content.
* As long as the `booktabs` package is used, its features are also provided in `longtable`.
@slide(layout=extra-content-only)
@title
Particularly wide tables
@content
If you need a table to be wider than a page, you can display it in landscape orientation:
``` {.hljs .lang-tex}
\usepackage{rotating}
```
``` {.hljs .lang-tex}
\begin{sidewaystable}[<position>]
\begin{tabular}{<column def.>}
% table content
\end{tabular}
\end{sidewaystable}
```
@slide(layout=extra-content-and-preview)
@title
An advanced example
@content
``` {.hljs .lang-tex}
\begin{table}[h]
\begin{tabular}{llr}
\toprule
Structure & \multicolumn{2}{l}{Access time complexity} \\ \cmidrule(r){2-3}
& Average & Worst \\
\midrule
Stack & $\mathcal{O}(n)$ & $\mathcal{O}(n)$ \\
Binary tree & $\mathcal{O}(log(n))$ & $\mathcal{O}(n)$ \\
AVL tree & $\mathcal{O}(log(n))$ & $\mathcal{O}(log(n))$ \\
\bottomrule
\end{tabular}
\end{table}
```
[<span class="emoji">🔗</span> Booktabs documentation](http://packages.oth-regensburg.de/ctan/macros/latex/contrib/booktabs/booktabs.pdf)
@preview
![](svg/chapter-12/table-advanced-example-crop.svg){.thin-padding}
If you have questions, try to consult the documentation of the `listings` package.

View File

@ -4,105 +4,209 @@
12
@title
Quelltext-Listings
Referenzen und&nbsp;Fußnoten
@slide(layout=content-and-preview)
@title
Code im LaTeX-Quelltext
Fußnoten <span class="emoji">📎</span>
@content
In einer eigenen Umgebung:
``` {.hljs .lang-tex}
\usepackage{hyperref}
```
``` {.lang-tex .hljs}
\section*{Haskell-Magie}
Quadrate aller geraden % …
\begin{lstlisting}[language=Haskell]
[x^2 | x <- [1..200], even x]
\end{lstlisting}
Die Nummerierung erfolgt automatisch und ist fortlaufend, unabhängig davon, ob ein neuer Abschnitt beginnt.
``` {.hljs .lang-tex}
Eber, beim Hausschwein insbesondere
oberdeutsch Saubär, beim Wildschwein
Keiler, bezeichnet das männliche
Geschlecht des Schweins.
\footnote{\url{https://de.wikipedia.org/
wiki/Eber}}
```
@preview
![](svg/chapter-10/listings-haskell-crop.svg)
![](svg/chapter-13/fußnotenbeispiel-crop.svg)
@slide(layout=content-and-preview)
@title
Externer Code
Querverweise
@content
Praktischerweise bietet `listings` einen Befehl zum Einfügen externen Codes:
Manuell (Just dont!)
``` {.lang-tex .hljs}
\section*{Einfache Java-Anwendung}
\lstinputlisting[language=Java]{Test.java}
``` {.hljs .lang-tex}
Wie man in Abbildung 23 sieht, …
```
``` {.lang-java .hljs data-sourcefile="Test.java"}
public class Test {
public static void main(/*…*/) {
System.out.println(/*…*/);
}
}
Mit dem Befehl `\ref`:
``` {.hljs .lang-tex}
\begin{figure}[H]
\includegraphics % …
\caption{Unser Maskottchen Fooboar}
\label{img:fooboar}
\end{figure}
Wie man in Abbildung \ref{img:fooboar} …
```
@preview
![](svg/chapter-10/listings-java-crop.svg)
![](svg/chapter-13/ref-beispiel-crop.svg)
@slide(layout=content-only)
@slide(layout=content-and-preview)
@title
Themen und Stile
Referenzen
@content
`listings` stellt keine eigenen Themes zur Verfügung. Dies kann aber durch die vielen Konfigurationsoptionen ausgeglichen werden.
Mit dem Paket `cleveref` (mit *einem* r!):
``` {.lang-tex .hljs}
\begin{lstlisting}[
language=Java,
basicstyle=\footnotesize\ttfamily,
breaklines=true,
keywordstyle=\color{ForestGreen},
commentstyle=\color{DarkGray},
literate={ö}{{\"o}}
]
% …
\end{lstlisting}
``` {.hljs .lang-tex}
\begin{figure}[H]
\includegraphics % …
\caption{Unser Maskottchen Fooboar}
\label{img:fooboar}
\end{figure}
Fooboar ist ein sehr engagierter
Jungeber (siehe \Cref{img:fooboar}).
```
Für die Erstellung eigener Themes ist der Befehl `\lstset` nützlich.
Der Befehl `\cref` fügt selbstständig die passende Abkürzung ein.
@preview
![](svg/chapter-13/cref-beispiel-crop.svg)
@slide(layout=content-only)
@title
Weitere Materialien
Label vergeben
@content
* [Einführung](https://www.overleaf.com/learn/latex/Code_listing#Reference_guide) in das Paket
* offizielle [Dokumentation](https://www.overleaf.com/learn/latex/Code_listing#Reference_guide)
* das Paket [`xcolor`](https://www.overleaf.com/learn/latex/Using_colours_in_LaTeX) für Farben
* zwei [Themes](https://github.com/jez/latex-solarized) im solarized-Stil für `listings`
Beide Referenzierungsbefehle funktionieren mit **Abschnitten, Bildern, Tabellen, Listings und Gleichungen,** sofern die richtigen Label vergeben wurden.
Label müssen **eindeutig** sein. Zur Strukturierung ist das Voranstellen von Kürzeln üblich, denn einige Pakete ziehen aus den Kürzeln Informationen.
<table>
<tr>
<td>`fig:` Abbildungen</td>
<td>`tbl:` Tabellen</td>
</tr>
<tr>
<td>`sec:` Abschnitte</td>
<td>`subsec:` Unter&shy;abschnitte</td>
</tr>
<tr>
<td>`ch:` Kapitel</td>
<td>`itm:` Aufzählungs&shy;elemente</td>
</tr>
<tr>
<td>`eq:` Gleichungen</td>
<td>`lst:` Quelltext&shy;listings</td>
</tr>
</table>
@slide(layout=content-only)
@title
Dinge, die zu beachten sind
@content
* ++ Durch `\cref` eingefügte Passagen tauchen in einigen Dokumentklassen erst dann auf Deutsch auf, wenn bereits in der Dokumentklasse die Sprache festgelegt wurde:
``` {.hljs .lang-tex}
\documentclass[ngerman]{article}
```
* ++ Beschriftungen (`\caption{…}`) müssen, von Abschnitten abgesehen, **immer und vor dem Label** vergeben werden.
* ++ Bei Abschnitten wird das Label direkt hinter dem Befehl angefügt.
``` {.hljs .lang-tex}
\section{Hinweise}\label{sec:hinweise}
```
@slide(layout=task)
@task-number
10
12a
@title
Listings
Fußnoten einfügen
@content
* Im Ordner `exercises/source-code-listings` findet ihr eine Datei namens `Source.java`.
* **Bindet** den Java-Quelltext in der Datei `source-code-listings.tex` **ein**. (Beachtet, dass der Dateipfad relativ zu `main.tex` ist.)
* Aktiviert das **Syntax-Highlighting** durch Angabe der Sprache Java.
* **Nummeriert** die Zeilen und aktiviert **Umbrüche**.
* Setzt mit dem Parameter `basicstyle` eine dicktengleiche Schrift (`\ttfamily \small`).
* Ändert die Schlüsselwortfarbe zu Blau.
* Verbergt die Sonderzeichen, die **Leerzeichen in Zeichenketten** markieren.
* Pack den Text *March 2021* in der Datei `exercises/footnotes/footnotes.tex` in eine **Fußnote**.
* Fügt zusätzlich eine **klickbare URL**, die zur Download-Seite des Java Development Kit führt (`https://www.oracle.com/java/technologies/javase-downloads.html`), als Fußnote ein.
@slide(layout=task)
@task-number
12b
@title
Referenzen einfügen
@content
* Ersetzt im Text in der Datei `references.tex` im Ordner `exercises/references` *In the figure* und *The following source code listing* durch eine **Referenz** auf das Bild bzw. auf das Quelltext-Listing.
* Nutzt dafür den Befehl `\Cref`.
* Achtet darauf, zuerst **Labels** für die Elemente, die ihr referenzieren wollt, zu vergeben.
* Packt dafür das Quelltext-Listing in eine **Umgebung** namens `listing`.
* Fügt noch eine **Beschriftung** zum Listing hinzu.
@slide(layout=extra-content-and-preview)
@title
Konfiguration von Fußnoten
@content
Das Paket `footmisc` stellt verschiedene weitere Optionen für die Darstellung von Fußnoten zur Verfügung, die als optionale Parameter an den Befehl `\usepackage` übergeben werden können.
``` {.hljs .lang-tex}
% Zählung auf jeder Seite neu beginnen:
\usepackage[perpage]{footmisc}
% Fußnoten inline anzeigen lassen:
\usepackage[para]{footmisc}
% Symbole statt Nummerierung verwenden:
\usepackage[symbol]{footmisc}
```
@preview
![](svg/chapter-13/footmisc-de-crop.svg){.thin-padding}
@slide(layout=extra-content-and-preview)
@title
Weiterführend
@content
* Wurde vor dem Paket `cleveref` das Paket `hyperref` eingebunden, entsteht ein **klickbarer Link** im fertigen PDF.
* Mehrere Referenzen können in `\cref` kommagetrennt angegeben werden.
``` {.hljs .lang-tex}
\section{Ein Einstieg}
\label{sec:section1}
% …
Hier sei verwiesen auf
\cref{sec:section1,sec:section2,
sec:section3,sec:section5}.
```
@preview
![](svg/chapter-13/cref-multiple-beispiel-crop.svg)
Seht bei Fragen in der Dokumentation des Paketes `listings` nach.

View File

@ -4,105 +4,211 @@
12
@title
Source code listings
References and&nbsp;footnotes
@slide(layout=content-and-preview)
@title
In-situ listings
Footnotes <span class="emoji">📎</span>
@content
Within a dedicated environment:
``` {.hljs .lang-tex}
\usepackage{hyperref}
```
``` {.lang-tex .hljs}
\section*{Haskell Magic}
Squares of all even % …
\begin{lstlisting}[language=Haskell]
[x^2 | x <- [1..200], even x]
\end{lstlisting}
Footnotes are automatically numbered consecutively, independent of sections.
(Here, `hyperref` is used for the `\url` command, it is not necessary for footnotes per se.)
``` {.hljs .lang-tex}
The wild boar (\textit{Sus scrofa}), also
known as the wild swine, common wild pig,
or simply wild pig, is a suid native to
much of Eurasia and North Africa, and has
been introduced to the Americas and Oceania.
\footnote{\url{https://en.wikipedia.org/
wiki/Wild_boar}}
```
@preview
![](svg/chapter-10/listings-haskell-english-crop.svg)
![](svg/chapter-13/footnote-example-crop.svg)
@slide(layout=content-and-preview)
@title
External source code
Cross-references
@content
Conveniently, `listings` offers an import command:
Manually (just dont!)
``` {.lang-tex .hljs}
\section*{Simple Java Application}
\lstinputlisting[language=Java]{Test.java}
``` {.hljs .lang-tex}
As you can see in figure 23, …
```
``` {.lang-java .hljs data-sourcefile="Test.java"}
public class Test {
public static void main(/*…*/) {
System.out.println(/*…*/);
}
}
Using the `\ref` command:
``` {.hljs .lang-tex}
\begin{figure}[H]
\includegraphics % …
\caption{Our mascot Fooboar}
\label{img:fooboar}
\end{figure}
As you can see in figure
\ref{img:fooboar}, …
```
@preview
![](svg/chapter-10/listings-java-english-crop.svg)
![](svg/chapter-13/ref-example-crop.svg)
@slide(layout=content-only)
@title
Themes and styles
Assigning labels
@content
`listings` does not provide any themes by default, but can be configured extensively.
Both cross-reference commands work with **sections, figures, tables, listings, and equations,** as long as you use correct labels.
``` {.lang-tex .hljs}
\begin{lstlisting}[
language=Java,
basicstyle=\footnotesize\ttfamily,
breaklines=true,
keywordstyle=\color{ForestGreen},
commentstyle=\color{DarkGray},
literate={ö}{{\"o}}
]
% …
\end{lstlisting}
Labels have to be **unambiguous.** For clarity, certain prefixes are common, and some packages use them to derive information.
<table>
<tr>
<td>`fig:` Figures</td>
<td>`tbl:` Tables</td>
</tr>
<tr>
<td>`sec:` Sections</td>
<td>`subsec:` Subsections</td>
</tr>
<tr>
<td>`ch:` Chapters</td>
<td>`itm:` Enumeration items</td>
</tr>
<tr>
<td>`eq:` Equations</td>
<td>`lst:` Source code listings</td>
</tr>
</table>
@slide(layout=content-and-preview)
@title
Cross-references
@content
Using the `cleveref` package (with *one* r!):
``` {.hljs .lang-tex}
\begin{figure}[H]
\includegraphics % …
\caption{Our mascot Fooboar}
\label{img:fooboar}
\end{figure}
Fooboar is a young and highly engaged
boar (see \Cref{img:fooboar}).
```
Have a look at the `\lstset` command for creating your own themes.
The `\cref` command automatically inserts suitable prefixes.
@preview
![](svg/chapter-13/cref-example-crop.svg)
@slide(layout=content-only)
@title
Further resources
Things to consider
@content
* [introduction](https://www.overleaf.com/learn/latex/Code_listing#Reference_guide) to the package
* official [documentation](https://www.overleaf.com/learn/latex/Code_listing#Reference_guide)
* [`xcolor` package](https://www.overleaf.com/learn/latex/Using_colours_in_LaTeX) for colors
* two [solarized themes](https://github.com/jez/latex-solarized) for `listings`
* Terms inserted by `\cref` use the language specified with the document class (or `babel`):
``` {.hljs .lang-tex}
\documentclass[english]{article}
```
* Apart from sections, referenced elements need captions (`\caption{…}`), and the **captions have to be placed before the label.**
* For sectioning commands, the label is inserted directly after the section command.
``` {.hljs .lang-tex}
\section{Notes}\label{sec:notes}
```
@slide(layout=task)
@task-number
10
12a
@title
Listings
Inserting footnotes
@content
* In the directory `exercises/source-code-listings` you can find a file named `Source.java`.
* **Include** it in the file `source-code-listings.tex`. (Keep in mind that the file path is relative to the main LaTeX document, i.&thinsp;e., to `main.tex`.)
* Activate **syntax highlighting** by stating the programming language Java.
* **Number** the code lines.
* Set the `basicstyle` to a proper mono-spaced font (`\ttfamily \small`)
* Change the **keyword color** to blue.
* Don't show special characters for **spaces in strings**.
* Make the text *March 2021* in file `exercises/footnotes/footnotes.tex` appear as a **footnote**.
* Additionally, insert a **clickable URL** that leads to the download page for the Java Development Kit (`https://www.oracle.com/java/technologies/javase-downloads.html`).
If you have questions, try to consult the documentation of the `listings` package.
@slide(layout=task)
@task-number
12b
@title
Inserting references
@content
* In file `exercises/references/references.tex`, replace *In the figure* and *The following source code listing* by **references** to the figure and to the source code listing.
* Use the command `\Cref` for the references.
* Make sure to add **labels** to the elements that you want to create a reference for.
* To do so, wrap the source code listing in a `listing` **environment**.
* Additionally, add a **caption** to the source code listing.
@slide(layout=extra-content-and-preview)
@title
Configuring footnotes
@content
The `footmisc` package provides additional options for the presentation of footnotes that can be activated by adding parameters to the `\usepackage` command.
``` {.hljs .lang-tex}
% Reset the counter on each page:
\usepackage[perpage]{footmisc}
% Display footnotes in-line:
\usepackage[para]{footmisc}
% Use symbols instead of numbers:
\usepackage[symbol]{footmisc}
```
@preview
![](svg/chapter-13/footmisc-en-crop.svg){.thin-padding}
@slide(layout=extra-content-and-preview)
@title
A few more things
@content
* It is recommended that you include the package `hyperref` before `cleveref`.
* `\cref` can take multiple references at once, separated by commas.
``` {.hljs .lang-tex}
\section{An introduction}
\label{sec:section1}
% …
Reference be made to
\cref{sec:section1,sec:section2,
sec:section3,sec:section5}.
```
@preview
![](svg/chapter-13/cref-multiple-example-crop.svg)

View File

@ -4,209 +4,111 @@
13
@title
Referenzen und&nbsp;Fußnoten
@slide(layout=content-and-preview)
@title
Fußnoten <span class="emoji">📎</span>
@content
``` {.hljs .lang-tex}
\usepackage{hyperref}
```
Die Nummerierung erfolgt automatisch und ist fortlaufend, unabhängig davon, ob ein neuer Abschnitt beginnt.
``` {.hljs .lang-tex}
Eber, beim Hausschwein insbesondere
oberdeutsch Saubär, beim Wildschwein
Keiler, bezeichnet das männliche
Geschlecht des Schweins.
\footnote{\url{https://de.wikipedia.org/
wiki/Eber}}
```
@preview
![](svg/chapter-13/fußnotenbeispiel-crop.svg)
@slide(layout=content-and-preview)
@title
Querverweise
@content
Manuell (Just dont!)
``` {.hljs .lang-tex}
Wie man in Abbildung 23 sieht, …
```
Mit dem Befehl `\ref`:
``` {.hljs .lang-tex}
\begin{figure}[H]
\includegraphics % …
\caption{Unser Maskottchen Fooboar}
\label{img:fooboar}
\end{figure}
Wie man in Abbildung \ref{img:fooboar} …
```
@preview
![](svg/chapter-13/ref-beispiel-crop.svg)
@slide(layout=content-and-preview)
@title
Referenzen
@content
Mit dem Paket `cleveref` (mit *einem* r!):
``` {.hljs .lang-tex}
\begin{figure}[H]
\includegraphics % …
\caption{Unser Maskottchen Fooboar}
\label{img:fooboar}
\end{figure}
Fooboar ist ein sehr engagierter
Jungeber (siehe \Cref{img:fooboar}).
```
Der Befehl `\cref` fügt selbstständig die passende Abkürzung ein.
@preview
![](svg/chapter-13/cref-beispiel-crop.svg)
Literatur&shy;verwaltung
@slide(layout=content-only)
@title
Label vergeben
Was brauchen wir dafür?
@content
Beide Referenzierungsbefehle funktionieren mit **Abschnitten, Bildern, Tabellen, Listings und Gleichungen,** sofern die richtigen Label vergeben wurden.
* eine **Bibliographiedatei** (nachfolgend `.bib`-Datei) zur Speicherung von Literaturverweisen
* **BibTeX** als Schnittstelle zwischen der Literatur und LaTeX
Label müssen **eindeutig** sein. Zur Strukturierung ist das Voranstellen von Kürzeln üblich, denn einige Pakete ziehen aus den Kürzeln Informationen.
<table>
<tr>
<td>`fig:` Abbildungen</td>
<td>`tbl:` Tabellen</td>
</tr>
<tr>
<td>`sec:` Abschnitte</td>
<td>`subsec:` Unter&shy;abschnitte</td>
</tr>
<tr>
<td>`ch:` Kapitel</td>
<td>`itm:` Aufzählungs&shy;elemente</td>
</tr>
<tr>
<td>`eq:` Gleichungen</td>
<td>`lst:` Quelltext&shy;listings</td>
</tr>
</table>
@slide(layout=wide-content)
@title
Was ist diese ominöse `.bib`-Datei?
@content
* Sammlung von Literatureinträgen im BibTeX-Format
* Beispielhafter Literatureintrag:
``` {.hljs .lang-tex}
@article{turing1990, % Art des Dokuments und Bezeichner für den \cite Befehl
title={The chemical basis of morphogenesis}, % Titel
author={Turing, Alan Mathison}, % Autor
journal={Bulletin of mathematical biology}, % Titel des Journals
volume={52}, % Band des Journals
pages={153--197}, % Seitenzahl im Journal
year={1990}, % Erscheinungsjahr
publisher={Springer} % Verleger des Journals
}
```
@slide(layout=content-only)
@title
Dinge, die zu beachten sind
Wie wird das verwendet?
@content
* ++ Durch `\cref` eingefügte Passagen tauchen in einigen Dokumentklassen erst dann auf Deutsch auf, wenn bereits in der Dokumentklasse die Sprache festgelegt wurde:
Durch BibTeX wird LaTeX um einige Befehle zum Zitieren erweitert. Außerdem benötigt wird das Paket `natbib`.
``` {.hljs .lang-tex}
\documentclass[ngerman]{article}
```
* ++ Zitieren eines Autors: `\citeauthor{<quelle>}`
* ++ Zitieren einer Quelle: `\cite{<quelle>}`
* ++ Zitieren einer Seite: `\cite[S. 15]{<quelle>}`
* ++ Zitieren mit weiteren Zusätzen:<br/>`\cite[<präfix>][<suffix>]{<quelle>}`
* ++ Verweis auf die genutzte `.bib`-Datei: `\bibliography{<.bib-datei>}`
* ++ Angabe des genutzten Zitierstils: <br/>`\bibliographystyle{<zitierstil>}`
* ++ Beschriftungen (`\caption{…}`) müssen, von Abschnitten abgesehen, **immer und vor dem Label** vergeben werden.
* ++ Bei Abschnitten wird das Label direkt hinter dem Befehl angefügt.
``` {.hljs .lang-tex}
\section{Hinweise}\label{sec:hinweise}
```
> Zwei Dinge sind unendlich. Das Universum und&nbsp;die&nbsp;Auswahl an Zitierstilen.<cite>Unbekannt</cite>
@slide(layout=task)
@slide(layout=preview-only)
@preview
![Zitieren im Alpha-Zitierstil](svg/chapter-14/bibtex-alpha-crop.svg){.large .thin-padding}
@slide(layout=preview-only)
@preview
![Zitieren im Natdin-Zitierstil](svg/chapter-14/bibtex-natdin-crop.svg){.large .thin-padding}
@slide(layout=preview-only)
@preview
![Finden von fertigen BibTeX-Einträgen Bamberger Katalog](svg/chapter-14/bamberger_katalog_bibtex.jpg){.large}
@slide(layout=preview-only)
@preview
![Finden von fertigen BibTeX-Einträgen Google Scholar](svg/chapter-14/google_bibtex1.jpg){.large}
@slide(layout=preview-only)
@preview
![Finden von fertigen BibTeX-Einträgen Google Scholar](svg/chapter-14/google_bibtex2.jpg){.large}
@slide(layout=preview-only)
@preview
![Finden von fertigen BibTeX-Einträgen dblp.org](svg/chapter-14/dblp.jpg){.large}
@slide(layout=wide-task)
@task-number
13
@title
Fußnoten einfügen
Ein Literaturverzeichnis erstellen und einfügen
@content
* Pack den Text *March 2021* in der Datei `exercises/footnotes/footnotes.tex` in eine **Fußnote**.
* Fügt zusätzlich eine **klickbare URL**, die zur Download-Seite des Java Development Kit führt (`https://www.oracle.com/java/technologies/javase-downloads.html`), als Fußnote ein.
@slide(layout=task)
@task-number
14
@title
Referenzen einfügen
@content
* Ersetzt im Text in der Datei `references.tex` im Ordner `exercises/references` *In the figure* und *The following source code listing* durch eine **Referenz** auf das Bild bzw. auf das Quelltext-Listing.
* Nutzt dafür den Befehl `\Cref`.
* Achtet darauf, zuerst **Labels** für die Elemente, die ihr referenzieren wollt, zu vergeben.
* Packt dafür das Quelltext-Listing in eine **Umgebung** namens `listing`.
* Fügt noch eine **Beschriftung** zum Listing hinzu.
@slide(layout=extra-content-and-preview)
@title
Konfiguration von Fußnoten
@content
Das Paket `footmisc` stellt verschiedene weitere Optionen für die Darstellung von Fußnoten zur Verfügung, die als optionale Parameter an den Befehl `\usepackage` übergeben werden können.
``` {.hljs .lang-tex}
% Zählung auf jeder Seite neu beginnen:
\usepackage[perpage]{footmisc}
% Fußnoten inline anzeigen lassen:
\usepackage[para]{footmisc}
% Symbole statt Nummerierung verwenden:
\usepackage[symbol]{footmisc}
```
@preview
![](svg/chapter-13/footmisc-de-crop.svg){.thin-padding}
@slide(layout=extra-content-and-preview)
@title
Weiterführend
@content
* Wurde vor dem Paket `cleveref` das Paket `hyperref` eingebunden, entsteht ein **klickbarer Link** im fertigen PDF.
* Mehrere Referenzen können in `\cref` kommagetrennt angegeben werden.
``` {.hljs .lang-tex}
\section{Ein Einstieg}
\label{sec:section1}
% …
Hier sei verwiesen auf
\cref{sec:section1,sec:section2,
sec:section3,sec:section5}.
```
@preview
![](svg/chapter-13/cref-multiple-beispiel-crop.svg)
* Erstellt im Ordner `exercises/literature` eine neue BibTeX-Datei `literature.bib`.
* Sucht bei Google Scholar oder dblp.org die BibTeX-Einträge für folgende $\LaTeX$-Handbücher:
* Dilip Datta (2017): $\LaTeX$ in 24 Hours. A Practical Guide for Scientific Writing.
* Frank Mittelbach / Michel Goossens (2012): Der $\LaTeX$-Begleiter.
* Fügt die BibTeX-Einträge in die BibTeX-Datei ein.
* Vergebt aussagekräftige BibTeX-Keys.
* Bindet die BibTeX-Datei an einer geeigneten Stelle ein, an der später auch das Literaturverzeichnis zu sehen sein soll.
* Zitiert die zwei Handbücher im Text in der Datei `exercises/literature/literature.tex`.
* Wählt den Bibliographiestil `plain`.

View File

@ -4,211 +4,111 @@
13
@title
References and&nbsp;footnotes
@slide(layout=content-and-preview)
@title
Footnotes <span class="emoji">📎</span>
@content
``` {.hljs .lang-tex}
\usepackage{hyperref}
```
Footnotes are automatically numbered consecutively, independent of sections.
(Here, `hyperref` is used for the `\url` command, it is not necessary for footnotes per se.)
``` {.hljs .lang-tex}
The wild boar (\textit{Sus scrofa}), also
known as the wild swine, common wild pig,
or simply wild pig, is a suid native to
much of Eurasia and North Africa, and has
been introduced to the Americas and Oceania.
\footnote{\url{https://en.wikipedia.org/
wiki/Wild_boar}}
```
@preview
![](svg/chapter-13/footnote-example-crop.svg)
@slide(layout=content-and-preview)
@title
Cross-references
@content
Manually (just dont!)
``` {.hljs .lang-tex}
As you can see in figure 23, …
```
Using the `\ref` command:
``` {.hljs .lang-tex}
\begin{figure}[H]
\includegraphics % …
\caption{Our mascot Fooboar}
\label{img:fooboar}
\end{figure}
As you can see in figure
\ref{img:fooboar}, …
```
@preview
![](svg/chapter-13/ref-example-crop.svg)
@slide(layout=content-only)
@title
Assigning labels
@content
Both cross-reference commands work with **sections, figures, tables, listings, and equations,** as long as you use correct labels.
Labels have to be **unambiguous.** For clarity, certain prefixes are common, and some packages use them to derive information.
<table>
<tr>
<td>`fig:` Figures</td>
<td>`tbl:` Tables</td>
</tr>
<tr>
<td>`sec:` Sections</td>
<td>`subsec:` Subsections</td>
</tr>
<tr>
<td>`ch:` Chapters</td>
<td>`itm:` Enumeration items</td>
</tr>
<tr>
<td>`eq:` Equations</td>
<td>`lst:` Source code listings</td>
</tr>
</table>
@slide(layout=content-and-preview)
@title
Cross-references
@content
Using the `cleveref` package (with *one* r!):
``` {.hljs .lang-tex}
\begin{figure}[H]
\includegraphics % …
\caption{Our mascot Fooboar}
\label{img:fooboar}
\end{figure}
Fooboar is a young and highly engaged
boar (see \Cref{img:fooboar}).
```
The `\cref` command automatically inserts suitable prefixes.
@preview
![](svg/chapter-13/cref-example-crop.svg)
Reference management
@slide(layout=content-only)
@title
Things to consider
What do we need?
@content
* Terms inserted by `\cref` use the language specified with the document class (or `babel`):
``` {.hljs .lang-tex}
\documentclass[english]{article}
```
* Apart from sections, referenced elements need captions (`\caption{…}`), and the **captions have to be placed before the label.**
* For sectioning commands, the label is inserted directly after the section command.
``` {.hljs .lang-tex}
\section{Notes}\label{sec:notes}
```
* a **bibliography file** (hereafter `.bib` file) for storing references
* **BibTeX** as an interface between the references and LaTeX
@slide(layout=task)
@slide(layout=wide-content)
@title
What is this mysterious `.bib` file?
@content
* collection of references in BibTeX format
* example:
``` {.hljs .lang-tex}
@article{turing1990, % the type of the document and an identifier for the \cite command
title={The chemical basis of morphogenesis}, % information
author={Turing, Alan Mathison}, % about
journal={Bulletin of mathematical biology}, % the
volume={52}, % literature
pages={153--197}, % work
year={1990}, % follows
publisher={Springer} % …
}
```
@slide(layout=content-only)
@title
How is it used?
@content
BibTeX adds some citation commands to LaTeX. In addition, we need the `natbib` package.
* ++ Citing an author: `\citeauthor{<source>}`
* ++ Citing a source: `\cite{<source>}`
* ++ Citing a page: `\cite[p. 15]{<source>}`
* ++ Citing with additional text:<br/>`\cite[<prefix>][<suffix>]{<source>}`
* ++ Referencing the `.bib` file: `\bibliography{<.bib file>}`
* ++ Choosing a citation style: <br/>`\bibliographystyle{<citation style>}`
> Two things are infinite: the universe and&nbsp;the&nbsp;assortment of citation styles.<cite>Unknown</cite>
@slide(layout=preview-only)
@preview
![Citing in Alpha style](svg/chapter-14/bibtex-alpha-example-crop.svg){.large .thin-padding}
@slide(layout=preview-only)
@preview
![Citing in Natdin style](svg/chapter-14/bibtex-natdin-example-crop.svg){.large .thin-padding}
@slide(layout=preview-only)
@preview
![Finding ready-made BibTeX entries University of Bamberg Library](svg/chapter-14/bamberg_catalogue_bibtex.jpg){.large}
@slide(layout=preview-only)
@preview
![Finding ready-made BibTeX entries Google Scholar](svg/chapter-14/google_bibtex1.jpg){.large}
@slide(layout=preview-only)
@preview
![Finding ready-made BibTeX entries Google Scholar](svg/chapter-14/google_bibtex2.jpg){.large}
@slide(layout=preview-only)
@preview
![Finding ready-made BibTeX entries dblp.org](svg/chapter-14/dblp.jpg){.large}
@slide(layout=wide-task)
@task-number
13
@title
Inserting footnotes
Creating and inserting references
@content
* Make the text *March 2021* in file `exercises/footnotes/footnotes.tex` appear as a **footnote**.
* Additionally, insert a **clickable URL** that leads to the download page for the Java Development Kit (`https://www.oracle.com/java/technologies/javase-downloads.html`).
@slide(layout=task)
@task-number
14
@title
Inserting references
@content
* In file `exercises/references/references.tex`, replace *In the figure* and *The following source code listing* by **references** to the figure and to the source code listing.
* Use the command `\Cref` for the references.
* Make sure to add **labels** to the elements that you want to create a reference for.
* To do so, wrap the source code listing in a `listing` **environment**.
* Additionally, add a **caption** to the source code listing.
@slide(layout=extra-content-and-preview)
@title
Configuring footnotes
@content
The `footmisc` package provides additional options for the presentation of footnotes that can be activated by adding parameters to the `\usepackage` command.
``` {.hljs .lang-tex}
% Reset the counter on each page:
\usepackage[perpage]{footmisc}
% Display footnotes in-line:
\usepackage[para]{footmisc}
% Use symbols instead of numbers:
\usepackage[symbol]{footmisc}
```
@preview
![](svg/chapter-13/footmisc-en-crop.svg){.thin-padding}
@slide(layout=extra-content-and-preview)
@title
A few more things
@content
* It is recommended that you include the package `hyperref` before `cleveref`.
* `\cref` can take multiple references at once, separated by commas.
``` {.hljs .lang-tex}
\section{An introduction}
\label{sec:section1}
% …
Reference be made to
\cref{sec:section1,sec:section2,
sec:section3,sec:section5}.
```
@preview
![](svg/chapter-13/cref-multiple-example-crop.svg)
* Create a new BibTeX file called `literature.bib` in the `exercises/literature` folder.
* Use Google Scholar or dblp.org to retrieve BibTeX references for the following $\LaTeX$ handbooks:
* Dilip Datta (2017): $\LaTeX$ in 24 Hours. A Practical Guide for Scientific Writing.
* Frank Mittelbach / Michel Goossens (2012): Der $\LaTeX$-Begleiter.
* Add the BibTeX entries to the BibTeX file.
* Assign unique and meaningful BibTeX keys.
* Include the BibTeX file in a suitable location, where later on the references should be listed.
* Cite the two handbooks in the file `exercises/literature/literature.tex`.
* Make use of the `plain` bibliography style.

View File

@ -4,111 +4,211 @@
14
@title
Literatur&shy;verwaltung
Paket in Sicht!
@slide(layout=content-only)
@slide(layout=content-and-preview)
@title
Was brauchen wir dafür?
Stichwortverzeichnis anlegen
@content
* eine **Bibliographiedatei** (nachfolgend `.bib`-Datei) zur Speicherung von Literaturverweisen
* **BibTeX** als Schnittstelle zwischen der Literatur und LaTeX
@slide(layout=wide-content)
@title
Was ist diese ominöse `.bib`-Datei?
@content
* Sammlung von Literatureinträgen im BibTeX-Format
* Beispielhafter Literatureintrag:
``` {.hljs .lang-tex}
@article{turing1990, % Art des Dokuments und Bezeichner für den \cite Befehl
title={The chemical basis of morphogenesis}, % Titel
author={Turing, Alan Mathison}, % Autor
journal={Bulletin of mathematical biology}, % Titel des Journals
volume={52}, % Band des Journals
pages={153--197}, % Seitenzahl im Journal
year={1990}, % Erscheinungsjahr
publisher={Springer} % Verleger des Journals
}
```{.lang-tex .hljs}
\usepackage{makeidx}
\makeindex
\begin{document}
\maketitle
\section{Was ist LaTeX\index{LaTeX}?}
LaTeX\index{LaTeX} ist ein
Textsatzsystem\index{Textsatzsystem}.
\newpage \section{TeX\index{TeX} vs.
LaTeX\index{LaTeX}} Es basiert auf
TeX\index{TeX}, einer Erfindung von
Donald Knuth\index{Knuth, Donald}.
Da TeX\index{TeX} in seiner Syntax sehr
viel komplexer als LaTeX\index{LaTeX}
ist, ist LaTeX\index{LaTeX} wesentlich
weiter verbreitet.
\printindex
```
@preview
![](svg/chapter-15/index.png)
@slide(layout=content-and-preview)
@title
Präsentationen gestalten
@content
Für Präsentationen gibt es die Dokumentenklasse `beamer` sowie zahlreiche [Vorlagen und Themes](https://www.overleaf.com/learn/latex/Beamer).
```{.lang-tex .hljs .small-text}
\documentclass{beamer}
\usetheme{Frankfurt}
\usecolortheme{seahorse}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{frame}
\frametitle{Zitronensorbet}
\framesubtitle{Inkarnation des Guten?}
\begin{definition}
Ein Zitronensorbet ist eine
halbgefrorene \textbf{Speiseeiscreme}
auf Basis von \textit{Zitronen}.
\end{definition}
\end{frame}
\end{document}
```
@preview
<img src="svg/chapter-15/beamer-orig.svg" style="width: 100%; margin: 0;"/>
@slide(layout=content-and-preview)
@title
Grafiken erstellen
@content
`TikZ` (»TikZ ist kein Zeichenprogramm«) ist ein umfangreiches Paket zur Erstellung von Vektorgrafiken.
```{.lang-tex .hljs .small-text .scroll-one-half}
% …
\tikzstyle{every node}=[draw=black,thick,anchor=west]
\tikzstyle{selected}=[draw=red,fill=red!30]
\tikzstyle{dir}=[fill=gray!50]
\tikzstyle{relativeTo}=[fill=blue!70]
\begin{tikzpicture}[%
grow via
three points={one child at (0.5,-0.7) and
two children at
(0.5,-0.7) and (0.5,-1.4)},
edge from
parent path={(\tikzparentnode.south)
|- (\tikzchildnode.west)}]
\node {/ oder C:}
child { node {home}
child { node {knut}
child { node {pictures}}
child { node {docs}
child { node [dir] {latex}
child { node [relativeTo] {main.tex}
child { node [selected] {part1.tex}
}
}
}
};
\end{tikzpicture}
```
@preview
![](svg/chapter-04/relative-path-crop.svg)
@slide(layout=content-and-preview)
@title
Linguistik
@content
Mit dem Paket `qtree` lassen sich Konstituentenbäume erstellen:
```{.lang-tex .hljs}
\Tree [.S [.NP LaTeX ]
[.VP [.V is ] [.NP fun ] ] ]
```
@preview
![](svg/chapter-15/constituency-tree-crop.svg)
@slide(layout=content-and-preview)
@title
Mathematische Beweisführung
@content
Beweisbäume lassen sich mit dem Paket `prftree` einwandfrei darstellen.
```{.hljs .lang-tex .small-text .scroll-one-half}
\begin{displaymath}
\prftree[l,r]{}{[comp$\_{ns}$]}
{
\prftree[l,r]{}{[comp$\_{ns}$]}
{
\prftree[l,r]{}{[ass$\_{ns}$]}
{
-
}
{
(\texttt{m:=a}, \sigma\_{\bot,\bot})
\rightarrow \sigma\_{48,\bot}
}
}
{
\prftree[l,r]{}{[ass$\_{ns}$]}
{
-
}
{
(\texttt{n:=b}, \sigma\_{48,\bot})
\rightarrow \sigma\_{48,18}
}
}
{
(\texttt{m:=a; n:=b}, \sigma\_{\bot,\bot})
\rightarrow \sigma\_{48,18}
}
}
{
\prftree[l,r]{}{}
{
\dots
}
{
\textbf{[1]}\ (\texttt{LOOP}, \sigma\_{48,18})
\rightarrow \sigma\_{6,6}
}
}
{
(\texttt{m:=a; n:=b; LOOP}, \sigma\_{\bot,\bot})
\rightarrow \sigma\_{6,6}
}
\end{displaymath}
```
@preview
<img class="thin-padding" src="svg/chapter-15/prftree-crop.svg"/>
@slide(layout=content-only)
@title
Wie wird das verwendet?
Weitere nützliche Pakete
@content
Durch BibTeX wird LaTeX um einige Befehle zum Zitieren erweitert. Außerdem benötigt wird das Paket `natbib`.
* ++ Zitieren eines Autors: `\citeauthor{<quelle>}`
* ++ Zitieren einer Quelle: `\cite{<quelle>}`
* ++ Zitieren einer Seite: `\cite[S. 15]{<quelle>}`
* ++ Zitieren mit weiteren Zusätzen:<br/>`\cite[<präfix>][<suffix>]{<quelle>}`
* ++ Verweis auf die genutzte `.bib`-Datei: `\bibliography{<.bib-datei>}`
* ++ Angabe des genutzten Zitierstils: <br/>`\bibliographystyle{<zitierstil>}`
> Zwei Dinge sind unendlich. Das Universum und&nbsp;die&nbsp;Auswahl an Zitierstilen.<cite>Unbekannt</cite>
@slide(layout=preview-only)
@preview
![Zitieren im Alpha-Zitierstil](svg/chapter-14/bibtex-alpha-crop.svg){.large .thin-padding}
@slide(layout=preview-only)
@preview
![Zitieren im Natdin-Zitierstil](svg/chapter-14/bibtex-natdin-crop.svg){.large .thin-padding}
@slide(layout=preview-only)
@preview
![Finden von fertigen BibTeX-Einträgen Bamberger Katalog](svg/chapter-14/bamberger_katalog_bibtex.jpg){.large}
@slide(layout=preview-only)
@preview
![Finden von fertigen BibTeX-Einträgen Google Scholar](svg/chapter-14/google_bibtex1.jpg){.large}
@slide(layout=preview-only)
@preview
![Finden von fertigen BibTeX-Einträgen Google Scholar](svg/chapter-14/google_bibtex2.jpg){.large}
@slide(layout=preview-only)
@preview
![Finden von fertigen BibTeX-Einträgen dblp.org](svg/chapter-14/dblp.jpg){.large}
@slide(layout=wide-task)
@task-number
15
@title
Ein Literaturverzeichnis erstellen und einfügen
@content
* Erstellt im Ordner `exercises/literature` eine neue BibTeX-Datei `literature.bib`.
* Sucht bei Google Scholar oder dblp.org die BibTeX-Einträge für folgende $\LaTeX$-Handbücher:
* Dilip Datta (2017): $\LaTeX$ in 24 Hours. A Practical Guide for Scientific Writing.
* Frank Mittelbach / Michel Goossens (2012): Der $\LaTeX$-Begleiter.
* Fügt die BibTeX-Einträge in die BibTeX-Datei ein.
* Vergebt aussagekräftige BibTeX-Keys.
* Bindet die BibTeX-Datei an einer geeigneten Stelle ein, an der später auch das Literaturverzeichnis zu sehen sein soll.
* Zitiert die zwei Handbücher im Text in der Datei `exercises/literature/literature.tex`.
* Wählt den Bibliographiestil `plain`.
<table>
<tr>
<th>Paket</th>
<th>Anwendung</th>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/xcolor"><code>xcolor</code></a></td>
<td>Machs mit Farbe</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/todonotes"><code>todonotes</code></a></td>
<td>ToDo-Markierungen und Liste der ToDos</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/pdfpages"><code>pdfpages</code></a></td>
<td>Einbinden von PDF-Dateien</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/subcaption"><code>subcaption</code></a></td>
<td>Verschachtelte Abbildungen und ausgefeilte Bildunterschriften</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/colortbl"><code>colortbl</code></a>, <a href="https://www.ctan.org/pkg/tabularx"><code>tabularx</code></a>, <a href="https://www.ctan.org/pkg/multirow"><code>multirow</code></a>, <a href="https://www.ctan.org/pkg/makecell"><code>makecell</code></a></td>
<td>Gestalten von Tabellen</td>
</tr>
</table>

View File

@ -4,111 +4,212 @@
14
@title
Reference management
Package in sight!
@slide(layout=content-only)
@slide(layout=content-and-preview)
@title
What do we need?
Creating an index
@content
* a **bibliography file** (hereafter `.bib` file) for storing references
* **BibTeX** as an interface between the references and LaTeX
@slide(layout=wide-content)
@title
What is this mysterious `.bib` file?
@content
* collection of references in BibTeX format
* example:
``` {.hljs .lang-tex}
@article{turing1990, % the type of the document and an identifier for the \cite command
title={The chemical basis of morphogenesis}, % information
author={Turing, Alan Mathison}, % about
journal={Bulletin of mathematical biology}, % the
volume={52}, % literature
pages={153--197}, % work
year={1990}, % follows
publisher={Springer} % …
}
```{.lang-tex .hljs}
\usepackage{makeidx}
\makeindex
\begin{document}
\maketitle
\section{What is LaTeX\index{LaTeX}?}
LaTeX\index{LaTeX} is a typesetting
system\index{Typesetting system}.
\newpage \section{TeX\index{TeX} vs.
LaTeX\index{LaTeX}} It is based on
TeX\index{TeX}, an invention by
Donald Knuth\index{Knuth, Donald}.
As TeX\index{TeX} is way more complex
syntactically than LaTeX\index{LaTeX},
LaTeX\index{LaTeX} is much more
popular.
\printindex
```
@preview
![](svg/chapter-15/index_en-crop.svg)
@slide(layout=content-and-preview)
@title
Designing presentation slides
@content
For slides, there is the `beamer` document class, as well as numerous [templates and themes](https://www.overleaf.com/learn/latex/Beamer).
```{.lang-tex .hljs .small-text}
\documentclass{beamer}
\usetheme{Frankfurt}
\usecolortheme{seahorse}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{frame}
\frametitle{Lemon sorbet}
\framesubtitle{Incarnation of good?}
\begin{definition}
A lemon sorbet is a
semi-frozen \textbf{dessert}
on \textit{lemon} base.
\end{definition}
\end{frame}
\end{document}
```
@preview
<img src="svg/chapter-15/beamer-orig.svg" style="width: 100%; margin: 0;"/>
@slide(layout=content-and-preview)
@title
Drawing images
@content
`TikZ` (“TikZ ist kein Zeichenprogramm”&thinsp;&thinsp;“TikZ is no drawing software”) is a powerful package for drawing vector graphics.
```{.lang-tex .hljs .small-text .scroll-one-half}
% …
\tikzstyle{every node}=[draw=black,thick,anchor=west]
\tikzstyle{selected}=[draw=red,fill=red!30]
\tikzstyle{dir}=[fill=gray!50]
\tikzstyle{relativeTo}=[fill=blue!70]
\begin{tikzpicture}[%
grow via
three points={one child at (0.5,-0.7) and
two children at
(0.5,-0.7) and (0.5,-1.4)},
edge from
parent path={(\tikzparentnode.south)
|- (\tikzchildnode.west)}]
\node {/ or C:}
child { node {home}
child { node {knut}
child { node {pictures}}
child { node {docs}
child { node [dir] {latex}
child { node [relativeTo] {main.tex}
child { node [selected] {part1.tex}
}
}
}
};
\end{tikzpicture}
```
@preview
![](svg/chapter-04/relative-path-crop.svg)
@slide(layout=content-and-preview)
@title
Linguistics
@content
The `qtree` package can render constituent-based parse trees:
```{.lang-tex .hljs}
\Tree [.S [.NP LaTeX ]
[.VP [.V is ] [.NP fun ] ] ]
```
@preview
![](svg/chapter-15/constituency-tree-crop.svg)
@slide(layout=content-and-preview)
@title
Mathematical proofs
@content
Logical tableaux can be renderd using the `prftree` package.
```{.hljs .lang-tex .small-text .scroll-one-half}
\begin{displaymath}
\prftree[l,r]{}{[comp$\_{ns}$]}
{
\prftree[l,r]{}{[comp$\_{ns}$]}
{
\prftree[l,r]{}{[ass$\_{ns}$]}
{
-
}
{
(\texttt{m:=a}, \sigma\_{\bot,\bot})
\rightarrow \sigma\_{48,\bot}
}
}
{
\prftree[l,r]{}{[ass$\_{ns}$]}
{
-
}
{
(\texttt{n:=b}, \sigma\_{48,\bot})
\rightarrow \sigma\_{48,18}
}
}
{
(\texttt{m:=a; n:=b}, \sigma\_{\bot,\bot})
\rightarrow \sigma\_{48,18}
}
}
{
\prftree[l,r]{}{}
{
\dots
}
{
\textbf{[1]}\ (\texttt{LOOP}, \sigma\_{48,18})
\rightarrow \sigma\_{6,6}
}
}
{
(\texttt{m:=a; n:=b; LOOP}, \sigma\_{\bot,\bot})
\rightarrow \sigma\_{6,6}
}
\end{displaymath}
```
@preview
<img class="thin-padding" src="svg/chapter-15/prftree-crop.svg"/>
@slide(layout=content-only)
@title
How is it used?
Other useful packages
@content
BibTeX adds some citation commands to LaTeX. In addition, we need the `natbib` package.
<table>
<tr>
<th>Package</th>
<th>Use case</th>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/xcolor"><code>xcolor</code></a></td>
<td>colours</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/todonotes"><code>todonotes</code></a></td>
<td>todo&nbsp;annotations&nbsp;and&nbsp;index</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/pdfpages"><code>pdfpages</code></a></td>
<td>embedding PDF files</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/subcaption"><code>subcaption</code></a></td>
<td>Nested figures and fine-tuned captions</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/colortbl"><code>colortbl</code></a>, <a href="https://www.ctan.org/pkg/tabularx"><code>tabularx</code></a>, <a href="https://www.ctan.org/pkg/multirow"><code>multirow</code></a>, <a href="https://www.ctan.org/pkg/makecell"><code>makecell</code></a></td>
<td>Table tuning</td>
</tr>
</table>
* ++ Citing an author: `\citeauthor{<source>}`
* ++ Citing a source: `\cite{<source>}`
* ++ Citing a page: `\cite[p. 15]{<source>}`
* ++ Citing with additional text:<br/>`\cite[<prefix>][<suffix>]{<source>}`
* ++ Referencing the `.bib` file: `\bibliography{<.bib file>}`
* ++ Choosing a citation style: <br/>`\bibliographystyle{<citation style>}`
> Two things are infinite: the universe and&nbsp;the&nbsp;assortment of citation styles.<cite>Unknown</cite>
@slide(layout=preview-only)
@preview
![Citing in Alpha style](svg/chapter-14/bibtex-alpha-example-crop.svg){.large .thin-padding}
@slide(layout=preview-only)
@preview
![Citing in Natdin style](svg/chapter-14/bibtex-natdin-example-crop.svg){.large .thin-padding}
@slide(layout=preview-only)
@preview
![Finding ready-made BibTeX entries University of Bamberg Library](svg/chapter-14/bamberg_catalogue_bibtex.jpg){.large}
@slide(layout=preview-only)
@preview
![Finding ready-made BibTeX entries Google Scholar](svg/chapter-14/google_bibtex1.jpg){.large}
@slide(layout=preview-only)
@preview
![Finding ready-made BibTeX entries Google Scholar](svg/chapter-14/google_bibtex2.jpg){.large}
@slide(layout=preview-only)
@preview
![Finding ready-made BibTeX entries dblp.org](svg/chapter-14/dblp.jpg){.large}
@slide(layout=wide-task)
@task-number
15
@title
Creating and inserting references
@content
* Create a new BibTeX file called `literature.bib` in the `exercises/literature` folder.
* Use Google Scholar or dblp.org to retrieve BibTeX references for the following $\LaTeX$ handbooks:
* Dilip Datta (2017): $\LaTeX$ in 24 Hours. A Practical Guide for Scientific Writing.
* Frank Mittelbach / Michel Goossens (2012): Der $\LaTeX$-Begleiter.
* Add the BibTeX entries to the BibTeX file.
* Assign unique and meaningful BibTeX keys.
* Include the BibTeX file in a suitable location, where later on the references should be listed.
* Cite the two handbooks in the file `exercises/literature/literature.tex`.
* Make use of the `plain` bibliography style.

View File

@ -4,211 +4,100 @@
15
@title
Paket in Sicht!
@slide(layout=content-and-preview)
@title
Stichwortverzeichnis anlegen
@content
```{.lang-tex .hljs}
\usepackage{makeidx}
\makeindex
\begin{document}
\maketitle
\section{Was ist LaTeX\index{LaTeX}?}
LaTeX\index{LaTeX} ist ein
Textsatzsystem\index{Textsatzsystem}.
\newpage \section{TeX\index{TeX} vs.
LaTeX\index{LaTeX}} Es basiert auf
TeX\index{TeX}, einer Erfindung von
Donald Knuth\index{Knuth, Donald}.
Da TeX\index{TeX} in seiner Syntax sehr
viel komplexer als LaTeX\index{LaTeX}
ist, ist LaTeX\index{LaTeX} wesentlich
weiter verbreitet.
\printindex
```
@preview
![](svg/chapter-15/index.png)
@slide(layout=content-and-preview)
@title
Präsentationen gestalten
@content
Für Präsentationen gibt es die Dokumentenklasse `beamer` sowie zahlreiche [Vorlagen und Themes](https://www.overleaf.com/learn/latex/Beamer).
```{.lang-tex .hljs .small-text}
\documentclass{beamer}
\usetheme{Frankfurt}
\usecolortheme{seahorse}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{frame}
\frametitle{Zitronensorbet}
\framesubtitle{Inkarnation des Guten?}
\begin{definition}
Ein Zitronensorbet ist eine
halbgefrorene \textbf{Speiseeiscreme}
auf Basis von \textit{Zitronen}.
\end{definition}
\end{frame}
\end{document}
```
@preview
<img src="svg/chapter-15/beamer-orig.svg" style="width: 100%; margin: 0;"/>
@slide(layout=content-and-preview)
@title
Grafiken erstellen
@content
`TikZ` (»TikZ ist kein Zeichenprogramm«) ist ein umfangreiches Paket zur Erstellung von Vektorgrafiken.
```{.lang-tex .hljs .small-text .scroll-one-half}
% …
\tikzstyle{every node}=[draw=black,thick,anchor=west]
\tikzstyle{selected}=[draw=red,fill=red!30]
\tikzstyle{dir}=[fill=gray!50]
\tikzstyle{relativeTo}=[fill=blue!70]
\begin{tikzpicture}[%
grow via
three points={one child at (0.5,-0.7) and
two children at
(0.5,-0.7) and (0.5,-1.4)},
edge from
parent path={(\tikzparentnode.south)
|- (\tikzchildnode.west)}]
\node {/ oder C:}
child { node {home}
child { node {knut}
child { node {pictures}}
child { node {docs}
child { node [dir] {latex}
child { node [relativeTo] {main.tex}
child { node [selected] {part1.tex}
}
}
}
};
\end{tikzpicture}
```
@preview
![](svg/chapter-04/relative-path-crop.svg)
@slide(layout=content-and-preview)
@title
Linguistik
@content
Mit dem Paket `qtree` lassen sich Konstituentenbäume erstellen:
```{.lang-tex .hljs}
\Tree [.S [.NP LaTeX ]
[.VP [.V is ] [.NP fun ] ] ]
```
@preview
![](svg/chapter-15/constituency-tree-crop.svg)
@slide(layout=content-and-preview)
@title
Mathematische Beweisführung
@content
Beweisbäume lassen sich mit dem Paket `prftree` einwandfrei darstellen.
```{.hljs .lang-tex .small-text .scroll-one-half}
\begin{displaymath}
\prftree[l,r]{}{[comp$\_{ns}$]}
{
\prftree[l,r]{}{[comp$\_{ns}$]}
{
\prftree[l,r]{}{[ass$\_{ns}$]}
{
-
}
{
(\texttt{m:=a}, \sigma\_{\bot,\bot})
\rightarrow \sigma\_{48,\bot}
}
}
{
\prftree[l,r]{}{[ass$\_{ns}$]}
{
-
}
{
(\texttt{n:=b}, \sigma\_{48,\bot})
\rightarrow \sigma\_{48,18}
}
}
{
(\texttt{m:=a; n:=b}, \sigma\_{\bot,\bot})
\rightarrow \sigma\_{48,18}
}
}
{
\prftree[l,r]{}{}
{
\dots
}
{
\textbf{[1]}\ (\texttt{LOOP}, \sigma\_{48,18})
\rightarrow \sigma\_{6,6}
}
}
{
(\texttt{m:=a; n:=b; LOOP}, \sigma\_{\bot,\bot})
\rightarrow \sigma\_{6,6}
}
\end{displaymath}
```
@preview
<img class="thin-padding" src="svg/chapter-15/prftree-crop.svg"/>
Hilfe und Informationen
@slide(layout=content-only)
@title
Weitere nützliche Pakete
[Wikibooks](https://de.wikibooks.org/wiki/LaTeX-Kompendium)
@content
<table>
<tr>
<th>Paket</th>
<th>Anwendung</th>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/xcolor"><code>xcolor</code></a></td>
<td>Machs mit Farbe</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/todonotes"><code>todonotes</code></a></td>
<td>ToDo-Markierungen und Liste der ToDos</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/pdfpages"><code>pdfpages</code></a></td>
<td>Einbinden von PDF-Dateien</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/subcaption"><code>subcaption</code></a></td>
<td>Verschachtelte Abbildungen und ausgefeilte Bildunterschriften</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/colortbl"><code>colortbl</code></a>, <a href="https://www.ctan.org/pkg/tabularx"><code>tabularx</code></a>, <a href="https://www.ctan.org/pkg/multirow"><code>multirow</code></a>, <a href="https://www.ctan.org/pkg/makecell"><code>makecell</code></a></td>
<td>Gestalten von Tabellen</td>
</tr>
</table>
Das Wikibook zu LaTeX enthält eine große Anzahl interessanter Artikel und ist auch in deutscher Sprache verfügbar.
![](svg/chapter-16/wikibooks-latex.jpg)
@slide(layout=content-only)
@title
[CTAN](https://ctan.org)
@content
Das »Comprehensive TeX Archive Network« ist die zentrale Quelle für LaTeX-Pakete und ihre Dokumentation.
![](svg/chapter-16/ctan.jpg)
@slide(layout=content-only)
@title
[Overleaf](https://www.overleaf.com)
@content
Ein Online-LaTeX-Editor, der das kollaboratives Arbeiten an Dokumenten ermöglicht.
Außerdem findest du auf der Seite verschiedene Tutorials und unter <a href="https://www.overleaf.com/templates">»Templates«</a> LaTeX-Vorlagen für viele Gelegenheiten (Lebenslauf, Abschlussarbeiten, …).
![](svg/chapter-16/overleaf.jpg)
@slide(layout=content-only)
@title
[StackExchange](https://tex.stackexchange.com)
@content
Frage-Forum zu LaTeX.
![](svg/chapter-16/stackexchange.jpg)
@slide(layout=content-only)
@title
[TeXample](https://www.texample.net)
@content
Webseite mit zahlreichen LaTeX-Beispielvorlagen, vor allem zu TikZ.
![](svg/chapter-16/texample.jpg)
@slide(layout=preview-only)
@preview
![Klassisch ([Quelle](https://tex.stackexchange.com/questions/1319/showcase-of-beautiful-typography-done-in-tex-friends))](svg/chapter-16/klassisches-beispiel.jpg)
@slide(layout=preview-only)
@preview
![Noch klassischer ([Quelle](https://tex.stackexchange.com/questions/1319/showcase-of-beautiful-typography-done-in-tex-friends))](svg/chapter-16/klassischeres-beispiel.jpg)
@slide(layout=preview-only)
@preview
![Anders ([Quelle](https://tex.stackexchange.com/questions/1319/showcase-of-beautiful-typography-done-in-tex-friends))](svg/chapter-16/anderes-beispiel.jpg)
@slide(layout=content-only)
@title
[Fachschaft WIAI](https://www.uni-bamberg.de/wiai/fs/)
@content
Wenn ihr sonst noch Fragen oder Probleme habt, kommt gerne bei uns vorbei oder schreibt uns eine Mail!
<p><span style="display: inline-block; width: 2em;" class="emoji">📍</span>WE5/02.104 <br/>
<span style="display: inline-block; width: 2em;" class="emoji">☎️</span>0951 863 1219 <br/>
<span style="display: inline-block; width: 2em;" class="emoji">📧</span><a href="mailto:fachschaft-wiai.stuve@uni-bamberg.de">fachschaft-wiai.stuve@uni-bamberg.de</a>
</p>
<img src="images/logo-fachschaft.jpg" style="width:40%; margin: 0 auto; margin-top: 2em;
display:block;"/>
@slide(layout=content-only)
@title
Kurzes Feedback
@content
* Was hat euch gut gefallen?
* Was hätten wir besser machen können?
* Was hättet ihr euch gewünscht?
@slide(layout=preview-only)
@preview
<img src="svg/chapter-16/fooboar-latex-tut.jpg" style="width:80%; margin:0 auto; display: block;"/>

View File

@ -4,212 +4,101 @@
15
@title
Package in sight!
@slide(layout=content-and-preview)
@title
Creating an index
@content
```{.lang-tex .hljs}
\usepackage{makeidx}
\makeindex
\begin{document}
\maketitle
\section{What is LaTeX\index{LaTeX}?}
LaTeX\index{LaTeX} is a typesetting
system\index{Typesetting system}.
\newpage \section{TeX\index{TeX} vs.
LaTeX\index{LaTeX}} It is based on
TeX\index{TeX}, an invention by
Donald Knuth\index{Knuth, Donald}.
As TeX\index{TeX} is way more complex
syntactically than LaTeX\index{LaTeX},
LaTeX\index{LaTeX} is much more
popular.
\printindex
```
@preview
![](svg/chapter-15/index_en-crop.svg)
@slide(layout=content-and-preview)
@title
Designing presentation slides
@content
For slides, there is the `beamer` document class, as well as numerous [templates and themes](https://www.overleaf.com/learn/latex/Beamer).
```{.lang-tex .hljs .small-text}
\documentclass{beamer}
\usetheme{Frankfurt}
\usecolortheme{seahorse}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{frame}
\frametitle{Lemon sorbet}
\framesubtitle{Incarnation of good?}
\begin{definition}
A lemon sorbet is a
semi-frozen \textbf{dessert}
on \textit{lemon} base.
\end{definition}
\end{frame}
\end{document}
```
@preview
<img src="svg/chapter-15/beamer-orig.svg" style="width: 100%; margin: 0;"/>
@slide(layout=content-and-preview)
@title
Drawing images
@content
`TikZ` (“TikZ ist kein Zeichenprogramm”&thinsp;&thinsp;“TikZ is no drawing software”) is a powerful package for drawing vector graphics.
```{.lang-tex .hljs .small-text .scroll-one-half}
% …
\tikzstyle{every node}=[draw=black,thick,anchor=west]
\tikzstyle{selected}=[draw=red,fill=red!30]
\tikzstyle{dir}=[fill=gray!50]
\tikzstyle{relativeTo}=[fill=blue!70]
\begin{tikzpicture}[%
grow via
three points={one child at (0.5,-0.7) and
two children at
(0.5,-0.7) and (0.5,-1.4)},
edge from
parent path={(\tikzparentnode.south)
|- (\tikzchildnode.west)}]
\node {/ or C:}
child { node {home}
child { node {knut}
child { node {pictures}}
child { node {docs}
child { node [dir] {latex}
child { node [relativeTo] {main.tex}
child { node [selected] {part1.tex}
}
}
}
};
\end{tikzpicture}
```
@preview
![](svg/chapter-04/relative-path-crop.svg)
@slide(layout=content-and-preview)
@title
Linguistics
@content
The `qtree` package can render constituent-based parse trees:
```{.lang-tex .hljs}
\Tree [.S [.NP LaTeX ]
[.VP [.V is ] [.NP fun ] ] ]
```
@preview
![](svg/chapter-15/constituency-tree-crop.svg)
@slide(layout=content-and-preview)
@title
Mathematical proofs
@content
Logical tableaux can be renderd using the `prftree` package.
```{.hljs .lang-tex .small-text .scroll-one-half}
\begin{displaymath}
\prftree[l,r]{}{[comp$\_{ns}$]}
{
\prftree[l,r]{}{[comp$\_{ns}$]}
{
\prftree[l,r]{}{[ass$\_{ns}$]}
{
-
}
{
(\texttt{m:=a}, \sigma\_{\bot,\bot})
\rightarrow \sigma\_{48,\bot}
}
}
{
\prftree[l,r]{}{[ass$\_{ns}$]}
{
-
}
{
(\texttt{n:=b}, \sigma\_{48,\bot})
\rightarrow \sigma\_{48,18}
}
}
{
(\texttt{m:=a; n:=b}, \sigma\_{\bot,\bot})
\rightarrow \sigma\_{48,18}
}
}
{
\prftree[l,r]{}{}
{
\dots
}
{
\textbf{[1]}\ (\texttt{LOOP}, \sigma\_{48,18})
\rightarrow \sigma\_{6,6}
}
}
{
(\texttt{m:=a; n:=b; LOOP}, \sigma\_{\bot,\bot})
\rightarrow \sigma\_{6,6}
}
\end{displaymath}
```
@preview
<img class="thin-padding" src="svg/chapter-15/prftree-crop.svg"/>
Getting help and&nbsp;information
@slide(layout=content-only)
@title
Other useful packages
[Wikibooks](https://en.wikibooks.org/wiki/LaTeX)
@content
<table>
<tr>
<th>Package</th>
<th>Use case</th>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/xcolor"><code>xcolor</code></a></td>
<td>colours</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/todonotes"><code>todonotes</code></a></td>
<td>todo&nbsp;annotations&nbsp;and&nbsp;index</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/pdfpages"><code>pdfpages</code></a></td>
<td>embedding PDF files</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/subcaption"><code>subcaption</code></a></td>
<td>Nested figures and fine-tuned captions</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/colortbl"><code>colortbl</code></a>, <a href="https://www.ctan.org/pkg/tabularx"><code>tabularx</code></a>, <a href="https://www.ctan.org/pkg/multirow"><code>multirow</code></a>, <a href="https://www.ctan.org/pkg/makecell"><code>makecell</code></a></td>
<td>Table tuning</td>
</tr>
</table>
The LaTeX Wikibook offers numerous interesting articles and is available in English and German (among others).
![](svg/chapter-16/wikibooks-latex_en.jpg)
@slide(layout=content-only)
@title
[CTAN](https://ctan.org)
@content
The “Comprehensive TeX Archive Network” is the central source for LaTeX packages and their documentation.
![](svg/chapter-16/ctan.jpg)
@slide(layout=content-only)
@title
[Overleaf](https://www.overleaf.com)
@content
Overleaf is a collaborative online LaTeX editor.
It also offers a multiple tutorials and templates for different occasions (CV, theses, …): <a href="https://www.overleaf.com/templates">»Templates«</a>.
![](svg/chapter-16/overleaf.jpg)
@slide(layout=content-only)
@title
[StackExchange](https://tex.stackexchange.com)
@content
Question-and-answer website for LaTeX.
![](svg/chapter-16/stackexchange.jpg)
@slide(layout=content-only)
@title
[TeXample](https://www.texample.net)
@content
A collection of LaTeX examples, especially with TikZ.
![](svg/chapter-16/texample.jpg)
@slide(layout=preview-only)
@preview
![Classic ([source](https://tex.stackexchange.com/questions/1319/showcase-of-beautiful-typography-done-in-tex-friends))](svg/chapter-16/klassisches-beispiel.jpg)
@slide(layout=preview-only)
@preview
![More classic ([source](https://tex.stackexchange.com/questions/1319/showcase-of-beautiful-typography-done-in-tex-friends))](svg/chapter-16/klassischeres-beispiel.jpg)
@slide(layout=preview-only)
@preview
![Different ([source](https://tex.stackexchange.com/questions/1319/showcase-of-beautiful-typography-done-in-tex-friends))](svg/chapter-16/anderes-beispiel.jpg)
@slide(layout=content-only)
@title
[Fachschaft WIAI](https://www.uni-bamberg.de/wiai/fs/)
@content
If you have any other questions or problems, just&nbsp;come over or write us an e-mail!
<p><span style="display: inline-block; width: 2em;" class="emoji">📍</span>WE5/02.104 <br/>
<span style="display: inline-block; width: 2em;" class="emoji">☎️</span>0951 863 1219 <br/>
<span style="display: inline-block; width: 2em;" class="emoji">📧</span><a href="mailto:fachschaft-wiai.stuve@uni-bamberg.de">fachschaft-wiai.stuve@uni-bamberg.de</a>
</p>
<img src="images/logo-fachschaft.jpg" style="width:40%; margin: 0 auto; margin-top: 2em;
display:block;"/>
@slide(layout=content-only)
@title
A short feedback round
@content
* What did you like?
* What could we have done better?
* What did you wish for?
@slide(layout=preview-only)
@preview
<img src="svg/chapter-16/fooboar-latex-tut.jpg" style="width:80%; margin:0 auto; display: block;"/>

View File

@ -1,103 +0,0 @@
@slide(layout=chapter-slide)
@number
16
@title
Hilfe und Informationen
@slide(layout=content-only)
@title
[Wikibooks](https://de.wikibooks.org/wiki/LaTeX-Kompendium)
@content
Das Wikibook zu LaTeX enthält eine große Anzahl interessanter Artikel und ist auch in deutscher Sprache verfügbar.
![](svg/chapter-16/wikibooks-latex.jpg)
@slide(layout=content-only)
@title
[CTAN](https://ctan.org)
@content
Das »Comprehensive TeX Archive Network« ist die zentrale Quelle für LaTeX-Pakete und ihre Dokumentation.
![](svg/chapter-16/ctan.jpg)
@slide(layout=content-only)
@title
[Overleaf](https://www.overleaf.com)
@content
Ein Online-LaTeX-Editor, der das kollaboratives Arbeiten an Dokumenten ermöglicht.
Außerdem findest du auf der Seite verschiedene Tutorials und unter <a href="https://www.overleaf.com/templates">»Templates«</a> LaTeX-Vorlagen für viele Gelegenheiten (Lebenslauf, Abschlussarbeiten, …).
![](svg/chapter-16/overleaf.jpg)
@slide(layout=content-only)
@title
[StackExchange](https://tex.stackexchange.com)
@content
Frage-Forum zu LaTeX.
![](svg/chapter-16/stackexchange.jpg)
@slide(layout=content-only)
@title
[TeXample](https://www.texample.net)
@content
Webseite mit zahlreichen LaTeX-Beispielvorlagen, vor allem zu TikZ.
![](svg/chapter-16/texample.jpg)
@slide(layout=preview-only)
@preview
![Klassisch ([Quelle](https://tex.stackexchange.com/questions/1319/showcase-of-beautiful-typography-done-in-tex-friends))](svg/chapter-16/klassisches-beispiel.jpg)
@slide(layout=preview-only)
@preview
![Noch klassischer ([Quelle](https://tex.stackexchange.com/questions/1319/showcase-of-beautiful-typography-done-in-tex-friends))](svg/chapter-16/klassischeres-beispiel.jpg)
@slide(layout=preview-only)
@preview
![Anders ([Quelle](https://tex.stackexchange.com/questions/1319/showcase-of-beautiful-typography-done-in-tex-friends))](svg/chapter-16/anderes-beispiel.jpg)
@slide(layout=content-only)
@title
[Fachschaft WIAI](https://www.uni-bamberg.de/wiai/fs/)
@content
Wenn ihr sonst noch Fragen oder Probleme habt, kommt gerne bei uns vorbei oder schreibt uns eine Mail!
<p><span style="display: inline-block; width: 2em;" class="emoji">📍</span>WE5/02.104 <br/>
<span style="display: inline-block; width: 2em;" class="emoji">☎️</span>0951 863 1219 <br/>
<span style="display: inline-block; width: 2em;" class="emoji">📧</span><a href="mailto:fachschaft-wiai.stuve@uni-bamberg.de">fachschaft-wiai.stuve@uni-bamberg.de</a>
</p>
<img src="images/logo-fachschaft.jpg" style="width:40%; margin: 0 auto; margin-top: 2em;
display:block;"/>
@slide(layout=content-only)
@title
Kurzes Feedback
@content
* Was hat euch gut gefallen?
* Was hätten wir besser machen können?
* Was hättet ihr euch gewünscht?
@slide(layout=preview-only)
@preview
<img src="svg/chapter-16/fooboar-latex-tut.jpg" style="width:80%; margin:0 auto; display: block;"/>

View File

@ -1,104 +0,0 @@
@slide(layout=chapter-slide)
@number
16
@title
Getting help and&nbsp;information
@slide(layout=content-only)
@title
[Wikibooks](https://en.wikibooks.org/wiki/LaTeX)
@content
The LaTeX Wikibook offers numerous interesting articles and is available in English and German (among others).
![](svg/chapter-16/wikibooks-latex_en.jpg)
@slide(layout=content-only)
@title
[CTAN](https://ctan.org)
@content
The “Comprehensive TeX Archive Network” is the central source for LaTeX packages and their documentation.
![](svg/chapter-16/ctan.jpg)
@slide(layout=content-only)
@title
[Overleaf](https://www.overleaf.com)
@content
Overleaf is a collaborative online LaTeX editor.
It also offers a multiple tutorials and templates for different occasions (CV, theses, …): <a href="https://www.overleaf.com/templates">»Templates«</a>.
![](svg/chapter-16/overleaf.jpg)
@slide(layout=content-only)
@title
[StackExchange](https://tex.stackexchange.com)
@content
Question-and-answer website for LaTeX.
![](svg/chapter-16/stackexchange.jpg)
@slide(layout=content-only)
@title
[TeXample](https://www.texample.net)
@content
A collection of LaTeX examples, especially with TikZ.
![](svg/chapter-16/texample.jpg)
@slide(layout=preview-only)
@preview
![Classic ([source](https://tex.stackexchange.com/questions/1319/showcase-of-beautiful-typography-done-in-tex-friends))](svg/chapter-16/klassisches-beispiel.jpg)
@slide(layout=preview-only)
@preview
![More classic ([source](https://tex.stackexchange.com/questions/1319/showcase-of-beautiful-typography-done-in-tex-friends))](svg/chapter-16/klassischeres-beispiel.jpg)
@slide(layout=preview-only)
@preview
![Different ([source](https://tex.stackexchange.com/questions/1319/showcase-of-beautiful-typography-done-in-tex-friends))](svg/chapter-16/anderes-beispiel.jpg)
@slide(layout=content-only)
@title
[Fachschaft WIAI](https://www.uni-bamberg.de/wiai/fs/)
@content
If you have any other questions or problems, just&nbsp;come over or write us an e-mail!
<p><span style="display: inline-block; width: 2em;" class="emoji">📍</span>WE5/02.104 <br/>
<span style="display: inline-block; width: 2em;" class="emoji">☎️</span>0951 863 1219 <br/>
<span style="display: inline-block; width: 2em;" class="emoji">📧</span><a href="mailto:fachschaft-wiai.stuve@uni-bamberg.de">fachschaft-wiai.stuve@uni-bamberg.de</a>
</p>
<img src="images/logo-fachschaft.jpg" style="width:40%; margin: 0 auto; margin-top: 2em;
display:block;"/>
@slide(layout=content-only)
@title
A short feedback round
@content
* What did you like?
* What could we have done better?
* What did you wish for?
@slide(layout=preview-only)
@preview
<img src="svg/chapter-16/fooboar-latex-tut.jpg" style="width:80%; margin:0 auto; display: block;"/>