-
Notifications
You must be signed in to change notification settings - Fork 520
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from rstudio/master
update to current rstudio version
- Loading branch information
Showing
82 changed files
with
3,008 additions
and
8,275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,33 @@ | ||
Package: rticles | ||
Type: Package | ||
Title: What the package does (short line) | ||
Version: 1.0 | ||
Date: 2014-03-14 | ||
Author: Who wrote it | ||
Maintainer: Who to complain to <yourfault@somewhere.net> | ||
Description: More about what it does (maybe more than one line) | ||
Title: Article Formats for R Markdown | ||
Version: 0.2 | ||
Date: 2016-04-24 | ||
Authors@R: c( | ||
person("JJ", "Allaire", role = c("aut", "cre"), email = "jj@rstudio.com"), | ||
person(family = "R Foundation", role = c("aut", "cph")), | ||
person("Hadley", "Wickham", role = "aut", email = "hadley@rstudio.com"), | ||
person(family = "Journal of Statistical Software", role = c("aut", "cph")), | ||
person("Yihui", "Xie", role = "aut", email = "yihui@rstudio.com"), | ||
person(family = "RStudio", role = "cph"), | ||
person("Ramnath ", "Vaidyanathan", role = c("aut", "cph"), email = "ramnath.vaidya@gmail.com"), | ||
person(family = "Assocation for Computing Machinery", role = c("aut", "cph")), | ||
person("Carl", "Boettiger", role = c("aut", "cph"), email = "cboettig@gmail.com"), | ||
person(family = "Elsevier", role = c("aut", "cph")), | ||
person("Karl", "Broman", role = c("aut", "cph"), email = "kbroman@gmail.com"), | ||
person("Kirill", "Mueller", role = c("aut", "cph"), email = "kirill.mueller@ivt.baug.ethz.ch"), | ||
person("Bastiaan", "Quast", role = c("aut", "cph"), email = "bquast@gmail.com"), | ||
person("Randall ", "Pruim", role = c("aut", "cph"), email = "rpruim@gmail.com"), | ||
person("Ben", "Marwick", role = c("aut", "cph"), email = "bmarwick@uw.edu"), | ||
person("Charlotte", "Wickham", role = c("aut", "cph"), email = "cwickham@gmail.com"), | ||
person("Oliver", "Keyes", role = c("aut", "cph"), email = "okeyes@wikimedia.org"), | ||
person("Miao", "Yu", role = c("aut", "cph"), email = "yufreecas@gmail.com") | ||
) | ||
Description: A suite of custom R Markdown formats and templates for | ||
authoring journal articles and conference submissions. | ||
License: GPL-3 | ||
Imports: | ||
rmarkdown | ||
Imports: utils, rmarkdown, knitr, yaml | ||
SystemRequirements: GNU make | ||
RoxygenNote: 5.0.1 | ||
Suggests: testthat | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
# Generated by roxygen2 (4.1.1): do not edit by hand | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export(acm) | ||
export(acs) | ||
export(acm_article) | ||
export(acs_article) | ||
export(ctex) | ||
export(ctex_template) | ||
export(frontiers_article) | ||
export(elsevier_article) | ||
export(jss_article) | ||
export(plos_article) | ||
export(rjournal_article) | ||
export(tufte_ebook) | ||
export(use_r_abstract) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,26 @@ | ||
#' Association for Computing Machinery (ACM) format. | ||
#' | ||
#' Format for creating an Association for Computing Machinery (ACM) articles. | ||
#' Adapted from | ||
#' \href{http://www.acm.org/publications/article-templates/proceedings-template.html}{http://www.acm.org/publications/article-templates/proceedings-template.html}. | ||
#' | ||
#' @inheritParams rmarkdown::pdf_document | ||
#' @param ... Arguments to \code{rmarkdown::pdf_document} | ||
#' | ||
#' @return R Markdown output format to pass to \code{\link[rmarkdown:render]{render}} | ||
#' | ||
#' @examples | ||
#' | ||
#' \dontrun{ | ||
#' library(rmarkdown) | ||
#' draft("MyArticle.Rmd", template = "acm_article", package = "rticles") | ||
#' } | ||
#' | ||
#' @export | ||
acm <- function() { | ||
template <- find_resource("acm", "template.tex") | ||
csl <- find_resource("acm" ,"acm-sig-proceedings.csl") | ||
|
||
rmarkdown::pdf_document( | ||
template = template, | ||
pandoc_args = c("--csl", rmarkdown::pandoc_path_arg(csl))) | ||
acm_article <- function(...) { | ||
pdf_document_format(..., | ||
format = "acm_article", | ||
template = "template.tex", | ||
csl = "acm-sig-proceedings.csl") | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,30 @@ | ||
#' American Chemical Society (ACS) Journal format. | ||
#' | ||
#' Format for creating an American Chemical Society (ACS) Journal articles. | ||
#' Adapted from | ||
#' \href{http://pubs.acs.org/page/4authors/submission/tex.html}{http://pubs.acs.org/page/4authors/submission/tex.html}. | ||
#' | ||
#' @inheritParams rmarkdown::pdf_document | ||
#' @param ... Arguments to \code{rmarkdown::pdf_document} | ||
#' | ||
#' @return R Markdown output format to pass to \code{\link[rmarkdown:render]{render}} | ||
#' @examples | ||
#' | ||
#' \dontrun{ | ||
#' library(rmarkdown) | ||
#' draft("MyArticle.Rmd", template = "acs_article", package = "rticles") | ||
#' } | ||
#' | ||
#' @export | ||
acs <- function(keep_tex = TRUE) { | ||
template <- find_resource("acs", "template.tex") | ||
csl <- find_resource("acs", "american-chemical-society.csl") | ||
|
||
rmarkdown::pdf_document( | ||
keep_tex = keep_tex, | ||
fig_caption = TRUE, | ||
template = template, | ||
pandoc_args = c("--csl", rmarkdown::pandoc_path_arg(csl))) | ||
acs_article <- function(..., | ||
keep_tex = TRUE, | ||
md_extensions = c("-autolink_bare_uris"), | ||
fig_caption = TRUE){ | ||
pdf_document_format(..., | ||
keep_tex = keep_tex, | ||
md_extensions = md_extensions, | ||
format = "acs_article", | ||
template = "template.tex", | ||
csl = "american-chemical-society.csl", | ||
fig_caption = fig_caption) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,28 @@ | ||
#' A LaTeX template for Chinese documents | ||
#' A PDF format for documents based on the LaTeX package \pkg{ctex} | ||
#' | ||
#' This function returns the path to a LaTeX template for Chinese documents | ||
#' using the ctex package. | ||
#' \code{ctex()} is a wrapper function for \code{rmarkdown::pdf_document()} and | ||
#' changed the default values of two arguments \code{template} and | ||
#' \code{latex_engine} so it works better with the \pkg{ctex} package. | ||
#' @param ...,template,latex_engine Passed to | ||
#' \code{markdown::\link[rmarkdown]{pdf_document}()} | ||
#' @return \code{ctex()} returns a format that can be passed to | ||
#' \code{rmarkdown::render()}; \code{ctex_template()} returns the path to a | ||
#' LaTeX template in \pkg{rticles} for Chinese documents using the \pkg{ctex} | ||
#' package. | ||
#' | ||
#' @examples | ||
#' | ||
#' \dontrun{ | ||
#' library(rmarkdown) | ||
#' draft("MyArticle.Rmd", template = "ctex", package = "rticles") | ||
#' } | ||
#' | ||
#' @export | ||
ctex <- function(..., template = ctex_template(), latex_engine = 'xelatex') { | ||
inherit_pdf_document(..., template = template, latex_engine = latex_engine) | ||
} | ||
|
||
|
||
#' @rdname ctex | ||
#' @export | ||
ctex_template <- function() find_resource('ctex', 'default.latex') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#' Elsevier journal format. | ||
#' | ||
#' Format for creating submissions to Elsevier journals. Adapted from | ||
#' \href{https://www.elsevier.com/authors/author-schemas/latex-instructions}{https://www.elsevier.com/authors/author-schemas/latex-instructions}. | ||
#' | ||
#' @inheritParams rmarkdown::pdf_document | ||
#' @param ... Additional arguments to \code{rmarkdown::pdf_document} | ||
#' | ||
#' @return R Markdown output format to pass to | ||
#' \code{\link[rmarkdown:render]{render}} | ||
#' | ||
#' @examples | ||
#' | ||
#' \dontrun{ | ||
#' library(rmarkdown) | ||
#' draft("MyArticle.Rmd", template = "elsevier_article", package = "rticles") | ||
#' } | ||
#' | ||
#' @export | ||
elsevier_article <- function(..., | ||
keep_tex = TRUE, | ||
md_extensions = c("-autolink_bare_uris")) { | ||
inherit_pdf_document(..., | ||
template = find_resource("elsevier_article", "template.tex"), | ||
keep_tex = keep_tex, | ||
md_extensions = md_extensions) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.