R markdown 投影仪幻灯片:顶部对齐正文文本,但将顶级部分标题居中

问题描述 投票:0回答:1

我正在使用 R Markdown 为投影仪演示创建幻灯片。要将文本与幻灯片顶部对齐(而不是默认居中),我在 yaml 标题中使用

classoption: t

问题在于,这也会顶部对齐章节标题(即出现在自己的幻灯片上的顶级标题)。我该如何阻止这种情况发生?

我找到了this答案,其中包括(在评论中)如果您只想将顶部对齐应用于特定幻灯片,则使用

# New Slide {.t}
的建议。但我想要相反的方式:除了章节标题之外,所有地方都顶部对齐。

有什么想法吗?

这是一个最小的示例,其中节标题错误地顶部对齐:

---
title: "Your Presentation Title"
author: "Your Name"
date: "`r Sys.Date()`"
output:
  beamer_presentation:
classoption: t
---

# Section 1

## Slide 1

Content here.

# Section 2

## Slide 2

More content here.
r r-markdown markdown beamer
1个回答
0
投票
---
title: "Your Presentation Title"
author: "Your Name"
date: "`r Sys.Date()`"
output:
  beamer_presentation:
classoption: t
header-includes:
 - \AtBeginSection{\ifbibliography\else\frame[c]{\sectionpage}\fi}
---

# Section 1

## Slide 1

Content here.

# Section 2

## Slide 2

More content here.
© www.soinside.com 2019 - 2024. All rights reserved.