Skip to content

Commit

Permalink
Merge pull request #11 from robjhyndman/master
Browse files Browse the repository at this point in the history
Added color option to monash
  • Loading branch information
eddelbuettel committed Oct 10, 2018
2 parents 65d58df + d726a9f commit c67b911
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 38 deletions.
7 changes: 4 additions & 3 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2018-10-09 Rob Hyndman <rob.hyndman@monash.edu>

* Added Monash theme

2018-10-02 Ista Zahn <istazahn@gmail.com>

* inst/iqssDemo/beamerfontthemeiqss.sty: Fall back to default font
Expand Down Expand Up @@ -108,6 +112,3 @@
Example skeleton taken from my samples=rmarkdown-metropolis repo
* inst/rmarkdown/templates/metropolis/resources/template.tex:
Generic template for beamer presentations



9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ Type: Package
Title: 'binb' is not 'Beamer'
Version: 0.0.2
Date: 2018-09-27
Author: Dirk Eddelbuettel and Ista Zahn
Author: Dirk Eddelbuettel, Ista Zahn and Rob Hyndman
Maintainer: Dirk Eddelbuettel <edd@debian.org>
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 needed: 'Metropolis' prefers 'Fira', and 'IQSS' requires 'Libertinus'.
theme by Matthias Vogelgesang and others (now included in 'TeXLive'), the
'IQSS' by Ista Zahn (which is included here), and the 'Monash' theme by
Rob J Hyndman. 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
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ The [Beamer](https://github.com/josephwright/beamer) package is very popular for
presentations from LaTeX, and also supported from Markdown and
[RMarkdown](https://github.com/rstudio/rmarkdown). This package (currently)
provides functionality to use the following custom (LaTeX) themes for
[Beamer](https://github.com/josephwright/beamer) directly via RMarkdown:
[Beamer](https://github.com/josephwright/beamer) directly via RMarkdown:

- [Metropolis](https://github.com/matze/mtheme) (formerly `mtheme`) by Matthias Vogelgesang
([longer demo](https://eddelbuettel.github.io/binb/metropolis_demo.pdf))
- [IQSS](https://github.com/IQSS/iqss-beamer-theme) by Ista Zahn
([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))
- Monash by Rob J Hyndman

The original LaTeX styles been converted to be directly useable from
[RMarkdown](https://github.com/rstudio/rmarkdown)
Expand Down Expand Up @@ -127,8 +128,8 @@ output: binb::presento
____
\begin{center}
\hugetext{BIG BOLD TEXT}
\medskip
\hugetext{BIG BOLD TEXT}
\medskip
\small but background color does not work
\end{center}
Expand All @@ -147,13 +148,13 @@ which can be converted into this animated gif:

![](https://eddelbuettel.github.io/binb/presento_minimal.gif)


### Status

The package is fairly new and susceptible to change, but on
[CRAN](https://cran.r-project.org/).

### Usage
### Usage

The package is on [CRAN](https://cran.r-project.org/) and can be installed
via a standard
Expand Down Expand Up @@ -194,12 +195,12 @@ These themes use additional (free) fonts you may need to install:
- [IQSS Beamer Theme](https://github.com/IQSS/iqss-beamer-theme) wants
[Libertinus](https://github.com/libertinus-fonts/libertinus), see the
[IQSS Beamer Theme](https://github.com/IQSS/iqss-beamer-theme) page for details.
- [Presento Theme](https://github.com/RatulSaha/presento) wants
[Montserrat](https://github.com/JulietaUla/Montserrat),
[Lato Light](http://www.latofonts.com/)
- [Presento Theme](https://github.com/RatulSaha/presento) wants
[Montserrat](https://github.com/JulietaUla/Montserrat),
[Lato Light](http://www.latofonts.com/)
(also [here](https://github.com/google/fonts/tree/master/ofl/lato)),
[Noto Sans](https://www.google.com/get/noto),
[Algreya Sans](https://github.com/huertatipografica/Alegreya-Sans) as the small caps font and
[Algreya Sans](https://github.com/huertatipografica/Alegreya-Sans) as the small caps font and
[Inconsolata](https://github.com/google/fonts/tree/master/ofl/inconsolata) as a monospaced font.

If you use [Debian](https://www.debian.org) or [Ubuntu](https://www.ubuntu.com), you can
Expand Down
2 changes: 1 addition & 1 deletion inst/rmarkdown/templates/monash/resources/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
$endif$

$if(titlefontsize)$
\setbeamerfont{title}{series=\bfseries,parent=structure,size=\fontsize{$titlefontsize$}{32}}
\setbeamerfont{title}{series=\bfseries,parent=structure,size=\fontsize{$titlefontsize$}{32}}
$endif$

$if(mainfont)$
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
%% Beamer Color Theme: Monash Blue
%% Created by Rob J Hyndman. 28 March 2017

\definecolor{MonashBlue}{RGB}{0, 99, 167}
\definecolor{Orange}{RGB}{204, 89, 0}
\definecolor{DarkGrey}{RGB}{100,100,100}
\definecolor{DarkYellow}{RGB}{230, 172, 0}
\definecolor{grey}{RGB}{191,191,191}
\definecolor{DarkGrey}{RGB}{100,100,100}
\definecolor{LightGrey}{RGB}{231,231,231}
\setbeamercolor{normal text}{fg=black!2,bg=MonashBlue}
\usebeamercolor[fg]{normal text}
\setbeamercolor{progress bar}{fg=Orange}
\setbeamercolor{frametitle}{fg=MonashBlue,bg=black!2}
\definecolor{MonashBlue}{RGB}{0, 99, 167}
\definecolor{Orange}{RGB}{204, 89, 0}

\setbeamercolor{alerted text}{fg=DarkYellow}
\setbeamercolor{block body alerted}{fg=black,bg=DarkYellow}
\setbeamercolor{block body}{fg=black,bg=black!25!white}
\setbeamercolor{block title alerted}{fg=white,bg=black}
\setbeamercolor{block title}{fg=white,bg=Orange}
\setbeamercolor{description item}{fg=DarkYellow}
\setbeamercolor{enumerate item}{fg=Orange,bg=LightGrey}
\setbeamercolor{enumerate subitem}{fg=Orange!50!yellow,bg=white}
\setbeamercolor{frametitle}{fg=MonashBlue,bg=black!2}
\setbeamercolor{itemize item}{fg=Orange}
\setbeamercolor{itemize subitem}{fg=Orange!50!yellow}
\setbeamercolor{description item}{fg=DarkYellow}
\setbeamercolor{title}{fg=white,bg=MonashBlue}
\setbeamercolor{section}{fg=MonashBlue}
\setbeamercolor{subsection}{fg=MonashBlue}
\setbeamercolor{itemize}{fg=black}
\setbeamercolor{alerted text}{fg=DarkYellow}
\setbeamercolor{block body alerted}{fg=black,bg=DarkYellow}
\setbeamercolor{block body}{fg=black,bg=black!25!white}
\setbeamercolor{normal text}{fg=black!2,bg=MonashBlue}
\setbeamercolor{progress bar}{fg=Orange}
\setbeamercolor{section in toc shaded}{fg=white}
\setbeamercolor{section in toc}{fg=DarkYellow}
\setbeamercolor{section number projected}{bg=Orange,fg=white}
\setbeamercolor{section}{fg=MonashBlue}
\setbeamercolor{structure}{fg=white}
\setbeamercolor{block title}{fg=white,bg=Orange}
\setbeamercolor{block title alerted}{fg=white,bg=black}
\setbeamercolor{subsection}{fg=MonashBlue}
\setbeamercolor{title}{fg=white,bg=MonashBlue}
\usebeamercolor[fg]{normal text}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
%% Beamer Color Theme: Monash White
%% Created by Rob J Hyndman. 19 July 2017

\definecolor{DarkGrey}{RGB}{100,100,100}
\definecolor{DarkYellow}{RGB}{230, 172, 0}
\definecolor{grey}{RGB}{191,191,191}
\definecolor{LightGrey}{RGB}{231,231,231}
\definecolor{MonashBlue}{RGB}{0, 99, 167}
\definecolor{Orange}{RGB}{204, 89, 0}

\setbeamercolor{alerted text}{fg=Orange}
\setbeamercolor{block body alerted}{fg=black,bg=DarkYellow}
\setbeamercolor{block body}{fg=black,bg=black!15!white}
\setbeamercolor{block title alerted}{fg=white,bg=black}
\setbeamercolor{block title}{fg=white,bg=MonashBlue}
\setbeamercolor{description item}{fg=Orange}
\setbeamercolor{enumerate item}{fg=Orange,bg=LightGrey}
\setbeamercolor{enumerate subitem}{fg=Orange!50!yellow,bg=DarkGrey}
\setbeamercolor{frametitle}{bg=MonashBlue,fg=white}
\setbeamercolor{itemize item}{fg=Orange}
\setbeamercolor{itemize subitem}{fg=Orange!50!yellow}
\setbeamercolor{itemize}{fg=black}
\setbeamercolor{normal text}{fg=black,bg=black!2}
\setbeamercolor{progress bar}{fg=Orange}
\setbeamercolor{section in toc shaded}{fg=DarkYellow}
\setbeamercolor{section in toc}{fg=Orange}
\setbeamercolor{section number projected}{bg=Orange,fg=white}
\setbeamercolor{section}{fg=MonashBlue}
\setbeamercolor{structure}{fg=MonashBlue}
\setbeamercolor{subsection}{fg=MonashBlue}
\setbeamercolor{title}{fg=white,bg=MonashBlue}
\usebeamercolor[fg]{normal text}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
%% Updated by Rob J Hyndman. 8 October 2018

\RequirePackage{beamerthememetropolis}
\usecolortheme{monash}
\usecolortheme{monashblue}
\usefonttheme{monash}

\metroset{progressbar=foot}
Expand Down Expand Up @@ -45,9 +45,7 @@

\setbeamertemplate{section in toc}[square]
\setbeamerfont{section number projected}{size=\large}
\setbeamercolor{section number projected}{bg=Orange,fg=white}
\setbeamercolor{section in toc shaded}{fg=white}
\setbeamercolor{section in toc}{fg=DarkYellow}

\setbeamertemplate{section in toc shaded}[default][50]

% Figure placement
Expand All @@ -57,13 +55,14 @@
\def\placefig#1#2#3#4{\begin{textblock}{.1}(#1,#2)\rlap{\includegraphics[#3]{#4}}\end{textblock}}

% Monash title page
\setbeamerfont{title}{series=\bfseries,parent=structure,size=\fontsize{24}{32}}
\setbeamertemplate{title page}
{\placefig{-0.01}{-0.01}{width=1.01\paperwidth,height=1.01\paperheight}{titlepage}
\begin{textblock}{7.5}(1,2.8)\usebeamerfont{title}
{\color{white}\raggedright\par\inserttitle}
\end{textblock}
\begin{textblock}{7.5}(1,7)
{\color{white}\raggedright{\insertauthor}\\[0.2cm]
{\color{white}\raggedright{\insertauthor}\mbox{}\\[0.2cm]
\insertdate}
\end{textblock}}

Expand Down
1 change: 1 addition & 0 deletions inst/rmarkdown/templates/monash/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ date: \today
fontsize: 14pt
titlefontsize: 22pt
classoption: compress
colortheme: monashblue
toc: true
output: binb::monash
---
Expand Down

0 comments on commit c67b911

Please sign in to comment.