2020-04-09 02:07:05 +02:00
## binb: Binb is not Beamer
2018-09-18 03:36:22 +02:00
2020-12-19 21:39:32 +01:00
[![CI ](https://github.com/eddelbuettel/binb/workflows/ci/badge.svg )](https://github.com/eddelbuettel/binb/actions?query=workflow%3Aci)
2024-07-14 14:54:04 +02:00
[![Package-License ](https://img.shields.io/badge/license-GPL--2-brightgreen.svg?style=flat )](https://www.gnu.org/licenses/gpl-2.0.html)
[![CRAN ](https://www.r-pkg.org/badges/version/binb )](https://cran.r-project.org/package=binb)
2024-05-18 15:19:17 +02:00
[![Dependencies ](https://tinyverse.netlify.app/badge/binb )](https://cran.r-project.org/package=binb)
2024-07-14 14:54:04 +02:00
[![Downloads ](https://cranlogs.r-pkg.org/badges/binb?color=brightgreen )](https://www.r-pkg.org:443/pkg/binb)
2020-04-09 02:04:05 +02:00
[![Last Commit ](https://img.shields.io/github/last-commit/eddelbuettel/binb )](https://github.com/eddelbuettel/binb)
2018-09-18 03:36:22 +02:00
### Motivation
The [Beamer ](https://github.com/josephwright/beamer ) package is very popular for making pdf
2018-09-20 13:11:43 +02:00
presentations from LaTeX, and also supported from Markdown and
[RMarkdown ](https://github.com/rstudio/rmarkdown ). This package (currently)
2018-09-25 02:41:47 +02:00
provides functionality to use the following custom (LaTeX) themes for
2018-10-09 05:50:18 +02:00
[Beamer ](https://github.com/josephwright/beamer ) directly via RMarkdown:
2018-09-25 02:41:47 +02:00
2018-09-18 03:36:22 +02:00
- [Metropolis ](https://github.com/matze/mtheme ) (formerly `mtheme` ) by Matthias Vogelgesang
2018-09-25 02:41:47 +02:00
([longer demo](https://eddelbuettel.github.io/binb/metropolis_demo.pdf))
2018-09-18 03:36:22 +02:00
- [IQSS ](https://github.com/IQSS/iqss-beamer-theme ) by Ista Zahn
2018-09-25 02:41:47 +02:00
([longer demo](https://eddelbuettel.github.io/binb/iqss_demo.pdf))
- [Presento ](https://github.com/RatulSaha/presento ) by Ratul Saha
([longer demo](https://eddelbuettel.github.io/binb/presento_demo.pdf))
2018-10-15 13:59:54 +02:00
- [Monash ](https://github.com/robjhyndman/MonashEBSTemplates ) by Rob J Hyndman
2019-11-02 12:33:50 +01:00
(longer demos [one ](https://eddelbuettel.github.io/binb/monashDemo.pdf ) and
[two ](https://eddelbuettel.github.io/binb/monashOptions.pdf ))
2018-09-18 03:36:22 +02:00
2018-09-25 02:41:47 +02:00
The original LaTeX styles been converted to be directly useable from
[RMarkdown ](https://github.com/rstudio/rmarkdown )
2018-09-18 03:36:22 +02:00
2018-09-25 02:41:47 +02:00
### Examples
2018-09-18 03:36:22 +02:00
#### Metropolis
Consider the following minimal example, adapted from the original minimal example at the bottom of
the [Metropolis ](https://github.com/matze/mtheme ) page:
````{md}
---
title: A minimal example
author: Matthias Vogelgesang
date: \today
institute: Centre for Modern Beamer Themes
output: binb::metropolis
---
# First Section
## First Frame
Hello, world!
````
2018-09-27 16:26:14 +02:00
It creates a [three-page pdf file ](https://eddelbuettel.github.io/binb/metropolis_minimal.pdf ) which
we converted into this animated gif
2018-09-18 03:36:22 +02:00
2018-09-19 16:52:35 +02:00
![](https://eddelbuettel.github.io/binb/metropolis_minimal.gif)
2018-09-18 03:36:22 +02:00
#### IQSS
Similarly, for IQSS we use the following input adapting the example above but showing sections and
subsections for the nice headings it generates:
````{md}
---
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!
````
2018-09-27 16:26:14 +02:00
This creates this [pdf file ](https://eddelbuettel.github.io/binb/iqss_minimal.pdf ) which we
converted into this animated gif:
2018-09-18 03:36:22 +02:00
2018-09-19 16:52:35 +02:00
![](https://eddelbuettel.github.io/binb/iqss_minimal.gif)
2018-09-18 03:36:22 +02:00
2018-09-25 02:41:47 +02:00
#### Presento
The following small example adapted some of the slides from original minimal example from the
[Presento ](https://github.com/RatulSaha/presento ) repo:
```{md}
---
author: Ratul Saha
address: www.ratulsaha.com
title: PRESENTO
subtitle: clean, simple and extensible
date: \today
output: binb::presento
---
## Presento
- \begin{center}\largetext{The design is \underline{clean}}\end{center} \bigskip
- \begin{center}\largetext{The rules are \underline{simple}}\end{center} \bigskip
- \item \begin{center}\largetext{The code is \underline{extensible}}\end{center}
## Open Source Fonts
- \montserratfont This is \textsc{Montserrat} \bigskip
- \notosansfont This is \textsc{Noto Sans} \bigskip
- \latolightfont This is Lato (light) \bigskip
- \inconsolatafont This is inconsolata \bigskip
- \textsc{This is Alegreya Sans small caps} \bigskip
## Color Palette
\begin{center}
\crule[colordgray] \crule[colorhgray] \crule[colorblue] \crule[colorgreen] \crule[colororange]
\end{center}
____
\begin{center}
2018-10-09 05:50:18 +02:00
\hugetext{BIG BOLD TEXT}
\medskip
2018-09-25 02:41:47 +02:00
\small but background color does not work
\end{center}
____
\tikz[overlay,remember picture] \node[opacity=0.8, at=(current page.center)]{%
\includegraphics[width=\paperwidth]{images/skeleton}};
\begin{textblock}{7}(7,2.5)
{\color{colorblue}\hugetext{\textbf{RUN!}}}
\end{textblock}
```
2018-09-27 16:26:14 +02:00
From this, one can creats this [pdf file ](https://eddelbuettel.github.io/binb/presento_minimal.pdf )
which can be converted into this animated gif:
2018-09-25 02:41:47 +02:00
![](https://eddelbuettel.github.io/binb/presento_minimal.gif)
2018-10-11 04:20:34 +02:00
### Monash
2019-11-02 12:33:50 +01:00
Below is an example of the [Monash Business School ](https://www.monash.edu/business ) theme
by [Rob Hyndman ](https://robjhyndman.com/ ). There also two longer Monash demos included in the
package: [longer demo ](https://eddelbuettel.github.io/binb/monashDemo.pdf ) and [options
demo](https://eddelbuettel.github.io/binb/monashOptions.pdf).
(The source is a little longer [and included in the
2018-10-11 04:20:34 +02:00
repo](https://github.com/eddelbuettel/binb/blob/master/inst/rmarkdown/templates/monash/skeleton/skeleton.Rmd)
and package so not shown here.)
![](https://eddelbuettel.github.io/binb/monash_minimal.gif)
2018-10-09 05:50:18 +02:00
2018-09-18 03:36:22 +02:00
### Status
2018-09-25 02:41:47 +02:00
The package is fairly new and susceptible to change, but on
2018-09-20 13:11:43 +02:00
[CRAN ](https://cran.r-project.org/ ).
2018-09-18 03:36:22 +02:00
2018-10-09 05:50:18 +02:00
### Usage
2018-09-18 03:36:22 +02:00
2018-09-20 13:11:43 +02:00
The package is on [CRAN ](https://cran.r-project.org/ ) and can be installed
via a standard
2018-09-18 03:36:22 +02:00
```r
2018-09-20 13:11:43 +02:00
install.packages("binb")
2018-09-18 03:36:22 +02:00
```
2018-09-20 13:11:43 +02:00
and can then be used as a Markdown template via RStudio, or via code such as
2018-09-18 03:36:22 +02:00
```r
library(rmarkdown)
draft("myslides.Rmd", template="metropolis", package="binb", edit=FALSE)
setwd("myslides") ## template creates a new subdir
render("myslides.Rmd")
```
2018-09-20 13:11:43 +02:00
to create a first draft of a new `myslides.Rmd` .
2018-09-18 03:36:22 +02:00
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`).
2018-09-25 02:41:47 +02:00
The [Metropolis ](https://github.com/matze/mtheme ) 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 ](https://github.com/IQSS/iqss-beamer-theme ) and the [Presento
Theme](https://github.com/RatulSaha/presento) are included (and adapted for
2018-09-18 03:36:22 +02:00
[RMarkdown ](https://github.com/rstudio/rmarkdown ) use).
2018-09-25 02:41:47 +02:00
These themes use additional (free) fonts you may need to install:
2018-09-18 03:36:22 +02:00
- [Metropolis ](https://github.com/matze/mtheme ) wants [Fira Sans ](https://github.com/mozilla/Fira )
but can proceed with alternate fonts;
2018-10-02 16:51:33 +02:00
- [IQSS Beamer Theme ](https://github.com/IQSS/iqss-beamer-theme ) wants
2024-07-06 17:32:59 +02:00
[Libertinus ](https://github.com/alerque/libertinus ), see the
2018-09-18 03:36:22 +02:00
[IQSS Beamer Theme ](https://github.com/IQSS/iqss-beamer-theme ) page for details.
2018-10-09 05:50:18 +02:00
- [Presento Theme ](https://github.com/RatulSaha/presento ) wants
[Montserrat ](https://github.com/JulietaUla/Montserrat ),
2024-07-14 14:54:04 +02:00
[Lato Light ](https://www.latofonts.com/ )
2018-09-25 02:41:47 +02:00
(also [here ](https://github.com/google/fonts/tree/master/ofl/lato )),
2024-07-06 17:32:59 +02:00
[Noto Sans ](https://fonts.google.com/noto ),
2018-10-09 05:50:18 +02:00
[Algreya Sans ](https://github.com/huertatipografica/Alegreya-Sans ) as the small caps font and
2018-09-25 02:41:47 +02:00
[Inconsolata ](https://github.com/google/fonts/tree/master/ofl/inconsolata ) as a monospaced font.
2018-10-15 13:59:54 +02:00
- [Monash ](https://github.com/robjhyndman/MonashEBSTemplates ) wants [Carlito ](https://fontlibrary.org/en/font/carlito ) which some systems (such as Ubuntu)
2018-10-11 04:20:34 +02:00
provide.
2018-09-25 02:41:47 +02:00
2024-07-06 17:32:59 +02:00
If you use [Debian ](https://www.debian.org ) or [Ubuntu ](https://ubuntu.com/ ), you can
2018-09-25 02:41:47 +02:00
use the informal font packages I created for [Fira and Fira
Sans](https://github.com/eddelbuettel/pkg-fonts-fira),
[Libertinus ](https://github.com/eddelbuettel/pkg-fonts-libertinus ),
[Montserrat ](https://github.com/eddelbuettel/pkg-fonts-montserrat ), [Alegreya
Sans](https://github.com/eddelbuettel/pkg-fonts-alegreya-sans), respectively.
Most modern desktop systems make it easy to install additional fonts as a user. However,
instructions vary so please see for your particular system.
2018-09-18 03:36:22 +02:00
2019-10-27 13:10:45 +01:00
### See Also
- [linl ](https://github.com/eddelbuettel/linl ): Linl is not Letter: LaTeX letters from RMarkdown
- [pinp ](https://github.com/eddelbuettel/pinp ): Pinp is not PNAS: Snazzy one-or two column short papers or vignettes
- [tint ](https://github.com/eddelbuettel/tint ): tint is not tufte: Beautiful pdf or html handout or writeups
and the [minm ](https://github.com/eddelbuettel/minm ) package installing all of them.
2018-09-18 03:36:22 +02:00
### Authors
2018-10-11 04:20:34 +02:00
Dirk Eddelbuettel, Ista Zahn and Rob Hyndman
2018-09-18 03:36:22 +02:00
### License
2018-10-11 04:20:34 +02:00
GPL (>= 2) for this package.