【发布时间】:2021-05-24 13:15:46
【问题描述】:
如何在 `rmarkdown::beamer_presentation 中垂直居中对齐多个列的内容?
正如对this SO post 的回答中的评论所建议的那样,我尝试了::: {.column width="30%"},但这对我不起作用。
如果有一种简单的方法可以为每一列以不同方式对齐内容,那也将非常有帮助(例如,c1:顶部,c2:中间,c3:底部,c4:中间) .
MWE
---
output:
bookdown::pdf_book:
base_format: rmarkdown::beamer_presentation
slide_level: 2
keep_tex: true
---
## Figures in columns top-aligned
::: columns
:::: {.column width="30%"}
```{r top-p-5, echo=FALSE, out.width='30%'}
plot(pressure[1:5,])
```
::::
:::: {.column width="30%"}
```{r top-p-10, echo=FALSE, out.width='50%'}
plot(pressure[1:10,])
```
::::
:::: {.column width="30%"}
```{r top-p-all, echo=FALSE, out.width='100%'}
plot(pressure[1:nrow(pressure),])
```
::::
:::
## Figures in columns center-aligned (not working)
::: columns
::: {.column width="30%"}
```{r center-p-5, echo=FALSE, out.width='30%'}
plot(pressure[1:5,])
```
:::
::: {.column width="30%"}
```{r center-p-10, echo=FALSE, out.width='50%'}
plot(pressure[1:10,])
```
:::
::: {.column width="30%"}
```{r center-p-all, echo=FALSE, out.width='100%'}
plot(pressure[1:nrow(pressure),])
```
:::
:::
【问题讨论】:
标签: r latex r-markdown markdown beamer