Maintaining numbering in citation list?

I edit a lot of research papers for other people, so I get a completed document with a citation list already in the doc.
When I extract the citation list from the document (using https://rintze.zelle.me/ref-extractor/ or https://anystyle.io/) and import that into Zotero (v. 6.0.13 on Linux), it doesn't maintain the numbering, even though I see it in the underlying RIS or BibText.
Same thing happens if I ask the author to export their RIS or BibText file for me. Importing into Zotero loses the numbering information.

Importing a RIS puts them in author surname alphabetical order, BibText scrambles them in a way I can't see a pattern.

It's fine for creating an alphabetical bibliography, but a PitA for numbered styles.

Is there a way to maintain the numbering? I don't even see a way to reorder once they're in there other than alphabetically by title or author or by date added.

What am I missing?
Thanks
  • What exactly are you trying to do?
    The standard way to edit a document with references & keep the numbering up to date is to just edit the document -- the Zotero word processor add-on takes care of the renumbering.

    The is no concept of position in any of the bibliography export formats, so re-creating the order in which items were cited in some document is just not possible.
  • I'm editing other people's work. The main point in dumping the references out to Zotero is so I can fix all the auto-gen garbage that all the citation managers seem to be prone to without having to do it all manually. I don't understand why the reference order isn't maintained -- it means I have to import them into Zotero, fix the garbage, then put them back in one at a time. It would be easier if it remembered what was ref #1, #1, #3 etc.
  • What you're describing isn't possible, for the reason adamsmith explained, but a future version of Zotero might make it possible to edit the metadata of embedded citations. Then the author would just be able to share the document itself with you and you could edit the metadata using the Zotero plugin.

    For now, another option would be to ask the author to create a Zotero group library for the project and cite from that instead of from their personal library, so that you could edit the metadata in the group library and refresh the document using the plugin yourself.

    (Or the authors could just use citation managers the way they're meant to be used and fix up the metadata once at import time so that the citations would be correct in any paper they wrote and wouldn't need to be corrected during editing every time, beyond perhaps some minor tweaks that could be done in an unlinked copy.)
  • OK, I see what you're saying, and I'm using the tool a little outside how it is usually used.
    A complicating factor is I'm running on Linux, so native Zotero but MSWord in a WINE wrapper so the Zotero plugins don't work. I can use LibreOffice, but sometimes that messes up the Word docs.
    Many journals want all the field codes removed and the references in flat text at submission time, so this is at the late stage of prep. All the managers seem to choke somewhere and glitches get introduced. I agree having a central repository of corrected and vetted references would be good, but I can't see that happening for a number of reasons -- not least I do this for multiple different groups.

    Seems kinda weird that there is obviously some kind of underlying principle in the order in which citations are imported from a bib or ris file, but it's not the same order they're in the file.

    I did try putting the citations in manually one at a time, and that maintained the order so I could fix them and then export a numbered bibliography, but that gets pretty tedious and isn't workable for lists over a dozen citations.

  • Thank you, Alan Kerr. I am disappointed to not find a solution through Zotero as I am in the same situation. I've explored for over two hours how to get the numbers to import. I see a number field in Zotero. I imported citation styles that include numbers. I have 650 citations in a large scientific paper to keep in order.

    I chose to work with Zotero so that I could easily add and delete citations for an update. The reason I am discovering Zotero is for this purpose. I am happy to find it, but rather frustrated to not find a workaround for maintaining the numerical order of original paper to be updated.
  • I would like to be able to map out exactly the fields produced by anystyle.io to the corresponding field in zotero.
  • I could manually add the citation number from the original "works cited" of the scientific paper. I see that anystyle.io does create a "Citations Number" that is accurate. It simply does not import.

    So the workaround could be that I manually enter it in the field "number" in the item pane. However, for some reason, the item pane does not ahve number. I don't mind mapping to another field in Zotero, but which one? Then, I can fix this issue manually as a reference to recall the citation numbers that run through this very long scientific paper. Thank you for your guidance on this matter.
  • Oh and while I'm at it, I do not see the URL Accessed Date importing correctly either. Bit by bit.
  • Yes, I see the citation-number = {#.}, field in the anystye.bib output, but I don't see a way of using it to order the citations. I also can't figure out how Zotero decides what order to produce output -- it seems pretty random.
    There's no citation number heading in Zotero, which is a shame.
    Would be really useful. Also, no way to reorder the citations manually in the centre panel.

    Who do we talk to, to request a feature?

    I found something weird, though. It comes out in the correct order depending on where and how the bib file is imported.

    Here's a simple usage case with an example bib file. You can see "citation-number = #, as the 2nd line in each entry.

    Import this into Zotero and then output a bibliography.

    @article{whitlow2012a,
    citation-number = {1.},
    author = {Whitlow, P.L. and Burke, M.N. and Lombardi, W.L.},
    title = {Use of a novel crossing and re-entry system in coronary chronic total occlusions that have failed standard crossing techniques: results of the FAST-CTOs (Facilitated Antegrade Steering Technique in Chronic Total Occlusions) trial},
    volume = {4},
    date = {2012},
    pages = {393–401},
    language = {en},
    journal = {JACC Cardiovasc Interv}
    }
    @article{tanaka2019a,
    citation-number = {2.},
    author = {Tanaka, T. and Okamura, A. and Iwakura, K.},
    title = {Efficacy and feasibility of the 3-dimensional wiring technique for chronic total occlusion percutaneous coronary intervention: first report of outcomes of the 3-dimensional wiring technique},
    volume = {12},
    date = {2019},
    pages = {545–55},
    language = {en},
    journal = {J Am Coll Cardiol Intv}
    }
    @article{okamura2020a,
    citation-number = {3.},
    author = {Okamura, A. and Iwakura, K. and Iwamoto, M.},
    title = {Tip detection method using the new IVUS facilitates the 3-dimensional wiring technique for CTO intervention},
    volume = {13},
    date = {2020},
    pages = {74–82},
    language = {en},
    journal = {J Am Coll Cardiol Intv}
    }
    @article{suzuki2021a,
    citation-number = {4.},
    author = {Suzuki, S. and Okamura, A. and Iwakura, K.},
    title = {Initial outcomes of AnteOwl IVUS-based 3D wiring using the tip detection method for CTO intervention},
    volume = {14},
    date = {2021},
    pages = {812–4},
    language = {en},
    journal = {J Am Coll Cardiol Intv}
    }
    @article{suzuki2022a,
    citation-number = {5.},
    author = {Suzuki, S. and Okamura, A. and Nagai, H. and Iwakura, K.},
    title = {Tip detection-antegrade dissection and reentry using intravascular ultrasound in chronic total occlusion intervention: first human case report},
    volume = {6},
    date = {2022},
    pages = {1–5},
    language = {en},
    journal = {Eur Heart J Case Rep}
    }

    If I import the bib file (File->Import...), it creates a new collection called anystyle.io. Or if I open the bib file in a text editor and do import from clipboard into a subcollection, export bibliography from that gives the wrong order:

    1. Whitlow PL, Burke MN, Lombardi WL. Use of a novel crossing and re-entry system in coronary chronic total occlusions that have failed standard crossing techniques: results of the FAST-CTOs (Facilitated Antegrade Steering Technique in Chronic Total Occlusions) trial. JACC Cardiovasc Interv. 2012;4:393–401.
    2. Tanaka T, Okamura A, Iwakura K. Efficacy and feasibility of the 3-dimensional wiring technique for chronic total occlusion percutaneous coronary intervention: first report of outcomes of the 3-dimensional wiring technique. J Am Coll Cardiol Intv. 2019;12:545–55.
    3. Suzuki S, Okamura A, Nagai H, Iwakura K. Tip detection-antegrade dissection and reentry using intravascular ultrasound in chronic total occlusion intervention: first human case report. Eur Heart J Case Rep. 2022;6:1–5.
    4. Suzuki S, Okamura A, Iwakura K. Initial outcomes of AnteOwl IVUS-based 3D wiring using the tip detection method for CTO intervention. J Am Coll Cardiol Intv. 2021;14:812–4.
    5. Okamura A, Iwakura K, Iwamoto M. Tip detection method using the new IVUS facilitates the 3-dimensional wiring technique for CTO intervention. J Am Coll Cardiol Intv. 2020;13:74–82.

    Here's the weird thing. If I open the bib file in a text editor and import from cliboard *into the root level of My Library* and then output bibliography while the freshly imported citations are highlighted, it comes out in the correct order (even though it's the wrong order in the centre panel):

    1. Whitlow PL, Burke MN, Lombardi WL. Use of a novel crossing and re-entry system in coronary chronic total occlusions that have failed standard crossing techniques: results of the FAST-CTOs (Facilitated Antegrade Steering Technique in Chronic Total Occlusions) trial. JACC Cardiovasc Interv. 2012;4:393–401.
    2. Tanaka T, Okamura A, Iwakura K. Efficacy and feasibility of the 3-dimensional wiring technique for chronic total occlusion percutaneous coronary intervention: first report of outcomes of the 3-dimensional wiring technique. J Am Coll Cardiol Intv. 2019;12:545–55.
    3. Okamura A, Iwakura K, Iwamoto M. Tip detection method using the new IVUS facilitates the 3-dimensional wiring technique for CTO intervention. J Am Coll Cardiol Intv. 2020;13:74–82.
    4. Suzuki S, Okamura A, Iwakura K. Initial outcomes of AnteOwl IVUS-based 3D wiring using the tip detection method for CTO intervention. J Am Coll Cardiol Intv. 2021;14:812–4.
    5. Suzuki S, Okamura A, Nagai H, Iwakura K. Tip detection-antegrade dissection and reentry using intravascular ultrasound in chronic total occlusion intervention: first human case report. Eur Heart J Case Rep. 2022;6:1–5.

    If I lose highlighting, then re-select them, it comes out in the wrong order again.

    Zotero devs, it would be really useful if we could use that citation-number field please and thank you.
  • Who do we talk to, to request a feature?
    Zotero devs read all posts, so you're talking to them here. I wouldn't be super optimistic about doing anything with citation-number, though -- that seems quite convoluted as a workflow to support with tons of potential for confusing users and messy implications for the Zotero data model (as citations also get a new citation number when you insert them into a document).

    FWIW, you might be able to get pandoc to produce the bibliography you want using anstyle output -- certainly worth a try.

    Finding ways to allow you to edit metadata for citations inserted by others (as dstillman above suggests might happen) seems like a more promising way forward.
  • I realise it's a little out of the main aim of the citation manager, but for editors -- when we get a flattened doc with no access to the original library or a doc done in another citation manager -- it would be a real boon to be able to apply styles to a bibliography while maintaining numbering. It looks like the data are there, but there's just no way to access.

    If there were a way to order by that citation number field in the centre panel -- the same way we already have order by Title, Creator, Data added, etc., even bury it in the 'More Columns' submenu, it would be really useful. That would allow ordering by citation number and then export in that order.

    I've had situations where I've extracted the bibliography from a document, used anystyle, imported into Zotero to apply a style and exported. Then, had to manually reorder the references in the bibliography. It's not fun, and prone to error.

    I guess @mleferrand idea of mapping to another field would work -- map it to Extra then order by that for example. We already have access to order by a whole whack of other fields, I can't see why one more would cause problems.

  • We already have access to order by a whole whack of other fields, I can't see why one more would cause problems.
    Because citation-number is a dynamic field: in regular Zotero usage, the same item gets a different citation number every time it's cited. Assigning it statically solves your use case, but is conceptually messy and potentially quite confusing for people who use Zotero regularly.
  • edited February 2, 2023
    OK, I can see that.
    Seems weird that anystyle includes the citation-number = {##.} field only to throw it away again though. I guess I could try changing citation-number to some other field that would allow me to reorder by that field -- I thought Extra would be ideal but that doesn't seem to be accessible. It's a dynamic field too?

    It kinda works if I first nuke any language entries and then s/citation-number/language/g on the bib file and export that -- it maintains the order if I then order by Language, which I suppose will have to do.

    So:
    sed -i -e 's/language\ =.*$//g' anystyle.bib
    sed -i -e 's/citation-number/language/g' anystyle.bib

    Then import that, and it allows me to order by citation-number.



  • edited November 4, 2023
    I'm running into this issue as well... I have an 800+ page document in word and when I use numbered citations, I would think the document would start the first citation number at [1] and go from there. Of course, as you progress in the document then the citation numbers would get out of order as the same source would be cited in multiple locations, and that's totally fine. I wrote some VBA code that goes through the document, finds the bibliography, create bookmarks on each numbered source, then find the matching numbers throught the document and creates hyperlinks to the matching source in the bibliography. The code handles commas and dashes (ranges) as well. If there was a way to fix the numbering order, that would be amazing!
  • @Lynx_TWO I don't quite understand where/how you're using Zotero in this? Just to re-iterate: when used in the standard way using the word processor add-on, Zotero does renumber in-text citations. This thread is about a use case where you want to create a numbered bibliography from Zotero without using word processor integration, e.g. because you are - as alankerr - editing someone else's work that was created without Zotero.
  • @Lynx_TWO Do you have multiple copies of the cited references in your zotero library? When you enter a citation, zotero should use the same number for each reference each time you cite it. So, Watson & Crick, 1953 might be [1] on first citation. When you cite it again later, it should still go in as [1] ... unless I'm misunderstanding what you're doing.

Sign In or Register to comment.