sim_article.R 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #' Statistics in Medicine format.
  2. #'
  3. #' Format for creating submissions to Statistics in Medicine. Based on the official Statistics in Medicine
  4. #' \href{http://onlinelibrary.wiley.com/journal/10.1002/(ISSN)1097-0258/homepage/la_tex_class_file.htm}{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{author} list of authors, containing \code{name} and \code{num}
  16. #' \item \code{address} list containing \code{num} and \code{org} for defining \code{author} affiliations
  17. #' \item \code{presentaddress} not sure what they mean with this
  18. #' \item \code{corres} author and address for correspondence
  19. #' \item \code{authormark} short author list for header
  20. #' \item \code{received}, \code{revised}, \code{accepted} dates of submission, revision, and acceptance of the manuscript
  21. #' \item \code{abstract} abstract, limited to 250 words
  22. #' \item \code{keywords} up to 6 keywords
  23. #' \item \code{bibliography} BibTeX \code{.bib} file
  24. #' \item \code{classoption} options of the \code{WileyNJD-v2} class
  25. #' \item \code{longtable} set to \code{true} to include the \code{longtable} package, used by default from \code{pandoc} to convert markdown to LaTeX code
  26. #' \item \code{header-includes}: custom additions to the header, before the \code{\\begin\{document\}} statement
  27. #' \item \code{include-after}: for including additional LaTeX code before the \code{\\end\{document\}} statement}
  28. #'
  29. #' @examples
  30. #'
  31. #' \dontrun{
  32. #' library(rmarkdown)
  33. #' draft("MyArticle.Rmd", template = "sim_article", package = "rticles")
  34. #' }
  35. #'
  36. #' @export
  37. sim_article <- function(..., highlight = NULL, citation_package = "natbib") {
  38. inherit_pdf_document(...,
  39. template = find_resource("sim_article", "template.tex"),
  40. highlight = highlight,
  41. citation_package = citation_package)
  42. }