Knit vs render for slides

I am in the process of converting from RMarkdown to Quarto for a class website. But, I have many of my resources still as RMarkdown Xaringan slides and RMarkdown to LaTeX to PDF documents. I have the directories with the RMD files excluded from Quarto compile, but there seems to be no way for me to Knit these documents without moving them to an entirely separate directory.

I asked a related question yesterday on StackOverflow here but I am really stuck in terms of whether this is an RStudio issue, a Quarto issue, or an issue with how I have configured my project in RStudio.

Any help or starting advice would be appreciated.

It seems like this is related to the bug report on Github here.

I believe in the Rmd files you have a Render and not a Knit ?

image

I think RStudio IDE will consider all Rmd and Qmd file to be rendered with Quarto. This means it won't be render with rmarkdown::render() and output key is not considered. Hence the result you shared in SO.

Quarto project feature won't be able to render mixed content with Quarto for some files, and with R Markdown for other.

So one solution would be to render Rmd file with specific format (like xaringan) in another step in the rendering and ignore the files or folder in the rendering target.
See project scripts and render target

I think you can build a rendering script that would render the Rmd files, and then the Quarto website considering only the HTML outputs of the previous step. Hope it makes sense.

For those document, you should be able to do a one one conversion, just by adapting the YAML, and the chunk options (See ?knitr::convert_chunk_header) so that you convert your Rmd to PDF.
Using shared metadata can be useful to apply same YAML config to several document, without modifying individual YAML header.

Hope it helps

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.