From cbd889b7444509a57f90a4a0131e4ed0a1d5bdbc Mon Sep 17 00:00:00 2001 From: Rob J Hyndman Date: Tue, 9 Oct 2018 14:47:49 +1100 Subject: [PATCH 1/6] Added color option for monash theme --- ...ash.sty => beamercolorthememonashblue.sty} | 40 ++++++++++--------- .../skeleton/beamercolorthememonashwhite.sty | 32 +++++++++++++++ .../monash/skeleton/beamerthememonash.sty | 5 +-- .../templates/monash/skeleton/skeleton.Rmd | 1 + 4 files changed, 56 insertions(+), 22 deletions(-) rename inst/rmarkdown/templates/monash/skeleton/{beamercolorthememonash.sty => beamercolorthememonashblue.sty} (88%) create mode 100644 inst/rmarkdown/templates/monash/skeleton/beamercolorthememonashwhite.sty diff --git a/inst/rmarkdown/templates/monash/skeleton/beamercolorthememonash.sty b/inst/rmarkdown/templates/monash/skeleton/beamercolorthememonashblue.sty similarity index 88% rename from inst/rmarkdown/templates/monash/skeleton/beamercolorthememonash.sty rename to inst/rmarkdown/templates/monash/skeleton/beamercolorthememonashblue.sty index bfda1fe..c52a1b8 100644 --- a/inst/rmarkdown/templates/monash/skeleton/beamercolorthememonash.sty +++ b/inst/rmarkdown/templates/monash/skeleton/beamercolorthememonashblue.sty @@ -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} -\setbeamercolor{enumerate item}{fg=Orange,bg=LightGrey} -\setbeamercolor{enumerate subitem}{fg=Orange!50!yellow,bg=white} -\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} +\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{structure}{fg=white} -\setbeamercolor{block title}{fg=white,bg=Orange} \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{itemize}{fg=black} +\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{subsection}{fg=MonashBlue} +\setbeamercolor{title}{fg=white,bg=MonashBlue} +\usebeamercolor[fg]{normal text} diff --git a/inst/rmarkdown/templates/monash/skeleton/beamercolorthememonashwhite.sty b/inst/rmarkdown/templates/monash/skeleton/beamercolorthememonashwhite.sty new file mode 100644 index 0000000..a8189cb --- /dev/null +++ b/inst/rmarkdown/templates/monash/skeleton/beamercolorthememonashwhite.sty @@ -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} diff --git a/inst/rmarkdown/templates/monash/skeleton/beamerthememonash.sty b/inst/rmarkdown/templates/monash/skeleton/beamerthememonash.sty index 407d026..aefb0dd 100644 --- a/inst/rmarkdown/templates/monash/skeleton/beamerthememonash.sty +++ b/inst/rmarkdown/templates/monash/skeleton/beamerthememonash.sty @@ -3,7 +3,6 @@ %% Updated by Rob J Hyndman. 8 October 2018 \RequirePackage{beamerthememetropolis} -\usecolortheme{monash} \usefonttheme{monash} \metroset{progressbar=foot} @@ -45,9 +44,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 diff --git a/inst/rmarkdown/templates/monash/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/monash/skeleton/skeleton.Rmd index 0e51cd9..a6fddfc 100644 --- a/inst/rmarkdown/templates/monash/skeleton/skeleton.Rmd +++ b/inst/rmarkdown/templates/monash/skeleton/skeleton.Rmd @@ -5,6 +5,7 @@ date: \today fontsize: 14pt titlefontsize: 22pt classoption: compress +colortheme: monashblue toc: true output: binb::monash --- From 89d744bf7159310e820672d1eeac994879e7fb01 Mon Sep 17 00:00:00 2001 From: Rob J Hyndman Date: Tue, 9 Oct 2018 14:50:18 +1100 Subject: [PATCH 2/6] Added RJH as author --- DESCRIPTION | 10 ++++++---- README.md | 19 ++++++++++--------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 45ec82a..b01ed98 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -3,14 +3,16 @@ 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 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 diff --git a/README.md b/README.md index f77156f..8d948d0 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ 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)) @@ -16,6 +16,7 @@ provides functionality to use the following custom (LaTeX) themes for ([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) @@ -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} @@ -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 @@ -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 From 034a6d934ff61fc951a92c69a6ed8e773d26fad4 Mon Sep 17 00:00:00 2001 From: Rob J Hyndman Date: Tue, 9 Oct 2018 14:51:38 +1100 Subject: [PATCH 3/6] Updated changelog --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index efaf4eb..da1f77d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2018-10-09 Rob Hyndman + + * Added Monash theme + 2018-10-02 Ista Zahn * inst/iqssDemo/beamerfontthemeiqss.sty: Fall back to default font From 73724dfa6f2696198441834813659d84ca324173 Mon Sep 17 00:00:00 2001 From: Rob J Hyndman Date: Wed, 10 Oct 2018 08:02:59 +1100 Subject: [PATCH 4/6] Fixed spacing --- ChangeLog | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index da1f77d..68e8d8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ -2018-10-09 Rob Hyndman +2018-10-09 Rob Hyndman - * Added Monash theme + * Added Monash theme 2018-10-02 Ista Zahn @@ -112,6 +112,3 @@ Example skeleton taken from my samples=rmarkdown-metropolis repo * inst/rmarkdown/templates/metropolis/resources/template.tex: Generic template for beamer presentations - - - From 6e10275144cfda48904a5cb9b02be9cade41c312 Mon Sep 17 00:00:00 2001 From: Rob J Hyndman Date: Wed, 10 Oct 2018 08:03:10 +1100 Subject: [PATCH 5/6] Approx 80 chars per line --- DESCRIPTION | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index b01ed98..1f548d0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -8,11 +8,10 @@ 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'), - 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'. + 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 From d726a9fadff3ed91d80a9bc24bb3aa0e814acc1d Mon Sep 17 00:00:00 2001 From: Rob J Hyndman Date: Wed, 10 Oct 2018 08:04:09 +1100 Subject: [PATCH 6/6] Default values for all monash options --- inst/rmarkdown/templates/monash/resources/template.tex | 2 +- .../rmarkdown/templates/monash/skeleton/beamerthememonash.sty | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/inst/rmarkdown/templates/monash/resources/template.tex b/inst/rmarkdown/templates/monash/resources/template.tex index 54ea760..3098754 100644 --- a/inst/rmarkdown/templates/monash/resources/template.tex +++ b/inst/rmarkdown/templates/monash/resources/template.tex @@ -70,7 +70,7 @@ $if(fonttheme)$ $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)$ diff --git a/inst/rmarkdown/templates/monash/skeleton/beamerthememonash.sty b/inst/rmarkdown/templates/monash/skeleton/beamerthememonash.sty index aefb0dd..cd9a180 100644 --- a/inst/rmarkdown/templates/monash/skeleton/beamerthememonash.sty +++ b/inst/rmarkdown/templates/monash/skeleton/beamerthememonash.sty @@ -3,6 +3,7 @@ %% Updated by Rob J Hyndman. 8 October 2018 \RequirePackage{beamerthememetropolis} +\usecolortheme{monashblue} \usefonttheme{monash} \metroset{progressbar=foot} @@ -54,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}}