Skip to content
Snippets Groups Projects
Commit 5f64c253 authored by Iago Mosqueira's avatar Iago Mosqueira
Browse files

Much better

parent 1df1d8bf
No related branches found
No related tags found
No related merge requests found
......@@ -6,13 +6,14 @@
#
# Distributed under the terms of the EUPL-1.2
# wur {{{
wur <- function(toc = FALSE,
slide_level = 2,
slide_level = 1,
incremental = FALSE,
fig_width = 10,
fig_height = 7,
fig_width = 5,
fig_height = 4,
fig_crop = TRUE,
fig_caption = TRUE,
fig_caption = FALSE,
dev = 'pdf',
df_print = "default",
fonttheme = "default",
......@@ -24,22 +25,18 @@ wur <- function(toc = FALSE,
md_extensions = NULL,
pandoc_args = NULL) {
# COPY beamertheme
file.copy(system.file("rmarkdown", "templates", "wur", "skeleton",
"beamerthemewurnew.sty", package="wur"), ".", recursive=TRUE)
# COPY front.png, logo.png
file.copy(system.file("rmarkdown", "templates", "wur", "skeleton",
c("front.png", "logo.png"), package="wur"), ".", recursive=TRUE)
# COPY default custom if not there
if(!file.exists("custom.png"))
file.copy(system.file("rmarkdown", "templates", "wur", "skeleton",
c("custom.png"), package="wur"), ".", recursive=TRUE)
c("front.png", "logo.png", "default.png"), package="wur"), ".", recursive=TRUE)
template <- system.file("rmarkdown", "templates", "wur",
"resources", "template.tex", package="wur")
"resources", "template.tex", package="wmrkdown")
rmarkdown::beamer_presentation(template = template,
toc = toc,
slide_level = slide_level,
......@@ -60,4 +57,4 @@ wur <- function(toc = FALSE,
md_extensions = md_extensions,
pandoc_args = pandoc_args)
}
} # }}}
......@@ -398,6 +398,16 @@ $endif$
$if(logo)$
\logo{\includegraphics{$logo$}}
$endif$
$if(custom)$
\pgfdeclareimage[height=\pictsize,width=\pictsize,interpolate=true]{custom}{$custom$}
$else$
\pgfdeclareimage[height=\pictsize,width=\pictsize,interpolate=true]{custom}{default.jpg}
$endif$
$if(sectpic)$
\pgfdeclareimage[height=\pictsize,width=\pictsize,interpolate=true]{sectpic}{$sectpic$}
$else$
\pgfdeclareimage[height=\pictsize,width=\pictsize,interpolate=true]{sectpic}{default.jpg}
$endif$
$endif$
\begin{document}
......
\def\beamer@wurbeamer@version{0.3.0bart}
\def\beamer@wurbeamer@version{0.3.1}
\ProvidesPackage{beamerthemewurnew}
\RequirePackage{beamerbasethemes}[2004/10/07]
\RequirePackage{beamerbasethemes}
\RequirePackage{pgf}
%-------------------------------------------------------------------------------
% detect PDF-LaTeX
......@@ -183,8 +183,6 @@
% user-command to change the picture bar used:
\pgfdeclareimage[height=\pictsize,width=0.67\textwidth,interpolate=true]{front}{front.jpg}
\def\custompic#1{\pgfdeclareimage[height=\pictsize,width=0.33\textwidth,interpolate=true]{custom}{#1}}
\pgfdeclareimage[height=\pictsize,width=\pictsize,interpolate=true]{custom}{custom.jpg}
\titlegraphic{
\pgfuseimage{custom}
......@@ -212,19 +210,16 @@
%-------------------------------------------------------------------------------
% section page
%\def\sectionpic#1{\pgfdeclareimage[height=2\pictsize,width=2\pictsize,interpolate=true]{sectpic}{#1}}
%
\setbeamertemplate{section page}{
\vskip-1pc
\hskip1.2\pictsize\hbox to 0pt{\vbox to 0pt{\pgfuseimage{sectpic}}}
\vskip-2pc
\raisebox{-.8pc}{\rule{1.2\pictsize}{.4pt}}\par
\raisebox{-.8pc}\par
\begin{minipage}[t]{1.2\pictsize}
\flushleft
\usebeamerfont{title}\usebeamercolor[fg]{title}\insertsection
\end{minipage}
\vskip1pc
\rule{1.2\pictsize}{.4pt}
\vskip0pt plus 1filll
}
%-------------------------------------------------------------------------------
......@@ -291,7 +286,7 @@
% Disable the navigation buttons
\setbeamertemplate{navigation symbols}{}
\navon
\navoff
\setbeamersize{text margin right=1pc}
\setbeamersize{text margin left=2pc}
......
......@@ -4,7 +4,8 @@ subtitle: With a subtitle
author: Some Body
date: \today
institute: Wageningen Marine Research (WMR), IJmuiden.
output: wmrkdown::wur
output:
wmrkdown::wur
fontsize: 11pt
---
......@@ -12,51 +13,28 @@ fontsize: 11pt
knitr::opts_chunk$set(cache=TRUE)
```
# First Section
## First Frame
# First Slide
Hello, world!
# Second Section
# Second Slide
## Second Frame
## Bulleted Lists
### Bulleted Lists
- Element A
- Element B
- B.1
- B.2
- Element C
# Elements
## Typography
```
The theme provides sensible defaults to
\emph{emphasize} text, \alert{accent} parts
or show \textbf{bold} results.
In Markdown, you can also use _emphasize_ and **bold**.
```
\begin{center}becomes\end{center}
The theme provides sensible defaults to \emph{emphasize} text,
\alert{accent} parts or show \textbf{bold} results.
In Markdown, you can also use _emphasize_ and **bold**.
## Math
# Math
\begin{equation*}
e = \lim_{n\to \infty} \left(1 + \frac{1}{n}\right)^n
\end{equation*}
## R Figure Example
# R Figure Example
The following code generates the plot on the next slide (taken from
`help(bxp)` and modified slightly):
......@@ -71,8 +49,7 @@ bxp(bx.p, notch = FALSE, boxfill = "lightblue",
main = "Example from help(bxp)")
```
## R Figure Example
# R Figure Example
```{r pressureFig, echo=FALSE}
library(stats)
......@@ -84,7 +61,7 @@ bxp(bx.p, notch = FALSE, boxfill = "lightblue",
main = "Example from help(bxp)")
```
## R Table Example
# R Table Example
A simple `knitr::kable` example:
......
name: Binb is not Beamer - Metropolis (pdf)
description: A custom R Markdown Beamer presentation theme.
name: wur (pdf)
description: A custom R Markdown Beamer presentation for WUR.
create_dir: true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment