class: middle background-image: url(data:image/png;base64,#LTU_logo.jpg) background-position: top left background-size: 30% # Slide Theme Options ## using the xaringan package ### 2021-12-03 --- # Introduction These slides provide an overview of the different available themes for the `xaringan` package. If you change the option in the line `css: [default]`, you can see how the different themes affect the slides' appearances. --- ## Example Slide This is an example slide with some R code. ```r install.packages('xaringan') #or remotes::install_github('yihui/xaringan') ``` --- # Highlights This is an example slide with some code highlights. ```r *install.packages(palmerpenguins) # missing quotation marks! install.packages("palmerpenguins") ``` --- #Sidebars .left-column[ ### Side bar example ] .right-column[ This is an example of a slide using the sidebars layout (`.left-column[]` and `.right-column[]`.) It is worth noting that several themes disable this CSS code. ] --- # Theme notes There are 41 available themes provided in the `xaringan` package. Some of these are just for the font (e.g. `chocolate-fonts`, `uwm-fonts`), while others change both the font and overall layout/appearance. I would suggest trying out the different themes yourself (via e.g. `css: [chocolate]` in the YAML metadata). I have gone through all these options and provided some notes below, but these are just my personal feelings. --- ## Potential Themes * The `default` theme is the theme used in my `xaringan` walkthrough slides - I think it's nice and clean. * I think `hygge-duke` (and `hygge`) are just the `default` theme, with a title slide that doesn't have the `inverse` property. * The `kunoichi` and `shinobi` themes are sharp, and any words enclosed in tildes are highlighted, which makes it easier to distinguish (however it would be nice to change this highlight to something darker, the yellow can get lost on the white background (or we change the background)). You would have to make some changes to the title page though, and unfortunately there is no option that I can see to just use e.g. `kunoichi-fonts`. Also, interesting, the CSS code for creating sidebars doesn't work with these themes - we need to use their own versions of these codes. * `metropolis` reminds me of some of the old `beamer` slide themes - it's quite clean and sparse. However the CSS code for creating sidebars doesn't work here either. * Using `ninjutsu` didn't change anything for me (except invalidate the sidebar CSS code) - I think you need to use specific CSS class options from this theme to see a big difference. * If we could remove the logo on the title slide, the `rutgers` theme could work - red 1 hash headings, black 2 hash headings, nice and clean. This is what I am using now (with the title slide turned off). --- ## Probably Unsuitable Themes * `tamu` is ugly - brown border and headings, brown background for title slide. * `chocolate` is ok but I think we can do better. * `lucy` isn't great - black background for everything, normal text too large. Code chunks are easy to read though. * `middlebury` is ok but doesn't really seem to offer anything different. Plus it has a logo on the title slide. * I quite like aspects of `nhsr` (the headings and font), but the code highlighting is poor, and if we use `nhsr-fonts` we lose the blue headings which I liked, while retaining the aspects I didn't like, so that was a dead-end. * `rladies` is ok but the code highlighting is poor. * The `robot` theme didn't seem to offer much except pink code highlights, which didn't look great. * `fc` has a minimalist theme which I quite like, but code chunks and highlighting are not as distinct as in other themes. Also, interesting, the CSS code for creating sidebars doesn't work for this theme. --- ## Unsuitable Themes * `uwm` is for the University of Wisconsin-Madison, and has their logo. * `useR` has the useR! image on every slide. * `uol` is for the University of Leicester, and has their logo. * `uo` is for the University of Oregon, and has their logo. * `uio` doesn't seem to work - title slide is black. * `duke-blue` has strange headings - they have a glow/drop-shadow that makes them seem slightly out of focus. * For the same reason, I would ignore `glasgow_template` - if anything it's worse than `duke-blue`. * `ki` is for the Karolinska Institute, and has their logo. The code highlighting is also not great. *Note: If you liked the font for any of these, you could just use the font, e.g. `uwm-fonts`* --- # Conclusion Overall, I would say that, in the interests of time, it might be best to simply stick to the default theme (or if you like the theme of these slides, consider using the `rutgers` theme). None of the other themes provided in the `xaringan` package appeared clearly better than the default theme. I understand that some themes, like Emi Tanaka's `kunoichi` theme, could be used to create amazing slides, but that would involve spending a while learning all the particulars of the CSS options she includes in her themes, e.g. `shuriken`, `blade`, etc.