首页 > 解决方案 > Rmarkdown html 文档中的通用(非 R)代码折叠

问题描述

我想在 Rmarkdown 文档中切换非 R 代码的代码折叠。例子:

---
title: "Fold code chunks?"
author: "Miguel"
date: "2.9.2021"
output:
  html_document:
    code_folding: hide
---

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

Show and hide this:

```
FOO=$HOME/bar
```

有任何想法吗?

标签: r-markdowncode-folding

解决方案


推荐阅读