Rmarkdown - how to remove grey background on output

妖精的绣舞 提交于 2019-12-04 18:53:42

You might simply want to override the grey highlighting in the YAML header as follows:

---
title: "Untitled"
output: 
   word_document:
      highlight: NULL
---

```{r setup, include = FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

Now if you want to get rid of the "##" and the line-numbers, tell knitr to handle texts as-is, and use cat():

```{r textfoo, echo = FALSE, results = 'asis'}
hej <- ("test")
cat(hej)
```

Et voilà:

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!