Tar*_*aas 6 markdown yaml r knitr r-markdown
当在 Rmarkdown 文档的 YAML 部分声明输出格式时,有没有办法确保它编织成 PDF,但看起来像编织的 HTML?
knitted PDF 看起来完全不一样:字体是某种衬线字体(假设我可以更改它),块引用和代码块看起来不同。
我喜欢针织 HTML 和外观,但是有没有办法生成看起来完全相同的 PDF?
作为例子,只是一个简单的默认示例代码:
---
title: "Untitled"
output:
html_document: default
pdf_document: default
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
This is an R Markdown document. 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>.
> This is a quote
This is a link: <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. You can embed an R code chunk like this:
```{r cars}
summary(cars)
```
Run Code Online (Sandbox Code Playgroud)
以下是 2 个输出开箱即用的 2 个示例
| 归档时间: |
|
| 查看次数: |
2699 次 |
| 最近记录: |