diff --git a/slides/chapter-13.en.md b/slides/chapter-13.en.md index cfcdf8e..8c1e67a 100644 --- a/slides/chapter-13.en.md +++ b/slides/chapter-13.en.md @@ -14,7 +14,9 @@ Footnotes 📎 \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. + + + + + + + + + + + + + + + + + + +
`fig:` Figures`tbl:` Tables
`sec:` Sections`subsec:` Subsections
`ch:` Chapters`itm:` Enumeration items
`eq:` Equations`lst:` Source code listings
+ @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). - - - - - - - - - - - - - - - - - -
`fig:` Figures`tbl:` Tables
`sec:` Sections`subsec:` Subsections
`ch:` Chapters`itm:` Enumeration items
`eq:` Equations`lst:` Source code listings
+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}