Change style of PNAS to include DOI

Hello, I'm wondering how to include DOIs in the PNAS bibliography code. PNAS requires DOIs, but the current citation style doesn't incorporate them. Any guidance would be appreciated. Thank you!
  • Additional information:

    In the PNAS reference guidelines, the relevant part is:
    Provide volume numbers for journal articles as applicable; provide DOI numbers if volume numbers are not available.
  • So automatically, PNAS reference template will use doi whenever volume numbers are not available?
  • It is supposed to do, but currently it doesn't. So the csl needs to be updated to take into account this. I was just adding the relevant information, to make the life easier for the volunteers who create and maintain the csl repo.
  • Thanks. So it would be better that by default it actually includes the DOI. It is easier to remove it than to have to fetch it on a case per case basis.
  • The style does this correctly, since at least 2019 when the style was updated last time.
    You must have Volume or Page info in your item. Make sure nothing is in the extra field.
  • edited March 18, 2024
    Oh right, there was something in my extra field for the example provided by the guidelines. My bad. (While this is problematic one need to be sure "Extra" is empty.)
  • I don't think this is about having the Extra empty. When volume numbers are missing, with or without anything in Extra, I do not get DOI if page numbers are present. This is not uncommon with early publications, where the volume is not set but some type of item number/page has been assigned. The conditional statement in the csl file agrees with this (both volume and pages need to be empty to display DOI).

    Following the exact wording of the style ("if volume numbers are not available"), I would then think that the style needs to corrected.
  • (what's in Extra would matter, of course, if "Pages" or "Volume" are in Extra.)
  • I think I agree, especially with the increasingly common article numbers mapped to page. We should rewrite the access macro to only print the DOI where there's no volume.
  • (PR: https://github.com/citation-style-language/styles/pull/6962
    "deposited" would be also a nice term to have in CSL 1.0.3)
  • Thanks damnation (sorry for my messy comments, it didn't help)
  • New style now merged and available from the repository.
  • Thank you, damnation. I can confirm that this works well in Word now.

    There was one thing odd, though. When I created bibliography by copying to clipboard, a link was added only to the DOI prefix+suffix but not the resolver. This is not the case for the APA style, for example. This does not affect me at all since I only work in Word, but I thought I'd mention it.

    Here is how PNAS (top) vs APA (bottom) styles look for the same item when biblio is copied and pasted into Textedit:

    https://s3.amazonaws.com/zotero.org/images/forums/u5124/wx2coha6r5xqyfdcweao.png

  • edited March 21, 2024
    @enozkan This is because the address is missing a / in line 70 of the csl (I have submitted a PR)
  • @poettli Nice catch! Thank you.
  • One more issue: There should not be a comma before date, and the comma after the date should be a period:

    M. J. McCoy, A. Z. Fire, Parallel gene size and isoform expansion of ancient neuronal genes. Curr Biol, S0960-9822(24)00163–5, (2024), https://doi.org/10.1016/j.cub.2024.02.021.

    should be

    M. J. McCoy, A. Z. Fire, Parallel gene size and isoform expansion of ancient neuronal genes. Curr. Biol., S0960-9822(24)00163–5 (2024). https://doi.org/10.1016/j.cub.2024.02.021.

    according to the guidelines. The first comma is a problem for all journal articles at the moment, whether there is a volume number or not.
  • Thank you, @damnation. The issue with the first comma is resolved.

    There are other issues with other publication types, especially preprints, but those are for another day.
  • well, I have a PR open, better to solve it all at once, cause it duplicates work for me opening all these PRs.
  • edited March 26, 2024
    @damnation I appreciate all the work you do. I was hoping to find the time and open a PR myself, but that's clearly wishful thinking.

    A common issue to all item types: Make it a full stop/period after year. "(2024), URL or access or deposit date" should be "(2024). Anything that follows".

    Preprint is the big one:
    N. C. Morano, et al., Cis inhibition of co-expressed DIPs and Dprs shapes neural development. 2024.03.04.583391 (2024).
    should be
    N. C. Morano, et al., Cis inhibition of co-expressed DIPs and Dprs shapes neural development. bioRxiv [Preprint] (2024). https://www.biorxiv.org/content/10.1101/2024.03.04.583391v1 (accessed 3 June 2024).
    The issues to fix:
    1. Include Repository name after title, and follow it with [Preprint] (Year).
    2. Add URL after year.
    3. Their examples and papers do not include item/page numbers for preprints.
    So -> Authors, Title. repoName [Preprint] (Year). https://preprint.url.here/preprint.
    4. While I don't like it, after "URL." there is "(accessed Day Month Year)."

    Most papers I looked also include datasets and software referenced now, and there are also issues there:
    S. Ovchinnikov, sokrypton/ColabFold. (2024), . Deposited March 26, 2024.
    should be
    S. Ovchinnikov, sokrypton/ColabFold. Github. https://github.com/sokrypton/colabfold. Deposited 26 March 2024.
    The issues to fix for these item types:
    1. Add Repository Name to software (like, Github). Unfortunately, there isn't an obvious field for this. "Github" is in Library Catalog, so that could be it.
    2. Add Repo Name to dataset (like, Zenodo). The field name to is Repository.
    3. For both, include URL after Repository Name.
    For dataset, have it as -> Available at https://url.here/dataset.
    For software, just URL.
    3. In both, remove year.
    4. For both, add at the end -> Deposited Day Month Year.

    Thank you! Please ask if anything is not clear.
  • edited March 27, 2024
    For preprint, it's almost there. The [Accessed 6 March 2024] at the end should be (Accessed 6 March 2024).

    Dataset and Preprint have the Available from switched. Preprint should have just <URL>, and instead Dataset should have Available from <URL>.

    Last point, Software bibliography should include Archive (Github) and URL. Currently, it is
    S. Ovchinnikov, sokrypton/ColabFold. (2024). Deposited 26 March 2024.
    which is improved from previous version (thank you!). But it should be
    S. Ovchinnikov, sokrypton/ColabFold. Github. https://github.com/sokrypton/colabfold. Deposited 26 March 2024.
    APA and Chicago both get "Github" from the Archive field, so we should do that. The URL is the URL.

    P.S. We may also want the Github translator to record "Github" in the Archive field. I may open another post for that.
  • (For the preprints, contrary to the instructions, we shoudl prefer DOI URLs overy regular URLs, so the above should have https://doi.org/10.1101/2024.03.04.583391v1 see ref 77 in 10.1073/pnas.2313665121 for an example.
Sign In or Register to comment.