向ioslides演示文稿的标题页添加图片

7

是否可以在ioslides演示文稿的标题页中添加图片?我想在xyz之后添加一个大的标志。

---
title: "Empowering Data-Driven Decisions at <br> xyz"
author: Omayma Said
date: Jan 11, 2017
output: ioslides_presentation
---

enter image description here


2
请参见 http://www.audhalbritter.com/rmarkdown-title-page-picture/。 - Richard Telford
2个回答

2
是的。在ioslides bookdown documentation中有一个标准选项,可以包含一个小徽标,并提供一些使用CSS创建自定义大小图像的代码。这个CSS可以放在单独的文档中,也可以放在YAML头部之后的文档开头,当您只需要添加几行时通常更容易。
以下是一个将CSS放在文档中的示例,使用了bookdown documentation中的代码片段。
---
output:
  ioslides_presentation:
    logo: logo.png
---

<script>

    .gdbar img {
        width: 300px !important;
        height: 150px !important;
        margin: 8px 8px;
    }

    .gdbar {
        width: 400px !important;
        height: 170px !important;
    }

    slides > slide:not(.nobackground):before {
        width: 150px;
        height: 75px;
        background-size: 150px 75px;
    }

</script>

# Transition slide

## First slide

2
是的,借助css是可以实现的。
第一步是在markdown的输出中添加css:
---
title: "Your <br> Title"
author: "Author Name"
date: "<div class = 'slide-date'>`r format(Sys.Date(),format='%B %Y')` <div>"
output:
  ioslides_presentation:
    css: styles.css
---

下一步是在styles.css文件中添加图像。
slides>slide.title-slide {
    background-image: url('title_image.png');
    background-size: 100% 100%;
}

开心编程!


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