Implement "preprint" in the style "Royal Society of Chemistry"

I noticed that the new "preprint" category is not yet implemented in the style "Royal Society of Chemistry". How can I do this? I have tried to go in and edit the html, even with ChatGPT help, but so far I was not successful and haven't found a good guide.
  • Thank you very much for the quick reply! According to the website of the Royal Society of Chemistry, it looks nearly perfect, just some tiny issues. This is the official guide I found that I am referring to here: https://www.rsc.org/journals-books-databases/author-and-reviewer-hub/authors-information/prepare-and-format/article-content/how-to-reference-using-the-royal-society-of-chemistry-style/#preprint-servers

    Let me show you three examples for arXiv, ChemRxiv and bioRxiv. According to the guide in the link above, the arXiv citation should be slightly different than the other two.

    arXiv example:
    The above style: M. Schwilk, D. N. Tahchieva and O. A. von Lilienfeld, arXiv, 2020, preprint, arXiv:arXiv:2004.10600, https://arxiv.org/abs/2004.10600v1.
    Expected: M. Schwilk, D. N. Tahchieva and O. A. von Lilienfeld, arXiv, 2020, preprint, arXiv:2004.10600, https://arxiv.org/abs/2004.10600v1.
    For this example, there is one minor issue: The string "arXiv:" is incorrectly repeated. I believe this is because the "Archive ID" in Zotero already captures this field with the "arxiv:" at the beginning and it was probably hardcoded again in the style.

    ChemRxiv example:
    The above style: L. Morán-González, J. E. Betten, H. Kneiding and D. Balcells, ChemRxiv, 2024, preprint, ChemRxiv, https://chemrxiv.org/engage/chemrxiv/article-details/66d223bd20ac769e5f650d22.
    Expected: L. Morán-González, J. E. Betten, H. Kneiding and D. Balcells, ChemRxiv, 2024, preprint, DOI: 10.26434/chemrxiv-2023-5wbkr-v2.
    As you can see in this example, the word "ChemRxiv" is incorrectly repeated once after the word "preprint". Also, instead of the URL, it would be correct to specify "DOI: {doi_of_preprint}".

    bioRxiv example:
    The above style: S. Pal, Y. Su, E. Nwadozi, L. Claesson-Welsh and M. Richards, 2024, preprint, http://biorxiv.org/lookup/doi/10.1101/2024.01.23.576785.
    Expected: S. Pal, Y. Su, E. Nwadozi, L. Claesson-Welsh and M. Richards, bioRxiv, 2024, preprint, DOI: 10.1101/2024.01.23.576785.
    The bioRxiv format should be exactly the same as the ChemRxiv format, except for the name of the preprint server. However, it's neither correct, nor consistent with the ChemRxiv example. In this example here, there are two issues: The word "bioRxiv" is missing and instead of specifying the URL with the DOI, the correct string would be "DOI: {doi_of_preprint}".

    As a related note, I noticed that the guide requires you to specify the version of the preprint, but usually Zotero doesn't save the version number by itself. Do you know by any chance if Zotero supports downloading the version number directly or if you just have to manually add the version to the URL or DOI yourself once Zotero downloaded the entry?

    Again, thank you very much for the great work you're doing! Zotero is literally saving me and millions of other users a great many days of boring and tedious work. I tried to make these examples as helpful and expressive as possible in order to contribute a tiny little bit to this awesome project.
  • edited 3 days ago
    You'd need to remove the "arxiv" from the archive ID field.

    I had a small mistake in the style regarding the DOI, had it fixed yesterday, but forgot to update the link here. Please test the following.

    https://github.com/citation-style-language/styles/raw/754453eec52d5255ab43e24ee245c811f7b5b523/royal-society-of-chemistry.csl
  • Thank you very much, that fixes nearly everything now! These are the three citations I get now:
    M. Schwilk, D. N. Tahchieva and O. A. von Lilienfeld, arXiv, 2020, preprint, arXiv:2004.10600, DOI: 10.48550/arXiv.2004.10600
    L. Morán-González, J. E. Betten, H. Kneiding and D. Balcells, ChemRxiv, 2024, preprint, ChemRxiv, DOI: 10.26434/chemrxiv-2023-5wbkr-v2.
    S. Pal, Y. Su, E. Nwadozi, L. Claesson-Welsh and M. Richards, 2024, preprint, DOI: 10.1101/2024.01.23.576785.

    In these examples, the arXiv citation now shows the DOI, but according to the link cited above, it should actually be the URL. This was actually correct in the earlier version! That's just a difference between arXiv and ChemRxiv + bioaRxiv: arXiv is supposed to have the URL, the others are supposed to have the DOI. Also, the other two issues are still there: The word "ChemRxiv" is repeated incorrectly, and the word "bioRxiv" is missing.

    Would it be possible to implement these fixes? Thank you very much!
  • There's no way for CSL/Zotero to tell different preprint servers apart, but I think they're also wrong on principle: DOIs are always preferable to URLs when they exist, so we'll stick with the DOI for arXiv
  • Fair enough. What about the issue with the twice appearing "ChemRxiv" and never appearing "BioRxiv"? This seems like a very weird issue to me.
  • All of those preprints will be dealt with the same in the style. If BioRxiv is missing, then check if it's actually entered in your metadata.
  • Thank you, my bad! You're right, the missing "bioRxiv" was due to the metadata. However, now both for ChemRxiv and for bioRxiv, the name is repeated twice. I tried it out and the reason is that if no "Archive ID" is given, instead of fully leaving away this entry, only the name of the archive is printed.

    For example, with "Archive ID"=12:
    S. Pal, Y. Su, E. Nwadozi, L. Claesson-Welsh and M. Richards, bioRxiv, 2024, preprint, bioRxiv:12, DOI: 10.1101/2024.01.23.576785.
    With empty "Archive ID":
    S. Pal, Y. Su, E. Nwadozi, L. Claesson-Welsh and M. Richards, bioRxiv, 2024, preprint, bioRxiv, DOI: 10.1101/2024.01.23.576785.

    Would it be possible to leave away the arxive name if no "Archive ID" is given?
  • Beautiful, that's perfect! Thank you very much for your work!
Sign In or Register to comment.