1
0
mirror of https://github.com/eddelbuettel/binb synced 2024-11-01 01:08:44 +01:00
binb/README.md
Dirk Eddelbuettel 5b138a1c47 release 0.0.1
2018-09-20 06:11:43 -05:00

4.3 KiB

binb Build Status Package-License CRAN Downloads

Binb is not Beamer: Stylish pdf Presentation from RMarkdown

Motivation

The Beamer package is very popular for making pdf presentations from LaTeX, and also supported from Markdown and RMarkdown. This package (currently) provides functionality to use two custom (LaTeX) themes for Beamer directly via RMarkdown:

  • Metropolis (formerly mtheme) by Matthias Vogelgesang
  • IQSS by Ista Zahn

The original LaTeX styles been converted to be directly useable from RMarkdown

Example

Metropolis

Consider the following minimal example, adapted from the original minimal example at the bottom of the Metropolis page:

---
title: A minimal example
author: Matthias Vogelgesang
date: \today
institute: Centre for Modern Beamer Themes
output: binb::metropolis
---

# First Section

## First Frame

Hello, world!

It creates a three-page pdf file which we converted into this animated gif (which loses font crispness, sadly):

IQSS

Similarly, for IQSS we use the following input adapting the example above but showing sections and subsections for the nice headings it generates:

---
title: A minimal example
author: Ista Zahn
date: \today
institute: IQSS
output: binb::iqss
---

# First Section

## First Sub-Section

### First Frame

Hello, world!

# Second Section

## Second Subsection

### Second Frame

Another planet!

This creates this pdf file which we converted into this animated gif (also losing font crispness):

Status

The package is (currently) fairly new and susceptible to change, but on CRAN.

Usage

The package is on CRAN and can be installed via a standard

install.packages("binb")

and can then be used as a Markdown template via RStudio, or via code such as

library(rmarkdown)
draft("myslides.Rmd", template="metropolis", package="binb", edit=FALSE)
setwd("myslides")  ## template creates a new subdir
render("myslides.Rmd")

to create a first draft of a new myslides.Rmd.

Once installed, the above code examples should work as expected.

Requirements

Beyond the R package dependencies, a working pandoc binary is needed. RStudio installs its own copy, otherwise do what is needed on your OS (i.e., something like sudo apt-get install pandoc pandoc-citeproc).

The Metropolis LaTeX package is used, but we assume that is is installed via TeXLive, MikTeX or another LaTeX bundle. The LaTeX code for the IQSS Beamer Theme is included (adapted for RMarkdown use).

These themse use additional fonts you may need to install:

If you use Debian or Ubuntu, you can use the informal font packages I created for Fira and Fira Sans and Libertinus, respectively.

Authors

Dirk Eddelbuettel and Ista Zahn.

License

GPL-2 for this package.