quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.93k stars 325 forks source link

Quarto subcaption labels do not extend beyond z #7192

Open merrideewouters opened 1 year ago

merrideewouters commented 1 year ago

Bug description

Quarto subcaptions do not extend beyond z

Steps to reproduce


---
title: "BugDemo"
format: html
editor: visual
validate-yaml: false
---

## Quarto

```{r}
allNames <- paste0("a",seq(1:40))
#| label: fig-rawCN
#| layout-ncol: 4
#| fig-cap: Raw copy number profile.
#| fig-subcap: !expr allNames #names(files)
#| message: false
for (i in 1:40) {
  x <- rt(100, df=15)
dx <- dt(x, df=15)
plot(x, dx)
}


### Expected behavior

Typically after getting to z, one proceeds to "aa","ab","ac" ??

### Actual behavior

Weird characters are inserted after z is reached.

### Your environment

### 
RStudio 2023.09.0+463 
Mac Ventura 13.4

### Quarto check output

[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.1: OK
      Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.3.433
      Path: /Applications/RStudio.app/Contents/Resources/app/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.11.2
      Path: /usr/local/opt/python@3.11/bin/python3.11
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

(-) Checking R installation...........
cscheid commented 1 year ago

Thanks for the report.

Unfortunately, this is not as easy to fix as you might imagine because we need to handle a large number of different corner cases for subfigure numbering. Users can configure them to start at any unicode code point, and so "aa" doesn't work as well as you might expect when people start at, say, α. It's not practical for us to figure out what are the natural breaking points that will work across all possible starting code points.

What you should do instead is that if you expect to need more than 26 subcaption labels, you need to use a different numbering system:

---
title: "BugDemo"
format: html
keep-md: true
crossref:
  subref-labels: arabic
validate-yaml: false
---

This will cause the subrefs to be (1), (2), (3), etc.

merrideewouters commented 1 year ago

Thanks for this work around.

M

Get Outlook for iOShttps://aka.ms/o0ukef


From: Carlos Scheidegger @.> Sent: Thursday, October 12, 2023 1:49:56 AM To: quarto-dev/quarto-cli @.> Cc: Merridee Wouters @.>; Author @.> Subject: Re: [quarto-dev/quarto-cli] Quarto subcaption labels do not extend beyond z (Issue #7192)

Thanks for the report.

Unfortunately, this is not as easy to fix as you might imagine because we need to handle a large number of different corner cases for subfigure numbering. Users can configure them to start at any unicode code point, and so "aa" doesn't work as well as you might expect when people start at, say, α. It's not practical for us to figure out what are the natural breaking points that will work across all possible starting code points.

What you should do instead is that if you expect to need more than 26 subcaption labels, you need to use a different numbering system:


title: "BugDemo" format: html keep-md: true crossref: subref-labels: arabic validate-yaml: false

This will cause the subrefs to be (1), (2), (3), etc.

— Reply to this email directly, view it on GitHubhttps://ddec1-0-en-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fgithub.com%2fquarto%2ddev%2fquarto%2dcli%2fissues%2f7192%23issuecomment%2d1757858270&umid=7242fc62-a944-4887-b8c9-8046c9575326&auth=bd49bbd20ffeb7d6acc8e9a85bb2e9a8f7a67034-f5b71eb95c777dc1988c4c855a65c22f83e18e08, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVXEWKYK3KKMUGRHMNJQIG3X62WZJANCNFSM6AAAAAA53G7KNQ. You are receiving this because you authored the thread.Message ID: @.***>