我可以指定一个 highlight.js
使用 html_document 时 RMarkdown 前端的样式?
例子:
而不是使用 pandoc
的 espresso
突出显示说我想要 highlight.js
的 tommorrow
活着的highlithing here
---
title: "Untitled"
output:
html_document:
highlight: espresso
---
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}
summary(cars)
```
etc...
我该怎么做?
最佳答案
据我所知,没有内置的方法可以做到这一点,但您可以在 Rmd
的开头添加以下几行文档以获取您想要的内容:
<style type="text/css">
@import "https://highlightjs.org/static/demo/styles/tomorrow.css";
</style>
关于r - 在 rmarkdown::html_document() .Rmd 中使用 highlight.js 主题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30145208/