You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into something that seems like a bug, but I can't quite figure out where it comes from. I'm using bibtex (your package) to generate full citations in the body of the text in RMarkdown. However, when I generate the final document (a pdf, but the problem appears when I try other formats like html), some citations include commas that don't exist in the bib file.
Here's a simple example.
My rmd file (inspired by an earlier stack overflow suggestion here):
@article{BusemeyerTober2022,
author = {Marius R. Busemeyer and Tobias Tober},
journal = {Comparative Political Studies},
pages = {00104140221139381},
title = {Dealing with Technological Change: Social Policy Preferences and Institutional Context},
year = {2022}}
The pdf (and html) renders the following:
Busemeyer MR, Tober T (2022). "Dealing with Technological Change:, Social Policy Preferences and Institutional Context." Comparative, Political Studies, 00104140221139381.
Note two new commas: one after the colon ("Change:, Social") and one in the name of the journal ("_Comparative, Political").
Yet when I check the citation in the R console, I get the correct markdown code:
[1] "Busemeyer MR, Tober T (2022). “Dealing with Technological Change: Social"
[2] "Policy Preferences and Institutional Context.” _Comparative Political"
[3] "Studies_, 00104140221139381."
I would add that it doesn't affect all references (eyeballing my file, I would say about 1 in 4). I don't know if I'm doing something wrong, if rmarkdown is causing the problem, or if there's a bug, but I was wondering if anyone had an idea of what's happening here. Thanks!
The text was updated successfully, but these errors were encountered:
I've tested it out and can confirm an issue with the StackOverflow suggestion. However, bibtex does not have a custom print style for citations. Instead, bibtex interprets the bibliography file and places it into the bibentry class, which is part of the utils package.
Thus, I think you can fix the issue by switching from:
Thanks for this terrific package!
I ran into something that seems like a bug, but I can't quite figure out where it comes from. I'm using bibtex (your package) to generate full citations in the body of the text in RMarkdown. However, when I generate the final document (a pdf, but the problem appears when I try other formats like html), some citations include commas that don't exist in the bib file.
Here's a simple example.
My rmd file (inspired by an earlier stack overflow suggestion here):
minimalbib.bib contains the following:
The pdf (and html) renders the following:
Note two new commas: one after the colon ("Change:, Social") and one in the name of the journal ("_Comparative, Political").
Yet when I check the citation in the R console, I get the correct markdown code:
I would add that it doesn't affect all references (eyeballing my file, I would say about 1 in 4). I don't know if I'm doing something wrong, if rmarkdown is causing the problem, or if there's a bug, but I was wondering if anyone had an idea of what's happening here. Thanks!
The text was updated successfully, but these errors were encountered: