0
我正在將RStudio中的Rmd文件編織爲HTML,並且我想增加正文文本和表格/圖形之間的空間。用於PDF輸出的Here's a nice solution。什麼部分CSS在HTML輸出中指定了這個間距?我正在尋找一個模板範圍的解決方案,而不是手冊<br>
。在數字/代碼塊上下添加垂直空間(HTML)
---
title: "Example"
output:
bookdown::html_document2:
fig_captions: yes
number_sections: false
theme: cerulean
highlight: tango
toc: true
code_download: true
code_folding: "show"
toc_float: true
---
<style type="text/css">
body{ /* Normal */
font-size: 18px;
font-family: Helvetica;
}
div#TOC li {
list-style:none;
background-image:none;
background-repeat:none;
background-position:0;
}
</style>
```{r setup, include=FALSE}
library(ggplot2)
library(knitr)
```
## Section
Here is some text before a table.
```{r cars}
kable(head(cars))
```
Here is some text after the table. Here comes a plot. Could use more space after the table and before the plot.
```{r pressure, echo=FALSE, fig.align="center", fig.cap="My caption", message=FALSE, warning=FALSE}
ggplot(cars, aes(speed)) +
geom_histogram()
```
Here is some text after the plot. Need some space between the figure caption and the body text.
精彩,@GGamba。謝謝。 –