Compare commits

...

9 Commits

11 changed files with 840 additions and 759 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -68,8 +68,8 @@ body {
"content" "content"
"preview"; "preview";
background: linear-gradient(to bottom, background: linear-gradient(to bottom,
white 0%, var(--background, white) 0%,
white var(--square), var(--background, white) var(--square),
var(--secondary) var(--square), var(--secondary) var(--square),
var(--secondary) var(--square)); var(--secondary) var(--square));
@media (min-aspect-ratio: 1/1) { @media (min-aspect-ratio: 1/1) {
@ -79,7 +79,7 @@ body {
" . preview" " . preview"
"content preview" "content preview"
" . preview"; " . preview";
background: linear-gradient(to right, white 0%, white var(--square), var(--secondary) var(--square), var(--secondary) 100%); background: linear-gradient(to right, var(--background, white) 0%, var(--background, white) var(--square), var(--secondary) var(--square), var(--secondary) 100%);
} }
@media (min-aspect-ratio: 2/1) { @media (min-aspect-ratio: 2/1) {
grid-template-rows: var(--square); grid-template-rows: var(--square);
@ -95,7 +95,7 @@ body {
grid-template-areas: grid-template-areas:
"content" "content"
" . "; " . ";
background: linear-gradient(to bottom, white 0%, white var(--square), var(--secondary) var(--square), var(--secondary) 100%); background: linear-gradient(to bottom, var(--background, white) 0%, var(--background, white) var(--square), var(--secondary) var(--square), var(--secondary) 100%);
@media (min-aspect-ratio: 1/1) { @media (min-aspect-ratio: 1/1) {
grid-template-rows: auto var(--square) auto; grid-template-rows: auto var(--square) auto;
grid-template-columns: auto var(--square) auto; grid-template-columns: auto var(--square) auto;
@ -106,8 +106,8 @@ body {
background: linear-gradient(to right, background: linear-gradient(to right,
var(--secondary) 0%, var(--secondary) 0%,
var(--secondary) calc((100% - var(--square)) / 2), var(--secondary) calc((100% - var(--square)) / 2),
white calc((100% - var(--square)) / 2), var(--background, white) calc((100% - var(--square)) / 2),
white calc(100% - (100% - var(--square)) / 2), var(--background, white) calc(100% - (100% - var(--square)) / 2),
var(--secondary) calc(100% - (100% - var(--square)) / 2), var(--secondary) calc(100% - (100% - var(--square)) / 2),
var(--secondary) 100%); var(--secondary) 100%);
} }
@ -121,7 +121,7 @@ body {
} }
.layout-wide-content { .layout-wide-content {
background: white; background: var(--background, white);
grid-template-rows: min-content auto; grid-template-rows: min-content auto;
grid-template-columns: var(--square); grid-template-columns: var(--square);
grid-template-areas: grid-template-areas:
@ -145,15 +145,15 @@ body {
background: linear-gradient(to right, background: linear-gradient(to right,
var(--secondary) 0%, var(--secondary) 0%,
var(--secondary) calc((100% - 2 * var(--square)) / 2), var(--secondary) calc((100% - 2 * var(--square)) / 2),
white calc((100% - 2 * var(--square)) / 2), var(--background, white) calc((100% - 2 * var(--square)) / 2),
white calc(100% - (100% - 2 * var(--square)) / 2), var(--background, white) calc(100% - (100% - 2 * var(--square)) / 2),
var(--secondary) calc(100% - (100% - 2 * var(--square)) / 2), var(--secondary) calc(100% - (100% - 2 * var(--square)) / 2),
var(--secondary) 100%); var(--secondary) 100%);
} }
} }
.layout-content { .layout-content {
background: white; background: var(--background, white);
grid-area: content; grid-area: content;
position: relative; position: relative;
@ -279,12 +279,12 @@ body {
.layout-column-one { .layout-column-one {
grid-area: column1; grid-area: column1;
background: white; background: var(--background, white);
} }
.layout-column-two { .layout-column-two {
grid-area: column2; grid-area: column2;
background: white; background: var(--background, white);
} }
} }
@ -523,7 +523,7 @@ h3[data-category]::before {
font-variant: small-caps; font-variant: small-caps;
text-transform: lowercase; text-transform: lowercase;
background: black; background: black;
color: white; color: var(--background, white);
padding: .1em .5em; padding: .1em .5em;
display: inline-block; display: inline-block;
vertical-align: baseline; vertical-align: baseline;
@ -760,7 +760,7 @@ figcaption a:not(.dark-font) {
&:hover, &:hover,
&:active, &:active,
&:visited { &:visited {
color: white; color: var(--background, white);
&::before { &::before {
background-color: var(--secondary-dark); background-color: var(--secondary-dark);
@ -844,7 +844,7 @@ pre.scroll-one-half {
top: 50%; top: 50%;
transform: translateX(-50%) translateY(-50%); transform: translateX(-50%) translateY(-50%);
z-index: 500; z-index: 500;
background: white; background: var(--background, white);
box-shadow: 0 0px 50px rgba(0, 0, 0, 0.3); box-shadow: 0 0px 50px rgba(0, 0, 0, 0.3);
opacity: 0; opacity: 0;
transition: .2s opacity ease-in-out; transition: .2s opacity ease-in-out;
@ -877,3 +877,13 @@ pre.scroll-one-half {
background-color: rgba(0, 0, 0, .5); background-color: rgba(0, 0, 0, .5);
} }
} }
/*
* Extra Content
* ==============
*/
.extra-content {
--background: var(--secondary-light)
}

View File

@ -0,0 +1,9 @@
<div class="layout-content-and-preview extra-content">
<div class="layout-content">
<h2 data-category="Extra">@title(inline)</h2>
@content
</div>
<div class="layout-preview">
@preview(inline)
</div>
</div>

View File

@ -0,0 +1,6 @@
<div class="layout-content-only extra-content">
<div class="layout-content">
<h2 data-category="Extra">@title(inline)</h2>
@content
</div>
</div>

View File

@ -203,7 +203,7 @@ Lösung: »`\`« voranstellen:
50\% sind die Hälfte. 50\% sind die Hälfte.
``` ```
Funktioniert nicht mit »`\\`«, Lösung dafür später. Funktioniert nicht mit »`\\`«, nutzt `\textbackslash` stattdessen.
@preview @preview
![](svg/chapter-03/reservierte-zeichen-crop.svg) ![](svg/chapter-03/reservierte-zeichen-crop.svg)

View File

@ -203,7 +203,7 @@ Solution: prefix with `\`:
50\% is one half. 50\% is one half.
``` ```
Does not work for `\\`, we will see a solution for this later. Does not work for `\\`, use `\textbackslash` instead.
@preview @preview
![](svg/chapter-03/reserved-characters-crop.svg) ![](svg/chapter-03/reserved-characters-crop.svg)

View File

@ -163,46 +163,22 @@ Dateipfade angeben <span class="emoji">👣</span>
![](svg/chapter-04/relative-path-superdir-crop.svg) ![](svg/chapter-04/relative-path-superdir-crop.svg)
@slide(layout=content-only)
@title
Kompilieren des Projekts
@content
* **Nur die Hauptdatei** wird kompiliert, um das fertige PDF-Dokument zu erhalten.
* Fehlermeldungen enthalten dann Verweis, in welcher Unterdatei sie aufgetreten sind.
* Die Unterdateien können wegen ihrer fehlenden Präambel nicht selbstständig kompiliert werden.
@slide(layout=content-and-preview)
@title
Präambel auslagern
@content
Was denkt ihr, passiert, wenn wir die Präambel in eine Unterdatei auslagern?
Wird das Gesamtdokument kompilieren oder nicht?
++ **Ja, es kompiliert!** \
Ein einfacher Weg, um die Hauptdatei noch übersichtlicher zu halten.
@preview
![](svg/chapter-04/main-parts-präambel-crop.svg){.thin-padding}
@slide(layout=content-only-with-category) @slide(layout=content-only-with-category)
@category @category
Demo Demo
@title @title
Größere Projekte kompilieren Kompilieren des Projekts
@content @content
* Von nun an kompilieren wir die Datei `main.tex` im Wurzelverzeichnis des Projektordners. * **Nur die Hauptdatei** wird kompiliert, um das fertige PDF-Dokument zu erhalten.
* Klickt hierzu in TeXstudio mit der rechten Maustaste auf die Datei und wählt „Explizit als Root-Dokument setzen“. * ++ Fehlermeldungen enthalten dann Verweis, in welcher Unterdatei sie aufgetreten sind.
* Anschließend könnt ihr wie gewohnt kompilieren. * ++ Die Unterdateien können wegen ihrer fehlenden Präambel nicht selbstständig kompiliert werden.
<div class="box warning fragment">
Von nun an kompilieren wir die Datei `main.tex` im Wurzelverzeichnis des Projektordners. Klickt hierzu in TeXstudio mit der rechten Maustaste auf die Datei und wählt **„Explizit als Root-Dokument setzen“**. Anschließend könnt ihr wie gewohnt kompilieren.
</div>
@slide(layout=task) @slide(layout=task)
@ -216,6 +192,7 @@ Ein strukturiertes Projekt
@content @content
Im Ordner `exercises/project-structure` findet ihr eine Datei namens `main.tex`. Im Ordner `exercises/project-structure` findet ihr eine Datei namens `main.tex`.
* Erstellt neue Dateien (z.&thinsp;B.`section1.tex`, `section2.tex` und `section3.tex` und verschiebt die Abschnitte in diese. * Erstellt neue Dateien (z.&thinsp;B. `section1.tex` und `section2.tex` und verschiebt die Abschnitte in diese.
* Importiert die Fragmente anschließend mit Hilfe des `\input`-Befehls. * Importiert die Fragmente anschließend mit Hilfe des `\input`-Befehls.
* Schaut euch abschließend die Gesamtstruktur unseres Projektarchivs an, beginnend mit `main.tex` im Wurzelverzeichnis. * Lagert die Präambel auf demselben Weg in eine eigene Datei aus.
* Schaut euch abschließend die Gesamtstruktur unseres Projektarchivs an, beginnend mit `main.tex` im Wurzelverzeichnis. Wie binden wir hier die einzelnen Abschnitte ein?

View File

@ -160,33 +160,6 @@ Specifying file paths <span class="emoji">👣</span>
![](svg/chapter-04/relative-path-superdir-english-crop.svg) ![](svg/chapter-04/relative-path-superdir-english-crop.svg)
@slide(layout=content-only)
@title
Compiling the project
@content
* **Only the main file** has to be compiled to get the complete PDF document.
* Error messages include a reference to the corresponding subfile.
* Subfiles cannot be compiled on their own as they dont have a preamble.
@slide(layout=content-and-preview)
@title
Outsourcing the preamble
@content
What do you think happens when we outsource the preamble into its own subfile?
Will the document compile?
++ **Yes, it will!** \
A simple way of keeping the main file even more organised.
@preview
![](svg/chapter-04/main-parts-preamble-crop.svg){.thin-padding}
@slide(layout=content-only-with-category) @slide(layout=content-only-with-category)
@ -194,12 +167,18 @@ A simple way of keeping the main file even more organised.
Demo Demo
@title @title
Compiling larger projects Compiling the project
@content @content
* From now on, we will compile the file `main.tex` in the project root. * **Only the main file** has to be compiled to get the complete PDF document.
* To do so, right click on the file in TeXstudio and choose “Select as explicit root document” from the dropdown. * ++ Error messages include a reference to the corresponding subfile.
* Next, compile as usual. * ++ Subfiles cannot be compiled on their own as they dont have a preamble.
<div class="box warning fragment">
From now on, we will compile the file `main.tex` in the project root.
To do so, right click on the file in TeXstudio and choose **“Select as explicit root document”** from the dropdown.
Next, compile as usual.
</div>
@slide(layout=task) @slide(layout=task)
@ -213,5 +192,7 @@ A structured project
@content @content
You will find a file named `main.tex` in the folder `exercises/project-structure`. You will find a file named `main.tex` in the folder `exercises/project-structure`.
* Put the sections of the file into separate files, named `section1.tex`, `section2.tex`, and `section3.tex`. Include them using the `\input` command. * Put the sections of the file into separate files, named `section1.tex` and `section2.tex`.
* Finally, have a look at the general project archive, starting from `main.tex` (in the root folder of the project archive). * Include them using the `\input` command.
* Move the preamble to its own file in a similar fashion.
* Finally, have a look at the general project archive, starting from `main.tex` (in the root folder of the project archive). How do we include the different sections here?

View File

@ -13,10 +13,8 @@ Sonderzeichen
Leerzeichen Leerzeichen
@content @content
* normale Wortzwischenräume: <kbd>Leertaste</kbd>
* geschütztes Leerzeichen: `~` * Nutzt schmale Leerzeichen (`\,`) und geschützte Leerzeichen (`~`) an den geeigneten Stellen.
* schmales Leerzeichen: `\,`
* viele weitere Breiten verfügbar
``` {.hljs .lang-tex} ``` {.hljs .lang-tex}
Schmale Leerzeichen werden z.\,B. in Schmale Leerzeichen werden z.\,B. in
@ -28,29 +26,12 @@ dabei helfen, Titel und Namen in
einer Zeile zu halten: Dr.~Fooboar. einer Zeile zu halten: Dr.~Fooboar.
``` ```
* ++ Nutzt French Spacing (`\frenchspacing`), um riesige Freiräume nach Satzzeichen zu verhindern.
@preview @preview
![](svg/chapter-05/leerzeichen-crop.svg) ![](svg/chapter-05/leerzeichen-crop.svg)
@slide(layout=content-and-preview)
@title
English spacing
@content
In englischsprachigen Dokumenten verwendet LaTeX das traditionelle *English&nbsp;spacing,* also&nbsp;doppelte Leerzeichen nach dem Satzende.
++ Das kann mit `\frenchspacing` vor dem ersten Absatz verhindert werden. `\nonfrenchspacing` schaltet wieder zurück.
++ Bei *English&nbsp;spacing* versucht LaTeX, nach Abkürzungen trotzdem normale Wortzwischenräume zu setzen. Das sollte aber kontrolliert werden. Eingreifen können wir mit
* ++ erzwungenen Wortzwischenräumen: `.\␣`
* ++ erzwungenen Satzenden: `\@.␣`
@preview
![](svg/chapter-05/french-spacing-crop.svg)
@slide(layout=content-and-preview) @slide(layout=content-and-preview)
@title @title
@ -88,16 +69,88 @@ Striche
![](svg/chapter-05/striche-crop.svg) ![](svg/chapter-05/striche-crop.svg)
@slide(layout=content-and-preview) @slide(layout=content-and-preview)
@title
Zitate
@content
Das Paket `csquotes` stellt u.&thinsp;a. den Befehl `\enquote` zur Verfügung:
``` {.lang-tex .hljs}
\enquote{Ein \enquote{verschachteltes}
Zitat.}
```
Wenn das Paket mit `autostyle=true` eingebunden wird, werden bei fremdsprachigen Zitaten die entsprechenden Anführungszeichen verwendet:
``` {.lang-tex .hljs}
\foreignquote{english}{An English
quote.}
```
@preview
![](svg/chapter-05/zitate-crop.svg)
@slide(layout=content-only)
@title
Sonderzeichen & Symbole
@content
### Detexify to the rescue! <span class="emoji">⛑️</span>
* Ausführliche Liste an verwendbaren Symbolen:
[PDF auf der CTAN-Website](http://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf)
* Symbole malen und erkennen lassen:
[Detexify](http://detexify.kirelabs.org/classify.html)
@slide(layout=task)
@task-number
5
@title
Sonderzeichen einfügen
@content
<div class="box warning">
Kompiliert von nun an immer die Datei `main.tex`, um eure Änderungen im Skript zu sehen (in diesem Fall im Abschnitt „Übung 5“).
</div>
* Ersetzt die Leerzeichen innerhalb der Abkürzungen in `exercises/special-characters.tex` durch **schmale Leerzeichen**.
* Die Bindestriche bei den Öffnungszeiten der ERBA sollen durch **Halbgeviertstriche** ersetzt werden, optional mit schmalen Leerzeichen außenrum.
* Nutzt den Befehl `\enquote`, um die Wörter *Studi-Ticket* und *Studi-Karte* in **Anführungszeichen** zu setzen.
@slide(layout=extra-content-and-preview)
@title
English spacing
@content
In englischsprachigen Dokumenten verwendet LaTeX das traditionelle *English&nbsp;spacing,* also&nbsp;doppelte Leerzeichen nach dem Satzende.
Das kann mit `\frenchspacing` vor dem ersten Absatz verhindert werden. `\nonfrenchspacing` schaltet wieder zurück.
Bei *English&nbsp;spacing* versucht LaTeX, nach Abkürzungen trotzdem normale Wortzwischenräume zu setzen. Das sollte aber kontrolliert werden. Eingreifen können wir mit
* erzwungenen Wortzwischenräumen: `.\␣`
* erzwungenen Satzenden: `\@.␣`
@preview
![](svg/chapter-05/french-spacing-crop.svg)
@slide(layout=extra-content-and-preview)
@title @title
Silbentrennung Silbentrennung
@content @content
LaTeX trennt Wörter im Normalfall automatisch richtig, wenn die richtige Sprache konfiguriert ist. Manchmal muss aber auch manuell eingegriffen werden. Die verschiedenen Arten von Bindestrichen werden im Skript beschrieben. LaTeX trennt Wörter im Normalfall automatisch richtig, wenn die richtige Sprache konfiguriert ist. Manchmal muss aber auch manuell eingegriffen werden.
<!--
<table> <table>
<tr> <tr>
<td>Ausschließliche Trennung</td> <td>Ausschließliche Trennung</td>
@ -126,13 +179,14 @@ LaTeX trennt Wörter im Normalfall automatisch richtig, wenn die richtige Sprach
</table> </table>
<p data-category="Achtung!">Einige der Codes funktionieren nur mit eingebundenem `babel`-Paket.</p> <p data-category="Achtung!">Einige der Codes funktionieren nur mit eingebundenem `babel`-Paket.</p>
-->
@preview @preview
![](svg/chapter-05/silbentrennung-crop.svg) ![](svg/chapter-05/silbentrennung-crop.svg)
@slide(layout=content-only)
@slide(layout=extra-content-only)
@title @title
Anführungszeichen Anführungszeichen
@ -189,31 +243,7 @@ Anführungszeichen
Für andere Sprachen können andere Regeln gelten, meistens aber mit den gleichen Zeichen, nur in anderer Zusammensetzung. Für andere Sprachen können andere Regeln gelten, meistens aber mit den gleichen Zeichen, nur in anderer Zusammensetzung.
@slide(layout=content-and-preview) @slide(layout=extra-content-only)
@title
Zitate
@content
Das Paket `csquotes` stellt u.&thinsp;a. den Befehl `\enquote` zur Verfügung:
``` {.lang-tex .hljs}
\enquote{Ein \enquote{verschachteltes}
Zitat.}
```
Wenn das Paket mit `autostyle=true` eingebunden wird, werden bei fremdsprachigen Zitaten die entsprechenden Anführungszeichen verwendet:
``` {.lang-tex .hljs}
\foreignquote{english}{An English
quote.}
```
@preview
![](svg/chapter-05/zitate-crop.svg)
@slide(layout=content-only)
@title @title
Diakritika Diakritika
@ -255,7 +285,7 @@ Buchstaben mit Diakritika können entweder direkt über die Tastatur eingegeben
</table> </table>
@slide(layout=content-only) @slide(layout=extra-content-only)
@title @title
Sonderzeichen & Symbole Sonderzeichen & Symbole
@ -298,53 +328,4 @@ Auch andere Sonderzeichen können entweder direkt eingegeben werden oder per Bef
</tr> </tr>
</table> </table>
… und so ziemlich alles andere. … und so ziemlich alles andere.
@slide(layout=content-only)
@title
Sonderzeichen & Symbole
@content
### Mathmode
Einige Sonderzeichen und Symbole funktionieren nur in einer Mathematikumgebung:
``` {.lang-tex .hljs}
% griechische Buchstaben
$\pi \Sigma \delta$
% Kreuz
$\dagger$
```
@slide(layout=content-only)
@title
Sonderzeichen & Symbole
@content
### Detexify to the rescue! <span class="emoji">⛑️</span>
* Symbole malen und erkennen lassen:
[Detexify](http://detexify.kirelabs.org/classify.html)
* Ausführliche Liste an verwendbaren Symbolen:
[PDF auf der CTAN-Website](http://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf)
@slide(layout=task)
@task-number
5
@title
Sonderzeichen einfügen
@content
<div class="box warning">
Kompiliert von nun an immer die Datei `main.tex`, um eure Änderungen im Skript zu sehen (in diesem Fall im Abschnitt „Übung 5“).
</div>
* Ersetzt die Leerzeichen innerhalb der Abkürzungen in `exercises/special-characters.tex` durch **schmale Leerzeichen**.
* Ersetzt die Bindestriche bei den Öffnungszeiten der ERBA durch **Halbgeviertstriche**, optional mit schmalen Leerzeichen außenrum.
* Setzt beim Wort *Studierendenausweis* eine **ausschließliche Trennstelle** nach *Studierenden-*.

View File

@ -13,10 +13,7 @@ Special characters
Spaces Spaces
@content @content
* normal space dividing words: <kbd>space bar</kbd> * Use thin spaces (`\,`) and non-breaking spaces (`~`), where appropriate.
* non-breaking space: `~`
* thin space: `\,`
* many other widths available
``` {.hljs .lang-tex} ``` {.hljs .lang-tex}
Thin spaces are used in abbreviations Thin spaces are used in abbreviations
@ -26,29 +23,12 @@ keep honorary titles and names on one
line: Dr.~Fooboar. line: Dr.~Fooboar.
``` ```
* ++ Use french spacing (`\frenchspacing`) to avoid giant gaps after full stops.
@preview @preview
![](svg/chapter-05/spaces-crop.svg) ![](svg/chapter-05/spaces-crop.svg)
@slide(layout=content-and-preview)
@title
English and French spacing
@content
In English, LaTeX uses the old-fashioned *English&nbsp;spacing,* i.&thinsp;e., double sentence spacing.
++ If you want to be more modern, you can use `\frenchspacing` above your first paragraph. `\nonfrenchspacing` goes back to default.
++ If you actually use *English&nbsp;spacing,* LaTeX will still try and put normal word spacing after abbreviations. However, you should check the results and intervene where needed by
* ++ forcing normal spaces: `.\␣`
* ++ manually ending sentences: `\@.␣`
@preview
![](svg/chapter-05/french-spacing-crop.svg)
@slide(layout=content-and-preview) @slide(layout=content-and-preview)
@title @title
@ -88,15 +68,87 @@ Hyphens and dashes
@slide(layout=content-and-preview) @slide(layout=content-and-preview)
@title
Quotes
@content
The `csquotes` package provides, amongst others, the command `\enquote`.
``` {.lang-tex .hljs}
\enquote{A \enquote{nested}
quote.}
```
When included with `autostyle=true`, foreign-language quotes use the according quotation marks:
``` {.lang-tex .hljs}
\foreignquote{ngerman}{Ein deutsches
Zitat.}
```
@preview
![](svg/chapter-05/quotes-crop.svg)
@slide(layout=content-only)
@title
Special characters & symbols
@content
### Detexify to the rescue! <span class="emoji">⛑️</span>
* A long list of symbols to use:
[PDF on the CTAN website](http://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf)
* Draw symbols and have them recognised:
[Detexify](http://detexify.kirelabs.org/classify.html)
@slide(layout=task)
@task-number
5
@title
Insert special characters
@content
<div class="box warning">
From now on, compile the file `main.tex` to see your changes appear in the script itself (in this task, see section “Übung 5”).
</div>
* Replace the spaces in `exercises/special-characters.tex` within the abbreviations (“e.&thinsp;g.”, “i.&thinsp;a.”) by **thin spaces**.
* Replace the hyphens separating the opening hours by **en dashes** (`--`), optionally surrounded by thin spaces.
* Add **quotation marks** around the words *Studi-Ticket* and *Studi-Karte* using the `\enquote` command.
@slide(layout=extra-content-and-preview)
@title
English and French spacing
@content
In English, LaTeX uses the old-fashioned *English&nbsp;spacing,* i.&thinsp;e., double sentence spacing.
If you want to be more modern, you can use `\frenchspacing` above your first paragraph. `\nonfrenchspacing` goes back to default.
If you actually use *English&nbsp;spacing,* LaTeX will still try and put normal word spacing after abbreviations. However, you should check the results and intervene where needed by
* forcing normal spaces: `.\␣`
* manually ending sentences: `\@.␣`
@preview
![](svg/chapter-05/french-spacing-crop.svg)
@slide(layout=extra-content-and-preview)
@title @title
Hyphenation Hyphenation
@content @content
Most of the time, LaTeX hyphenates words correctly, if the correct language is configured. Most of the time, LaTeX hyphenates words correctly, if the correct language is configured.
Sometimes, however, manual intervention is necessary. Sometimes, however, manual intervention is necessary.
The different kinds of hyphens that LaTeX offers are described in our script.
<!--
<table> <table>
<tr> <tr>
<td>Exclusive hyphenation</td> <td>Exclusive hyphenation</td>
@ -125,16 +177,15 @@ The different kinds of hyphens that LaTeX offers are described in our script.
</table> </table>
<p data-category="Caution!">Some of the codes only work when you use the `babel` package.</p> <p data-category="Caution!">Some of the codes only work when you use the `babel` package.</p>
-->
@preview @preview
![](svg/chapter-05/hyphenation-crop.svg) ![](svg/chapter-05/hyphenation-crop.svg)
@slide(layout=content-only) @slide(layout=extra-content-only)
@title @title
Quotation marks Manual quotation
@content @content
<table> <table>
@ -188,31 +239,7 @@ Quotation marks
Other rules my apply for other languages, but most of the time its the same characters, only combined differently. Other rules my apply for other languages, but most of the time its the same characters, only combined differently.
@slide(layout=content-and-preview) @slide(layout=extra-content-only)
@title
Quotes
@content
The `csquotes` package provides, amongst others, the command `\enquote`.
``` {.lang-tex .hljs}
\enquote{A \enquote{nested}
quote.}
```
When included with `autostyle=true`, foreign-language quotes use the according quotation marks:
``` {.lang-tex .hljs}
\foreignquote{ngerman}{Ein deutsches
Zitat.}
```
@preview
![](svg/chapter-05/quotes-crop.svg)
@slide(layout=content-only)
@title @title
Diacritics Diacritics
@ -254,10 +281,10 @@ Letters with diacritics can either by typed directly on the keyboard or via esca
</table> </table>
@slide(layout=content-only) @slide(layout=extra-content-only)
@title @title
Special characters & symbols Special characters
@content @content
The same is true for special characters: They can either be typed directly or created via escape codes and commands: The same is true for special characters: They can either be typed directly or created via escape codes and commands:
@ -297,53 +324,4 @@ The same is true for special characters: They can either be typed directly or cr
</tr> </tr>
</table> </table>
… and pretty much anything else. … and pretty much anything else.
@slide(layout=content-only)
@title
Special characters & symbols
@content
### Math mode
Some special characters and symbols require a math environment:
``` {.lang-tex .hljs}
% greek letters (π Σ δ)
$\pi \Sigma \delta$
% dagger/obelisk/obelus (†)
$\dagger$
```
@slide(layout=content-only)
@title
Special characters & symbols
@content
### Detexify to the rescue! <span class="emoji">⛑️</span>
* Draw symbols and have them recognised:
[Detexify](http://detexify.kirelabs.org/classify.html)
* A long list of symbols to use:
[PDF on the CTAN website](http://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf)
@slide(layout=task)
@task-number
5
@title
Insert special characters
@content
<div class="box warning">
From now on, compile the file `main.tex` to see your changes appear in the script itself (in this task, see section “Übung 5”).
</div>
* Replace the spaces in `exercises/special-characters.tex` within the abbreviations (“e.&thinsp;g.”, “i.&thinsp;a.”) by **thin spaces**.
* Replace the hyphens separating the opening hours by **en dashes** (`--`), optionally surrounded by thin spaces.
* Add an **exclusive hyphenation** in the word *Studierendenausweis* after *Studierenden-*.