Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upInline citation ordering not as expected #206
Comments
This comment has been minimized.
This comment has been minimized.
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 |
This comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
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? |
This comment has been minimized.
This comment has been minimized.
Ah, good insight! Wonder if it could be related to something with |
This comment has been minimized.
This comment has been minimized.
adam3smith
commented
Apr 18, 2019
•
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) |
This comment has been minimized.
This comment has been minimized.
Looping in @jgm. Is it intentional that |
This comment has been minimized.
This comment has been minimized.
@adam3smith are you referencing these lines in the |
This comment has been minimized.
This comment has been minimized.
adam3smith
commented
Apr 18, 2019
I was looking at the corresponding section in the specifications but that's just a different way of looking at the same thing, yes. |
slochower commentedApr 17, 2019
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