I'm trying to create my own sublime-build
in Sublime Text 3, since the default build in knitr
package (https://sublime.wbond.net/packages/knitr) doesn't work (for me). I modified the one in knitr
package as follows:
{
"selector": "text.html.markdown.knitr",
"working_dir": "${project_path:${folder}}",
"cmd": ["Rscript", "-e", "library(knitr); knit('$file')" ],
"shell": true
}
but get the error:
Error: '\G' is an unrecognized escape in character string starting "'C:\G"
Execution halted
[Finished in 0.4s with exit code 1]
[cmd: ['Rscript', '-e', "library(knitr); knit('C:\\GitHub\\Projects\\test\\testLaTeXing\\knitrRmd\\testRmd.Rmd')"]]
obviously some windows path escape issue, but how can I fix this, when I want to acces file path dynamically?
I'm working on windows7.
This is what I finally cooked up, thanks to @MattDMo.
where the default command is from the knitr sublime package (https://github.com/andrewheiss/SublimeKnitr/blob/master/knitr-Markdown.sublime-build)