mirror of
https://github.com/eddelbuettel/binb
synced 2025-07-15 13:58:11 +02:00
Added monash theme
This commit is contained in:
parent
65948308ce
commit
91ca8fd519
10 changed files with 676 additions and 5 deletions
|
@ -0,0 +1,28 @@
|
|||
%% 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{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}
|
||||
\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}
|
|
@ -0,0 +1,10 @@
|
|||
%% Font theme for use with Monash beamer theme
|
||||
%% Created by Rob J Hyndman. 8 October 2018
|
||||
|
||||
\usepackage[lf,t]{carlito}
|
||||
%\usepackage{bera}
|
||||
|
||||
% Lets make descriptions and alerts bold
|
||||
\setbeamerfont{description item}{series=\bfseries}
|
||||
\setbeamerfont{alerted text}{series=\bfseries}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
%% This is the Monash beamer theme
|
||||
%% Created for Monash Business School
|
||||
%% Updated by Rob J Hyndman. 8 October 2018
|
||||
|
||||
\RequirePackage{beamerthememetropolis}
|
||||
\usecolortheme{monash}
|
||||
\usefonttheme{monash}
|
||||
|
||||
\metroset{progressbar=foot}
|
||||
|
||||
% Plenty of room
|
||||
\setbeamersize{text margin left=2em,text margin right=2em}
|
||||
|
||||
% Rounded corners on boxes
|
||||
\useinnertheme{rounded}
|
||||
|
||||
% Square bullets and enumerated items
|
||||
\setbeamertemplate{items}[square]
|
||||
|
||||
% larger squares for enumeration
|
||||
\defbeamertemplate{enumerate item}{mysquare}
|
||||
{ \raisebox{-0.ex}{\hbox{%
|
||||
\usebeamerfont*{item projected}%
|
||||
\usebeamercolor{enumerate item}%
|
||||
\vrule width4ex height2.7ex depth.7ex%
|
||||
\hskip-4ex%
|
||||
\hbox to4ex{%
|
||||
\hfil%
|
||||
\color{LightGrey}\raisebox{.2ex}{\insertenumlabel}%
|
||||
\hfil}%
|
||||
}}%
|
||||
}
|
||||
[action]
|
||||
{\setbeamerfont{item projected}{size=\scriptsize}}
|
||||
\setbeamertemplate{enumerate item}[mysquare]
|
||||
\setbeamertemplate{itemize item}[square]
|
||||
\setbeamertemplate{items}[mysquare]
|
||||
|
||||
\usesubitemizeitemtemplate{%
|
||||
\tiny\raise1.5pt\hbox{\color{beamerstructure}$\blacktriangleright$}%
|
||||
}
|
||||
\usesubsubitemizeitemtemplate{%
|
||||
\tiny\raise1.5pt\hbox{\color{beamerstructure}$\bigstar$}%
|
||||
}
|
||||
|
||||
\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
|
||||
\RequirePackage[absolute,overlay]{textpos}
|
||||
\setlength{\TPHorizModule}{1cm}
|
||||
\setlength{\TPVertModule}{1cm}
|
||||
\def\placefig#1#2#3#4{\begin{textblock}{.1}(#1,#2)\rlap{\includegraphics[#3]{#4}}\end{textblock}}
|
||||
|
||||
% Monash title page
|
||||
\setbeamertemplate{title page}
|
||||
{\placefig{-0.01}{-0.01}{width=1.01\paperwidth,height=1.01\paperheight}{MonashTitleSlide}
|
||||
\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]
|
||||
\insertdate}
|
||||
\end{textblock}}
|
||||
|
||||
% Reduce vertical space around displayed equations
|
||||
\preto\frame{%
|
||||
\setlength{\abovedisplayskip}{1pt}%
|
||||
\setlength{\belowdisplayskip}{4pt}%
|
||||
\setlength{\abovedisplayshortskip}{0pt}%
|
||||
\setlength{\belowdisplayshortskip}{0pt}}
|
||||
|
||||
% Redefine shaded environment if it exists (for R plots)
|
||||
\ifcsname Shaded\endcsname
|
||||
\definecolor{shadecolor}{RGB}{225,225,225}
|
||||
\renewenvironment{Shaded}{\color{black}\begin{snugshade}\color{black}}{\end{snugshade}}
|
||||
\fi
|
||||
|
||||
%%
|
||||
%% End of file `beamerthememonash.sty'.
|
113
inst/rmarkdown/templates/monash/skeleton/skeleton.Rmd
Normal file
113
inst/rmarkdown/templates/monash/skeleton/skeleton.Rmd
Normal file
|
@ -0,0 +1,113 @@
|
|||
---
|
||||
title: Monash Beamer Class Demonstration
|
||||
author: Rob J Hyndman
|
||||
date: \today
|
||||
fontsize: 14pt
|
||||
titlefontsize: 22pt
|
||||
classoption: compress
|
||||
toc: true
|
||||
output: binb::monash
|
||||
---
|
||||
|
||||
```{r setup, include=FALSE}
|
||||
knitr::opts_chunk$set(echo = FALSE, message=FALSE, warning=FALSE, cache=TRUE, dev.args=list(bg=grey(0.9), pointsize=11))
|
||||
```
|
||||
|
||||
# Intro
|
||||
|
||||
## Slide with bullets
|
||||
|
||||
- Bullet 1
|
||||
- Bullet 2
|
||||
- Bullet 3
|
||||
|
||||
Use `\alert` to \alert{highlight} some text
|
||||
|
||||
### Some enumeration
|
||||
|
||||
1. The first item
|
||||
1. Stuff
|
||||
1. Nonsense
|
||||
|
||||
# Using R
|
||||
|
||||
## Slide with R output
|
||||
|
||||
```{r cars, echo = TRUE}
|
||||
summary(cars)
|
||||
```
|
||||
|
||||
## Slide with graphics
|
||||
|
||||
```{r pressure}
|
||||
plot(pressure)
|
||||
```
|
||||
|
||||
## Slide with mathematics
|
||||
|
||||
Quantile score for observation $y$. For $0<p<1$:
|
||||
|
||||
\begin{block}{}
|
||||
\[
|
||||
S(y_t,q_t(p)) = \left\{
|
||||
\begin{array}{rl}
|
||||
p(y_t-q_t(p)) & \text{if $y_t \ge q_t(p)$}\\
|
||||
(1-p)(q_t(p)-y_t) & \text{if $y_t < q_t(p)$}
|
||||
\end{array}\right.
|
||||
\]
|
||||
\end{block}
|
||||
|
||||
Average score over all percentiles gives the best distribution forecast:
|
||||
\[
|
||||
QS = \frac{1}{99T}\sum_{p=1}^{99}\sum_{t=1}^T S(q_t(p),y_t)
|
||||
\]
|
||||
|
||||
# RMarkdown Examples
|
||||
|
||||
## R Figure
|
||||
|
||||
The following code generates the plot on the next slide (taken from
|
||||
`help(bxp)` and modified slightly):
|
||||
|
||||
\small
|
||||
|
||||
```{r pressureCode, eval=FALSE, echo=TRUE}
|
||||
library(stats)
|
||||
set.seed(753)
|
||||
bx.p <- boxplot(split(rt(100, 4),
|
||||
gl(5, 20)), plot=FALSE)
|
||||
bxp(bx.p, notch = FALSE, boxfill = "orange",
|
||||
frame = FALSE, outl = TRUE,
|
||||
main = "Example from help(bxp)")
|
||||
```
|
||||
|
||||
|
||||
## R Figure
|
||||
|
||||
```{r pressureFig, echo=FALSE}
|
||||
library(stats)
|
||||
set.seed(753)
|
||||
bx.p <- boxplot(split(rt(100, 4),
|
||||
gl(5, 20)), plot=FALSE)
|
||||
bxp(bx.p, notch = FALSE, boxfill = "orange",
|
||||
frame = FALSE, outl = TRUE,
|
||||
main = "Example from help(bxp)")
|
||||
```
|
||||
|
||||
## R Table
|
||||
|
||||
A simple `knitr::kable` example:
|
||||
|
||||
\small
|
||||
|
||||
```{r kableEx, echo=TRUE}
|
||||
knitr::kable(mtcars[1:4, 1:7],
|
||||
caption="(Parts of) the mtcars dataset")
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
### For more information:
|
||||
- See the [RMarkdown repository](https://github.com/rstudio/rmarkdown) for more on RMarkdown
|
||||
- See the [binb repository](https://github.com/eddelbuettel/binb) for more on binb
|
||||
- See the [binb vignettes](https://github.com/eddelbuettel/binb/vignettes) for more examples.
|
BIN
inst/rmarkdown/templates/monash/skeleton/titlepage.png
Normal file
BIN
inst/rmarkdown/templates/monash/skeleton/titlepage.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 116 KiB |
Loading…
Add table
Add a link
Reference in a new issue