Open cderv opened 1 year ago
Real issue is that in R Markdown we are building the files dir with files_dir_slash <- file.path(output_dir, knitr_files_dir(basename(output_file)))
knitr_files_dir <- function(file) {
paste(xfun::sans_ext(file), "_files", sep = "")
}
Combine with the above, as output_file
would be input_name.customwriter.lua
we remove only .lua
when creating the directory. Which messes up what Quarto is looking for.
And so now I have it all covered. Probably another issue but related.
The directory with format in the name is created by rmarkdown when R chunks are added. I don't think Quarto expect this so not sure we are cleaning this correctly.
When no
output_file
is passed tormarkdown::render()
, one is automatically determined considering thepandoc.to
format.With
to
beingcustomwriter.lua
, the output file will have a.customwriter
suffix as we can see in above commentsThen the files where to store figures for knitr is computed based on
output_file
which will lead to the other folder
customwriter-yaml.customformat_files
when R code are into this.I believe this will happen with any format no known by rmarkdown function
pandoc_output_ext
I'll probably look into that in another issue too, but that explains the behavior and differences seen above
Originally posted by @cderv in https://github.com/quarto-dev/quarto-cli/issues/4260#issuecomment-1421667821