See https://github.com/quarto-dev/quarto-cli/discussions/3899

This works 
````markdown
---
title: "Document"
format: 
  html:
    embed-resources: false
---

```{r}
knitr::opts_chunk$set(dev = c("png", "pdf", "svg"))
```


```{r}
library(ggplot2)
ggplot() + ggtitle("this is a title")
```

````

But setting option in YAML does not 

````markdown
---
title: "Document"
format: 
  html:
    embed-resources: false
knitr:
  opts_chunk:
    dev:
      - png
      - pdf
      - svg
---

```{r}
library(ggplot2)
ggplot() + ggtitle("this is a title")
```

````

Error is 
````
processing file: test2.qmd
  |...................................                 |  67% (unnamed-chunk-1)Quitting from lines 15-17 (test2.qmd) 
Error in `auto_exts[x]`:
! type 'list' d'indice incorrect
Backtrace:
  1. global .main()
  2. execute(...)
  3. rmarkdown::render(...)
  4. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
  5. knitr:::process_file(text, output)
  8. knitr:::process_group.block(group)
  9. knitr:::call_block(x)
 10. knitr:::block_exec(params)
 11. knitr:::eng_r(options)
 12. knitr:::dev2ext(options)
                                                                                                            
Exécution arrêtée
````

Why is that ? 

It seems something is missing when letting Quarto set the default knitr options

cderv
2023-01-09T21:46:51Z
cderv
bug
v1.3
closed
Error setting multipe dev value in knitr opts_chunk in YAML
https://github.com/quarto-dev/quarto-cli/issues/3909