Skip to content

Instantly share code, notes, and snippets.

@mbjoseph
Created August 22, 2016 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbjoseph/42b76cab60645c2038150c41ee54ea3a to your computer and use it in GitHub Desktop.
Save mbjoseph/42b76cab60645c2038150c41ee54ea3a to your computer and use it in GitHub Desktop.
A R markdown beamer template that doesn't suck that much.
---
title: "Your title here"
subtitle: a clever subtitle
author: "Your name"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
beamer_presentation:
latex_engine: xelatex
fonttheme: "structurebold"
header-includes:
- \usepackage{graphicx}
- \beamertemplatenavigationsymbolsempty
- \usefonttheme{professionalfonts}
- \renewcommand{\familydefault}{\sfdefault}
- \usepackage{xcolor}
- \definecolor{foreground}{RGB}{0,0,0}
- \definecolor{background}{RGB}{255,255,255}
- \definecolor{title}{RGB}{0,120,255}
- \definecolor{gray}{RGB}{155,155,155}
- \definecolor{subtitle}{RGB}{204,0,0}
- \definecolor{hilight}{RGB}{102,255,204}
- \definecolor{vhilight}{RGB}{255,111,207}
- \setbeamercolor{titlelike}{fg=title}
- \setbeamercolor{subtitle}{fg=subtitle}
- \setbeamercolor{institute}{fg=gray}
- \setbeamercolor{normal text}{fg=foreground,bg=background}
- \setbeamercolor{local structure}{fg=title}
- \setbeamertemplate{frametitle}{\begin{centering} \insertframetitle \par \end{centering}}
- \setmonofont[Scale=MatchLowercase]{Courier}
- \setmonofont[Scale=0.8]{Courier}
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
```{r cars}
summary(cars)
```
## Including Plots
You can also embed plots, for example:
```{r pressure, echo=FALSE}
plot(pressure)
```
Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment