Closed andrewheiss closed 3 years ago
This is good. I'll admit there were occasions of debugging in Rstudio where I had to manually enter that and it was kind of dumb that's what I had to do. I'll also incorporate some of the other things you mentioned in your tweet.
knitr::opts_knit$get("rmarkdown.pandoc.to")
works fine when knitting, but when running interactively, it returnslogical(0)
and breaks lots of the logic that depends onis_docx
oris_latex
being true or false. Thepandoc_to()
function in knitr always returns true or false, though, so it works both when knitting and when working interactively