如何使用ioslides在rmarkdown演示文稿中填充整个幻灯片?

时间:2017-02-21 08:46:29

标签: r r-markdown ioslides

我想要一张图片来填充整张幻灯片。 我试图使用具有绝对定位的div,但是,它会将图像部分定位在幻灯片之外。

我想我可以做到这一点,如果我对分辨率进行硬编码,但是,我也想让它在另一台机器上工作。 (最好是宽屏切换)

重现/测试的一个例子:

---
title: "some title"
author: Me
company: Me
date: 21-02-2017
output:
    ioslides_presentation

---

##

![test image](https://i.ytimg.com/vi/yaqe1qesQ8c/maxresdefault.jpg)

编辑: 我知道: Rpresentation in Rstudio - Make image fill out the whole screen 但是,他们转而使用slidy_presentation,我已经为ioslides提供了自定义css。如果可能的话,我想留下ioslides。它应该是可能的,对吗? :)

1 个答案:

答案 0 :(得分:3)

当我想要让我的文本输出更小时,我知道了。

我发现了这个:Markdown: Change default font size of code chunks in ioslides

现在我使用以下自定义css:

.fullslide img {
  margin-top: -85px;
  margin-left: -60px;
}

然后在rmarkdown文件中我可以这样做:

## {.fullslide}

![](image.jpg)

如果您现在想确保获得完整图像,请确保图像具有以下尺寸:

  • 宽屏:1100 x 700
  • 正常:900 x 700

我只是确保使用GIMP或其他东西编辑它们。 我还没弄清楚如何抑制页面编号,但显然你无法在每张幻灯片的基础上抑制页码。 :(