andras-simonyi / citeproc-el

A CSL 1.0.2 Citation Processor for Emacs.
GNU General Public License v3.0
85 stars 9 forks source link

Fix incorrect capitalization of acronyms in journal names #80

Closed rudolf-adamkovic closed 2 years ago

rudolf-adamkovic commented 2 years ago

Example

@Article{carter+2015,
  author       = {S.E. Carter and M. Jones and V.F. Gladwell},
  title        = {Energy expenditure and heart rate response to
                  breaking up sedentary time with three different
                  physical activity interventions},
  journal      = {Nutrition, metabolism, and cardiovascular diseases,
                  NMCD},
  year         = 2015,
  volume       = 25,
  doi          = {10.1016/j.numecd.2015.02.006},
  number       = 5,
  abstract     = {...}
}

(CSL: APA)

Expected

Carter, S., Jones, M., & Gladwell, V. (2015). Energy expenditure and heart rate response to breaking up sedentary time with three different physical activity interventions. Nutrition, Metabolism, and Cardiovascular Diseases, NMCD, 25(5). https://doi.org/10.1016/j.numecd.2015.02.006

[bold emphasis: mine]

Actual

Carter, S., Jones, M., & Gladwell, V. (2015). Energy expenditure and heart rate response to breaking up sedentary time with three different physical activity interventions. Nutrition, Metabolism, and Cardiovascular Diseases, Nmcd, 25(5). https://doi.org/10.1016/j.numecd.2015.02.006

[bold emphasis: mine]

andras-simonyi commented 2 years ago

(similarly to Pandoc's citeproc and bib(la)tex, I think) you need to use curly brackets around regions where the original case has to be protected:

journal      = {Nutrition, metabolism, and cardiovascular diseases, {NMCD}},

see also https://tex.stackexchange.com/questions/238078/biblatex-preserve-case-of-acronyms-in-title

rudolf-adamkovic commented 2 years ago

@andras-simonyi Even in journal names? I thought the processors leave those alone, like publishers.

andras-simonyi commented 2 years ago

Of course, the concrete transformation depends on the style and processor, but, for instance, Pandoc renders the original 'Journal of Capitalized lowercase' journal field as 'Journal of Capitalized Lowercase'' with the CSL chicago-author-date style, so yes, processors treat journal names similarly to other titles in this respect. Or do you specifically mean acronyms in journal titles?

rudolf-adamkovic commented 2 years ago

@andras-simonyi I have just tried pandoc (2.16.2) with the same APA CSL, and it does re-capitalize the title to sentence case (like citeproc.el does) which proves my statement above ("leave those alone") wrong. As for the "NMCD", pandoc does generate "NMCD" instead of "Ncmd" even without braces. I guess we could consider that a bug (or feature) in pandoc. In fact, I have just tried to add "NCMD" to the title, and pandoc generates "NCMD" for that as well. Somewhere along the way, pandoc has learned not to sentence-case all-uppercase words!

rudolf-adamkovic commented 2 years ago

Closing. Thank you @andras-simonyi for helping me to see the facts.