quarto-dev / quarto-dev/quarto-cli

Python #| fig-cap: produces <p> tags not <figcaption>

Open
#7,999 2 comments 1 reaction 1 assignee View on GitHub

@cscheid is already working on this.

Since Dec 20, 2023.

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

Description

It might be worth taking a fix for this for 1.4, and make the jupyter behavior equivalent to that of knitr.

Discussed in https://github.com/quarto-dev/quarto-cli/discussions/7994

Originally posted by astrowonk December 20, 2023

Description

```{python}
#| echo: false
#| fig-cap: "This is my figure caption"

fig =  makeplotlyfig() #some function that makes a plotly figure
fig.show()
```




So, the above code in Quarto 1.4x, there is a caption underneath the plotly figure but it is wrapped in <p> tags and looks exactly like the rest of the text. By contrast, a Figure caption added to an inline image ala ![Elephant](elephant.png) the caption is wrapped in <figcaption>.

I think this is bug? EDITED to say that this is Quarto version 1.4.532

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.