diff --git a/.Rbuildignore b/.Rbuildignore index 7a05ef5..90dee8e 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -5,3 +5,4 @@ ^docs ^vignettes/.*_cache ^vignettes/.*_files +^.travis.yml$ diff --git a/ChangeLog b/ChangeLog index 177c51e..14c0004 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2018-09-19 Dirk Eddelbuettel + * DESCRIPTION (Date, Version): Initial release 0.0.1 + + * R/binb.R: Expanded manual page + * inst/iqssDemo/: Move iqss vignette material here as vignette processing requires the Libertinus font which may not be present diff --git a/DESCRIPTION b/DESCRIPTION index 5541ce3..62cf73b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,15 +1,16 @@ Package: binb Type: Package Title: 'binb' is not 'Beamer' -Version: 0.0.0 -Author: Dirk Eddelbuettel +Version: 0.0.1 +Date: 2018-09-19 +Author: Dirk Eddelbuettel and Ista Zahn Maintainer: Dirk Eddelbuettel Description: A collection of 'LaTeX' styles using 'Beamer' customization for - pdf-based presentation slides in RMarkdown. At present it contains RMarkdown - adaptations of the LaTeX themes 'Metropolis' (formerly 'mtheme') theme by - Matthias Vogelgesang and others (now included in TeXLive), and the 'IQSS' by - Ista Zahn (which is included here). Additional (free) fonts may be required: - 'Metropolis' prefers 'Fira', and 'IQSS' requires 'Libertinus'. + pdf-based presentation slides in 'RMarkdown'. At present it contains + 'RMarkdown' adaptations of the LaTeX themes 'Metropolis' (formerly 'mtheme') + theme by Matthias Vogelgesang and others (now included in 'TeXLive'), and + the 'IQSS' by Ista Zahn (which is included here). Additional (free) fonts + may be needed: 'Metropolis' prefers 'Fira', and 'IQSS' requires 'Libertinus'. URL: https://github.com/eddelbuettel/binb BugReports: https://github.com/eddelbuettel/binb/issues Imports: rmarkdown, knitr diff --git a/R/binb.R b/R/binb.R index 9f83701..6346949 100644 --- a/R/binb.R +++ b/R/binb.R @@ -3,8 +3,12 @@ ##' and the \sQuote{IQSS} style by Ista Zahn and Gary King. ##' ##' Note that not all options and customizations available at the LaTeX -##' level are implemented or supported yet. +##' level are implemented or supported yet. A number of styling options +##' could be exposed by setting YAML meta-data in the header for either +##' style. This needs more testing and documentation. +##' ##' @title Binb is not Beamer - PDF Presentation Themes +##' ##' @param toc A logical variable defaulting to \code{FALSE}. ##' @param slide_level A numeric variable defaulting to two for ##' \sQuote{Metrpolis} and three for \sQuote{IQSS}. @@ -24,8 +28,23 @@ ##' @param includes An optional character variable defaulting to \code{NULL}. ##' @param md_extensions An optional character variable defaulting to \code{NULL}. ##' @param pandoc_args An optional character variable defaulting to \code{NULL}. -##' @return RMarkdown content processed for rendering. +##' +##' @section IQSS Details: We currently set \code{slide_level} to three to use +##' the same appearance as the LaTeX demo. This means section and sub-section headers +##' use one and two hash marks, new slides use three, and \dQuote{box} environments +##' start with four. More commonly, Beamer theme use two and work without subsections. +##' +##' @seealso Three other packages also offer RMarkdown interfaces to LaTeX +##' (or HTML) content: \code{\link[tint]{tint}} for Tufte-style pdf and html, +##' \code{\link[pinp]{pinp}} for two-column pdf vignettes, and +##' \code{\link[linl]{linl}} for LaTeX letters. +##' +##' @return RMarkdown content processed is returned for use by the +##' \code{\link[rmarkdown]{render}} function but the function is invoked +##' for it side effect of creating the pdf file. +##' ##' @author Dirk Eddelbuettel +##' ##' @examples ##' \dontrun{ ##' library(rmarkdown) diff --git a/README.md b/README.md index 350197e..088fa87 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,10 @@ Binb is not Beamer: Stylish pdf Presentation from RMarkdown ### Motivation The [Beamer](https://github.com/josephwright/beamer) package is very popular for making pdf -presentation from LaTeX, and also supported from Markdown and -[RMarkdown](https://github.com/rstudio/rmarkdown). This package provides two custom (LaTeX) themes -for [Beamer](https://github.com/josephwright/beamer) adapted for RMarkdown use: +presentations from LaTeX, and also supported from Markdown and +[RMarkdown](https://github.com/rstudio/rmarkdown). This package (currently) +provides functionality to use two custom (LaTeX) themes for +[Beamer](https://github.com/josephwright/beamer) directly via RMarkdown: - [Metropolis](https://github.com/matze/mtheme) (formerly `mtheme`) by Matthias Vogelgesang - [IQSS](https://github.com/IQSS/iqss-beamer-theme) by Ista Zahn @@ -82,18 +83,19 @@ animated gif (also losing font crispness): ### Status -The package is (currently) fairly new and not yet on [CRAN](https://cran.r-project.org/). +The package is (currently) fairly new and susceptible to change, but on +[CRAN](https://cran.r-project.org/). ### Usage -As the package is not yet CRAN, you must install from GitHub _e.g._ via +The package is on [CRAN](https://cran.r-project.org/) and can be installed +via a standard ```r -install.packages("remotes") # if needed -remotes::install_github("eddelbuettel/binb") +install.packages("binb") ``` -to install it from CRAN, and then use as a Markdown template via RStudio, or use code such as +and can then be used as a Markdown template via RStudio, or via code such as ```r library(rmarkdown) @@ -102,7 +104,7 @@ setwd("myslides") ## template creates a new subdir render("myslides.Rmd") ``` -to create a first draft of a new `myslides.Rmd`. +to create a first draft of a new `myslides.Rmd`. Once installed, the above code examples should work as expected. @@ -131,7 +133,7 @@ and [Libertinus](https://github.com/eddelbuettel/pkg-fonts-libertinus), respecti ### Authors -Dirk Eddelbuettel wrote this package. Ista Zahn authored the included IQSS Beamer Theme. +Dirk Eddelbuettel and Ista Zahn. ### License diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd new file mode 100644 index 0000000..1cf9e73 --- /dev/null +++ b/inst/NEWS.Rd @@ -0,0 +1,10 @@ +\name{NEWS} +\title{News for Package \pkg{binb}} +\newcommand{\ghpr}{\href{https://github.com/eddelbuettel/binb/pull/#1}{##1}} +\newcommand{\ghit}{\href{https://github.com/eddelbuettel/binb/issues/#1}{##1}} + +\section{Changes in binb version 0.0.1 (2018-09-19)}{ + \itemize{ + \item Initial CRAN release supporting Metropolis and IQSS + } +} diff --git a/man/metropolis.Rd b/man/metropolis.Rd index e216ac9..ea4a193 100644 --- a/man/metropolis.Rd +++ b/man/metropolis.Rd @@ -59,7 +59,9 @@ iqss(toc = FALSE, slide_level = 3, incremental = FALSE, \item{pandoc_args}{An optional character variable defaulting to \code{NULL}.} } \value{ -RMarkdown content processed for rendering. +RMarkdown content processed is returned for use by the +\code{\link[rmarkdown]{render}} function but the function is invoked +for it side effect of creating the pdf file. } \description{ Templates for RMarkdown-based Beamer PDF presentations supporting @@ -68,8 +70,17 @@ and the \sQuote{IQSS} style by Ista Zahn and Gary King. } \details{ Note that not all options and customizations available at the LaTeX -level are implemented or supported yet. +level are implemented or supported yet. A number of styling options +could be exposed by setting YAML meta-data in the header for either +style. This needs more testing and documentation. } +\section{IQSS Details}{ + We currently set \code{slide_level} to three to use +the same appearance as the LaTeX demo. This means section and sub-section headers +use one and two hash marks, new slides use three, and \dQuote{box} environments +start with four. More commonly, Beamer theme use two and work without subsections. +} + \examples{ \dontrun{ library(rmarkdown) @@ -78,6 +89,12 @@ setwd("myslides") ## template creates a new subdir render("myslides.Rmd") } } +\seealso{ +Three other packages also offer RMarkdown interfaces to LaTeX +(or HTML) content: \code{\link[tint]{tint}} for Tufte-style pdf and html, +\code{\link[pinp]{pinp}} for two-column pdf vignettes, and +\code{\link[linl]{linl}} for LaTeX letters. +} \author{ Dirk Eddelbuettel }