Skip to content

Commit cf7c907

Browse files
authored
Mention caption-location on guide page (#1604)
* Mention `caption-location` on guide page * Tweak language
1 parent 1587071 commit cf7c907

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

docs/authoring/cross-references-custom.qmd

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ You can define custom float cross-reference types using the `custom` key to the
1818
- `kind`, which currently can only be `float`
1919
- `key`, the abbreviation used in the reference identifier ("In `@fig-1`, ...")
2020
- `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`.
2221

2322
For example, the following YAML defines a new cross-reference type for videos:
2423

@@ -54,11 +53,20 @@ Which renders as:
5453

5554
In @vid-cern...
5655

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+
5765
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.
5866

5967
## PDF Output
6068

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`:
6270

6371
``` yaml
6472
format: pdf

0 commit comments

Comments
 (0)