Compare commits

...

5 Commits

Author SHA1 Message Date
Florian
2bd1273c9a Add extra document customization task 2025-05-08 23:25:02 +02:00
Florian
5a1e84ffd4 Remove the commenting-out task 2025-05-08 22:13:20 +02:00
Florian
bca1d963e1 Add extra tasks for lists 2025-05-08 22:08:29 +02:00
Florian
8ae6d9ee28 Fix typo 2025-05-08 21:38:42 +02:00
Florian
55517bb476 Add AlgoK exercise page link 2025-05-08 21:37:05 +02:00
6 changed files with 108 additions and 24 deletions

View File

@ -435,16 +435,45 @@ Außerdem kann für das Inhaltsverzeichnis ein alternativer Titel angegeben werd
![](svg/chapter-02/abschnitte-anders-crop.svg) ![](svg/chapter-02/abschnitte-anders-crop.svg)
@slide(layout=content-only) @slide(layout=extra-content-only)
@title @title
Bevor wir fortfahren können … Kopf- und Fußzeilen
@content @content
::: {.box .warning} Hier hilft das Paket `fancyhdr` weiter.
**Kommentiert** zuletzt die Präambel, die Dokumentenumgebung und das Inhaltsverzeichnis **wieder aus**.
Nur so kann eure Lösung auch ins Skript eingebunden werden (Schnelles Auskommentieren kann in TeXstudio mit dem Shortcut <kbd>Strg</kbd> + <kbd>T</kbd> erreicht werden). ``` {.lang-tex .hljs}
::: % generell aktivieren
\pagestyle{fancy}
Im nächsten Kapitel erklären wir, warum das notwendig ist. % auch auf der ersten Seite anwenden
\thispagestyle{fancy}
% zurücksetzen
\fancyhead{} % bzw. \fancyfoot{}
\fancyhead[L]{Links in der Kopfzeile}
\fancyfoot[C]{Mittig in der Fußzeile}
\fancyfoot[R]{\thepage}
```
Eine ausführliche Anleitung gibt es bei [Overleaf](https://www.overleaf.com/learn/latex/Headers_and_footers).
@slide(layout=wide-task)
@task-number
2x
@title
Dokumente nach eigenen Wünschen
@content
+ Fügt dem Dokument einen **Titel** hinzu.
+ Lasst das heutige Datum in einer **Sprache eurer Wahl** erscheinen.
+ Lasst eine Überschrift aus dem Inhaltsverzeichnis **verschwinden**.
+ Gebt einer Überschrift im Inhaltsverzeichnis einen **Kurztitel**.
+ Teilt den Text auf **zwei Spalten** auf (Stichwort: `twocolumn`).
+ Fügt rechts eine **Kopfzeile** mit dem Titel und links eine **Fußzeile** mit der Seitenzahl ein.
+ Probiert aus, was sich durch **Ändern der Dokumentenklasse** verändert.
+ Erkundigt euch zu den Möglichkeiten [herkömmlicher](https://hartwork.org/beamer-theme-matrix/) und [moderner](https://gitlab.cs.fau.de/i4/tex/i4neo) **Beamer-Präsentationsvorlagen**.

View File

@ -432,16 +432,45 @@ You can also provide an alternative title for the table of contents:
![](svg/chapter-02/sections-differently-crop.svg) ![](svg/chapter-02/sections-differently-crop.svg)
@slide(layout=content-only) @slide(layout=extra-content-only)
@title @title
Before we can continue … Headers and footers
@content @content
::: {.box .warning} The `fancyhdr` package helps us with that.
Finally, **comment out** the preamble, the document environment, and the table of contents.
Only this way, your solution can be embedded in the script itself. (In TeXstudio, comments can be achieved by the shortcut <kbd>Strg</kbd> + <kbd>T</kbd>.) ``` {.lang-tex .hljs}
::: % activate in general
\pagestyle{fancy}
We will learn in the following chapter why this is the case. % apply to the first page as well
\thispagestyle{fancy}
% reset values
\fancyhead{} % and/or \fancyfoot{}
\fancyhead[L]{Left header}
\fancyfoot[C]{Center footer}
\fancyfoot[R]{\thepage}
```
A comprehensive tutorial can be found on [Overleaf](https://www.overleaf.com/learn/latex/Headers_and_footers).
@slide(layout=wide-task)
@task-number
2x
@title
Make it fit your needs
@content
+ Add a **title** to the document.
+ Make today's date appear in a **language of your choice**.
+ **Hide** one section title in the table of contents.
+ Add a **short title** to a different section title.
+ Split the text in **two columns** (keyword: `twocolumn`).
+ Add a **header** with the title on the right and a **footer** with the page number on the left.
+ Try out what changes when you change the **document class**.
+ Research the possibilities of [traditional](https://hartwork.org/beamer-theme-matrix/) and [modern](https://gitlab.cs.fau.de/i4/tex/i4neo) **beamer presentation templates**.

View File

@ -161,4 +161,18 @@ Die Art der Aufzählung lässt sich über den optionalen Parameter `label` ände
``` ```
@preview @preview
![](svg/chapter-07/list-style-types-crop.svg) ![](svg/chapter-07/list-style-types-crop.svg)
@slide(layout=task)
@task-number
6x
@title
Besondere Aufzählungen
@content
* Nutze **Römische Zahlen** für die geordnete Liste.
* Lass die Nummerierung **bei 7 beginnen** (Stichwort: `\setcounter`).
* Reduziere den **Leerraum** zwischen den Elementen der ungeordneten Liste.

View File

@ -90,7 +90,7 @@ Adding enumerations
@content @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. * 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. * Within this list, create an **unordered list** for the ingredients and an **ordered list** for the instructions.
@slide(layout=extra-content-and-preview) @slide(layout=extra-content-and-preview)
@ -149,7 +149,7 @@ List styles
@content @content
The list style type can be set using the optional parameter `label`. The list style type can be set using the optional parameter `label`.
To accomplish this, we need to include the package `enumitem` first. To accomplish this, we need to include the package `enumitem` first (but after all other list-related packages).
``` {.lang-tex .hljs} ``` {.lang-tex .hljs}
% Roman numerals % Roman numerals
@ -164,4 +164,18 @@ To accomplish this, we need to include the package `enumitem` first.
``` ```
@preview @preview
![](svg/chapter-07/list-style-types-english-crop.svg) ![](svg/chapter-07/list-style-types-english-crop.svg)
@slide(layout=task)
@task-number
6x
@title
Special enumerations
@content
* Try using **Roman numerals** in the ordered list.
* Make the ordered list **start at 7** (keyword: `\setcounter`).
* Reduce the **white space** between the items in the unordered list.

View File

@ -105,14 +105,13 @@ Setzt die folgenden Formeln in der Datei `exercises/maths/math-formulas.tex`.
Formeln setzen Formeln setzen
@content @content
Setzt die folgenden Formeln in der Datei `exercises/maths/math-formulas.tex`.
| Bedeutung | Ergebnis | | Bedeutung | Ergebnis |
|-----------|----------| |-----------|----------|
| Definition der Fakultät | $n! = \prod_{i=1}^{n} i$ | | Definition der Fakultät | $n! = \prod_{i=1}^{n} i$ |
| Menge aller ungeraden natürlichen Zahlen | $\{ x \mid x \in \mathbb{N}, \text{ungerade}(x) \}$ | | Menge aller ungeraden natürlichen Zahlen | $\{ x \mid x \in \mathbb{N}, \text{ungerade}(x) \}$ |
| Elimination $\neg\exists x$ | $\neg\exists x . p(x) \Leftrightarrow \forall x . \neg p(x)$ | | Elimination $\neg\exists x$ | $\neg\exists x . p(x) \Leftrightarrow \forall x . \neg p(x)$ |
Weitere Anwendungsbeispiele findet ihr auf der [LaTeX-Übungsseite des Lehrstuhls für Algorithmen und Komplexitätstheorie](https://www.algok.uni-bamberg.de/practice/KaTeX%20Formula%20Practice%20Page.html).
@slide(layout=extra-content-only) @slide(layout=extra-content-only)

View File

@ -94,8 +94,8 @@ Code up the following formulas in the file `exercises/maths/math-formulas.tex`.
| Meaning | Result | | Meaning | Result |
|---------|--------| |---------|--------|
| Gravitational acceleration | $9.81\,\frac{m}{s^2}$ | | 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}$ | | One 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}$ | | The other one | $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!}$ | | Catalan numbers | $C_n = \frac{1}{n+1} {2n \choose n} = \frac{(2n)!}{(n+1)!n!}$ |
@ -108,14 +108,13 @@ Code up the following formulas in the file `exercises/maths/math-formulas.tex`.
Typesetting mathematics Typesetting mathematics
@content @content
Code up the following formulas in the file `exercises/maths/math-formulas.tex`.
| Meaning | Result | | Meaning | Result |
|---------|--------| |---------|--------|
| Definition of factorial | $n! = \prod_{i=1}^{n} i$ | | Definition of factorial | $n! = \prod_{i=1}^{n} i$ |
| Set of all odd natural numbers | $\{ x \mid x \in \mathbb{N}, \text{odd}(x) \}$ | | Set of all odd natural numbers | $\{ x \mid x \in \mathbb{N}, \text{odd}(x) \}$ |
| Elimination $\neg\exists x$ | $\neg\exists x . p(x) \Leftrightarrow \forall x . \neg p(x)$ | | Elimination $\neg\exists x$ | $\neg\exists x . p(x) \Leftrightarrow \forall x . \neg p(x)$ |
Find further examples on the [Chair of Algorithms and Complexity Theory's LaTeX exercise page](https://www.algok.uni-bamberg.de/practice/KaTeX%20Formula%20Practice%20Page.html).
@slide(layout=extra-content-only) @slide(layout=extra-content-only)