You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/authoring/cross-references-custom.qmd
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,6 @@ You can define custom float cross-reference types using the `custom` key to the
18
18
-`kind`, which currently can only be `float`
19
19
-`key`, the abbreviation used in the reference identifier ("In `@fig-1`, ...")
20
20
-`reference-prefix`, used for the reference in output ("In Figure 1, ...")
21
-
-`caption-prefix`, used in front of the caption text ("Figure 1: ..."). If `caption-prefix` is unspecified, Quarto will use the value of `reference-prefix`.
22
21
23
22
For example, the following YAML defines a new cross-reference type for videos:
24
23
@@ -54,11 +53,20 @@ Which renders as:
54
53
55
54
In @vid-cern...
56
55
56
+
There are some additional options that give you more control over the appearance of the cross-reference:
57
+
58
+
-`caption-prefix`, the text used to construct the caption title shown under the float ("Figure 1: ..."). If unspecified, Quarto will use the value of `reference-prefix`.
59
+
60
+
-`caption-location`, the position of the the caption. Options are: `top`, `bottom` (default) or `margin`.
61
+
62
+
-`space-before-numbering`, whether there is a space between the prefix and number. Set to `false` to omit the space (e.g. "Figure1").
63
+
64
+
57
65
You can find a complete listing of the options available for the `custom` key on the [Cross-Reference Options](/docs/reference/metadata/crossref.qmd#custom) reference page.
58
66
59
67
## PDF Output
60
68
61
-
If your output format is PDF you'll also need to specify `latex-env`, a name to be used for the float environment wrapped around the element in the intermediate TeX. For example, to use the custom video reference type in PDF you could add `latex-env: video`:
69
+
If your output format is `pdf` you'll also need to specify `latex-env`, a name to be used for the float environment wrapped around the element in the intermediate TeX. For example, to use the custom video reference type you could add `latex-env: video`:
0 commit comments