【发布时间】:2017-09-10 14:15:16
【问题描述】:
我正在使用 Markdown 编写我的简历,并希望有多个参考书目部分(一个用于期刊文章,另一个用于书籍章节等)。我正在使用RefManagerR 包来执行此操作,并且效果很好。
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"))
在 pdf 中呈现为
Antonsson、K、S. Brooks 和 H. Seppa (2006)。 “从瑞典中北部 Gilltjarnen 湖的化石花粉和摇蚊组合推断出的定量古温度记录”。在:第四纪科学杂志 21.8,第 831-841 页。
我想更改参考的样式。基本上,我想删除引号和In:,并在名字后面加上首字母。我知道样式是使用tools::bibstyle 设置的,我需要创建一个名为formatArticle 的例程,但tools::bibstyle 的示例仅显示如何更改排序顺序,我无法弄清楚如何查看默认的JSS 样式.
请有人告诉我如何使用bibstyle。
或者,请有人告诉我如何使用 rmarkdown 内置的书目生成器在单个文档中制作多个书目部分,以便我可以使用 csl 文件。
【问题讨论】:
-
据我所知,在使用 RefManageR 时还没有选项。不过,提高使用 bibstyle 的灵活性正在酝酿之中。
-
您打算使用
pdf以外的输出格式吗?如果没有,您可以直接使用latex来实现您想要的,尽管您需要驯服 BeaST,而且从个人经验来看,这并不好玩。
标签: r r-markdown