Closed hturner closed 2 months ago
The following example only works correctly if the relative file path is first normalized with normalizePath to create an absolute file path:
normalizePath
## copy source files for the {parallel} package vignette to a local folder article_dir <- "rnw_to_rmd" dir.create(article_dir) file.copy(system.file(file.path("doc", "parallel.Rnw"), package = "parallel"), file.path(article_dir , "parallel.Rnw")) download.file("https://svn.r-project.org/R/trunk/src/library/parallel/vignettes/parallel.bib", file.path(article_dir , "parallel.bib")) ## convert to Rmd texor::rnw_to_rmd(normalizePath(file.path(article_dir, "parallel.Rnw")), front_matter_type = "vignettes", clean_up = TRUE, autonumber_eq = TRUE, autonumber_sec = TRUE)
It would be more user-freindly if rnw_to_rmd could normalize the path internally, so that relative file paths also work.
rnw_to_rmd
The following example only works correctly if the relative file path is first normalized with
normalizePath
to create an absolute file path:It would be more user-freindly if
rnw_to_rmd
could normalize the path internally, so that relative file paths also work.