r - 我们如何编程 statet 以同时使用 knitr 和 pdflatex
问题描述
在 statet4.0 的新版本中,我想找到一种方法来配置 sweave 以同时使用 knitr 和 pdflatex 运行。
在 external tool configuration > sweave Document processing 中有一个使用示例,tools::texi2dvi(file= "${resource_loc}", pdf= TRUE)
我应该如何配置使用 pdflatex ?
解决方案
乳胶文件
我已经将 R Weave 配置设置为生成tex
(.tex
不仅仅是 tex)
然后我使用了
system2(command='pdflatex', args=c('-interaction=nonstopmode','-synctex=1','${resource_loc}')).
在这里,我尝试设置一个stdin
andstout
参数但没有成功,但在 Windows 下可能存在问题,正如那里指出的那样:
https ://github.com/rstudio/rstudio/issues/2446 。最后将文件的路径${resource.loc}
作为最后一个参数效果很好。
推荐阅读
- javascript - 按钮单击音频启动和停止 JS
- python - Python - ModuleNotFoundError:没有命名的模块
- javascript - 为什么 for-in 循环不能有多个变量声明?
- python - tf.keras 混合精度损失规模仍然导致下溢
- configuration - HAProxy - 它是否缓存配置文件
- sql - 如何在 sublime text 3 中运行 sql?
- flutter - 如何在颤动中从共享首选项中获取所有内容
- html - 如何通过单击 jquery 来更改 a::before 样式?
- mysql - 输出以某种格式连接两个表
- c++ - 如何使 QGraphicsView 背景以 R - G - B 每秒闪烁