Skip to content

Commit

Permalink
crossreferenceable executable listings
Browse files Browse the repository at this point in the history
  • Loading branch information
cscheid committed Oct 22, 2023
1 parent 670757b commit 92bc8c6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/prerelease/1.4/crossref.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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.
````

0 comments on commit 92bc8c6

Please sign in to comment.