quarto-dev / quarto-dev/quarto-cli
Python #| fig-cap: produces <p> tags not <figcaption>
Open
@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  the caption is wrapped in <figcaption>.
I think this is bug? EDITED to say that this is Quarto version 1.4.532
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.