【发布时间】:2021-12-29 15:37:12
【问题描述】:
在 R markdown 或 R studio 中,对于这样的一行
library('tidyverse')
library 为蓝色,tidyverse 为绿色。当我编织到 html 时,它们分别显示为深红色和红色。如何编织我的 html 以保持整个文档的原始颜色?在R Markdown Cookbook 中,它说我可以使用span tag 并设置颜色,但这似乎适用于特定的代码块。我发现this post 是背景颜色,而不是文本。或this one,但又是单个代码块。我相信这是因为颜色在 R 和 HTML 中有不同的名称?有没有办法在 YAML 标头下方的 <style type="text/css"> 部分中指定它?我用 R 编写代码,但我对 CSS 或 HTML 完全陌生。
【问题讨论】:
标签: html r r-markdown