【发布时间】:2018-06-22 12:43:42
【问题描述】:
在 xaringan 中,如何创建将某些单元格格式化为代码的表格。
在降价中,我会以下列方式声明这样的表:
header1 | header2 | header3
---------------------------
`fun1` | `code1` | text not formatted as code
`fun2` | `code2` | another
`fun3` | `code3` | and again
除了语法高亮我当然不会。
我能够使用knitr::kable(, format="html") 来生成表格,但无法将其用于将单元格格式化为代码。尝试添加<pre><code>fun1</code></pre>,没有帮助。
【问题讨论】:
-
能否将您的示例代码扩展为minimal reproducible example?
标签: r r-markdown knitr xaringan