Refactor tables chapter

This commit is contained in:
Knoch 2022-10-11 20:54:16 +02:00
parent 589c36bc70
commit fffb6f14c7
2 changed files with 73 additions and 67 deletions

View File

@ -121,6 +121,33 @@ Die gesamte Tabelle
@slide(layout=content-only) @slide(layout=content-only)
@title
Mehr Komfort
@content
Der [Tables Generator](https://tablesgenerator.com/) ist ein wunderbares Werkzeug, um schnell Tabellen verschiedener Formate zu erstellen.
[![](svg/chapter-12/tables-generator.png)](https://tablesgenerator.com/)
@slide(layout=task)
@task-number
12
@title
Tabellen setzen
@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**.
@slide(layout=extra-content-only)
@title @title
Besonders lange Tabellen Besonders lange Tabellen
@ -140,7 +167,7 @@ Tabellen, die über eine Seite hinaus gehen, werden von `tabular` einfach abgesc
``` ```
@slide(layout=content-only) @slide(layout=extra-content-only)
@title @title
Hinweise zu `longtable` Hinweise zu `longtable`
@ -153,12 +180,12 @@ Hinweise zu `longtable`
\label{<label>} \label{<label>}
\end{longtable} \end{longtable}
``` ```
* ++ Die `longtable`-Umgebung vereint die `tabular`-Umgebung und die `table`-Umgebung. * Die `longtable`-Umgebung vereint die `tabular`-Umgebung und die `table`-Umgebung.
* ++ Titel und Label können deshalb direkt unter dem Tabelleninhalt stehen. * 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. * Sofern das Paket `booktabs` eingebunden ist, stehen seine Features auch in `longtable` zur Verfügung.
@slide(layout=content-only) @slide(layout=extra-content-only)
@title @title
Besonders breite Tabellen Besonders breite Tabellen
@ -178,7 +205,8 @@ Sollte die Tabelle einmal zu breit für eine Seite werden, kann sie auch im Quer
\end{sidewaystable} \end{sidewaystable}
``` ```
@slide(layout=content-and-preview)
@slide(layout=extra-content-and-preview)
@title @title
Weiterführendes Beispiel Weiterführendes Beispiel
@ -202,30 +230,4 @@ Weiterführendes Beispiel
[<span class="emoji">🔗</span> Dokumentation zu Booktabs](http://packages.oth-regensburg.de/ctan/macros/latex/contrib/booktabs/booktabs.pdf) [<span class="emoji">🔗</span> Dokumentation zu Booktabs](http://packages.oth-regensburg.de/ctan/macros/latex/contrib/booktabs/booktabs.pdf)
@preview @preview
![](svg/chapter-12/tabelle-fortgeschritten-beispiel-crop.svg){.thin-padding} ![](svg/chapter-12/tabelle-fortgeschritten-beispiel-crop.svg){.thin-padding}
@slide(layout=content-only)
@title
Mehr Komfort
@content
Der [Tables Generator](https://tablesgenerator.com/) ist ein wunderbares Werkzeug, um schnell Tabellen verschiedener Formate zu erstellen.
[![](svg/chapter-12/tables-generator.png)](https://tablesgenerator.com/)
@slide(layout=task)
@task-number
12
@title
Tabellen setzen
@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**.

View File

@ -121,6 +121,34 @@ The entire table
@slide(layout=content-only) @slide(layout=content-only)
@title
More comfort
@content
The [Tables Generator](https://tablesgenerator.com/) is a wonderful tool to quickly create tables of different formats.
[![](svg/chapter-12/tables-generator.png)](https://tablesgenerator.com/)
@slide(layout=task)
@task-number
12
@title
Typesetting tables
@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.
@slide(layout=extra-content-only)
@title @title
Particularly long tables Particularly long tables
@ -140,7 +168,7 @@ Tables that exceed one page are simply cut off by `tabular`. A solution is offer
``` ```
@slide(layout=content-only) @slide(layout=extra-content-only)
@title @title
Notes on `longtable` Notes on `longtable`
@ -153,12 +181,12 @@ Notes on `longtable`
\label{<label>} \label{<label>}
\end{longtable} \end{longtable}
``` ```
* ++ The `longtable` environment merges the `tabular` and `table` environments. * The `longtable` environment merges the `tabular` and `table` environments.
* ++ Caption and label can therefore be inserted directly under the table content. * 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`. * As long as the `booktabs` package is used, its features are also provided in `longtable`.
@slide(layout=content-only) @slide(layout=extra-content-only)
@title @title
Particularly wide tables Particularly wide tables
@ -178,7 +206,10 @@ If you need a table to be wider than a page, you can display it in landscape ori
\end{sidewaystable} \end{sidewaystable}
``` ```
@slide(layout=content-and-preview)
@slide(layout=extra-content-and-preview)
@title @title
An advanced example An advanced example
@ -202,31 +233,4 @@ An advanced example
[<span class="emoji">🔗</span> Booktabs documentation](http://packages.oth-regensburg.de/ctan/macros/latex/contrib/booktabs/booktabs.pdf) [<span class="emoji">🔗</span> Booktabs documentation](http://packages.oth-regensburg.de/ctan/macros/latex/contrib/booktabs/booktabs.pdf)
@preview @preview
![](svg/chapter-12/table-advanced-example-crop.svg){.thin-padding} ![](svg/chapter-12/table-advanced-example-crop.svg){.thin-padding}
@slide(layout=content-only)
@title
More comfort
@content
The [Tables Generator](https://tablesgenerator.com/) is a wonderful tool to quickly create tables of different formats.
[![](svg/chapter-12/tables-generator.png)](https://tablesgenerator.com/)
@slide(layout=task)
@task-number
12
@title
Typesetting tables
@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.