Closed seannyD closed 3 years ago
Using .get()
is deprecated, and the function does not support nosort
. Use this instead:
cite.format('bibliography', {format:"html",template:"apa",nosort:true})
Demo: https://runkit.com/larsgw/citation-js-nosort-custom-sort
I have a list of citations and I want them to appear by year. Or I can order them myself by year and I want to turn off internal sorting. The docs suggest there's a 'nosort' option, but I can't get it to work.
Here is a string with three bibtex papers. I want them to appear in year order, which is also the order they appear in:
I can try rendering them with:
But this reorders the output I also try to sorting the input with a custom function:
The object 'sorted' now holds the entries in the correct order. But when I try to output them, they get re-ordered again:
The only way I could figure to do this was to convert each entry individually and put them into an object, then sort that object. Horrible:
What am I doing wrong?