I use RStudio with Rmarkdown to create reports. For some reason using the “Knit” button results in it being created in some temporary directory only. From the command output it seems that pandoc itself is instructed to do so, which I find very strange.
/usr/lib/rstudio/bin/pandoc/pandoc +RTS -K512m -RTS 31_effective_masses.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmppeovW9/preview-2c001154ef6d2e.dir/31_effective_masses.tex --table-of-contents --toc-depth 3 --template /hadron/ueding/R/x86_64-pc-linux-gnu-library/3.6/rmarkdown/rmd/latex/default-1.17.0.2.tex --number-sections --highlight-style tango --pdf-engine lualatex --variable graphics=yes --lua-filter /hadron/ueding/R/x86_64-pc-linux-gnu-library/3.6/rmarkdown/rmd/lua/pagebreak.lua --lua-filter /hadron/ueding/R/x86_64-pc-linux-gnu-library/3.6/rmarkdown/rmd/lua/latex-div.lua --variable 'geometry:margin=1in' --variable 'compact-title:yes'
output file: 31_effective_masses.knit.md
Output created: /tmp/RtmppeovW9/preview-2c001154ef6d2e.dir/31_effective_masses.pdf
But when I do it on the command line with Rscript -e "rmarkdown::render('vignettes/3pi/31_effective_masses.Rmd')"
, it creates the output in the correct directory:
/usr/bin/pandoc +RTS -K512m -RTS 31_effective_masses.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output 31_effective_masses.tex --table-of-contents --toc-depth 3 --template /hadron/ueding/R/x86_64-pc-linux-gnu-library/3.6/rmarkdown/rmd/latex/default-1.17.0.2.tex --number-sections --highlight-style tango --latex-engine lualatex --variable graphics=yes --variable 'geometry:margin=1in' --variable 'compact-title:yes'
Output created: 31_effective_masses.pdf
I am using RStudio 1.2.5001 on Debian 9.