andras-simonyi / citeproc-el

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

Journal titles exported incorrectly in sentence case with oscola.csl #159

Closed icaruszhu closed 7 months ago

icaruszhu commented 7 months ago

Dear Andras,

Many thanks for the wonderful package!

I have encountered an issue for a while and I tried to trouble shoot myself with no success.

When I export an bibliographic item using the Oxford University Standard for Citation of Legal Authorities (OSCOLA) (csl link: https://github.com/citation-style-language/styles/blob/master/oscola.csl), the journal titles always appear incorrectly in sentence case, but they are meant to be in title case.

For example, here is an item:

@article{nissenbaumProtectingPrivacyInformation1998,
  title = {Protecting {{Privacy}} in an {{Information Age}}: {{The Problem}} of {{Privacy}} in {{Public}}},
  shorttitle = {Protecting {{Privacy}} in an {{Information Age}}},
  author = {Nissenbaum, Helen},
  date = {1998},
  journaltitle = {Law and Philosophy},
  volume = {17},
  number = {5/6},
  pages = {559--596},
  publisher = {{Springer}},
  issn = {0167-5249},

}

The rendered result is as follows:

Helen Nissenbaum, “Protecting Privacy in an Information Age: The Problem of Privacy in Public” (1998) 17 Law and philosophy 559

The journal title should be in title case ("Law and Philosophy") rather than sentence case ("Law and philosophy"). I am not sure this is an issue with the csl file or citeproc or otherwise.

Any advice on how to solve the above issue would be much appreciated!

andras-simonyi commented 7 months ago

Hello, I think the simplest solution is to modify the CSL style you are using. Specifically, if one changes line 425 of oscola.csl to

<text variable="container-title" text-case="title"/>

then journal titles are rendered in title case for articles. (Citeproc-el sentence-cases title fields during the BibTeX -> CSL conversion because many CSL styles assume that titles are specified in sentence case.) Also, if you are convinced that OSCOLA should title-case journal titles then it might be worth opening an issue about the problem in the CSL styles repository.

icaruszhu commented 7 months ago

Andras, thank you so much!

The modification of the oscola.csl does work like a charm!

<text variable="container-title" text-case="title"/>

I have been struggling with this for a long time with many different attempts, none of which work previously. Your advice is deeply appreciated! (I am also thankful the line number of the oscola file is pinpointed. It just takes me 5 minutes to have this issue fixed.)

I think the the issue can be closed. !

icaruszhu commented 7 months ago

I will try to alert the CLS repostory to fix this.