Sort bibliography by page number?

I know this is not a typical application for Zotero, but is it possible to sort the bibliography by page number? If you had all the articles/chapters for a given volume/issue, this would produce a table of contents.

I tried using the following in the bibliography:
<sort>
<key variable="page" sort="ascending"/>
</sort>

But, it didn't seem to work. It's not sorting alphabetically, but it's also not sorting by page number. My xml skills are very weak, so thanks in advance for any assistance.
  • Yes, there is a problem with this. You need leading zeros. Otherwise a simple sort of 1 through 12, comes out like this:
    1
    10
    11
    12
    2
    3
    ...
    9

    However, if you enter "01" for instance into the pages field in Zotero, it will be converted to simply "1". Unless someone knows a way around that, it seems like it is not really possible.
    If you are willing to use the "extra" field for this purpose, you might be able to make it work since that field does accept leading zeros, but you would have to copy the page numbers manually, etc.
  • Thanks! Now I understand how it's sorting, at least.

    Too bad I would have to manually transfer the page numbers to another field for this to work. I'll think about it and see if I can find another way.
  • You could generate the bibliography piecemeal using the paste feature. You would just need to copy the references in groups by the number of digits in their page numbers. IOW, for a collection of items with page numbers ranging from double to triple digits, you would just highlight and copy all the references with double digit pages, and then highlight and copy the triple digit items.
  • Thanks for your suggestions. Most of the volumes I'm looking at are indexed in PubMed. Your comment prompted me to see what was getting mapped to the note field from PubMed (turns out it's the PMID). I'm not sure if this is always true, but for my test volume, the PMID numbers are in the same numerical order as the table of contents. So, when I sorted by note, that seemed to work well. (And required no manual editing of the records)

    Unfortunately, I'm not sure it would well for other databases or publisher sites. SpringerLink formats their doi with _chapternumber at the end. This causes similar sorting problems as sorting by page number (doi_11 gets filed before doi_2).

    I have to take a look at ScienceDirect, Wiley, and Web of Science, but having this option for things indexed in PubMed is a great help, so thanks for the idea!
Sign In or Register to comment.