Compare commits
9 Commits
0a0b531e22
...
27056f93a1
| Author | SHA1 | Date | |
|---|---|---|---|
| 27056f93a1 | |||
| af84aa0e29 | |||
| 79fdd1e824 | |||
| 550e2dea16 | |||
| d0b28f79fb | |||
| 0ef774b72a | |||
| 6968a193c7 | |||
| cffbe6b3fd | |||
| 960d9ae817 |
1063
css/latex.css
1063
css/latex.css
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -68,8 +68,8 @@ body {
|
||||
"content"
|
||||
"preview";
|
||||
background: linear-gradient(to bottom,
|
||||
white 0%,
|
||||
white var(--square),
|
||||
var(--background, white) 0%,
|
||||
var(--background, white) var(--square),
|
||||
var(--secondary) var(--square),
|
||||
var(--secondary) var(--square));
|
||||
@media (min-aspect-ratio: 1/1) {
|
||||
@ -79,7 +79,7 @@ body {
|
||||
" . preview"
|
||||
"content 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) {
|
||||
grid-template-rows: var(--square);
|
||||
@ -95,7 +95,7 @@ body {
|
||||
grid-template-areas:
|
||||
"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) {
|
||||
grid-template-rows: auto var(--square) auto;
|
||||
grid-template-columns: auto var(--square) auto;
|
||||
@ -106,8 +106,8 @@ body {
|
||||
background: linear-gradient(to right,
|
||||
var(--secondary) 0%,
|
||||
var(--secondary) calc((100% - var(--square)) / 2),
|
||||
white calc((100% - var(--square)) / 2),
|
||||
white calc(100% - (100% - var(--square)) / 2),
|
||||
var(--background, white) calc((100% - var(--square)) / 2),
|
||||
var(--background, white) calc(100% - (100% - var(--square)) / 2),
|
||||
var(--secondary) calc(100% - (100% - var(--square)) / 2),
|
||||
var(--secondary) 100%);
|
||||
}
|
||||
@ -121,7 +121,7 @@ body {
|
||||
}
|
||||
|
||||
.layout-wide-content {
|
||||
background: white;
|
||||
background: var(--background, white);
|
||||
grid-template-rows: min-content auto;
|
||||
grid-template-columns: var(--square);
|
||||
grid-template-areas:
|
||||
@ -145,15 +145,15 @@ body {
|
||||
background: linear-gradient(to right,
|
||||
var(--secondary) 0%,
|
||||
var(--secondary) calc((100% - 2 * var(--square)) / 2),
|
||||
white calc((100% - 2 * var(--square)) / 2),
|
||||
white calc(100% - (100% - 2 * var(--square)) / 2),
|
||||
var(--background, white) calc((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) 100%);
|
||||
}
|
||||
}
|
||||
|
||||
.layout-content {
|
||||
background: white;
|
||||
background: var(--background, white);
|
||||
grid-area: content;
|
||||
position: relative;
|
||||
|
||||
@ -279,12 +279,12 @@ body {
|
||||
|
||||
.layout-column-one {
|
||||
grid-area: column1;
|
||||
background: white;
|
||||
background: var(--background, white);
|
||||
}
|
||||
|
||||
.layout-column-two {
|
||||
grid-area: column2;
|
||||
background: white;
|
||||
background: var(--background, white);
|
||||
}
|
||||
}
|
||||
|
||||
@ -523,7 +523,7 @@ h3[data-category]::before {
|
||||
font-variant: small-caps;
|
||||
text-transform: lowercase;
|
||||
background: black;
|
||||
color: white;
|
||||
color: var(--background, white);
|
||||
padding: .1em .5em;
|
||||
display: inline-block;
|
||||
vertical-align: baseline;
|
||||
@ -760,7 +760,7 @@ figcaption a:not(.dark-font) {
|
||||
&:hover,
|
||||
&:active,
|
||||
&:visited {
|
||||
color: white;
|
||||
color: var(--background, white);
|
||||
|
||||
&::before {
|
||||
background-color: var(--secondary-dark);
|
||||
@ -844,7 +844,7 @@ pre.scroll-one-half {
|
||||
top: 50%;
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
z-index: 500;
|
||||
background: white;
|
||||
background: var(--background, white);
|
||||
box-shadow: 0 0px 50px rgba(0, 0, 0, 0.3);
|
||||
opacity: 0;
|
||||
transition: .2s opacity ease-in-out;
|
||||
@ -877,3 +877,13 @@ pre.scroll-one-half {
|
||||
background-color: rgba(0, 0, 0, .5);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Extra Content
|
||||
* ==============
|
||||
*/
|
||||
|
||||
.extra-content {
|
||||
--background: var(--secondary-light)
|
||||
}
|
||||
|
||||
9
layouts/extra-content-and-preview.html
Normal file
9
layouts/extra-content-and-preview.html
Normal 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>
|
||||
6
layouts/extra-content-only.html
Normal file
6
layouts/extra-content-only.html
Normal 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>
|
||||
@ -203,7 +203,7 @@ Lösung: »`\`« voranstellen:
|
||||
50\% sind die Hälfte.
|
||||
```
|
||||
|
||||
Funktioniert nicht mit »`\\`«, Lösung dafür später.
|
||||
Funktioniert nicht mit »`\\`«, nutzt `\textbackslash` stattdessen.
|
||||
|
||||
@preview
|
||||

|
||||
|
||||
@ -203,7 +203,7 @@ Solution: prefix with ‘`\`’:
|
||||
50\% is one half.
|
||||
```
|
||||
|
||||
Does not work for ‘`\\`’, we will see a solution for this later.
|
||||
Does not work for ‘`\\`’, use `\textbackslash` instead.
|
||||
|
||||
@preview
|
||||

|
||||
|
||||
@ -163,46 +163,22 @@ Dateipfade angeben <span class="emoji">👣</span>
|
||||

|
||||
|
||||
|
||||
@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
|
||||
{.thin-padding}
|
||||
|
||||
|
||||
@slide(layout=content-only-with-category)
|
||||
|
||||
@category
|
||||
Demo
|
||||
|
||||
@title
|
||||
Größere Projekte kompilieren
|
||||
Kompilieren des Projekts
|
||||
|
||||
@content
|
||||
* 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.
|
||||
* **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.
|
||||
|
||||
<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)
|
||||
@ -216,6 +192,7 @@ Ein strukturiertes Projekt
|
||||
@content
|
||||
Im Ordner `exercises/project-structure` findet ihr eine Datei namens `main.tex`.
|
||||
|
||||
* Erstellt neue Dateien (z. B.`section1.tex`, `section2.tex` und `section3.tex` und verschiebt die Abschnitte in diese.
|
||||
* Erstellt neue Dateien (z. B. `section1.tex` und `section2.tex` und verschiebt die Abschnitte in diese.
|
||||
* 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?
|
||||
@ -160,33 +160,6 @@ Specifying file paths <span class="emoji">👣</span>
|
||||

|
||||
|
||||
|
||||
@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 don’t 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
|
||||
{.thin-padding}
|
||||
|
||||
|
||||
@slide(layout=content-only-with-category)
|
||||
|
||||
@ -194,12 +167,18 @@ A simple way of keeping the main file even more organised.
|
||||
Demo
|
||||
|
||||
@title
|
||||
Compiling larger projects
|
||||
Compiling the project
|
||||
|
||||
@content
|
||||
* 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.
|
||||
* **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 don’t 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)
|
||||
@ -213,5 +192,7 @@ A structured project
|
||||
@content
|
||||
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.
|
||||
* Finally, have a look at the general project archive, starting from `main.tex` (in the root folder of the project archive).
|
||||
* Put the sections of the file into separate files, named `section1.tex` and `section2.tex`.
|
||||
* 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?
|
||||
@ -13,10 +13,8 @@ Sonderzeichen
|
||||
Leerzeichen
|
||||
|
||||
@content
|
||||
* normale Wortzwischenräume: <kbd>Leertaste</kbd>
|
||||
* geschütztes Leerzeichen: `~`
|
||||
* schmales Leerzeichen: `\,`
|
||||
* viele weitere Breiten verfügbar
|
||||
|
||||
* Nutzt schmale Leerzeichen (`\,`) und geschützte Leerzeichen (`~`) an den geeigneten Stellen.
|
||||
|
||||
``` {.hljs .lang-tex}
|
||||
Schmale Leerzeichen werden z.\,B. in
|
||||
@ -28,29 +26,12 @@ dabei helfen, Titel und Namen in
|
||||
einer Zeile zu halten: Dr.~Fooboar.
|
||||
```
|
||||
|
||||
* ++ Nutzt French Spacing (`\frenchspacing`), um riesige Freiräume nach Satzzeichen zu verhindern.
|
||||
|
||||
@preview
|
||||

|
||||
|
||||
|
||||
@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
|
||||

|
||||
|
||||
|
||||
@slide(layout=content-and-preview)
|
||||
|
||||
@title
|
||||
@ -88,16 +69,88 @@ Striche
|
||||

|
||||
|
||||
|
||||
|
||||
@slide(layout=content-and-preview)
|
||||
|
||||
@title
|
||||
Zitate
|
||||
|
||||
@content
|
||||
Das Paket `csquotes` stellt u. 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
|
||||

|
||||
|
||||
|
||||
@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 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
|
||||

|
||||
|
||||
|
||||
@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. 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>
|
||||
<tr>
|
||||
<td>Ausschließliche Trennung</td>
|
||||
@ -126,13 +179,14 @@ LaTeX trennt Wörter im Normalfall automatisch richtig, wenn die richtige Sprach
|
||||
</table>
|
||||
|
||||
<p data-category="Achtung!">Einige der Codes funktionieren nur mit eingebundenem `babel`-Paket.</p>
|
||||
-->
|
||||
|
||||
|
||||
@preview
|
||||

|
||||
|
||||
|
||||
@slide(layout=content-only)
|
||||
|
||||
@slide(layout=extra-content-only)
|
||||
|
||||
@title
|
||||
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.
|
||||
|
||||
|
||||
@slide(layout=content-and-preview)
|
||||
|
||||
@title
|
||||
Zitate
|
||||
|
||||
@content
|
||||
Das Paket `csquotes` stellt u. 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
|
||||

|
||||
|
||||
|
||||
@slide(layout=content-only)
|
||||
@slide(layout=extra-content-only)
|
||||
|
||||
@title
|
||||
Diakritika
|
||||
@ -255,7 +285,7 @@ Buchstaben mit Diakritika können entweder direkt über die Tastatur eingegeben
|
||||
</table>
|
||||
|
||||
|
||||
@slide(layout=content-only)
|
||||
@slide(layout=extra-content-only)
|
||||
|
||||
@title
|
||||
Sonderzeichen & Symbole
|
||||
@ -298,53 +328,4 @@ Auch andere Sonderzeichen können entweder direkt eingegeben werden oder per Bef
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
… 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-*.
|
||||
… und so ziemlich alles andere.
|
||||
@ -13,10 +13,7 @@ Special characters
|
||||
Spaces
|
||||
|
||||
@content
|
||||
* normal space dividing words: <kbd>space bar</kbd>
|
||||
* non-breaking space: `~`
|
||||
* thin space: `\,`
|
||||
* many other widths available
|
||||
* Use thin spaces (`\,`) and non-breaking spaces (`~`), where appropriate.
|
||||
|
||||
``` {.hljs .lang-tex}
|
||||
Thin spaces are used in abbreviations
|
||||
@ -26,29 +23,12 @@ keep honorary titles and names on one
|
||||
line: Dr.~Fooboar.
|
||||
```
|
||||
|
||||
* ++ Use french spacing (`\frenchspacing`) to avoid giant gaps after full stops.
|
||||
|
||||
@preview
|
||||

|
||||
|
||||
|
||||
@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
|
||||

|
||||
|
||||
|
||||
@slide(layout=content-and-preview)
|
||||
|
||||
@title
|
||||
@ -88,15 +68,87 @@ Hyphens and dashes
|
||||
|
||||
@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
|
||||

|
||||
|
||||
|
||||
@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. g.”, “i. 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 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
|
||||

|
||||
|
||||
|
||||
@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.
|
||||
The different kinds of hyphens that LaTeX offers are described in our script.
|
||||
|
||||
<!--
|
||||
<table>
|
||||
<tr>
|
||||
<td>Exclusive hyphenation</td>
|
||||
@ -125,16 +177,15 @@ The different kinds of hyphens that LaTeX offers are described in our script.
|
||||
</table>
|
||||
|
||||
<p data-category="Caution!">Some of the codes only work when you use the `babel` package.</p>
|
||||
-->
|
||||
|
||||
@preview
|
||||

|
||||
|
||||
|
||||
@slide(layout=content-only)
|
||||
@slide(layout=extra-content-only)
|
||||
|
||||
@title
|
||||
Quotation marks
|
||||
Manual quotation
|
||||
|
||||
@content
|
||||
<table>
|
||||
@ -188,31 +239,7 @@ Quotation marks
|
||||
Other rules my apply for other languages, but most of the time it’s the same characters, only combined differently.
|
||||
|
||||
|
||||
@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
|
||||

|
||||
|
||||
|
||||
@slide(layout=content-only)
|
||||
@slide(layout=extra-content-only)
|
||||
|
||||
@title
|
||||
Diacritics
|
||||
@ -254,10 +281,10 @@ Letters with diacritics can either by typed directly on the keyboard or via esca
|
||||
</table>
|
||||
|
||||
|
||||
@slide(layout=content-only)
|
||||
@slide(layout=extra-content-only)
|
||||
|
||||
@title
|
||||
Special characters & symbols
|
||||
Special characters
|
||||
|
||||
@content
|
||||
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>
|
||||
</table>
|
||||
|
||||
… 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. g.”, “i. 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-*.
|
||||
… and pretty much anything else.
|
||||
Loading…
x
Reference in New Issue
Block a user