add logo only on first (main) slide in ioslides RStudio

不羁的心 提交于 2019-12-24 13:06:59

问题


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?


回答1:


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)



来源:https://stackoverflow.com/questions/32458089/add-logo-only-on-first-main-slide-in-ioslides-rstudio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!