Skip to content

Commit

Permalink
Add 18pt word template
Browse files Browse the repository at this point in the history
  • Loading branch information
paulnorthrop committed Oct 22, 2023
1 parent e2de679 commit dabc067
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/rmd2word.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.}
Expand Down Expand Up @@ -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")
Expand Down
Binary file added inst/examples/template18.docx
Binary file not shown.
1 change: 1 addition & 0 deletions man/rmd2word.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dabc067

Please sign in to comment.