2

I'm using ioslides (rmarkdwon) in RStudio to create the presentation from R. I would like to add the logo, but only to the first slide (main) which renders this information:

---
title: "Presentation"
author: "Tom Hanks"
output: ioslides_presentation
logo: logo.jpg
---

I don't want the logo in the bottom-left footer of each slide. Can anyone tell me how to switch it off?

scoa
  • 19,359
  • 5
  • 65
  • 80
Leni Ohnesorge
  • 716
  • 8
  • 19
  • possible duplicate of [Insert a logo in upper right corner of R markdown pdf document](http://stackoverflow.com/questions/27982052/insert-a-logo-in-upper-right-corner-of-r-markdown-pdf-document) – drmariod Sep 08 '15 at 12:44

3 Answers3

5

You could modify the ioslide template to remove the repetition of the logo on each page. Download the template on the rmarkdown github repository or find your local version on your computer. Remove the following part:

$if(logo)$
    slides > slide:not(.nobackground):before {
      font-size: 12pt;
      content: "";
      position: absolute;
      bottom: 20px;
      left: 60px;
      background: url($logo$) no-repeat 0 50%;
      -webkit-background-size: 30px 30px;
      -moz-background-size: 30px 30px;
      -o-background-size: 30px 30px;
      background-size: 30px 30px;
      padding-left: 40px;
      height: 30px;
      line-height: 1.9;
    }
$endif$

Save the resulting file as default.ioslides in your pandoc home:

$HOME/.pandoc/templates (unix)
C:\Documents And Settings\USERNAME\Application Data\pandoc\templates (windows XP)
C:\Users\USERNAME\AppData\Roaming\pandoc\templates (windows 7)

The logo linked in your yaml front matter should now only appear on the title slide.

(I answered a similar question here)

Community
  • 1
  • 1
scoa
  • 19,359
  • 5
  • 65
  • 80
0

This is quite hacky, but you can also put html directly into your title or author elements.

---
title: "Presentation"
author: 'Tom Hanks<img src="logo.jpg" width="200px" height="90px" style="position: absolute; right: -200px; bottom: -50px;">'
output: ioslides_presentation
---
filups21
  • 1,611
  • 1
  • 19
  • 22
0

One option is to make each subsequent slide background white with data-background=#ffffff. The logo no longer appears at the bottom left. I don't like the default gradient that shows up at the bottom of the presentation slides either so this works for me.

---
title: "Presentation"
author: "Tom Hanks"
output: ioslides_presentation
logo: logo.jpg
---

## First Slide Title {data-background=#ffffff}

rob123
  • 1