### Bug description

````md
---
title: "Untitled"
format: pdf
editor: visual
---

Please see @ref1.

## Quarto {#ref1}

Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.
````

I hope I'm not making a simple mistake, but the code autocompletion does not recognize `ref1` in visual mode, nor is the document properly generating the link.. 

RStudio
2022.12.0 Build 353

```{r}
> Sys.info()
                                                                                          sysname 
                                                                                         "Darwin" 
                                                                                          release 
                                                                                         "22.3.0" 
                                                                                          version 
"Darwin Kernel Version 22.3.0: Thu Jan  5 20:53:49 PST 2023; root:xnu-8792.81.2~2/RELEASE_X86_64" 
                                                                                         nodename 
                                                                   "Matthews-MacBook-Pro-2.local" 
                                                                                          machine 
                                                                                         "x86_64" 
                                                                                            login 
                                                                                           "root" 
                                                                                             user 
                                                                                     "matthewson" 
                                                                                   effective_user 
                                                                                     "matthewson" 
```


### 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.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
2023-02-15T00:35:19Z
matthewgson
bug
closed
Cross reference does not work on headings (pdf)
https://github.com/quarto-dev/quarto-cli/issues/4356