Change bibliography style

I am writing my resume using markdowns and want to have several sections of the bibliography (one for journal articles, another for book sections, etc.). I use the RefManagerR package for this and it works well.

 library("RefManageR") BIB <- structure(list(structure(list(title = "Quantitative palaeotemperature records inferred from fossil pollen and chironomid assemblages from Lake Gilltjarnen, northern central Sweden", author = structure(list(structure(list(given = "K", family = "Antonsson", role = NULL, email = NULL, comment = NULL), .Names = c("given", "family", "role", "email", "comment")), structure(list(given = "SJ", family = "Brooks", role = NULL, email = NULL, comment = NULL), .Names = c("given", "family", "role", "email", "comment")), structure(list(given = "H", family = "Seppa", role = NULL, email = NULL, comment = NULL), .Names = c("given", "family", "role", "email", "comment"))), class = "person"), journal = "Journal of Quaternary Science", year = "2006", number = "8", pages = "831-841", volume = "21"), .Names = c("title", "author", "journal", "year", "number", "pages", "volume"), bibtype = "Article", key = "RID:0428130725771-5", dateobj = structure(1136070000, class = c("POSIXct", "POSIXt"), tzone = "", day.mon = 0L))), strings = structure(character(0), .Names = character(0)), class = c("BibEntry", "bibentry")) NoCite(BIB) PrintBibliography(BIB, .opts = list(style = "latex", bib.style = "authoryear", sorting = "ydnt")) 

What is displayed in pdf as

Antonson, C., Brooks, and H. Seppa (2006). "Quantitative paleotemperature records obtained from fossil pollen and chironomid groups from Lake Giltsรคrnen, northern central Sweden." In: Journal of Quaternary Science 21.8, pp. 831-841.

I want to change the style of the link. Basically, I want to remove the quotation marks and In: and put the initials after the name. I understand that the style is set using tools::bibstyle and that I need to make a routine called formatArticle , but the example for tools::bibstyle only shows how to change the sort order, and I cannot figure out how to see the default JSS style.

Please someone show me how to use bibstyle .

Alternatively, please someone can show me how to make several bibliography sections in one document using the bibliography generator built into rmarkdown, so I can use the csl file.

+7
r r-markdown
source share
1 answer

Answering only the question about bibliography in several sections: If you want to do this "using the bibliography generator built into rmarkdown", you will need to change the latex template used to create the pdf file from the Rmarkdown file. Define the template in the YAML section like this:

 output: pdf_document: template: mytemplate.tex 

links on how to work with templates.

A simpler approach would be to add several sections to the RMarkdown file and print the badges. Example .Rmd file:

 --- title: "2 bibs" output: pdf_document --- ```{r init, echo=FALSE} library("RefManageR") ## loading some bib entries from example file file <- system.file("Bib", "biblatexExamples.bib", package = "RefManageR") BibOptions(check.entries = FALSE) bib <- ReadBib(file) ## Gerating the entries for the 2 sections bib1 = bib[[5:6]] bib2 = bib[[7:8]] ``` Intro text. # Bib 1 ```{r, results='asis', echo=FALSE} NoCite(bib1) PrintBibliography(bib1, .opts = list(style = "markdown", bib.style = "authoryear", sorting = "ydnt")) ``` # Bib 2 ```{r, results='asis', echo=FALSE} NoCite(bib2) PrintBibliography(bib2, .opts = list(style = "markdown", bib.style = "authoryear", sorting = "ydnt")) ``` 
0
source share

All Articles