diff --git a/docs/prerelease/1.4/crossref.qmd b/docs/prerelease/1.4/crossref.qmd index 340634f9b..4dc83455d 100644 --- a/docs/prerelease/1.4/crossref.qmd +++ b/docs/prerelease/1.4/crossref.qmd @@ -116,3 +116,19 @@ Keep in mind the following changes in the HTML output of figures, etc: - Floats include an extra div for ARIA referencing, so that captions are referenced appropriately and uniformly. As a result, a table appears inside a float, its caption will be hoisted to the figure node itself + +## Cross-referenceable listings of executable code blocks: + +To create crossreferenceable code listings from executable code blocks, use `lst-label` and `lst-cap`. + +```` +```{r} +#| label: fig-1 +#| fig-cap: A figure caption +#| lst-label: lst-1 +#| lst-cap: A listing caption +plot(1:10) +``` + +See @fig-1 and @lst-1. +````