相关疑难解决方法(0)

使用slidify将图像添加到标题幻灯片

我正在使用最新版本的Rstudio(和knitr),我已经从github安装了slidify的开发版本.Slidify允许您通过1次点击直接从Rmarkdown到html5slides.

我的问题是我想在标题幻灯片中添加图像,但使用正常的Rmarkdown语法不起作用.我认为这是因为第一张幻灯片被指定为YAML.

title       : 
subtitle    : 
author      : 
job         : 
framework   : io2012        # {io2012, html5slides, shower, dzslides, ...}
highlighter : highlight.js  # {highlight.js, prettify, highlight}
hitheme     : tomorrow      # 
widgets     : []            # {mathjax, quiz, bootstrap}
mode        : selfcontained # {standalone, draft}
Run Code Online (Sandbox Code Playgroud)

如果我在第一个幻灯片规范中添加任何内容,我会在函数yaml.load()中收到错误,该函数解析YAML.有没有办法使用YAML指定背景图像?

r r-markdown slidify

13
推荐指数
1
解决办法
5069
查看次数

使用reveal.js将标题幻灯片图像添加到RMarkdown幻灯片

我正在尝试弄清楚如何使用reveal.js幻灯片在标题幻灯片中包含居中的背景图像,同时在RMarkdown和http://rmarkdown.rstudio.com/revealjs_presentation_format.html中书写

我的测试平台如下

---
title: "Attempt"
css: style.css
output: revealjs::revealjs_presentation
---

## Will this work

- Did the title slide have an image?
Run Code Online (Sandbox Code Playgroud)

style.cssas

.title {
    background-image: url(http://img1.wikia.nocookie.net/__cb20100706023807/familyguy/images/c/c7/Tauntaun.png);
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    }
Run Code Online (Sandbox Code Playgroud)

注意,.title唯一能在标题幻灯片上显示任何图像的东西.我已经根据我在SO和其他地方看到的内容尝试了一些其他组合.

.section .reveal .state-background基于Rstudio 0.98.1028,仅将背景图像添加到标题幻灯片中

.title-slide基于使用slidify将图像添加到标题幻灯片

这些都不起作用.我错过了什么吗?也许我遗漏了一个神奇的YAML选项?

rstudio knitr r-markdown reveal.js

8
推荐指数
1
解决办法
2040
查看次数

标签 统计

r-markdown ×2

knitr ×1

r ×1

reveal.js ×1

rstudio ×1

slidify ×1