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
Inline citation ordering not as expected #206
Comments
I wonder if this behavior is related to http://docs.citationstyles.org/en/stable/specification.html#sorting
If we do find a way to get citations to sort within a series of citations, would we want this as the default behavior? Or is it useful that citations remain in the order of the raw markdown? @slochower I am not sure why the order in your manuscript is not |
But we do have
Why wouldn't you expected 8 to be the first (followed by 9, 10, and then 11)? Maybe I'm misunderstanding the sorting. |
The input is:
The output is:
However, this output corresponds to:
So the input order is not preserved as I had assumed. Instead what I think is happening is that the rendered citations are being sorted as strings rather than numbers! @adam3smith sorry to bug you, but any idea how we get our citation-numbers to sort as numbers rather than strings? |
Ah, good insight! Wonder if it could be related to something with |
Yes, this appears to be the result of poorly written specifications and pandoc-citeproc reading them overly literally: cc @rmzelle who may know more on why this wasn't included as a number. (to be clear -- I verified this issue with a local copy of pandoc) |
Looping in @jgm. Is it intentional that |
@adam3smith are you referencing these lines in the |
I was looking at the corresponding section in the specifications but that's just a different way of looking at the same thing, yes. |
David Slochower <notifications@github.com> writes:
Looping in @jgm. Is it intentional that `pandoc-citeproc` treats `citation-number` as a string and not an integer, and therefore sorts `citation-number` alphabetically?
Not intentional on my part. (This is part of code I
inherited.) It can be fixed; please submit an issue
requset on jgm/pandoc-citeproc.
|
(This is fixed upstream.) |
rootstock/build/assets/style.csl
Lines 38 to 40 in 091ca8d
My understanding is these lines should sort inline citations like
[8, 9, 10, 11]
but I have a manuscript where the citations appear[10, 11, 8, 9]
(https://slochower.github.io/smirnoff-host-guest-manuscript/v/a2fec1ee6bf387a1e664186f8ddd2c15facadcf7/). I'm not sure why this is the case.I attempted to confirm the proper behavior in the Visual CSL Editor, but note: uploading the bundled
build/assets/style.csl
to the Visual CSL Editor for experimentation results in "Citeproc exception: TypeError: blob.strings is undefined". I haven't investigated the meaning of that error.Also, this URL does not resolve:
rootstock/build/assets/style.csl
Line 7 in 091ca8d
The text was updated successfully, but these errors were encountered: