Code Monkey home page Code Monkey logo

youngmetro's Introduction

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.

youngmetro's People

Contributors

aaronbaggett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

youngmetro's Issues

title graphic too close to the right edge

Hi, thanks for creating the template. I replaced the stock title graphic with my own but I find it to be placed too close to the right-hand edge of the slide. I think it would look neater if there was a similar amount of white space as on the left edge. There is also the danger that on some projectors/screens the edges of the slides might not be visible. Is there an easy way to fix this and/or manipulate the distance of the graphic from the edge?

names within the R chunk

\scriptsize

some_vector <- c("Erik", "Statistiker")
names(some_vector) <- c("Name", "Profession")

some_vector

this small chunk comes out wrong in the pdf output. It writes
n (some_vector) <- c("Name", "Profession")
instead of
names(some_vector) <- c("Name", "Profession")

.Not sure if it related to your beamer template or not.

skarmavbild 2018-03-08 kl 17 38 45

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.