【发布时间】:2013-12-14 17:00:03
【问题描述】:
我正在使用脚本将knitr生成的Markdown文件转换为tex:
mess <- paste('pandoc -f markdown -t latex -s -o', "intro-spatial.tex",
"intro-spatial.md")
system(mess) # create latex file
这很好用,但我需要对乳胶文档做一些额外的调整。让它看起来nice。我可以在文本编辑器中执行此操作,但因为它需要多次编译,所以编写脚本很有意义。例如,为了使数字尺寸合适,我添加了:
mess <- paste("sed -i -e 's/width=\\maxwidth/[width=8cm/g' intro-spatial-rl.tex")
system(mess)
我不知道如何插入一大块文本。具体来说,如何在第 n 行之后添加它。 62? (相关问题请参见here。)
\author{
x, y\\
\texttt{x@y.com}
\and
x, y\\
\texttt{x@y.com}
}
\title{Introduction to Spatial Data and ggplot2}
我可能在这里使用了完全错误的方法。如果有,请告诉我!
【问题讨论】: