【问题标题】:How do I attach more than one stylesheet to an rmarkdown document?如何将多个样式表附加到 rmarkdown 文档?
【发布时间】:2016-10-18 12:11:17
【问题描述】:

如果我正在创建一个 .rmd 报告并且这是我的示例 YAML,我如何将另一个样式表附加到该报告的输出中?

---
title: "Example Report"
author: "Cool guy 62"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
  html_document:
    theme: null
    css: 'style.css'
---

【问题讨论】:

    标签: css r knitr r-markdown


    【解决方案1】:

    将多个 css 文件放入一个带括号的数组中,如下所示:

    ---
    title: "Example Report"
    author: "Cool guy 62"
    date: "`r format(Sys.time(), '%d %B, %Y')`"
    output:
      html_document:
        theme: null
        css: ['browserreset.css', 'style.css', 'C:/Users/coolguy62/webpages/styles/bootstrap-modified.css']
    ---
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-06-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-04
      • 2013-08-31
      相关资源
      最近更新 更多