Open adknudson opened 5 months ago
Possibly related to #587
This seems to be an issue of case being insensitive for engine Jupyter and Julia:
---
title: "Quarto Playground"
format: html
---
@fig-0x7b2ada84-okay (all lower case works)
```{python}
#| label: fig-0x7b2ada84-Okay
#| fig-cap: "Just a caption"
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, 10, 100)
y = np.sin(x)
plt.plot(x, y)
Workaround: use fenced div syntax:
````qmd
---
format: html
engine: julia
---
This is a reference to @fig-0x7b2ada84-Okay (does not work)
::: {#fig-0x7b2ada84-Okay}
```{julia}
#| echo: fenced
xs = rand(50) * 2pi
ys = sin.(xs)
scatter(xs, ys)
Just a caption
:::
The keep-ipynb
output has an uppercase identifier
{
"cell_type": "code",
"execution_count": 1,
"id": "fig-0x7b2ada84-Okay",
"metadata": {},
But the keep-md
output has a lowercase identifier:
::: {.cell-output .cell-output-display}
![Just a caption](9441_files/figure-html/fig-0x7b2ada84-okay-output-1.png){#fig-0x7b2ada84-okay width=590 height=411}
:::
That means that somewhere in the ipynb to jupyter conversion, Quarto is explicitly converting the ids to lower case.
I think we should mandate that such identifiers be lowercase, and issue warnings on the relevant inputs.
Bug description
Cross reference does not work when figure label has a uppercase letters in it.
Steps to reproduce
This is a reference to @fig-0x4a59ab6a-okay (works)
This is a reference to @fig-0x7b2ada84-Okay (does not work)
This is a reference to @fig-0xdd9b4a13-notbad (works)
This is a reference to @fig-0xdd9ca19d-nOtbad (does not work)