You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear developers,
The second plot is rendered correctly whereas the first one is messed up unless you add a fig.alt since the unescaped HTML of the formula ends up in the aria-label tag of the <img> element.
---
title: "Circle Plot"
output:
bookdown::html_document2:
toc: yes
toc_depth: 2
---
(ref:caption) The formula for a circle: $x^2 + y^2 = r^2$).
```{r circle-plot, fig.cap="(ref:caption)"}
t <- seq(0, 2*pi, length.out = 1000)
x <- cos(t)
y <- sin(t)
plot(x, y, type = "l", asp = 1, xlab = "x", ylab = "y", main = "Circle")
```
```{r circle-plot2, fig.cap="The formula for a circle: $x^2 + y^2 = r^2$."}
plot(x, y, type = "l", asp = 1, xlab = "x", ylab = "y", main = "Circle")
```
Dear developers,
The second plot is rendered correctly whereas the first one is messed up unless you add a
fig.alt
since the unescaped HTML of the formula ends up in thearia-label
tag of the<img>
element.Checklist
formatted your issue so it is easier for us to read?
included a minimal, self-contained, and reproducible example?
pasted the output from
xfun::session_info('bookdown')
in your issue?upgraded all your packages to their latest versions (including your versions of R, the RStudio IDE, and relevant R packages)?
installed and tested your bug with the development version of the bookdown package using
remotes::install_github("rstudio/bookdown")
?The text was updated successfully, but these errors were encountered: