-
-
Notifications
You must be signed in to change notification settings - Fork 61
Citation sorting with additional citation text #292
Comments
This seems quite sensible. I'm wondering how citeproc-js behaves. |
Test case
|
I've implemented this suggestion. I still don't know how citeproc-js behaves. @njbart any comments? |
In Zotero, if the selected CSL style file supports sorting of in-text citations (e.g., sage-harvard.csl), a checkbox “Keep Sources Sorted” becomes available in the “Add/edit sources” -> “Multiple sources” window, which, if unchecked, permits manual sorting of the individual references – but there seems to be no mechanism like the one that has just been implemented here automatically modifying the sorting of citations based on the occurrence of prefixes. (If the CSL style file does not support sorting of in-text citations (e.g., chicago-author-date.csl), the checkbox “Keep Sources Sorted” is not available.) Currently I don’t see any reasons why the new pandoc-citeproc behaviour should be problematic. If anything crops up, I’m sure it could be made optional, e.g., via a command line switch … |
In a few tests, the implementation seems to work perfectly. |
This commit also includes the test for #292, which wasn't added before.
This is something of an extension of #101.
When a CSL has a
<sort>
field set for the ordering of parenthetical citations, such as alphabetically by author, additional commentary in a parenthetical citation is disrupted.For instance, the following:
A fascinating research tidbit [@Zanadu1999, p. 35; see for comparison @Aalto2005] ...
when rendered with an alphabetical-order citer (e.g., SAGE-Harvard) will produce
A fascinating research tidbit (see for comparison Aalto, 2005; Zanadu, 1999: 35)
Ideally the filter would divide citations up into sub-blocks at each point that it finds text which is not a citation reference, and order each sub-block according to the CSL's configuration. Thus, if we had a complex citation like:
Disagreements abound [@Xylax2016; see also @Yi2014; @Ang2017; for a contrary view, see @Mutt2012]
We would divide the citation up into three sub-blocks, alphabetically order each, and produce:
Disagreements abound (Xylax, 2016; see also Ang 2017; Yi 2014; for a contrary view, see Mutt, 2012)
The text was updated successfully, but these errors were encountered: