mitchelloharawild / vitae

R Markdown Résumés and CVs

Home Page:https://pkg.mitchelloharawild.com/vitae/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect title case in APA references

felixdidi opened this issue · comments

I have created a CV based on the this one: https://github.com/HanZhang-psych/CV

For some reason, the bibliography_entries are set entirely in title case, even though I am using the "apa-cv.csl" file which should prevent this. When I create a normal bibliography (through citing with "@"), the titles are correctly set in sentence case. Even stranger, it seems like this error does not occur in the CV of HanZhang.

Bildschirmfoto 2022-01-05 um 15 43 18

I am using vitae version 0.5.1 and the latest version of RStudio which comes with Pandoc version 2.14.0.3

Here is a reproducible example (nothing special there):

Header

---
name: Felix
surname: Dietrich
position: "Something"
address: "Somewhere"
www: www.felix-dietrich.de

headcolor: 414141 # use black color 
date: "`r Sys.setlocale('LC_TIME', 'C'); format(Sys.time(), '%B %Y')`"
csl: https://raw.githubusercontent.com/citation-style-language/styles/master/apa-cv.csl
output: 
  vitae::awesomecv:
    keep_tex: yes
---

Bibliography

vitae::bibliography_entries("articles.bib")

Bib File

@article{schneiderWhatImportantWhen2020,
  title = {What Is Important When We Evaluate Movies? {{Insights}} from Computational Analysis of Online Reviews},
  shorttitle = {What Is Important When We Evaluate Movies?},
  author = {Schneider, Frank M. and Domahidi, Emese and Dietrich, Felix},
  date = {2020-08-13},
  journaltitle = {Media and Communication},
  shortjournal = {MaC},
  volume = {8},
  number = {3},
  pages = {153--163},
  issn = {2183-2439},
  doi = {10.17645/mac.v8i3.3134},
  url = {https://www.cogitatiopress.com/mediaandcommunication/article/view/3134},
  urldate = {2021-02-01},
  file = {/Users/fedietri/Zotero/storage/J4F6SEWR/Schneider et al_2020_What Is Important When We Evaluate Movies.pdf}
}

The .bib file is exported from Zotero and the title is automatically set in title case, but should be converted to sentence case by the .csl file (with the exception of words protected by double curly brackets).

Update (and temporary fix)

The issue seems to be caused by my system locale, which was not set to English. If I change it to English, the problem does not occur with bibliography_entries() anymore. Maybe a future update of vitae can implement a fix so that it will also work on non-English systems by default. If I find the time, I may look into how this could be done, but for now this fix works for me. Adding this comment in case other people encounter the same problem in the future. I will leave the issue open for now, but please close it if you want to.

Strange, thanks for the temporary fix. This will probably help identify why it is not being converted to sentence case. I'm curious if this happens to you with other R Markdown documents, such as rmarkdown::pdf_document.

Seems to be fixed now for non English systems as well (vitae 0.5.2 and pandoc 2.19.2).