RStudio 中 Rmarkdown 中的 python 突出显示 [英] python highlighting in Rmarkdown in RStudio
本文介绍了RStudio 中 Rmarkdown 中的 python 突出显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是 RStudio 0.98.1103.发行说明 中说,他们添加了语法高亮模式用于 XML、YAML、SQL、Python 和 shell 脚本."但是当我写这样的东西时:
I'm using RStudio 0.98.1103. It is said in release notes that they've added "Syntax highlighting modes for XML, YAML, SQL, Python, and shell scripts." But when I write something like this:
```{r engine='python', highlight=TRUE}
print("Hello World")
```
- 我没有得到适当的突出显示(就像我在这里那样).我见过这个问题:Python块的语法高亮不起作用 - 但我想这是在 0.98.1103 发布之前被问到的,事情可能会改变,我只是做错了什么.
- I don't get proper highlighting (like I have here). I've seen this question: Syntax highlighting for Python chunks does not work - but I guess it was asked before the release of 0.98.1103 and things could've change, I'm just doing something wrong.
有人可以帮我吗?
推荐答案
output:
html_document:
highlight: pygments
在头脑中起到了作用.
这篇关于RStudio 中 Rmarkdown 中的 python 突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文