oc-csl: New custom option `org-cite-csl-bibtex-titles-to-sentence-case'
* lisp/oc-csl.el (org-cite-csl-bibtex-titles-to-sentence-case): New variable. (org-cite-csl--processor): Create the itemgetter using the new option. * etc/ORG-NEWS (New option ~org-cite-csl-bibtex-titles-to-sentence-case~): Announce the change.
This commit is contained in:
parent
a92951d0c6
commit
782f6c33be
11
etc/ORG-NEWS
11
etc/ORG-NEWS
|
@ -61,6 +61,17 @@ The default value used to be pulled from =dvipng= process type from
|
|||
=latexmk= (when available), or running =latex= multiple times, so that
|
||||
all the references are resolved in the generated png.
|
||||
|
||||
*** New option ~org-cite-csl-bibtex-titles-to-sentence-case~
|
||||
|
||||
When this option is non-nil then title fields in bibtex bibliography
|
||||
entries are converted to sentence-case before being formatted
|
||||
according to a CSL style, except for entries with a =langid= field
|
||||
specifying a non-English language. When nil, this conversion is
|
||||
limited to entries having a =langid= field specifying a variant of
|
||||
English. The default value is ~t~ as the CSL standard assumes that
|
||||
English titles are specified in sentence-case but the bibtex
|
||||
bibliography format requires them to be written in title-case.
|
||||
|
||||
** New functions and changes in function arguments
|
||||
|
||||
# This also includes changes in function behavior from Elisp perspective.
|
||||
|
|
|
@ -321,6 +321,24 @@ in the bibliography measured in characters."
|
|||
:type 'string
|
||||
:package-version '(Org . "9.7"))
|
||||
|
||||
(defcustom org-cite-csl-bibtex-titles-to-sentence-case t
|
||||
"Convert bibtex title fields to sentence-case by default.
|
||||
|
||||
When non-nil, title fields in bibtex bibliography entries are
|
||||
converted to sentence-case before being formatted according to a
|
||||
CSL style, except for entries with a `langid' field specifying a
|
||||
non-English language. When nil, title conversion is limited to
|
||||
entries having a `langid' field specifying a variant of English.
|
||||
|
||||
Conversion of titles to sentence-case by default is in most cases
|
||||
useful because the CSL standard assumes that English titles are
|
||||
specified in sentence-case but the bibtex bibliography format
|
||||
requires them to be written in title-case."
|
||||
:group 'org-cite
|
||||
:package-version '(Org . "9.8")
|
||||
:type 'boolean
|
||||
:safe #'booleanp)
|
||||
|
||||
|
||||
;;; Internal variables
|
||||
(defconst org-cite-csl--etc-dir
|
||||
|
@ -579,7 +597,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-bibtex-titles-to-sentence-case))
|
||||
(org-cite-csl--locale-getter)
|
||||
locale)))
|
||||
(plist-put info :cite-citeproc-processor processor)
|
||||
|
|
Loading…
Reference in New Issue