【问题标题】:Change color theme to HTML markdown将颜色主题更改为 HTML markdown
【发布时间】:2019-06-27 08:59:45
【问题描述】:

我正在尝试更改 HTML 降价背景,但我不能。例如,“蔚蓝”主题有一个白色的背景,这很烦人,因为我的眼睛很快就会疲劳。

我知道 prettydoc、tint 等有很多主题,但我想知道如何使用 CSS 更改主题的背景颜色、字体样式和字体颜色。

【问题讨论】:

  • 您能给我们提供更多信息吗?如果我们不知道您的问题到底是什么,很难为您提供帮助。给我们一些代码,示例,...有关如何提出明确问题的更多信息,请访问article
  • html r-markdown 报告的背景是白色的,我的眼睛很快就会疲劳。我需要将其更改为,例如,灰色。我知道我可以使用 .css 文件来做到这一点,但我不知道如何调用“报告的背景颜色”或“报告颜色”。你知道怎么做吗?

标签: html css r r-markdown background-color


【解决方案1】:
**Themes for R Markdown**
*With the powerful rmarkdown package, we could easily create nice HTML document by adding some meta information in the header, for example*
-------------
title: Nineteen Years Later
author: S M Sharif Mia
date: feb 03, 2019
output:
  rmarkdown::html_document:
    theme: lumen
----------------
*The html_document engine uses the Bootswatch theme library to support different styles of the document. This is a quick and easy way to tune the appearance of your document, yet with the price of a large file size (> 700KB) since the whole Bootstrap library needs to be packed in.
For package vignettes, we can use the html_vignette engine to generate a more lightweight HTML file that is meant to minimize the package size, but the output HTML is less stylish than the html_document ones.*

**The prettydoc Engine**
*The prettydoc package provides an alternative engine, html_pretty, to knit your R Markdown document into pretty HTML pages. Its usage is extremely easy: simply replace the rmarkdown::html_document or rmarkdown::html_vignette output engine by prettydoc::html_pretty in your R Markdown header, and use one of the built-in themes and syntax highlighters. For example*
---
title: Nineteen Years Later
author: S M Sharif Mia
date: feb 03, 2019
output:
  prettydoc::html_pretty:
    theme: cayman
    highlight: github
---
**Options and Themes**
*The options for the html_pretty engine are mostly compatible with the default html_document (see the documentation) with a few exceptions:*

 1. Currently the theme option can take the following values. More themes will be added in the future. 
  = cayman: Modified from the Cayman theme.
  = tactile: Modified from the Tactile theme.
  = architect: Modified from the Architect theme.
  = leonids: Modified from the Leonids theme.
  = hpstr: Modified from the HPSTR theme.
 2. The highlight option takes value from github and vignette.
 3. Options code_folding, code_download and toc_float are not applicable.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-04-01
    • 2016-04-03
    • 1970-01-01
    • 2023-01-30
    • 1970-01-01
    • 2021-08-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多