From ec039a9be05350350e08d390df265d4c46e2d60b Mon Sep 17 00:00:00 2001 From: Charlotte Wickham Date: Tue, 1 Apr 2025 14:26:24 -0700 Subject: [PATCH 1/2] Mention `caption-location` on guide page --- docs/authoring/cross-references-custom.qmd | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/authoring/cross-references-custom.qmd b/docs/authoring/cross-references-custom.qmd index 6e1163cbb5..8f09643a54 100644 --- a/docs/authoring/cross-references-custom.qmd +++ b/docs/authoring/cross-references-custom.qmd @@ -18,7 +18,6 @@ You can define custom float cross-reference types using the `custom` key to the - `kind`, which currently can only be `float` - `key`, the abbreviation used in the reference identifier ("In `@fig-1`, ...") - `reference-prefix`, used for the reference in output ("In Figure 1, ...") -- `caption-prefix`, used in front of the caption text ("Figure 1: ..."). If `caption-prefix` is unspecified, Quarto will use the value of `reference-prefix`. For example, the following YAML defines a new cross-reference type for videos: @@ -54,11 +53,20 @@ Which renders as: In @vid-cern... +There are some additional options that give you more control over the appearance of the cross-reference: + +- `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`. + +- `caption-location`, position of the the caption: `top`, `bottom` or `margin`. + +- `space-before-numbering`, set to `false` to omit the space between the prefix and numbering (e.g. "Figure1"). + + 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. ## PDF Output -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`: +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`: ``` yaml format: pdf From bb993e5d82d3c700e64910c1da145f99ffddf245 Mon Sep 17 00:00:00 2001 From: Charlotte Wickham Date: Tue, 1 Apr 2025 14:59:36 -0700 Subject: [PATCH 2/2] Tweak language --- docs/authoring/cross-references-custom.qmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/authoring/cross-references-custom.qmd b/docs/authoring/cross-references-custom.qmd index 8f09643a54..6d4794f6b9 100644 --- a/docs/authoring/cross-references-custom.qmd +++ b/docs/authoring/cross-references-custom.qmd @@ -57,9 +57,9 @@ There are some additional options that give you more control over the appearance - `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`. -- `caption-location`, position of the the caption: `top`, `bottom` or `margin`. +- `caption-location`, the position of the the caption. Options are: `top`, `bottom` (default) or `margin`. -- `space-before-numbering`, set to `false` to omit the space between the prefix and numbering (e.g. "Figure1"). +- `space-before-numbering`, whether there is a space between the prefix and number. Set to `false` to omit the space (e.g. "Figure1"). 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.