R markdown beamer 演示:调整幻灯片的宽高比

问题描述

如何调整呈现为输出格式 beamer 的 R markdown 演示文稿的幻灯片的宽度以生成 LaTex/PDF 文件? 为了能够快速调整到给定的演示设备(宽屏、4:3 屏幕等),理想情况下可以轻松更改纵横比以采用不同的值。

MWE:

---
title: "Adjust the width/aspect ratio of slides"
output:
  # beamer_presentation: default
  bookdown::pdf_book:
    base_format: rmarkdown::beamer_presentation
---


## Some Slides

some content

解决方法

您可以将 aspectratio 作为类选项传递。查看投影仪用户指南以检查可用比率。

---
title: "Adjust the width/aspect ratio of slides"
output:
  beamer_presentation:
    theme: "default"
    keep_tex: true
classoption: aspectratio=169    
---

## Some Slides

some content