quarto-dev / quarto-dev/quarto-cli

figure crossreference doesn't work when label has uppercase letters anywhere in it

Open
#9,441 3 comments 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since Apr 22, 2024.

crossref engines-julia engines-jupyter enhancement lint
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

Cross reference does not work when figure label has a uppercase letters in it.

Steps to reproduce
---
engine: julia
---

```{julia}
using CairoMakie
```

This is a reference to @fig-0x4a59ab6a-okay (works)

```{julia}
#| echo: fenced
#| label: fig-0x4a59ab6a-okay
#| fig-cap: "Just a caption"

xs = rand(50) * 2pi
ys = sin.(xs)
scatter(xs, ys)
```

This is a reference to @fig-0x7b2ada84-Okay (does not work)

```{julia}
#| echo: fenced
#| label: fig-0x7b2ada84-Okay
#| fig-cap: "Just a caption"

xs = rand(50) * 2pi
ys = sin.(xs)
scatter(xs, ys)
```

This is a reference to @fig-0xdd9b4a13-notbad (works)

```{julia}
#| echo: fenced
#| label: fig-0xdd9b4a13-notbad
#| fig-cap: "Just a caption"

xs = rand(50) * 2pi
ys = sin.(xs)
scatter(xs, ys)
```

This is a reference to @fig-0xdd9ca19d-nOtbad (does not work)

```{julia}
#| echo: fenced
#| label: fig-0xdd9ca19d-nOtbad
#| fig-cap: "Just a caption"

xs = rand(50) * 2pi
ys = sin.(xs)
scatter(xs, ys)
```
Expected behavior

Any string sequence after fig- should be a valid identifier

Actual behavior

Get missing reference in document.

Your environment
  • Windows_NT x64 10.0.19045
  • VSCode v1.88.1
Quarto check output
Quarto 1.5.29
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.11: 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.29
      Path: C:\Users\Alex\AppData\Local\Programs\Quarto\bin
      CodePage: 1252

[>] Checking tools....................OK
      TinyTeX: v2024.04
      Chromium: (not installed)

[>] Checking LaTeX....................OK
      Using: TinyTex
      Path: C:\Users\Alex\AppData\Roaming\TinyTeX\bin\windows\
      Version: 2024

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK
      Version: 3.12.3
      Path: C:/Python312/python.exe
      Jupyter: 5.7.2
      Kernels: python3

(/) Checking Jupyter engine render....2024-04-21 18:13:48,874 - traitlets - WARNING - Kernelspec name python3 cannot be found!
2024-04-21 18:13:48,874 - traitlets - ERROR - No such kernel named python3
Traceback (most recent call last):
  File "C:\Python312\Lib\site-packages\jupyter_client\manager.py", line 87, in wrapper
    out = await method(self, *args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jupyter_client\manager.py", line 435, in _async_start_kernel    
    kernel_cmd, kw = await self._async_pre_start_kernel(**kw)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jupyter_client\manager.py", line 397, in _async_pre_start_kernel
    self.kernel_spec,
    ^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jupyter_client\manager.py", line 195, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jupyter_client\kernelspec.py", line 285, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3


No such kernel named python3
[>] Checking Jupyter engine render....OK

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.