Hi,

There was a [discussion](https://github.com/quarto-dev/quarto-cli/discussions/1785) about this issue, but I figured I would file a formal feature request. [Bookdown](https://bookdown.org/) allows you to use [text references](https://bookdown.org/yihui/bookdown/markdown-extensions-by-bookdown.html#text-references) to create figure and table captions:

````
---
title: Text references
output: bookdown::html_document2
---

(ref:cap) This is a long complex caption with an equation ($E=mc^2$), some calculated results (`r 5^2`), **bold text** and text in "quotes".

```{r fig.cap="(ref:cap)"}
plot(1:10)
```
````

This is a super handy feature when captions are complicated and long. To my knowledge this feature, or something equivalent to it, does not exist in Quarto. Though the same result can undoubtedly be achieved using `!expr` and `paste` statements with lots of back quoting, it is far less ergonomic.

Would it be possible to implement something like that in Quarto? Basically, you need a way to pass text by reference a bit like one can insert figures and links by reference id. This seems like a feature that could potentially be more generally valuable beyond table and figure captions.
 
cscheid
2022-08-18T07:37:06Z
dmkaplan2000
crossref
v1.4
open
Feature request: Bookdown-style text references
https://github.com/quarto-dev/quarto-cli/issues/1959