Because of the picture I have at the bottom of my title slide, I want to:
title
, subtitle
and author
up from their center positions. Rlogo
in the title slide only (don't really know how to do it). I could only remove slide number for now using .title-slide .remark-slide-number { display: none; }
. Any suggestion is appreciated! Thanks!
Here is my reproducible example:
tweaks.css file
/* 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;
}
1st attempt: modified margin-top
in tweaks.css
file as mentioned in xaringan
wiki
---
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
---
Result 1:
2nd attempt: added <br>
to the title
to manually push it up but then the subtitle
and author
were also pushed down. Adding <br>
to subtitle
and author
did not help either.
---
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
---
Result 2:
Photos used
Aligning Text By default, all text in Markdown fields are aligned to the left. You can also align to the right, or center the content by wrapping the text in div tags.
You can add images to Markdown using the [alt text](image_url) syntax. Let's see how it works.
ioslides is one of the presentation format that can be easily put together using R Markdown. It has good compatibility with html, and very easy set-up.
Using seal: false
you can create a title slide that is independent from the YAML header. It often simplifies slide creation imo.
For the R logo across all slides but the title slide, create a custom div and set it as a 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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With