rxaringan

How can I disregard the theme for 1 slide in xaringan?


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.


Solution

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