quarto-dev / quarto-dev/quarto-cli

Capitals in Figure label strings break rendering

Open
#4,542 1 comment 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since Apr 19, 2023.

bug crossref lint triaged-to
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

When labeling figures, capitals in the label string cause the entire label to be unrecognized. "WARNING: Unable to resolve crossref @fig-data-weeeWho" Nothing in the documentation for references makes this appear to be expected behavior. This also impacts the numbering and captions. This behavior is appearing in Visual Studio Code 1.75.1 run on a MacBook Pro M1 Pro running Mac OS 13.1.

May be related to #1186. Sorry, not sure how to shrink the sample to <20 lines.

---
title: 'Labeling Bug'
format:
    pdf:
        include-in-header:
            text: |
                \addtokomafont{disposition}{\rmfamily}
jupyter: python3
---

```{python}
#| echo: false

# Workspace initialization
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

df = pd.DataFrame(np.random.randint(0, 100, size = (100, 2)))

```

# Demonstration

Lorem ipsum lanum et al. Lorem ipsum lanum et al. Lorem ipsum lanum et al. Lorem ipsum lanum et al. Lorem ipsum lanum et al. Lorem ipsum lanum et al. Lorem ipsum lanum et al. See @fig-data-weee and @fig-data-weeeWho.


```{python}
#| echo: false
#| label: fig-data-weee
#| fig-cap:
#|   - "Random Data"

plt.scatter(df[0], df[1], color = '#e34234')
```


```{python}
#| echo: false
#| label: fig-data-weeeWho
#| fig-cap:
#|   - "Random Data"

plt.scatter(df[0], df[1], color = '#e34234')
```

Checklist
  • 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.
  • Please format your issue so it is easier for us to read the bug report.
  • Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • Please document the operating system you're running. If on Linux, please provide the specific distribution.

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.