Rmarkdown到LaTeX [英] Rmarkdown to LaTeX
本文介绍了Rmarkdown到LaTeX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在RStudio中使用RMarkdown/Knitr进行了演示-它可以毫无问题地编译为pdf(通过LaTeX Beamer).
I made a presentation in RStudio with RMarkdown/Knitr - it compiles without problems to a pdf (via LaTeX Beamer).
但是我无法获取LaTeX文件.有没有办法导出转换中应生成的LaTeX文件?
But I cannot get the LaTeX file. Is there any way to export also the LaTeX file which should be produced in the conversion?
推荐答案
在RStudio中:
In RStudio:
- 单击编织旁边的齿轮-选项按钮.
- 单击输出选项.
- 单击高级.
- 单击保留tex源文件". . .
回答第一条评论, 这是一些LaTeX示例
to answer the 1st comment, here is some sample LaTeX
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{DF <-}\KeywordTok{read.table}\NormalTok{(}
\DataTypeTok{text=}
\StringTok{"Year State Histadrut Private}
\StringTok{1985 27 26 47}
\StringTok{1993 10 14 76}
\StringTok{"}\NormalTok{, }\DataTypeTok{header=}\OtherTok{TRUE}\NormalTok{)}
\KeywordTok{library}\NormalTok{(ggplot2)}
\KeywordTok{library}\NormalTok{(reshape2)}
通过编译产生
一些简单的RMD
```{r}
DF <-read.table(
text=
"Year State Histadrut Private
1985 27 26 47
1993 10 14 76
", header=TRUE)
library(ggplot2)
library(reshape2)
```
输出看起来像:
这篇关于Rmarkdown到LaTeX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文