R markdown - 如何删除引用文章中年份周围的额外括号?
R markdown - how can I remove additional brackets around year in cited articles?
我正在准备一份文档,其中我引用了不止一篇文章。我希望将它们全部放在一个括号中,例如:
在(第 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
使用这种格式:
It was mentioned in [@barras2010a; @barras2010b; @barras2010c]
换句话说,我会将您的 ID 名称重命名为:Sh1
、Sh2
、Sh3
,然后说:
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)中被提及
希望对你有所帮助。
我正在准备一份文档,其中我引用了不止一篇文章。我希望将它们全部放在一个括号中,例如:
在(第 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
使用这种格式:
It was mentioned in [@barras2010a; @barras2010b; @barras2010c]
换句话说,我会将您的 ID 名称重命名为:Sh1
、Sh2
、Sh3
,然后说:
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)中被提及
希望对你有所帮助。