Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First author having full name in in-text citation (but just a few instances, not all citations) #2453

Closed
koichiosamura opened this issue Feb 12, 2023 · 6 comments

Comments

@koichiosamura
Copy link

koichiosamura commented Feb 12, 2023

Hi there,

I am facing trouble with some of my in-text citations, in which they bring the full name of the first author. Curiously, this is happening with two authors with the same last name, distributed in five different papers.

Here is how the bibtex is formatted for one of the papers:

test.rmd

---
title: "Test"
author: ""
date: "February 2023"
fontsize: 12pt
output: pdf_document
bibliography: test.bib
csl: chicago-author-date.csl
---

I have citations using both [@pereiraWhatConditionsPresidents2005] or Pereira, Power and Renno [-@pereiraWhatConditionsPresidents2005].

test.bib

@article{pereiraWhatConditionsPresidents2005,
	title = {Under {What} {Conditions} {Do} {Presidents} {Resort} to {Decree} {Power}? {Theory} and {Evidence} from the {Brazilian} {Case}},
	volume = {67},
	doi = {10.1111/j.1468-2508.2005.00313.x},
	number = {1},
	journal = {The Journal of Politics},
	author = {Pereira, Carlos and Power, Timothy J. and Renno, Lucio},
	year = {2005},
	pages = {178--200}
}

Regardless on how I cite these papers (i.e., [@reference] or [-@reference]), it always bring the full name for the first author. I emphasize that this happens only with this name Pereira (there are two different authors with the same last name in this paper), and I have a few dozens of other authors cited but the issue does not happen with them.

I noticed that issue #586 had the same problem and it was suggested to use "citation_package: natbib" and "biblio-style: apalike". However, in this work I need to use Chicago style, so despite using the Chicago csl it will bring APA. I tried searching for a Chicago equivalent for biblio-style but could not find any.

I am using the latest versions of Rmarkdown and all packages I have installed. Thank you.

@cderv
Copy link
Collaborator

cderv commented Feb 13, 2023

This is what I am getting
image

I am not sure to see what you are mentioning. Is the above having the issue ?

I used a web CSL for reproducibility (test.bib is yours unchanged)

---
title: "Test"
author: ""
date: "February 2023"
fontsize: 12pt
output: pdf_document
bibliography: test.bib
csl: https://www.zotero.org/styles/chicago-author-date
---

I have citations using both [@pereiraWhatConditionsPresidents2005] or Pereira, Power and Renno [-@pereiraWhatConditionsPresidents2005].

Otherwise can you share a screenshot of the wrong output ?

Can you share the pandoc version you are using ? rmarkdown::pandoc_version()

thanks

@koichiosamura
Copy link
Author

koichiosamura commented Feb 13, 2023

Thank you for your reply. My pandoc version is 2.14.0.3.

In the screenshot you sent you have the correct format, but when I try I get the full name again (as shown in the screenshot below), even using a web CSL as you did.

Here is the code in Rmarkdown:
Screenshot 2023-02-13 at 14 41 24

And here is the output:
Screenshot 2023-02-13 at 14 41 04

One interesting thing that I just noticed is that if I use only one reference (like in the screenshot below), I have the correct format as you have in your output too.

Code with one reference only:
Screenshot 2023-02-13 at 14 43 21

Output with one reference only:
Screenshot 2023-02-13 at 14 43 44

I emphasize that I have this issue only with these two authors called Pereira, when they come as first authors (i.e., when they come as second author there is no problem). Other people do not result in the same issue, regardless how many different papers from them I am citing.

Thank you for your time and support!

@cderv
Copy link
Collaborator

cderv commented Feb 13, 2023

One interesting thing that I just noticed is that if I use only one reference (like in the screenshot below), I have the correct format as you have in your output too.

Can you share with me more references in the bib file then to try out on my side ?

it seems that using the first example providing which I try before you are having no issue like me right ?

@cderv
Copy link
Collaborator

cderv commented Feb 13, 2023

Possibly something related to disambiguation that we find in CSL spec . CSL for chicago style seems to have configuration about this - see its source

I found this information in a possibly related issue in another tools that use Pandoc and Pandoc citeproc like R Markdown See quarto-dev/quarto-cli#4294 (comment) there.

CSL for chicago style seems to have configuration about this - see its source

@koichiosamura
Copy link
Author

Can you share with me more references in the bib file then to try out on my side ?

it seems that using the first example providing which I try before you are having no issue like me right ?

Here goes the other references:

@article{pereiraSurprisingSuccessMultiparty2012,
	title = {The {Surprising} {Success} of {Multiparty} {Presidentialism}},
	volume = {23},
	doi = {10.1353/jod.2012.0041},
	number = {3},
	journal = {Journal of Democracy},
	author = {Pereira, Carlos and Melo, Marcus Andr{\'e}},
	year = {2012},
	pages = {156--170}
}


@article{pereiraCostGoverningStrategic2004,
	title = {The {Cost} of {Governing}: {Strategic} {Behavior} of the {President} and {Legislators} in {Brazil}’s {Budgetary} {Process}},
	volume = {37},
	doi = {10.1177/0010414004266866},
	number = {7},
	journal = {Comparative Political Studies},
	author = {Pereira, Carlos and Mueller, Bernardo},
	year = {2004},
	pages = {781--815}
}

@article{pereiraWhatConditionsPresidents2005,
	title = {Under {What} {Conditions} {Do} {Presidents} {Resort} to {Decree} {Power}? {Theory} and {Evidence} from the {Brazilian} {Case}},
	volume = {67},
	doi = {10.1111/j.1468-2508.2005.00313.x},
	number = {1},
	journal = {The Journal of Politics},
	author = {Pereira, Carlos and Power, Timothy J. and Renno, Lucio},
	year = {2005},
	pages = {178--200}
}

@article{pereira2003successful,
  title={Successful Re-election Strategies in Brazil: The Electoral Impact of Distinct Institutional Incentives},
  author={Pereira, Carlos and Renno, Lucio},
  journal={Electoral Studies},
  volume={22},
  number={3},
  pages={425--448},
  year={2003},
  doi={10.1016/S0261-3794(01)00057-9}
}

@article{pereiraHemogramaGovernabilidadeNo,
	title = {Hemograma da Governabilidade no {Brasil}: Checando a Sa{\'u}de do Presidencialismo de Coaliz{\~a}o},
	author = {Pereira, Celina and Co{\^e}lho, Denilson Bandeira},
	year = {2016},
	journal = {Revista {\'I}bero-Americana de Estudos Legislativos},
	volume = {5},
	number = {1},
	pages = {1--23}
}

Possibly something related to disambiguation that we find in CSL spec . CSL for chicago style seems to have configuration about this - see its source

I found this information in a possibly related issue in another tools that use Pandoc and Pandoc citeproc like R Markdown See quarto-dev/quarto-cli#4294 (comment) there.

CSL for chicago style seems to have configuration about this - see its source

Following this reply, I tried once more without the second author and indeed there was no problem, so I will take a look at the links you provided and try to solve the issue. Thank you very much.

@github-actions
Copy link

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants