if (requireNamespace("bibtex")) {
file <- system.file("Bib", "biblatexExamples.bib", package = "RefManageR")
BibOptions(check.entries = FALSE)
bib <- ReadBib(file)
Citet(bib, 12)
NoCite(bib, title = "Alkanethiolate")
PrintBibliography(bib, .opts = list(style = "latex",
bib.style = "authoryear"))
}
if (FALSE) {
if (requireNamespace("bibtex")){
Citep(bib, c("loh", "geer"), .opts = list(cite.style = "numeric"),
before = "see e.g., ")
Citet(bib, "loh", .opts = list(cite.style = "numeric", super = TRUE))
AutoCite(bib, eprinttype = "arxiv", .opts = list(cite.style = "authoryear"))
AutoCite(bib, eprinttype = "arxiv", .opts = list(cite.style = "pandoc"))
Citep(bib, author = "kant")
## shorthand field in both entries gets used for numeric and alphabetic labels
TextCite(bib, author = "kant", .opts = list(cite.style = "alphabetic"))
TextCite(bib, author = "kant", .opts = list(cite.style = "numeric"))
TextCite(bib, author = "kant", .opts = list(cite.style = "alphabetic",
style = "html"))
punct <- unlist(BibOptions("bibpunct"))
punct[3:4] <- c("(", ")")
TextCite(bib, 33, .opts = list(bibpunct = punct, cite.style = "alphabetic"))
BibOptions(restore.defaults = TRUE)
}
}
if (FALSE) {
library(knitr)
## See also TestNumeric.Rmd and TestAlphabetic.Rmd for more examples
old.dir <- setwd(tdir <- tempdir())
doc <- system.file("Rmd", "TestRmd.Rmd", package = "RefManageR")
file.show(doc)
tmpfile <- tempfile(fileext = ".html", tmpdir = tdir)
knit2html(doc, tmpfile)
browseURL(tmpfile)
doc <- system.file("Rhtml", "TestAuthorYear.Rhtml", package = "RefManageR")
file.show(doc)
tmpfile <- tempfile(fileext = ".html", tmpdir = tdir)
knit2html(doc, tmpfile)
browseURL(tmpfile)
setwd(old.dir)
unlink(tdir)
}
Run the code above in your browser using DataLab