sage_article.R 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #' Sage Journals format.
  2. #'
  3. #' Format for creating submissions to Sage Journals. Based on the official Sage Journals
  4. #' \href{https://uk.sagepub.com/sites/default/files/sage_latex_template_4.zip}{class}.
  5. #'
  6. #' @inheritParams rmarkdown::pdf_document
  7. #' @param ... Additional arguments to \code{rmarkdown::pdf_document}
  8. #'
  9. #' @return R Markdown output format to pass to
  10. #' \code{\link[rmarkdown:render]{render}}
  11. #'
  12. #' @details Possible arguments for the YAML header are:
  13. #' \itemize{
  14. #' \item \code{title} title of the manuscript
  15. #' \item \code{runninghead} short author list for header
  16. #' \item \code{author} list of authors, containing \code{name} and \code{num}
  17. #' \item \code{address} list containing \code{num} and \code{org} for defining \code{author} affiliations
  18. #' \item \code{corrauth} corresponding author name and address
  19. #' \item \code{email} correspondence email
  20. #' \item \code{abstract} abstract, limited to 200 words
  21. #' \item \code{keywords} keywords for the artucle
  22. #' \item \code{bibliography} BibTeX \code{.bib} file name
  23. #' \item \code{classoption} options of the \code{sagej} class
  24. #' \item \code{header-includes}: custom additions to the header, before the \code{\\begin\{document\}} statement
  25. #' \item \code{include-after}: for including additional LaTeX code before the \code{\\end\{document\}} statement}
  26. #'
  27. #' @examples
  28. #'
  29. #' \dontrun{
  30. #' library(rmarkdown)
  31. #' draft("MyArticle.Rmd", template = "sage_article", package = "rticles")
  32. #' }
  33. #'
  34. #' @export
  35. sage_article <- function(..., highlight = NULL, citation_package = "natbib") {
  36. inherit_pdf_document(...,
  37. template = find_resource("sage_article", "template.tex"),
  38. highlight = highlight,
  39. citation_package = citation_package)
  40. }