gpt4 book ai didi

r - 如何在 RStudio 的 ioslides 中为每张幻灯片添加 Logo

转载 作者:行者123 更新时间:2023-12-04 04:17:02 28 4
gpt4 key购买 nike

我正在尝试使用 RStudio 在 ioslides 演示文稿中的 rmarkdown 中为每张幻灯片添加 Logo 。

我的代码如下:

---
title: " "
author: " "
date: " "
output:
ioslides_presentation:
widescreen: false
logo: logo_wp.png
runtime: shiny
---

# Caption1

## Caption 2

Logo 可以从 here! 下载

here

第 3 张幻灯片上没有 Logo 。 runtime: shiny需要,因为该演示文稿中有一个 Shiny 的应用程序。

根据 rstudio webpage 的这句话这应该工作,但它没有..

A 128x128 version of the logo graphic will be added to the title slide and an icon version of the logo will be included in the bottom-left footer of each slide



我正在使用 Windows 7,并且已将编码设置为 UTF-8。

最佳答案

您是否尝试过发布幻灯片?我在 Windows 8.1 上发现该图标没有出现在 RStudio 预览中,但是当我将它们发布到 shinyapps.io 时它就在那里。

如果您想强制图标显示在 RStudio 预览中,您可以使用:

---
title: " "
author: " "
date: " "
output:
ioslides_presentation:
widescreen: false
logo: logo_wp.png
runtime: shiny
---

```{r, echo=FALSE}
logo<-"path_to_logo_wp.png"
```

# Caption1

## Caption 2
<IMG style="position:absolute;bottom:2.5%;left:5%;width:35px;"SRC="`r logo`">

注意:您必须在希望 Logo 出现的每张内容幻灯片上包含最后一行代码。如果您选择发布幻灯片,此“强制”图标将放置在 YAML header 中标出的“ native ”图标之上。

关于r - 如何在 RStudio 的 ioslides 中为每张幻灯片添加 Logo ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27782312/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com