我试图通过pandoc
YAML传递rmarkdown
个参数,因为它链接在这里:http://rmarkdown.rstudio.com/html_document_format.html#advanced-customization
我要添加的option是代码行编号:
- 缩进码类= CLASSES
指定用于缩进代码块的类 - 例如,perl,numberLines或haskell。多个类可以用空格或逗号分隔。
我的.Rmd
文件位于下方,但在渲染后输出看起来不像是编号。有谁知道如何正确传递这个论点?我尝试了很多种可能性,但没有一种可行。
---
title: "Untitled"
author: "Marcin Kosinski"
date: "28.12.2015"
output:
html_document:
theme: united
highlight: espresso
md_extensions: +fenced_code_attributes+fenced_code_blocks
pandoc_args: [
"--indented-code-classes","numberLines"
]
---
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>.
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, results='hide'}
summary(cars)
iris
summary(iris)
```