quarto-dev / quarto-dev/quarto-cli

Support `-scap` in Float crossrefs consistently across formats and input options

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

@cscheid is already working on this.

Since Apr 26, 2023.

crossref enhancement layout
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

Minor issues with the fig-scap: when there are multiple subfigures. When using subfigures and subcaptions, the fig-scap is no longer used in the list of figures, instead the full caption is used and the scap is ignored.

---
title: "scratch"
toc: true
format: 
  pdf:
    table-of-contents: true
    lof: true
---

```{r}
#| fig-cap: "Long caption 1."
#| fig-scap: "Short1"
#| echo: false
plot(mtcars)
```

```{r}
#| layout-ncol: 2
#| label: fig-charts
#| echo: false
#| fig-cap: "Overall longer caption."
#| fig-scap: "Short2"
#| fig-subcap: 
#|   - "Long caption 2."
#|   - "Long caption 3."
plot(mtcars)
plot(cars)
```

Related to this as well is the potential for using scap in divs for markdown figures, ![](). Not necessarily a bug as I'm unsure if scap is supported for HTML output.

RStudio Build 576. MacOS 12.6, Intel Macbook Pro 15-inch (2017).

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.