Sort items Zotero offers to translator
I am using Better Bib(La)TeX to export collections to bib(la)tex. For some reason the ordering of the items in the exported bib file changes from time to time. How is that possible?
How can I ensure that the items are ordered (by whatever key) before they are offered to the translator? I don't care about the key by which the items are ordered, what is important is the that ordering stays the same.
Thank you very much!
How can I ensure that the items are ordered (by whatever key) before they are offered to the translator? I don't care about the key by which the items are ordered, what is important is the that ordering stays the same.
Thank you very much!
Would it be possible at all to sort the items before passing them on to BBT? Or let me ask differently: What determines the order in which the items are passed to BBT?
As to the "why" (in the sense of "by what cause" moreso than "for what reason"), Zotero.Items._load doesn't have an "ORDER BY" in the SQL query. The underlying database is therefore free to choose any order to return the items in that it deems fastest/simplest to do/whatever is the most fun to code/etc. Demanding a specific order by using an ORDER BY usually impacts performance (it's one more thing the database must do before it can hand over the results), so it's usually omitted when not required.
Would it greatly impact the performance of the query if the results were sorted? Could one leave it up to the translator to decide whether the items should to be sorted or not?