mirror of
https://github.com/eddelbuettel/binb
synced 2024-12-22 12:39:58 +01:00
commit
938adf1ee0
@ -18,4 +18,4 @@ Imports: rmarkdown, knitr
|
|||||||
VignetteBuilder: knitr
|
VignetteBuilder: knitr
|
||||||
License: GPL (>= 2)
|
License: GPL (>= 2)
|
||||||
Encoding: UTF-8
|
Encoding: UTF-8
|
||||||
RoxygenNote: 6.1.0
|
RoxygenNote: 6.1.1
|
||||||
|
6
R/binb.R
6
R/binb.R
@ -21,6 +21,7 @@
|
|||||||
##' @param dev A character variable defaulting to \dQuote{pdf}.
|
##' @param dev A character variable defaulting to \dQuote{pdf}.
|
||||||
##' @param df_print A character variable defaulting to \dQuote{default}.
|
##' @param df_print A character variable defaulting to \dQuote{default}.
|
||||||
##' @param fonttheme A character variable defaulting to \dQuote{default}.
|
##' @param fonttheme A character variable defaulting to \dQuote{default}.
|
||||||
|
##' @param colortheme For the \sQuote{Monash} theme only. A character variable defaulting to \dQuote{monashwhite}.
|
||||||
##' @param highlight A character variable defaulting to \dQuote{tango}.
|
##' @param highlight A character variable defaulting to \dQuote{tango}.
|
||||||
##' @param keep_tex A logical variable defaulting to \code{FALSE}.
|
##' @param keep_tex A logical variable defaulting to \code{FALSE}.
|
||||||
##' @param latex_engine A character variable defaulting to \dQuote{xelatex}.
|
##' @param latex_engine A character variable defaulting to \dQuote{xelatex}.
|
||||||
@ -161,6 +162,7 @@ monash <- function(toc = FALSE,
|
|||||||
dev = 'pdf',
|
dev = 'pdf',
|
||||||
df_print = "default",
|
df_print = "default",
|
||||||
fonttheme = "default",
|
fonttheme = "default",
|
||||||
|
colortheme = "monashwhite",
|
||||||
highlight = "tango",
|
highlight = "tango",
|
||||||
keep_tex = FALSE,
|
keep_tex = FALSE,
|
||||||
latex_engine = "pdflatex",
|
latex_engine = "pdflatex",
|
||||||
@ -169,7 +171,8 @@ monash <- function(toc = FALSE,
|
|||||||
md_extensions = NULL,
|
md_extensions = NULL,
|
||||||
pandoc_args = NULL) {
|
pandoc_args = NULL) {
|
||||||
|
|
||||||
for (f in c("beamercolorthememonash.sty", "beamerfontthememonash.sty",
|
fcolortheme <- paste0("beamercolortheme",colortheme,".sty")
|
||||||
|
for (f in c("beamerfontthememonash.sty",fcolortheme,
|
||||||
"beamerthememonash.sty", "titlepage.png", "figs/"))
|
"beamerthememonash.sty", "titlepage.png", "figs/"))
|
||||||
if (!file.exists(f))
|
if (!file.exists(f))
|
||||||
file.copy(system.file("rmarkdown", "templates", "monash", "skeleton",
|
file.copy(system.file("rmarkdown", "templates", "monash", "skeleton",
|
||||||
@ -191,6 +194,7 @@ monash <- function(toc = FALSE,
|
|||||||
dev = dev,
|
dev = dev,
|
||||||
df_print = df_print,
|
df_print = df_print,
|
||||||
theme = "monash",
|
theme = "monash",
|
||||||
|
colortheme = colortheme,
|
||||||
fonttheme = fonttheme,
|
fonttheme = fonttheme,
|
||||||
highlight = highlight,
|
highlight = highlight,
|
||||||
keep_tex = keep_tex,
|
keep_tex = keep_tex,
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
\RequirePackage{beamerthememetropolis}
|
\RequirePackage{beamerthememetropolis}
|
||||||
% For binb, one can alter the color theme by by setting eg 'colortheme: monashblue' in the YAML header
|
% For binb, one can alter the color theme by by setting eg 'colortheme: monashblue' in the YAML header
|
||||||
\usecolortheme{monashwhite}
|
%\usecolortheme{monashwhite}
|
||||||
\usefonttheme{monash}
|
\usefonttheme{monash}
|
||||||
|
|
||||||
\metroset{progressbar=foot}
|
\metroset{progressbar=foot}
|
||||||
@ -46,9 +46,11 @@
|
|||||||
|
|
||||||
\setbeamertemplate{section in toc}[square]
|
\setbeamertemplate{section in toc}[square]
|
||||||
\setbeamerfont{section number projected}{size=\large}
|
\setbeamerfont{section number projected}{size=\large}
|
||||||
|
|
||||||
\setbeamertemplate{section in toc shaded}[default][50]
|
\setbeamertemplate{section in toc shaded}[default][50]
|
||||||
|
|
||||||
|
\usepackage{etoolbox}
|
||||||
|
\patchcmd{\beamer@sectionintoc}{\vskip1.5em}{\vskip0.2em}{}{}
|
||||||
|
|
||||||
% Figure placement
|
% Figure placement
|
||||||
\RequirePackage[absolute,overlay]{textpos}
|
\RequirePackage[absolute,overlay]{textpos}
|
||||||
\setlength{\TPHorizModule}{1cm}
|
\setlength{\TPHorizModule}{1cm}
|
||||||
|
@ -26,10 +26,10 @@ iqss(toc = FALSE, slide_level = 3, incremental = FALSE,
|
|||||||
monash(toc = FALSE, slide_level = 2, incremental = FALSE,
|
monash(toc = FALSE, slide_level = 2, incremental = FALSE,
|
||||||
fig_width = 8, fig_height = 5, fig_crop = TRUE,
|
fig_width = 8, fig_height = 5, fig_crop = TRUE,
|
||||||
fig_caption = TRUE, dev = "pdf", df_print = "default",
|
fig_caption = TRUE, dev = "pdf", df_print = "default",
|
||||||
fonttheme = "default", highlight = "tango", keep_tex = FALSE,
|
fonttheme = "default", colortheme = "monashwhite",
|
||||||
latex_engine = "pdflatex", citation_package = c("none", "natbib",
|
highlight = "tango", keep_tex = FALSE, latex_engine = "pdflatex",
|
||||||
"biblatex"), includes = NULL, md_extensions = NULL,
|
citation_package = c("none", "natbib", "biblatex"), includes = NULL,
|
||||||
pandoc_args = NULL)
|
md_extensions = NULL, pandoc_args = NULL)
|
||||||
|
|
||||||
presento(toc = FALSE, slide_level = 2, incremental = FALSE,
|
presento(toc = FALSE, slide_level = 2, incremental = FALSE,
|
||||||
fig_width = 10, fig_height = 7, fig_crop = TRUE,
|
fig_width = 10, fig_height = 7, fig_crop = TRUE,
|
||||||
@ -75,6 +75,8 @@ presento(toc = FALSE, slide_level = 2, incremental = FALSE,
|
|||||||
\item{md_extensions}{An optional character variable defaulting to \code{NULL}.}
|
\item{md_extensions}{An optional character variable defaulting to \code{NULL}.}
|
||||||
|
|
||||||
\item{pandoc_args}{An optional character variable defaulting to \code{NULL}.}
|
\item{pandoc_args}{An optional character variable defaulting to \code{NULL}.}
|
||||||
|
|
||||||
|
\item{colortheme}{For the \sQuote{Monash} theme only. A character variable defaulting to \dQuote{monashwhite}.}
|
||||||
}
|
}
|
||||||
\value{
|
\value{
|
||||||
RMarkdown content processed is returned for use by the
|
RMarkdown content processed is returned for use by the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user