diff --git a/R/rmd2word.R b/R/rmd2word.R index ebf8e9f..03c1fe6 100644 --- a/R/rmd2word.R +++ b/R/rmd2word.R @@ -92,6 +92,7 @@ #' \item{\code{doc = "accessr"}: }{similar to \code{"officedown"} but with #' narrower margins and black text for titles and darker hyperlinks, to #' avoid contrast issues,} +#' \item{\code{doc = "18"}: }{like \code{"accessr"} but with 18pt text,} #' \item{\code{doc = "exam"}:}{creates a Word file with a header #' "Examination paper for STAT0002" on the left and "Page x of n" on the #' right.} @@ -216,6 +217,10 @@ rmd2word <- function(x, doc = "accessr", accessr_doc_path <- system.file(package = "accessr", "examples", "template.docx") doc <- ifelse(doc == "accessr", accessr_doc_path, doc) + # Do the same for any instances of "18" in doc + accessr_18_path <- system.file(package = "accessr", "examples", + "template18.docx") + doc <- ifelse(doc == "18", accessr_18_path, doc) # Do the same for any instances of "exam" in doc accessr_exam_path <- system.file(package = "accessr", "examples", "exam.docx") diff --git a/inst/examples/template18.docx b/inst/examples/template18.docx new file mode 100644 index 0000000..ac365c0 Binary files /dev/null and b/inst/examples/template18.docx differ diff --git a/man/rmd2word.Rd b/man/rmd2word.Rd index 0dec6de..76e88df 100644 --- a/man/rmd2word.Rd +++ b/man/rmd2word.Rd @@ -135,6 +135,7 @@ Information such as \code{title}, \code{author}, \code{lang} etc in \item{\code{doc = "accessr"}: }{similar to \code{"officedown"} but with narrower margins and black text for titles and darker hyperlinks, to avoid contrast issues,} + \item{\code{doc = "18"}: }{like \code{"accessr"} but with 18pt text,} \item{\code{doc = "exam"}:}{creates a Word file with a header "Examination paper for STAT0002" on the left and "Page x of n" on the right.}