在rmd / rmarkdown中格式化h1,h2

时间:2016-03-22 18:16:52

标签: css r r-markdown

使用外部css文件,我可以更改Rmd / html文档中的许多项目,但是一些基本的文件被markdown(?)插入的内联css覆盖。

.main-container {
....
h1 {
  font-size: 34px;
}
h2 {
  font-size: 30px;
}

所以改变h2字体大小的唯一方法是将代码直接插入到文档中,这很难看:

---
output: 
  html_document:
    theme: cosmo
   # css: whatever.css # adding h2 here does not work
---

<style type = "text/css">
h2 {color: red;}
</style>

## R Markdown

有更好的解决方案吗?是否可以抑制上面的内联块?

1 个答案:

答案 0 :(得分:2)

相关问题