Description
Bug description
I am attempting to cite a cross reference inside a code fold summary, but the cross reference is not found.
My main project is a quarto book, but the below example should illustrate the problem.
Inspecting the html code once the project is rendered as an html provides a possible explanation:
data-original-href="http://localhost:7382/filename.html#ref-fig-rf-theory-demo"
. note that it seems to place ref before the reference. Thus, it cannot find #ref-fig-rf-theory-demo which should be #fig-rf-theory-demo. The bug is that it doesn't recognize the fig
prefix so places ref
infront. Although I am not an expert in HTML code so I may be misleading you.
Thank you very much in advance.
Steps to reproduce
---
title: "Bug Example"
format: html
---
## Quarto
```{r}
#| label: fig-testing
plot(mtcars)
```
working in text @fig-testing
```{r}
#| code-fold: true
#| code-summary: "Adding a title to @fig-testing"
plot(mtcars, main="add a title")
```
The file rendered to be an html in the preview window.
Expected behavior
I expect that the figure will be cross referenced. Note that I am able to reference other objects inside code-summary such as a paper using @paper2024 and that works fine. for example:
Actual behavior
An error is found as if the cross-reference is not found.
Your environment
-
Windows 11
RStudio 2024.04.2+764 "Chocolate Cosmos" Release (e4392fc9ddc21961fd1d0efd47484b43f07a4177, 2024-06-05) for windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2024.04.2+764 Chrome/120.0.6099.291 Electron/28.3.1 Safari/537.36, Quarto 1.5.52 -
R: 4.4.1 patched
Quarto check output
Quarto 1.5.52
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.2.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.41.0: OK
Typst version 0.11.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.5.52
Path: C:\Users\mitch\AppData\Local\Programs\Quarto\bin
CodePage: 1252
[>] Checking tools....................OK
TinyTeX: v2024.07.03
Chromium: 869685
[>] Checking LaTeX....................OK
Using: TinyTex
Path: C:\Users\mitch\AppData\Roaming\TinyTeX\bin\windows
Version: 2024
[>] Checking basic markdown render....OK
[>] Checking Python 3 installation....OK
Version: 3.11.2
Path: C:/Users/mitch/AppData/Local/Programs/Python/Python311/python.exe
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with py -m pip install jupyter
[>] Checking R installation...........OK
Version: 4.4.1
Path: C:/PROGRA1/R/R-441.1PA
LibPaths:
- C:/Users/mitch/AppData/Local/R/win-library/4.4
- C:/Program Files/R/R-4.4.1patched/library
knitr: 1.48.1
rmarkdown: 2.27
[>] Checking Knitr engine render......OK