changes to chapter 13

This commit is contained in:
Amma 2020-06-19 20:35:10 +02:00
parent beb9ead403
commit 8e98530a57

View File

@ -14,7 +14,9 @@ Footnotes <span class="emoji">📎</span>
\usepackage{hyperref}
```
The footnotes are automatically numbered consecutively, independent of sections.
Footnotes are automatically numbered consecutively, independent of sections.
(Here, the package `hyperref` is used for the `\url` command, it is not necessary for footnotes per se.)
``` {.hljs .lang-tex}
The wild boar (Sus scrofa), also known as
@ -81,6 +83,35 @@ As you can see in figure
@preview
![](svg/chapter-13/ref-example-crop.svg)
@slide(layout=content-only)
@title
Assigning labels
@content
Both cross-reference commands work with **sections, figures, tables, listings, and equations,** as long as you use correct labels.
Labels have to be **unambiguous.** For clarity, certain prefixes are common, and some packages use them to derive information.
<table>
<tr>
<td>`fig:` Figures</td>
<td>`tbl:` Tables</td>
</tr>
<tr>
<td>`sec:` Sections</td>
<td>`subsec:` Subsections</td>
</tr>
<tr>
<td>`ch:` Chapters</td>
<td>`itm:` Enumeration items</td>
</tr>
<tr>
<td>`eq:` Equations</td>
<td>`lst:` Source code listings</td>
</tr>
</table>
@slide(layout=content-and-preview)
@ -111,31 +142,20 @@ The `\cref` command automatically inserts suitable prefixes.
@slide(layout=content-only)
@title
Assigning labels
Using the `hyperref` package
@content
Both cross-reference commands work with **sections, figures, tables, listings and equations,** as long as you use correct labels.
``` {.hljs .lang-tex}
\usepackage{hyperref}
```
Labels have to be **unambiguous.** For clarity, certain prefixes are common, and some packages use them to derive information.
Creates **clickable links** within the document itself (toc, tables/figures, index).
<table>
<tr>
<td>`fig:` Figures</td>
<td>`tbl:` Tables</td>
</tr>
<tr>
<td>`sec:` Sections</td>
<td>`subsec:` Subsections</td>
</tr>
<tr>
<td>`ch:` Chapters</td>
<td>`itm:` Enumeration items</td>
</tr>
<tr>
<td>`eq:` Equations</td>
<td>`lst:` Source code listings</td>
</tr>
</table>
The appearance of these links is customizable.
The command `\autoref` creates a reference that states the target's type.
The command `\url` creates a monospaced external hyperlink that will open a browser and has special breaking properties.
@slide(layout=content-only)
@ -144,15 +164,15 @@ Labels have to be **unambiguous.** For clarity, certain prefixes are common, and
Things to consider
@content
* ++ Passages inserted via `\cref` use the language specified at the document class:
* Terms inserted by `\cref` and `\autoref` use the language specified with the document class (or `babel`):
``` {.hljs .lang-tex}
\documentclass[english]{article}
```
* ++ Apart from sections, referenced elements need captions (`\caption{…}`), and the **captions have to be placed before the label.**
* Apart from sections, referenced elements need captions (`\caption{…}`), and the **captions have to be placed before the label.**
* ++ For sections, the label is inserted directly after the section command.
* For sectioning commands, the label is inserted directly after the section command.
``` {.hljs .lang-tex}
\section{Notes}\label{sec:notes}
@ -164,8 +184,8 @@ Things to consider
A few more things
@content
* ++ If the `hyperref` package is used before `cleveref`, cross-references appear as **clickable links** in the PDF document.
* ++ `\cref` can take multiple references at once, separated by commas.
* It is recommended that you include the package `hyperref` before `cleveref`.
* `\cref` can take multiple references at once, separated by commas.
``` {.hljs .lang-tex}
\section{An introduction}