简体   繁体   English

是否可以从 R 中的文本引用中删除括号?

[英]Is it possible to remove parentheses from in-text citations in R?

I'm trying to remove a parenthesis from a citation that is already within a parenthesis.我正在尝试从已经在括号内的引用中删除括号。 At the moment my markdown text looks as follows:目前我的 markdown 文本如下所示:

The questionnaire Patient Health Questionnaire 9-Item Scale (PHQ-9; [@Kroenke2010]) was used to assess symptoms of depression.

Which ends up like this:最终是这样的:

The questionnaire Patient Health Questionnaire 9Item Scale (PHQ9; (Kroenke, Spitzer, Williams, & Löwe, 2010)) was used to assess symptoms of depression.问卷患者健康问卷 9 项量表 (PHQ9;(Kroenke, Spitzer, Williams, & Löwe, 2010)) 用于评估抑郁症的症状。

I've tried to change the markdown text to (aka removing the brackets around the citation):我试图将 markdown 文本更改为(也就是删除引用周围的括号):

The questionnaire Patient Health Questionnaire 9-Item Scale (PHQ-9; @Kroenke2010) was used to assess symptoms of depression.

Which marginally improves how it looks:这略微改善了它的外观:

The questionnaire Patient Health Questionnaire 9Item Scale (PHQ9; Kroenke, Spitzer, Williams, & Löwe, (2010)) was used to assess symptoms of depression.问卷患者健康问卷 9 项量表 (PHQ9;Kroenke, Spitzer, Williams, & Löwe, (2010)) 用于评估抑郁症的症状。

I'd like for it to look like this:我希望它看起来像这样:

The questionnaire Patient Health Questionnaire 9Item Scale (PHQ9; Kroenke, Spitzer, Williams, & Löwe, 2010) was used to assess symptoms of depression.问卷患者健康问卷 9 项量表 (PHQ9; Kroenke, Spitzer, Williams, & Löwe, 2010) 用于评估抑郁症的症状。

Any idea how I'd go about doing it?知道我会怎么做 go 吗?

Edit: Since I am very new to this stuff I don't know if it's valuable information but I'll drop this here as well:编辑:由于我对这些东西很陌生,所以我不知道它是否有价值,但我也会把它放在这里:

bibliography      : ["r-references.bib", "library.bib"]
documentclass     : "apa6"

Edit: I tried to search around for a solution and the only thing I found was this thread which more or less has the same question.编辑:我试图四处寻找解决方案,我发现的唯一一件事就是这个线程或多或少有相同的问题。 Asked about 1 & 1/2 year ago and no answers.大约 1 和 1/2 年前被问到,没有答案。

For me it works with this format:对我来说,它适用于这种格式:

[PHQ-9; @Kroenke2010] was used to assess symptoms

You can read more about pandoc-citeproc formatting here: https://pandoc.org/MANUAL.html#citations .您可以在此处阅读有关pandoc-citeproc格式的更多信息: https://pandoc.org/MANUAL.html#citations

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM