17

由于标题幻灯片底部的图片,我想

  • 移动所有title,subtitleauthor从它们的中心位置向上移动。
  • 仅删除Rlogo标题幻灯片中的 (真的不知道该怎么做)。我现在只能删除幻灯片编号,使用.title-slide .remark-slide-number { display: none; }.

任何建议表示赞赏!谢谢!

这是我的可重现示例:

调整.css 文件

/* for logo and slide number in the footer */
.remark-slide-content:after {
    content: "";
    position: absolute;
    bottom: 15px;
    right:   8px;
    height: 40px;
    width: 120px;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("Rlogo.png");
}

/* for background image in title slide */
.title-slide {
  background-image: url("slideMasterSample.png");
  background-size: cover;
}

.title-slide h1 {
  color: #F7F8FA;
  margin-top: -170px;
}

.title-slide h2, .title-slide h3 {
  color: #e7e8e2; 
  line-height: 1.0em;
  margin-top: -75px;
}

.title-slide .remark-slide-number {
  display: none;
}

第一次尝试:在wiki中提到的文件中margin-top修改tweaks.cssxaringan

---
title: "Presentation Ninja"
subtitle: "xaringan"
author: "Author"
output:
  xaringan::moon_reader:
    lib_dir: libs
    css: ["default", "tweaks.css"]
    nature:
      highlightStyle: github
      highlightLines: true
      countIncrementalSlides: false
---

结果 1

结果 1

第二次尝试:添加<br>title手动将其向上推,但随后subtitleauthor被向下推。添加<br>subtitle没有author帮助。

---
title: "Presentation Ninja<br><br><br><br><br><br>"
subtitle: "xaringan"
author: "Author"
output:
  xaringan::moon_reader:
    lib_dir: libs
    css: ["default", "tweaks.css"]
    nature:
      highlightStyle: github
      highlightLines: true
      countIncrementalSlides: false
---

结果 2

结果 2

使用的照片

slideMasterSample.png Rlogo.png

4

1 回答 1

26

使用seal: false您可以创建独立于 YAML 标头的标题幻灯片。它通常简化了 imo 幻灯片创建。

对于除标题幻灯片之外的所有幻灯片中的 R 徽标,创建自定义 div 并将其设置为layout.

在此处输入图像描述在此处输入图像描述

CSS:

.title-slide {
  background-image: url("slideMasterSample.png");
  background-size: cover;
}
.title-slide h1, h2, h3 {
  text-align: center;
  color: #F7F8FA;
}

.title-slide .remark-slide-number {
  display: none;
}

div.my-footer {
content: "";
    position: absolute;
    bottom: 15px;
    right:   8px;
    height: 40px;
    width: 120px;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("Rlogo.png");
}

rmd:

---
title: "Presentation Ninja"
subtitle: "xaringan"
author: "Author"
output:
  xaringan::moon_reader:
    lib_dir: libs
    css: ["tweaks.css", "default"]
    nature:
      highlightStyle: github
      highlightLines: true
      countIncrementalSlides: false
    seal: false
---

```{r setup, include=FALSE}
options(htmltools.dir.version = FALSE)
```

class: title-slide   

# Header 1

## Header 2  

### Header 3 

---

layout: true

<div class="my-footer"></div>       

---

# new slide 1

---

# new slide 2
于 2018-02-27T21:46:11.840 回答