-
DescriptionIf I render the following Quarto document ---
title: "Untitled"
format: gfm
---
```{r plotting}
#| fig-alt: "An example plot"
plot(1:10)
``` I get # Untitled
``` r
plot(1:10)
```
<img src="Untitled-1_files/figure-commonmark/plotting-1.png"
data-fig-alt="An example plot" />
I'd expect the alternative text to be in |
Beta Was this translation helpful? Give feedback.
Answered by
mcanouil
Apr 3, 2025
Replies: 1 comment 6 replies
-
This feels like a bug. Note that you should avoid mixing syntaxes for options. You are using both R inline and YAML style syntax. In Quarto, it's pretty simple: a code cell has nothing but the language inside the brackets. ```{r}
#| label: plotting
#| fig-alt: "An example plot"
plot(1:10)
``` |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So, it feels like a bug but it's not really one.
I'm checking if this is specific to
knitr
.edit: the behaviour is the same across engines.
Now the question is: should
fig-alt
value be used as "caption" forgfm
format? What should be the behaviour iffig-cap
is also provided? 🤷♂️