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
Possible bug in title casing that affects journal names #120
Comments
Thanks for reporting! There are two intertwined issues here: (i) how As for (i), I've checked the CSL style used in the example (elsevier-harvard.csl) and it doesn't require any case transformation for journal titles, so the output should contain the content of the CSL (ii) is a bit more complicated. As it was discussed concerning several What's happening in this concrete case is that the CSL rendering doesn't touch the case of the |
I'm also having this trouble with journal titles rendering in sentence-case on my exports. I don't fully follow your comment above. In particular, it seems to me that the 'journal' field of bibtex entries do not require case-protecting brackets in the journal name. For example (as produced by a Better BibTeX export in Zotero):
This does not have extra case-protecting brackets in the journal field, but when exported via pandoc (shown below), the case is correct:
Considering this, I would think that (i) the org biblatex -> CSL conversion of the journal field should not alter the case , and that (ii) org-citeproc rendering of the CSL should preserve case as well. However, when I modify I must be missing something... thank you for the help! (For reference, here's the tex doc I used to test rendering in pandoc):
|
Hello, as I tried to explain earlier (see also the discussion concerning issue #159), the main problem is that in CSL the expectation is that the input is sentence-cased, this is why citeproc-el does the conversion. E.g., the latest CSL specification says that
Since the default case is, in effect, sentence case, CSL styles should explicitly use the |
Thanks for the quick response and your patience with me, I'm still learning CSL. I've tried using the online CSL visual editor (editor.citationstyles.org) to change the style manually. I manually exported CSL json from Zotero to use as an example citation:
Of note, the When I edit the default I understand that if citeproc-el did not attempt to manually convert fields to sentence case, it would be impossible to render a style that required a sentence-cased journal title. Since neither the Zotero nor Pandoc CSL exporters do this, however, this feels like an option that does not need to be enabled by default. Furthermore, citeproc-el suffers from the same issue as the CSL processors used to in that it cannot recognize proper nouns. If citeproc-el did not attempt the sentence-case conversion on its own, it's behaviour would be consistent with other CSL export tools, which I feel would be the best option. Again, I appreciate your patience with me, and you've clearly been thinking about these questions longer than I have, but this is my two cents. It seems like many of the current issues submitted to citeproc-el revolve around people not getting the casing they expect, and I wonder if making the behavior consistent with the other CSL exporters (Zotero, Pandoc) would resolve this. Please let me know if I'm misunderstanding something! N.b. it seems like APA requires sentence-cased titles. I tried a Zotero export directly to RTF in APA 7th ed. of a textbook, and it exported in title case. Their recommendation about this is documented here. In short, they make no attempt to perform a sentence case conversion by default and instead ask that the Zotero entries themselves be stored in sentence case. It seems reasonable for citeproc-el to do the same. |
Thanks for your comments! I think that it should be taken into consideration that, similarly to Zotero, citeproc-el doesn't do any case conversion on CSL input -- if you were using a CSL-JSON bibliography then it would simply assume that it is already in the required sentence case. The problem is that we talk about bib(la)tex input for which the casing expectation is the exact opposite of CSL's: the values of title fields should be in title case, with protecting brackets around strings that should not be touched during case conversion (e.g., "IEEE"). See the long discussion (partly with field experts) about issue #71 for some details. The long and short of it is that by default (i) bib(la)tex assumes that title fields in the input are in title case with protective brackets if necessary, while (ii) CSL processors assume that title fields are in sentence case, so the default behaviour for a CSL processor in case of bib(la)tex input should be conversion to sentence case, and this is what citeproc-el does. (I don't see how anything else wouldn't lead to users shooting themselves in the foot when trying to use their bibliography files both with bib(la)tex and CSL processors and styles.) A complication is that all of these assumptions should apply only to English entries, this is why citeproc-el already provides a way to limit this behaviour to entries with explicit English langid values. This option can also be abused to stop citeproc-el from converting English entries that do not have a langid. Having said all that, I don't want to be dogmatic about this issue (which is indeed a recurring one), so I plan to introduce a dedicated user option in Org to disable title field case conversion for langid-less bib(la)tex bibliography entries (it would simply expose the already existing citeproc option). What do you think about this solution? PS. As far as can see, Pandoc's bib(la)tex->CSL converter also performs sentence case conversion by default, the difference is that it skips fully capitalized words like "IEEE" (see also jgm/pandoc-citeproc#269). |
There is possible bug in
citeproc-hash-itemgetter-from-any
related to changing case that affects the journal in exported citations. This is related to issue #119.To reproduce it, I used this bibtex entry:
Then this helper function:
With the default setting of
no-sentcase-wo-langid
of nil, the journal name is sentence cased, which is not correct I think. You can protect it like: {ACS} {C}atalysis, but that should not be necessary.If you sent the
no-sentcase-wo-langid
tot
, this does not happen:#+BEGIN_SRC emacs-lisp
(render "elsevier-harvard.csl" '(((id . "kitchin-2015-examp")
(prefix . "See ")
(suffix . "")
(locator . "2")
(label . "page")
(suppress-author)))
t)
#+END_SRC
#+RESULTS:
: <<citeproc_bib_item_1>>Kitchin, J.R., 2015. Examples of Effective Data Sharing in Scientific Publishing. ACS Catalysis 5, 3894–3899. https://doi.org/10.1021/acscatal.5b00538
The text was updated successfully, but these errors were encountered: