2
我在R中做了一个演示,使用了一个reveal.js模板(使用了revealjs R包)。如何把R reveal.js演示文稿转换为PDF?
默认情况下,它生成一个html文件,当它打开时用于显示它显示浏览器的顶部部分,包括书签,文件路径等......我可以关闭书签栏,但不是文件路径部分,我需要在一个正式的设置,以便将演示文稿导出为pdf似乎是更好的选择。
有谁知道如何将其导出为pdf?我可以在YAML标题中添加任何内容,以便输出为pdf而不是html?
下面是示例代码,它生成“test.html”文件。我想产生“检验.pdf”,同时保留的呈现,例如转换,交互式绘图等所有其他属性...
---
title: "test"
output: revealjs::revealjs_presentation
---
## R Markdown
This is an R Markdown presentation. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.
## Slide with Bullets
- Bullet 1
- Bullet 2
- Bullet 3
## Slide with R Code and Output
```{r}
summary(cars)
```
## Slide with Plot
```{r, echo=FALSE}
plot(cars)
```
如果包含某种[可重现的示例](样本可能重现)(例如http://support.microsoft.com/kb/5963269/how-to-make-a-great-r-reproducible-example)可以测试的代码。 – MrFlick
使用Chrome浏览器,选择打印并保存为PDF .... –
@MartinSchmelzer保存为pdf将生成静态pdf文件,丢失包括交互式图表,过渡标题等演示文稿的属性。 – piyush