Adding args
This commit is contained in:
parent
a08d316fa7
commit
8b931c63a8
1 changed files with 5 additions and 1 deletions
|
|
@ -1,7 +1,11 @@
|
|||
#!/usr/bin/env Rscript
|
||||
require("knitr")
|
||||
create_latex <- function(f) {
|
||||
knitr::knit(f, "/tmp/tmp-outputfile.md")
|
||||
newname <- paste0(tools::file_path_sans_ext(f), ".tex")
|
||||
mess <- paste("pandoc -f markdown -t latex -p -o", shQuote(newname), "/tmp/tmp-outputfile.md")
|
||||
system(mess)
|
||||
}
|
||||
}
|
||||
args <- commandArgs(trailingOnly = TRUE)
|
||||
|
||||
create_latex(args)
|
||||
Loading…
Add table
Reference in a new issue