【发布时间】:2018-05-20 17:22:53
【问题描述】:
我无法使用 /input{file} 或 include{file} 命令将 .Rtex 文件输入到我的 shareLatex 项目中。
有没有办法像其他 .tex 文件一样包含它?
文件如下所示:
<<>>=
# Create a sequence of numbers
X = 2:10
# Display basic statistical measures
summary(X)
@
如果我将代码放在 main.Rtex 文件中,则代码会被编译,但如果我尝试包含它,则不会。这个问题类似于one on tex.stackexchange。
【问题讨论】:
-
你不能只使用
.tex作为包含文件的扩展名吗? -
@RalfStubner 我可以这样做,但效果不佳。包含这种代码的文件需要保存为.Rtex文件,根据sharelatex
-
@MatthiasAdriaans,您是否考虑或尝试过使用knitr child documents?
标签: r latex knitr tex sharelatex