【发布时间】:2017-01-07 14:01:16
【问题描述】:
我在玩 bookdown 为 pixiedust 写一些文档,我觉得这对于一个小插曲来说可能有点太长了。我喜欢bookdown::gitbook 的布局,但不幸的是,它带有自己的表格样式,这对我来说是个问题。由于pixiedust 都是关于样式表的,因此要显示pixiedust 使用默认的 gitbook 样式完成(或尚未完成)的工作有点挑战。
我尝试在
的指导下清除 CSSR bookdown gitbook - how to override table style
和
How to change the code padding effect of gitbook?
我没有运气将 css 代码放在我的根目录中的 css 文件中,并将文件名放在 css YAML 标记中。我没有创建styles 子目录的运气。而且下面的版本也没用。
---
title: "Sample Book"
output:
bookdown::gitbook:
config:
toc:
collapse: section
scroll_highlight: true
before: null
after: null
theme: null
css: ".book .book-body .page-wrapper .page-inner section.normal table td, .book .book-body .page-wrapper .page-inner section.normal table th { border-left: none; border-right: none; }"
---
```{r, warning = FALSE, message = FALSE, echo = FALSE}
library(pixiedust)
dust(head(mtcars))
```
我尝试过的所有方法都会生成一个看起来像这样的表格
我想要的是看起来像的东西
目前,我的根目录是空的,除了上面给出的代码的 index.Rmd 文件。
我正在使用 R 3.2.2 和 bookdown 0.3
【问题讨论】: