-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy path_cross-references-callouts.qmd
More file actions
51 lines (38 loc) · 1.44 KB
/
_cross-references-callouts.qmd
File metadata and controls
51 lines (38 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
To cross-reference a callout, add an ID attribute that starts with the appropriate callout prefix (see @tbl-callout-prefixes). You can then reference the callout using the usual `@` syntax. For example, here we add the ID `#tip-example` to the callout, and then refer back to it:
``` markdown
::: {#tip-example .callout-tip}
## Cross-Referencing a Tip
Add an ID starting with `#tip-` to reference a tip.
:::
See @tip-example...
```
This renders as follows:
::: {.border .p-3}
::: {#tip-example .callout-tip}
## Cross-Referencing a Tip
Add an ID starting with `#tip-` to reference a tip.
:::
See @tip-example...
:::
The prefixes for each type of callout are:
| Callout Type | Prefix |
|--------------|---------|
| `note` | `#nte-` |
| `tip` | `#tip-` |
| `warning` | `#wrn-` |
| `important` | `#imp-` |
| `caution` | `#cau-` |
: Prefixes for callout cross-references {#tbl-callout-prefixes}
The text used for each callout cross-reference (for example, "Note 1" in "See Note 1...") can be localised by setting `crossref-{nte,tip,wrn,imp,cau}-prefix` under `language:`:
``` yaml
---
lang: fr
language:
crossref-nte-prefix: "Note"
crossref-tip-prefix: "Astuce"
crossref-wrn-prefix: "Avertissement"
crossref-imp-prefix: "Important"
crossref-cau-prefix: "Mise en garde"
---
```
See [Cross-Reference Titles and Prefixes](language.qmd#cross-reference-titles-and-prefixes) for the full localisation pattern, including per-language subkeys.