quarto-dev / quarto-dev/quarto-cli

Figure cross reference numbering broken?

Open
#8,514 17 comments 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since Jan 31, 2024.

books bug crossref needs-discussion
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

In-text cross references to figures in unnumbered chapters now render the full caption text instead of the caption numbering. The caption itself still has the expected numbering pattern.

Steps to reproduce

Example of working code at https://lauren-obrien.github.io/nzsc_v3/Introduction.html - see Figure 2.1, and the cross reference to that figure in the text immediately above. This was built with Quarto 1.4.510.

Note that chapter numbering for this project is controlled globally with

format: 
  html:
    number-sections: false
Expected behavior

Caption should not appear in figure crossref

Actual behavior

With Quarto 1.4.549, the figure cross reference now renders as so:

image

changing to no longer use knitr::include() didn't fix the behaviour, the following code renders the same way:

::: {#fig-one}

![](images/Figure-001_oxidic-soils-hierarchy.png)

The hierarchy of the [Oxidic Soils](Oxidics.qmd#sec-ord-X) as an example of the hierarchical relationships between orders, groups and subgroups. As the diagram suggests, the range of soil properties for each class is related to hierarchical position.
:::
Your environment
  • IDE: RStudio 2023.12.1+402 "Ocean Storm" Release (4da58325ffcff29d157d9264087d4b1ab27f7204, 2024-01-28) for windows
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2023.12.1+402 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36
  • OS: Win10
  • R: 4.3.2
  • Quarto: 1.4.549
Quarto check output

Quarto 1.4.549
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.1.11: OK
Dart Sass version 1.69.5: OK
Deno version 1.37.2: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.4.549
Path: C:\Program Files\Quarto\bin
CodePage: 1252

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

[>] Checking LaTeX....................OK
Tex: (not detected)

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

[>] Checking Python 3 installation....OK
Version: 3.11.4
Path: C:/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.3.2
Path: C:/R/R-4.3.2
LibPaths:
- C:/R/R-4.3.2/library
knitr: 1.45
rmarkdown: 2.25

[>] Checking Knitr 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.