### Bug description

Hello,

I noticed that for figures and tables generated by a code chunks, Quarto let me reference those by adding a `#| label:` and the relevant label. The same isn't true for equation generated by code chunks.

I would like to display math and equation expressions that actually works in the document, so I'm thinking about using `sympy` or `handcalcs` to display nicely formatted math expression that actually yield results; these equation need to be cross referenceable across the document.

I got a working example where I show the issue using sympy, and a workaround that let me reference a sympy expression by wrapping it in a ``$$...$$` environment, similar to the solution used for displaying pandas dataframe mentioned in the guide.

[equation_label_in_code_chunks.pdf](https://github.com/quarto-dev/quarto-cli/files/10047971/equation_label_in_code_chunks.pdf)

(I would like to attach also the qmd file, but it doesn't seems to be supported by github)

![image](https://user-images.githubusercontent.com/11796345/202872270-85f2ea29-8226-4c6d-ba12-bcbedb570ef4.png)

(So I tricked it by changing the extension, just rename it)

[change file extension to qmd.md](https://github.com/quarto-dev/quarto-cli/files/10047974/change.file.extension.to.qmd.md)


### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [ ] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [ ] Please document the operating system you're running. If on Linux, please provide the specific distribution.
cscheid
2022-11-19T21:30:05Z
kompre
duplicate enhancement crossref
v1.4
closed
use "#| label: eq-xxx" to add label to equation generated in code chunks (e.g. sympy) 
https://github.com/quarto-dev/quarto-cli/issues/3397