@slide(layout=chapter-slide) @title Special characters @slide(layout=content-and-preview) @title Spaces @content * normal space dividing words: space bar * non-breaking space: `~` * thin space: `\,` * many other widths available ``` {.hljs .lang-tex} Thin spaces are used in abbreviations and before units, e.\,g., 10\,s. Normal-with non-breaking spaces can help keep honorary titles and names on one line: Dr.~Fooboar. ``` @preview ![](svg/chapter-05/spaces-crop.svg) @slide(layout=content-only) @title French spacing @todo Folie zu french spacing im Englischen @slide(layout=content-and-preview) @title Hyphens and dashes @todo * Für Silbentrennung muss bei Babel die Sprache angegeben werden. Hier erwähnen und überall überprüfen. * Überprüfen, ob die Trennung A.E./B.E. wirklich stimmt. @content
Name Use Code
- Hyphen compound-forming hyphen `-`
En dash *(Halbgeviert­strich)* a dash – or a range: 12 – 2 p.m. `--`
Em dash *(Geviertstrich)* A dash — in American English `---`
@preview ![](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. But you can also intervene manually:
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=content-only) @title Quotation marks @content
Language Command Result
Englisch (B. E.) \`…\' ‘ … ’
 2. Ebene \`\`…\'\' “ … ”
Englisch (A. E.) \`\`…\'\' “ … ”
 2. Ebene \`…\' ‘ … ’
Deutsch `\glqq … \grqq` „ … “
 2. Ebene ` \glq … \grq ` ‚ … ‘
Deutsch altern. `\frqq … \flqq` » … «
 2. Ebene ` \frq … \flq ` › … ‹
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, i. a., an `\enquote` command: ``` {.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 Diacritics @content Letters with diacritics can either by typed directly on the keyboard or via escape codes:
\\\`{o}ò   `\c{c}` ç   `\d{u}`
`\'{o}` ó `\k{a}` ą `\r{a}` å
`\^{o}` ô `\l{}` ł `\u{o}` ŏ
`\"{o}` ö `\={o}` ō `\v{s}` š
`\H{o}` ő `\b{o}` o `\t{oo}`o͡o
`\~{o}` õ `\.{o}` ȯ `\o` ø
@slide(layout=content-only) @title Special characters & symbols @content Special characters, as well, can either be typed or via escape codes and commands:
¿ ?\` ¡ !\`
^ `\textasciicircumflex` ~ `\textasciitilde`
`\textasteriskcentered` \\ `\textbackslash`
| `\textbar` `\textbullet`
`\textcopyright` `\textdagger`
`\textdaggerdbl` `\textellipsis`
< `\textless` > `\textgreater`
`\textperthousand` § `\textsection`
… 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 (Kreuz) $\dagger$ ``` @slide(layout=content-only) @title Special characters & symbols @content ### Euro (€) * `eurosym` package * `\euro` command ``` {.lang-tex .hljs} Using LaTeX costs 0 \euro. ``` @slide(layout=content-only) @title Special characters & symbols @content ### Detexify to the rescue! ⛑️ * 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 4 @title Insert special characters @content * In section 1.1.1, replace the spaces before and after the name Knuth by **non-breaking spaces.** * ++In section 1.2.1, paragraph 2, insert a **thin space** between ‘z.’ and ‘B.’ of ‘z.B.’ (= ‘e. g.’). * ++In section 1.2.2, there are several hypens misused as **dashes.** Replace them by en dashes (Halbgeviertstriche als Gedankenstriche). * ++In section 1.2.1, paragraph 2, a `"=` is used. What happens if you use a simple **hyphen** instead? * ++In section 1.1.1, “Tech” and “TeX” should be surrounded by **quotation marks.** Use `\enquote{…}` for that. * ++In section 1.2.1, paragraph 2, replace the three dots by a real **ellipsis.**