In xaringan, I want to add a background in the title slide. I've managed to do that following Yihui's instructions.
This works, except I loose the default fonts (Yanone Kaffeesatz).
YAML:
---
title: "My title"
subtitle: "My subtitle"
author: "Me Myself"
date: "01/01/2012"
output:
xaringan::moon_reader:
css: my-theme.css
lib_dir: libs
nature:
ratio: '16:9'
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
---
where my-theme.css
is as follows:
.title-slide {
background-image: url(Figures/MyBackground.jpg);
background-size: cover;
}
I don't recommend you to add default-fonts.css
to your my-theme.css
. If you want the default fonts, you can use
output:
xaringan::moon_reader:
css: [default, default-fonts, my-theme.css]
See more info in Section 7.5 of the R Markdown book.
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