Skip to content

*-subcap not working as expected and crashing #9550

Closed

Description

@mcanouil

Bug description

*-subcap are not working as expected and crashing.

Initially reported in #9546

Steps to reproduce

Quarto documentStatus
---
format: html
---

```{python}
#| label: fig-plots
#| fig-cap: "Plots"
#| fig-subcap: true
#| layout-ncol: 2

import matplotlib.pyplot as plt
plt.plot([1,23,2,4])
plt.show()

plt.plot([8,65,23,90])
plt.show()
```

No crash, but no a/b under the figures contrary to what is documented (screenshots)

---
format: html
---

```{python}
#| label: tbl-tables
#| tbl-cap: "Tables"
#| tbl-subcap: true
#| layout-ncol: 2

import pandas as pd
from IPython.display import display

df = pd.DataFrame({'cars': ['BMW', 'Volvo', 'Ford'],
                   'pressure': [1.0, 1.5, 2.0]})

df2 = pd.DataFrame({'cars': ['BMW', 'Volvo', 'Ford'],
                   'pressure': [1.0, 1.5, 2.0]})

display(df)
display(df2)
```

Crash

---
format: html
---

```{r}
#| label: fig-figure
#| fig-cap: "Figure"
#| fig-subcap: true
#| layout-ncol: 2
plot(1)
plot(2)
```

No crash, but no a/b under the figures contrary to what is documented (screenshots)

---
format: html
---

```{r}
#| label: tbl-tables
#| tbl-cap: "Tables"
#| tbl-subcap: true
#| layout-ncol: 2
knitr::kable(head(cars))
knitr::kable(head(pressure))
```

Crash

Expected behavior

No crash and a/b under figures/tables as documented in https://quarto.org/docs/authoring/cross-references.html#floats.
image
image

Your environment

Quarto development version at 84ee809

Activity

  1. added
    bug
    tables
    triaged-to
    on May 1, 2024
  2. cscheid commented on May 1, 2024

    @cscheid
    Member

    This is actually a v1.4 regression (of course we learn of it on the day that we have a new patch release 😭)

  3. added
    regression
    on May 1, 2024
  4. added this to the v1.5 milestone on May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugcrossrefregressiontablestriaged-to

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions