/youngmetro

R Markdown Beamer Theme Based on sthlm, HSRM, and Metropolis themes

Primary LanguageTeXOtherNOASSERTION

youngmetro

Build Status


Way too many questions you must think I trust you
You searching for answers I do not know nothing


Overview 🏙️

The youngmetro package is a semi-custom beamer theme for use in RStudio via R Markdown. This theme borrows heavily from the HSRM, sthlm, and Metropolis Beamer themes.

Installation 🔌

if (!require("devtools")) {
  install.packages("devtools", dependencies = TRUE) 
}
devtools::install_github("aaronbaggett/youngmetro")

Usage 💻

RStudio

The youngmetro theme is designed to be used primarily within RStudio. Once installed, select File > New File > R Markdown > From Template > youngmetro. After naming and selecting a location for your prestnation, a new R Markdown document will open in the Source pane. This document contains some basic information that you will want to update (see Front Matter below).

R

The following should work if you would like to use youngmetro outside of RStudio:

rmarkdown::draft("slide_deck.Rmd", template = "metro_beamer", package = "youngmetro")

rmarkdown::render("slide_deck.Rmd")

Front Matter

The Pandoc YAML is pre-populated with the following:

---
title: "Presentation Title"
shorttitle: "Short Title"
subtitle: "Presentation Subtitle"
author: "Aaron R. Baggett, Ph.D."
short-author: "Baggett"
date: '`r format(Sys.Date(), "%B %d, %Y")`'
short-date: '`r format(Sys.Date(), "%m/%d/%y")`'
institute: | 
  | University of Mary Hardin-Baylor
  | PSYC XXXX: COURSE TITLE
short-institute: "PSYC XXXX"
department: "Department of Psychology" # Institute must be defined
mainfont: Roboto
monofont: Lucida Console
monofont: Lucida Console
fontsize: 14pt
classoption: aspectratio = 1610
output: 
   youngmetro::metro_beamer
---

Title Graphic

I designed this slide deck to pretty much serve myself. I wanted an easy way to generate custom .Rmd Beamer slides for my classes. That said, you probably want to swap out the example image for your own university’s logo. Until I come up with a better solution, you will need to do the following:

  1. Rename your title graphic to title_graphic
  2. Place your title_graphic in the figs folder
  3. Accept replacement warning

That should do the trick.

Figures

Place all figures in the figs folder and refer directly to the filename with no directory mapping required. For example:

\includegraphics{file_name.EXT}

XeLaTeX

youngmetro uses XeLaTeX as the default TeX typesetting engine. Just comment out the mainfont: and monofont options in the front matter. This should revert back to Pandoc’s defaults.

---
# mainfont: Roboto
# monofont: Lucida Console
---

Note: Roboto can be downloaded free from Google Fonts here.

Emoji

There’s not really an easy way to add emoji to pdf LaTeX documents 😡. Most packages require including emoji as essentially .png or .pdf files 🤕. Unfortunately, at the moment, the emo package does not provide functionality for pdf documents. One alternative would be to use one of several emoji extractors. Even still, you are forced to include emoji as an image. One problem with this method is that, althogh the emoji images are fairly high-resolution, they are named in sequential order. In other words, the Unicode characters are lost in the file names, which makes it difficult to search for the emoji you want.