Note that as of quarto 1.4 (the R package, not just the general software), we can use the quarto_args argument in quarto_render() to pass arguments that are not individually supported. For example, my reprex above can be fixed by calling quarto::quarto_render("foo.qmd", output_format = "markdown", quarto_args = c("--default-image-extension", "")). I think that would allow us to greatly simplify the internals by removing all the "custom preamble" stuff
Originally posted by @etiennebacher in https://github.com/etiennebacher/altdoc/issues/178#issuecomment-1987373924