From bae1fe7e262c43b0647296fafdc557c4229d0cac Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Tue, 9 Oct 2018 20:10:11 -0500 Subject: [PATCH 1/2] provide better defaults for colortheme and two fontsizes --- ChangeLog | 6 +++++- inst/rmarkdown/templates/monash/resources/template.tex | 6 +++++- inst/rmarkdown/templates/monash/skeleton/skeleton.Rmd | 3 --- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index d958d40..0f9207c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ 2018-10-09 Dirk Eddelbuettel - * DESCRIPTION (Version, Date): Rolled minor version + * DESCRIPTION (Version, Date): Rolled minor version + + * inst/rmarkdown/templates/monash/resources/template.tex: Provide + better fallbacks for fontsize, titlefontsize, colortheme + * inst/rmarkdown/templates/monash/skeleton/skeleton.Rmd: Idem 2018-10-09 Rob Hyndman diff --git a/inst/rmarkdown/templates/monash/resources/template.tex b/inst/rmarkdown/templates/monash/resources/template.tex index 3098754..efe127e 100644 --- a/inst/rmarkdown/templates/monash/resources/template.tex +++ b/inst/rmarkdown/templates/monash/resources/template.tex @@ -1,6 +1,6 @@ \PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere \PassOptionsToPackage{hyphens}{url} -\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(handout)$handout,$endif$$if(colorlinks)$dvipsnames,$endif$$if(beamer)$ignorenonframetext,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} +\documentclass[$if(fontsize)$$fontsize$,$else$14pt,$endif$$if(lang)$$babel-lang$,$endif$$if(handout)$handout,$endif$$if(colorlinks)$dvipsnames,$endif$$if(beamer)$ignorenonframetext,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} \setbeamertemplate{caption}[numbered] \setbeamertemplate{caption label separator}{: } \setbeamercolor{caption name}{fg=normal text.fg} @@ -63,6 +63,8 @@ $endif$ $if(colortheme)$ \usecolortheme{$colortheme$} +$else$ + \usecolortheme{monashwhite} $endif$ $if(fonttheme)$ @@ -71,6 +73,8 @@ $endif$ $if(titlefontsize)$ \setbeamerfont{title}{series=\bfseries,parent=structure,size=\fontsize{$titlefontsize$}{32}} +$else$ + \setbeamerfont{title}{series=\bfseries,parent=structure,size=\fontsize{22pt}{32}} $endif$ $if(mainfont)$ diff --git a/inst/rmarkdown/templates/monash/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/monash/skeleton/skeleton.Rmd index a6fddfc..162b620 100644 --- a/inst/rmarkdown/templates/monash/skeleton/skeleton.Rmd +++ b/inst/rmarkdown/templates/monash/skeleton/skeleton.Rmd @@ -2,10 +2,7 @@ title: Monash Beamer Class Demonstration author: Rob J Hyndman date: \today -fontsize: 14pt -titlefontsize: 22pt classoption: compress -colortheme: monashblue toc: true output: binb::monash --- From 265eca3ecd9305fef39c774f6c1aa1b91dd1fb53 Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Wed, 10 Oct 2018 18:59:01 -0500 Subject: [PATCH 2/2] two refinements for Monash default values --- inst/rmarkdown/templates/monash/resources/template.tex | 5 +---- .../templates/monash/skeleton/beamerthememonash.sty | 4 +++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/inst/rmarkdown/templates/monash/resources/template.tex b/inst/rmarkdown/templates/monash/resources/template.tex index efe127e..8267465 100644 --- a/inst/rmarkdown/templates/monash/resources/template.tex +++ b/inst/rmarkdown/templates/monash/resources/template.tex @@ -63,18 +63,15 @@ $endif$ $if(colortheme)$ \usecolortheme{$colortheme$} -$else$ - \usecolortheme{monashwhite} $endif$ $if(fonttheme)$ \usefonttheme{$fonttheme$} $endif$ +% A default size of 24 is set in beamerthememonash.sty $if(titlefontsize)$ \setbeamerfont{title}{series=\bfseries,parent=structure,size=\fontsize{$titlefontsize$}{32}} -$else$ - \setbeamerfont{title}{series=\bfseries,parent=structure,size=\fontsize{22pt}{32}} $endif$ $if(mainfont)$ diff --git a/inst/rmarkdown/templates/monash/skeleton/beamerthememonash.sty b/inst/rmarkdown/templates/monash/skeleton/beamerthememonash.sty index cd9a180..bd714c3 100644 --- a/inst/rmarkdown/templates/monash/skeleton/beamerthememonash.sty +++ b/inst/rmarkdown/templates/monash/skeleton/beamerthememonash.sty @@ -3,7 +3,8 @@ %% Updated by Rob J Hyndman. 8 October 2018 \RequirePackage{beamerthememetropolis} -\usecolortheme{monashblue} +% For binb, one can alter the color theme by by setting eg 'colortheme: monashblue' in the YAML header +\usecolortheme{monashwhite} \usefonttheme{monash} \metroset{progressbar=foot} @@ -55,6 +56,7 @@ \def\placefig#1#2#3#4{\begin{textblock}{.1}(#1,#2)\rlap{\includegraphics[#3]{#4}}\end{textblock}} % Monash title page +% For binb, one can alter the font size by setting eg 'titlefontsize: 20pt' in the YAML header \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}