xaringan:如何轻松更改纵横比?

12

我想要把一个xaringan演示文稿的长宽比改为16:9。我猜如果创建自定义css主题应该是可以实现的,但这对我来说有点过度杀伤。

那么,有没有非常简单的方法来做到这一点呢?

1个回答

21

这非常容易,因为已经实现了。只需在 YAML 中包含以下内容(除了 YAML 中的所有其他内容):

output:
  xaringan::moon_reader:
    nature:
      ratio: '16:9'

这是我的默认起始YAML。也许你可以根据你的需求进行微调。

---
title: "My title"
author: "Claus<br>UCPH Biostatistics<br>.small[my@email.dk ]"
date: 'Some day 2019'
output:
  xaringan::moon_reader:
    lib_dir: libs
    css: ['default', 'hygge']
    seal: true
    nature:
      ratio: '16:9'
      slideNumberFormat: '%current%' 
      highlightStyle: ir-black
      highlightLines: true
      countIncrementalSlides: false
---

1
这非常简单。你有一个链接可以查看所有选项吗? - der_grund
一个好的起点是xaringan wiki。另外,由于xaringan基于remark.js,你也可以查找相关信息。 - ekstroem
维基看起来很棒。我一定会去看看的。 - der_grund

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接