1

我正在准备一份文件,其中我引用了不止一篇文章。我希望将它们全部放在一个括号中,例如:

(第 1 条;第 2 条;第 3 条)中提到了这一点。

不幸的是,我注意到 RMarkdown 在一年左右添加了括号:

一年左右的括号

我怎样才能删除它们?

我的文件:

---
title: Additional brackets around year in citations
author:
  - name: Mateusz Kędzior
    email: alice@sample.com
    affiliation: WUT
    footnote: Corresponding Author
abstract: |
  First line

  The second line

keywords: some \sep thing \sep some \sep where
bibliography: listb.bib # I get .bib file from http://shelah.logic.at/eindex.html
csl: elsevier-harvard.csl # I get style from: https://www.zotero.org/styles/
link-citations: true

output:
   bookdown::pdf_book:
    base_format: rticles::elsevier_article
    keep_tex: true
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

# What I receive

Cite only one article: @Sh:2

It was mentioned in: @Sh:1, @Sh:2, @Sh:3

It was mentioned in [ @Sh:1, @Sh:2, @Sh:3 ]

# Expected result

I wish to have something like:

It was mentioned in (Shelah, 1969b; Shelah, 1969a; Shelah, 1970)

# References
4

1 回答 1

1

使用这种格式:

It was mentioned in [@barras2010a; @barras2010b; @barras2010c]

换句话说,我会将您的 id 名称重命名为:、、、,然后Sh1说:Sh2Sh3

It was mentioned in [@Sh1; @Sh2; @Sh3]

这是您修改后的示例(带有我的示例参考):

---
title: Additional brackets around year in citations
author:
  - name: Mateusz Kędzior
    email: alice@sample.com
    affiliation: WUT
    footnote: Corresponding Author
output:
   html_document
references:
- id: barras2010a
  title: False Discoveries in Mutual Fund Performance - Measuring Luck in Estimated Alphas
  author:
  - family: Barras
    given: Lauren
  - family: Scaillet
    given: Olivier
  - family: Wermers
    given: Russ
  container-title: Journal of Finance
  volume: 65
  URL: 'http://onlinelibrary.wiley.com/doi/10.1111/j.1540-6261.2009.01527.x/abstract'
  DOI: 10.1111/j.1540-6261.2009.01527.x
  page: 179-216
  type: article-journal
  issued:
    year: 2010
    month: February
- id: barras2010b
  title: False Discoveries in Mutual Fund Performance - Measuring Luck in Estimated Alphas
  author:
  - family: Barras
    given: Lauren
  - family: Scaillet
    given: Olivier
  - family: Wermers
    given: Russ
  container-title: Journal of Finance
  volume: 65
  URL: 'http://onlinelibrary.wiley.com/doi/10.1111/j.1540-6261.2009.01527.x/abstract'
  DOI: 10.1111/j.1540-6261.2009.01527.x
  page: 179-216
  type: article-journal
  issued:
    year: 2010
    month: February
- id: barras2010c
  title: False Discoveries in Mutual Fund Performance - Measuring Luck in Estimated Alphas
  author:
  - family: Barras
    given: Lauren
  - family: Scaillet
    given: Olivier
  - family: Wermers
    given: Russ
  container-title: Journal of Finance
  volume: 65
  URL: 'http://onlinelibrary.wiley.com/doi/10.1111/j.1540-6261.2009.01527.x/abstract'
  DOI: 10.1111/j.1540-6261.2009.01527.x
  page: 179-216
  type: article-journal
  issued:
    year: 2010
    month: February
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

# What I receive

Cite only one article: @barras2010a

It was mentioned in: @barras2010a, @barras2010b, @barras2010c

It was mentioned in [@barras2010a; @barras2010b; @barras2010c]

# Expected result

I wish to have something like:

It was mentioned in (Shelah, 1969b; Shelah, 1969a; Shelah, 1970)

# References

这就是它所显示的:

它在(Barras、Scaillet 和 Wermers 2010a;Barras、Scaillet 和 Wermers 2010b;Barras、Scaillet 和 Wermers 2010c)中被提及

我希望这对你有帮助。

于 2017-02-25T16:02:17.387 回答