+ - 0:00:00
Notes for current slide
Notes for next slide

Contribute to Open Source with Pretty Slides

(And a short preview of a WIP package)

Daniel Anderson

June 2, 2018

1 / 14

xaringan

/ʃæ.'riŋ.ɡæn/

2 / 14

What it is

  • HTML-based slides
  • Produced with R Markdown
  • Styled with CSS

Slides available at datalorax.com/talks/cascadia18

3 / 14

Themes

This is the uo theme See All the available themes with xaringan:::list_css()

names(xaringan:::list_css())
## [1] "default-fonts" "default" "duke-blue"
## [4] "hygge-duke" "hygge" "metropolis-fonts"
## [7] "metropolis" "rladies-fonts" "rladies"
## [10] "robot-fonts" "robot" "rutgers-fonts"
## [13] "rutgers" "tamu-fonts" "tamu"
## [16] "uo-fonts" "uo"

Slides available at datalorax.com/talks/cascadia18

4 / 14

Specify a theme

Default YAML

---
title: "Presentation Ninja"
subtitle: "⚔<br/>with xaringan"
author: "Yihui Xie"
date: "2016/12/12"
output:
xaringan::moon_reader:
lib_dir: libs
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
---

Add a theme

---
title: "Presentation Ninja"
subtitle: "⚔<br/>with xaringan"
author: "Yihui Xie"
date: "2016/12/12"
output:
xaringan::moon_reader:
css: ["default", "uo", "uo-fonts"]
lib_dir: libs
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
---

Slides available at datalorax.com/talks/cascadia18

5 / 14

Where do the themes live?

CSS Files

Slides available at datalorax.com/talks/cascadia18

6 / 14

How do you contribute your own theme?


My advice

  1. Start with an existing theme
  2. Modify the CSS
    • Change colors!
    • Change fonts! (see here, import fonts with google fonts)
    • Consider changes to the background

Slides available at datalorax.com/talks/cascadia18

7 / 14

Look at CSS for existing themes

8 / 14

Basically this

Slides available at datalorax.com/talks/cascadia18

9 / 14

Once you've settled on a theme

  1. Pull out just the parts of your theme that are different from the default theme
    • Name the css file what you want your theme to be called (keep it simple and all lower case)
  2. Put all of your fonts in a separate file, called themename-fonts.css.

Slides available at datalorax.com/talks/cascadia18

10 / 14

Once you've settled on a theme

  1. Pull out just the parts of your theme that are different from the default theme
    • Name the css file what you want your theme to be called (keep it simple and all lower case)
  2. Put all of your fonts in a separate file, called themename-fonts.css.

Slides available at datalorax.com/talks/cascadia18

When you're sure you're ready to contribute

  1. Fork the xaringan repo, and clone your fork locally.
  2. Add your css files to xaringan/inst/rmarkdown/templates/xaringan/resources
  3. Push the files to your fork
  4. Submit a PR
10 / 14

Quick new package preview

Slides available at datalorax.com/talks/cascadia18

11 / 14

slidex

https://github.com/datalorax/slidex

Transition PowerPoint slides to xaringan slides

  • Currently exports one function:
convert_pptx("path/to/pptx", author = "Your Name")

Slides available at datalorax.com/talks/cascadia18

12 / 14

slidex

https://github.com/datalorax/slidex

Transition PowerPoint slides to xaringan slides

  • Currently exports one function:
convert_pptx("path/to/pptx", author = "Your Name")

Slides available at datalorax.com/talks/cascadia18

  • Still a WIP - not perfect but can do a lot
    • Maintains bulleting (basically)
    • Maintains and reproduces tables
    • Maintains images
    • Maintains links
    • Easy selection of existing themes (additional theme argument).
12 / 14
13 / 14

xaringan

/ʃæ.'riŋ.ɡæn/

2 / 14
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow