0

I am using the metropolis theme in a xaringan presentation. I would like to be able to negate the theme for a couple slides, or alternatively, use a new theme for some other slides.

Most importantly, I want to be able to get a "blank white" slide with no overhead padding/colors/anything.

So far, I have tried fiddling around with some css from other questions here and here.

(EDIT: added content below)

As of now, I have tried to create a new slide-style by creating a new CSS file, saving it in the same folder as my rmarkdown file, and calling it in the YAML:

----
title: "The Effect of X"
subtitle: "Conference"
author: ""
institute: ""
date: "6/9/2023"
output:
  xaringan::moon_reader:
    css: [default, metropolis, metropolis-fonts, "fullfigure.css"] 
    lib_dir: libs
    nature:
      ratio: "16:9"
      highlightStyle: github
      highlightLines: true
      countIncrementalSlides: false
editor_options: 
  chunk_output_type: inline

The CSS file (fullfigure.css) has the following code in it:

.remark-slide-content.full-slide-fig{
  padding: 0px 0px 0px 0px;
  width: 100%;}

I have tried using this to create a "full picture" slide by creating a new slide with the class full-slide-fig:

---
class: full-slide-fig
background-image: url("libs/figures/shotspot_works.png")
background-size: cover
---

However, this still gives me a blue overhead that cuts off part of the image.

mikeytop
  • 150
  • 9
  • Can you share an example, including what you have tried so far? I would suggest looking at defining a custom class as per this answer: https://stackoverflow.com/questions/73236486/how-to-change-font-style-size-and-color-in-xaringan-slide – nrennie Jun 02 '23 at 20:22
  • I have edited the original post to further explain what I have tried. – mikeytop Jun 02 '23 at 20:34
  • see discussion here, plz: https://github.com/yihui/xaringan/issues/5 (BTW, you can "black out" any slide during presentation with the B-key) – I_O Jun 02 '23 at 21:39
  • This discussion is only for the title slide, and not a general solution for any slide. – mikeytop Jun 03 '23 at 01:06
  • Turns out you can use `class: clear` to do this in the metropolis theme. This solves the problem. – mikeytop Jun 03 '23 at 08:21

1 Answers1

0

Use class: clear to do this in the metropolis theme. See https://github.com/pat-s/xaringan-metropolis.

mikeytop
  • 150
  • 9