我正在使用 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.
---
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.