latex-wochenende/slides/chapter-06.en.md

197 lines
3.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@slide(layout=chapter-slide)
@title
Text Markup
@slide(layout=content-and-preview)
@title
Emphases
@content
The easiest way of emphasising in continuous text is the semantic command `\emph{}` that can also be nested:
``` {.lang-tex .hljs}
\emph{If you have a whole bunch of
important text with some \emph{even more
important Text} hidden inside it,
you can use nested emphases.}
```
@preview
![](svg/chapter-06/emphases-crop.svg)
@slide(layout=content-and-preview)
@title
Optical highlighting
@content
specifies exactly how to format the text:
<table>
<tr><th>Name</th><th>Befehl</th></tr>
<tr><td>Bold (bold face)</td><td>`\textbf{important}`</td></tr>
<tr><td>Italics (italics)</td><td>`\textit{important}`</td></tr>
<tr><td>Small caps</td><td>`\textsc{important}`</td></tr>
<tr><td>non-proportional (teletype)</td><td>`\texttt{important}`</td></tr>
<tr><td>slanted</td><td>`\textsl{important}`</td></tr>
<tr><td>underlined</td><td>`\underline{important}`</td></tr>
<tr><td>subscript</td><td>`\textsubscript{…}`</td></tr>
<tr><td>superscript</td><td>`\textsuperscript{…}`</td></tr>
</table>
@preview
![](svg/chapter-06/optical-highlighting-crop.svg)
@slide(layout=content-and-preview)
@title
Nesting emphases
@content
Possible if the font contains the exact font style:
``` {.lang-tex .hljs}
\textbf{Very
\textit{Important
\textsc{Stuff}
}
}
```
@preview
![](svg/chapter-06/nesting-emphases-crop.svg)
@slide(layout=content-only)
@title
Font size
@content
<div class="box warning">
**Some well-meaning advice: Better Call ~~Saul~~ LaTeX!**
You want the entire document to look consistent?
Trust LaTeXs defaults (font sizes of title, paragraphs, footnotes, etc.)!
This conversely means: Avoid fiddling around with font sizes manually.
</div>
@slide(layout=content-only)
@title
Font size
@content
### `normalsize`
* used for continuous text paragraphs
* default: 10pt
* can be modified in the preamble:
``` {.lang-tex .hljs}
\documentclass[12pt]{article}
```
@slide(layout=content-and-preview)
@title
Font size
@content
### Preset font sizes
``` {.hljs .lang-tex}
{\<fontsize> some text}
```
Font sizes relative to `normalsize`:
``` {.hljs .lang-tex}
{\tiny If}
{\footnotesize you}
{\small can}
{\normalsize read}
{\large this,}
{\Large you}
{\LARGE dont}
{\huge need}
{\Huge glasses.}
```
@preview
![](svg/chapter-06/font-size-optician-crop.svg){.thin-padding}
@slide(layout=content-and-preview)
@title
Font size
@content
### Manual configuration possible
``` {.lang-tex .hljs}
\fontsize{<fontsize>}{<lineheight>}
\selectfont
```
<p data-category="Example"></p>
``` {.lang-tex .hljs}
This is text in normal font size.
\fontsize{1cm}{0.9cm}\selectfont
This is a ginormous passage.
\normalsize
Back to normal.
```
@preview
![](svg/chapter-06/font-size-fontsize-command-crop.svg){.thin-padding}
@slide(layout=content-and-preview)
@title
URLs
@content
The `hyperref` package provides an `\url{}` command that reproduces URLs
* letter by letter
* using line breaks without hyphens
* using a font with well-distinguishable characters
* as a clickable link in the PDF
``` {.lang-tex .hljs}
\url{https://www.latex-project.org/}
```
@preview
![](svg/chapter-06/url-crop.svg)
@slide(layout=task)
@task-number
6
@title
Emphasising text
@content
* **Emphasise** the words *Rekursion* and *rekursiv* in `exercises/text-markup/markup.tex` using `\emph{…}`.
* Make the **URL** in the text clickable.
* Of course, you can also experiment with the other **text markup** possibilities. However, remove them afterwards, if you want to have a clean document.