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

0

Issue

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:

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 9­Item Scale (PHQ­9; (Kroenke, Spitzer, Wil­liams, & Löwe, 2010)) was used to assess symptoms of depression.

I’ve tried to change the markdown text to (aka removing the brackets around the citation):

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 9­Item Scale (PHQ­9; Kroenke, Spitzer, Wil­liams, & Löwe, (2010)) was used to assess symptoms of depression.

I’d like for it to look like this:

The questionnaire Patient Health Questionnaire 9­Item Scale (PHQ­9; Kroenke, Spitzer, Wil­liams, & Löwe, 2010) was used to assess symptoms of depression.

Any idea how I’d go about doing it?

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.

Solution

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.

Answered By – user2554330

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More