Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add logo to each slide in ioslides in RStudio

I am trying to add logo to each slide in rmarkdown in ioslides presentation, using RStudio.

My code is below:

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

# Caption1

## Caption 2

and the logo can be downloaded from here!

here

There is no logo on slide nr 3. runtime: shiny is needed because there is a shiny app in that presentation.

According to this sentence from rstudio webpage this should work but it does not..

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

I am using windows 7 and I have set encoding to UTF-8.

like image 381
Marcin Kosiński Avatar asked Jan 05 '15 15:01

Marcin Kosiński


1 Answers

Have you tried publishing your slides? I've found on Windows 8.1 that the icon does not appear in the RStudio preview, but it's there when I publish them to shinyapps.io.

If you want to force the icon to show up in the RStudio preview you can use:

---
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`">

Note: you'll have to include this last line of code on each content slide you want the logo to appear. If you choose to publish the slides, this "forced" icon will be placed on top of the "native" icon called out in the YAML header.

like image 195
Jason Freels Avatar answered Nov 01 '22 19:11

Jason Freels