On 11/05/2024 22:33, András Simonyi wrote:
since bibtex and biblatex requires title fields to be in title case
but CSL assumes that they are in sentence-case, citeproc-el converts
title fields in bib(la)tex bibliography databases into sentence-case
before processing them except for entries with an explicit non-English
langid value.
I am not a user of citeproc-el, so feel free to disregard my comments.
In the past I had to adjust BibTeX styles, but yesterday I was surprised
that there are options for upper case, lower case, and sentence-style
capitalization, but not for title-style capitalization. It seems that
both approaches with title case and with sentence case have some
shortcomings. Likely title case like in BibTeX requires more explicit
hints and perhaps there are cases when available hints are not enough to
get specific formatting. I still expect that CSL needs hints as well to
avoid improper formatting.
Is it possible to keep title formatting from .bib files till it becomes
known that specific style requires sentence case for particular entry
type? I had a hope that it might alleviate the issue and to make things
working out of the box for more users.
I'm a bit unsure about naming the option:
Perhaps `org-cite-csl-sentence-case-bibtex-titles-without-langid'
A variant: org-cite-csl-bibtex-title-to-sentence-case
@@ -584,7 +599,8 @@ property in INFO."
(processor
(citeproc-create
(org-cite-csl--style-file info)
- (citeproc-hash-itemgetter-from-any bibliography)
+ (citeproc-hash-itemgetter-from-any
+ bibliography (not org-cite-csl-sentence-case-bibtex-titles))
(org-cite-csl--locale-getter)
locale)))
(plist-put info :cite-citeproc-processor processor)
I am not in the context, so I may be completely wrong.
Does it means that you added one more argument to `citeproc-create' and
that consistent Org and citeproc-el versions must be used? If so,
wouldn't it better to pass a property list to allow newer Org to work
with older citeproc-el or vice versa? It may be tricky to preserve
backward-forward compatibility on this step, but it should make further
changes easier. It may be reasonable to explicitly add version of
"protocol" to the property list, so that citeproc-el may decide if error
should be signaled in the case of serious version difference.
It is not clear for me why `org-cite-csl-sentence-case-bibtex-titles' is
a part of Org, not of citeproc-el. The only thing that Org can do is to
pass it to citeproc-el. It is not configurable per .org file and likely
it should not be. From my point of view it might be more suitable per
.bib file. Anyway it is almost unrelated to Org.