From d0b28f79fb23b8ae8c276cfc00931757b9842f24 Mon Sep 17 00:00:00 2001 From: Florian Knoch Date: Mon, 26 Sep 2022 11:14:29 +0200 Subject: [PATCH] Move more content to extra --- css/latex.css | 6 +- css/latex.scss | 6 +- layouts/extra-content-and-preview.html | 9 ++ slides/chapter-05.de.md | 125 ++++++++++++------------- slides/chapter-05.en.md | 125 ++++++++++++------------- 5 files changed, 138 insertions(+), 133 deletions(-) create mode 100644 layouts/extra-content-and-preview.html diff --git a/css/latex.css b/css/latex.css index 50dac8e..dc30a51 100644 --- a/css/latex.css +++ b/css/latex.css @@ -172,7 +172,7 @@ body .layout-preview img { box-shadow: 0.2em 0.2em 0.5em 0 rgba(0, 0, 0, 0.3); object-fit: cover; margin: calc(0.05 * var(--square)); - background-color: var(--background, white); + background-color: white; box-sizing: border-box; } body .layout-preview img.thin-padding { @@ -193,7 +193,7 @@ body .layout-preview img[src$="-crop.svg"].thin-padding { padding: calc(0.35 * var(--margin) * var(--square)); } body .layout-preview img[src$="-orig.svg"] { - background: var(--background, white); + background: white; object-fit: contain; } body .layout-preview figcaption { @@ -202,7 +202,7 @@ body .layout-preview figcaption { bottom: 0; width: 100%; text-align: center; - color: var(--background, white); + color: white; padding: 0.5em; box-sizing: border-box; } diff --git a/css/latex.scss b/css/latex.scss index e78ddbc..4ca6a2f 100644 --- a/css/latex.scss +++ b/css/latex.scss @@ -200,7 +200,7 @@ body { box-shadow: .2em .2em .5em 0 rgba(0, 0, 0, .3); object-fit: cover; margin: calc(.05 * var(--square)); - background-color: var(--background, white); + background-color: white; box-sizing: border-box; &.thin-padding { @@ -224,7 +224,7 @@ body { } } &[src$="-orig.svg"] { - background: var(--background, white); + background: white; object-fit: contain; } } @@ -234,7 +234,7 @@ body { bottom: 0; width: 100%; text-align: center; - color: var(--background, white); + color: white; padding: .5em; box-sizing: border-box; } diff --git a/layouts/extra-content-and-preview.html b/layouts/extra-content-and-preview.html new file mode 100644 index 0000000..9b48200 --- /dev/null +++ b/layouts/extra-content-and-preview.html @@ -0,0 +1,9 @@ +
+
+

@title(inline)

+ @content +
+
+ @preview(inline) +
+
diff --git a/slides/chapter-05.de.md b/slides/chapter-05.de.md index 3b8bb5e..29bc7b0 100644 --- a/slides/chapter-05.de.md +++ b/slides/chapter-05.de.md @@ -32,25 +32,6 @@ einer Zeile zu halten: Dr.~Fooboar. ![](svg/chapter-05/leerzeichen-crop.svg) -@slide(layout=content-and-preview) - -@title -English spacing - -@content -In englischsprachigen Dokumenten verwendet LaTeX das traditionelle *English spacing,* also doppelte Leerzeichen nach dem Satzende. - -++ Das kann mit `\frenchspacing` vor dem ersten Absatz verhindert werden. `\nonfrenchspacing` schaltet wieder zurück. - -++ Bei *English 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) @title @@ -88,50 +69,6 @@ Striche ![](svg/chapter-05/striche-crop.svg) - -@slide(layout=content-and-preview) - -@title -Silbentrennung - -@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. - - - -@preview -![](svg/chapter-05/silbentrennung-crop.svg) - - @slide(layout=content-and-preview) @title @@ -187,6 +124,68 @@ Kompiliert von nun an immer die Datei `main.tex`, um eure Änderungen im Skript * 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 spacing,* also doppelte Leerzeichen nach dem Satzende. + +Das kann mit `\frenchspacing` vor dem ersten Absatz verhindert werden. `\nonfrenchspacing` schaltet wieder zurück. + +Bei *English 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 +Silbentrennung + +@content +LaTeX trennt Wörter im Normalfall automatisch richtig, wenn die richtige Sprache konfiguriert ist. Manchmal muss aber auch manuell eingegriffen werden. + + + + + + + + + + + + + + + + + + + + + + + + + + +
Ausschließliche Trennung`\-`
Zusätzliche Trennstelle`"-`
Bindestrich (verbietet andere Trennstellen)`-`
Bindestrich (erlaubt andere Trennstellen)`"=`
Trennstelle ohne Strich`""`
Strich ohne Trennstelle`"~`
+ +

Einige der Codes funktionieren nur mit eingebundenem `babel`-Paket.

+ + +@preview +![](svg/chapter-05/silbentrennung-crop.svg) + + + @slide(layout=extra-content-only) @title diff --git a/slides/chapter-05.en.md b/slides/chapter-05.en.md index 118c2f1..1a0e6b7 100644 --- a/slides/chapter-05.en.md +++ b/slides/chapter-05.en.md @@ -30,25 +30,6 @@ line: Dr.~Fooboar. ![](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 spacing,* i. 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 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) @title @@ -86,51 +67,6 @@ Hyphens and dashes ![](svg/chapter-05/hyphens-and-dashes-crop.svg) -@slide(layout=content-and-preview) - -@title -Hyphenation - -@content -Most of the time, LaTeX hyphenates words correctly, if the correct language is configured. -Sometimes, however, manual intervention is necessary. -The different kinds of hyphens that LaTeX offers are described in our script. - - - -@preview -![](svg/chapter-05/hyphenation-crop.svg) - - @slide(layout=content-and-preview) @title @@ -186,6 +122,67 @@ From now on, compile the file `main.tex` to see your changes appear in the scrip * 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 spacing,* i. 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 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 +Hyphenation + +@content +Most of the time, LaTeX hyphenates words correctly, if the correct language is configured. +Sometimes, however, manual intervention is necessary. + + + + + + + + + + + + + + + + + + + + + + + + + + +
Exclusive hyphenation`\-`
Additional hyphenation`"-`
Hyphen (suppressing other hyphenation)`-`
Hyphen (allowing other hyphenation)`"=`
Possible separation without hyphen`""`
Non-breaking hyphen`"~`
+ +

Some of the codes only work when you use the `babel` package.

+ +@preview +![](svg/chapter-05/hyphenation-crop.svg) + + @slide(layout=extra-content-only) @title