Need a bit of help for a custom bibliography format

I have created a custom bibliography format for a recurrent publication that needs the citations to be in this format:

[article title](article link) -- short-list-of-authors -- publication-name

For instance:

[Introduction—First Billion Years: Habitability](https://doi.org/10.1089/ast.2020.2314) – Rivera-Valentín et al. – Astrobiology

I’m not an expert in Zotero’s bibliography XML codes but have *mostly* got it working. However, I have two problems:

1) sometimes, mostly for preprints, the URL field is populated with the article’s title, or not populated at all

2) ideally, I’d like preprints to be identified as "preprints" instead of e.g. "arXiv:2108.08393 [astro-ph]".

Here is what I have so far:

https://paste.ofcode.org/Czc3RDUV3xKHN6XaAYKBJ5

I’d appreciate any help in getting it fully working!
  • First of all, what you show as "article link" is actually the DOI. The DOI is not the same as the URL for an article. (but you have a conditional in your style, that tests for DOI and if not puts the URL, which is fine)

    I don't fully understand your problem re the preprints. Can you link to a publication you want to cite, so I can import it and test it out. Please also put here how it should look like.


  • Hi,

    I have the three following items, for instance, that get exported (bibliography style) as:

    [Low Levels of Sulphur Dioxide Contamination of Phosphine Spectra from Venus’ Atmosphere] -- Greaves et al. -- *arXiv:2108.08393 [astro-ph]*
    [Starting Life and Searching for Life on Rocky Planets] -- Rimmer et al. -- *arXiv:2108.08388 [astro-ph]*
    [Introduction—First Billion Years: Habitability](https://doi.org/10.1089/ast.2020.2314) -- Rivera-Valentín et al. -- *Astrobiology*

    and I would want:

    [Low Levels of Sulphur Dioxide Contamination of Phosphine Spectra from Venus’ Atmosphere](http://arxiv.org/abs/2108.08393) -- Greaves et al. -- *preprint*
    [Starting Life and Searching for Life on Rocky Planets](http://arxiv.org/abs/2108.08388) -- Rimmer et al. -- *preprint*
    [Introduction—First Billion Years: Habitability](https://doi.org/10.1089/ast.2020.2314) -- Rivera-Valentín et al. -- *Astrobiology*

    I pasted the exported items below. Ideally, I would want the word "preprint" to appear when those are from arXiv or bioarXiv, but the most pressing problem is that the links aren’t exported correctly (inside the parenthesis).

    Thanks for the help!


    @article{greaves_low_2021,
    title = {Low {{Levels}} of {{Sulphur Dioxide Contamination}} of {{Phosphine Spectra}} from {{Venus}}' {{Atmosphere}}},
    author = {Greaves, Jane S. and Rimmer, Paul B. and Richards, Anita M. S. and Petkowski, Janusz J. and Bains, William and Ranjan, Sukrit and Seager, Sara and Clements, David L. and Silva, Clara Sousa and Fraser, Helen J.},
    year = {2021},
    month = aug,
    journal = {arXiv:2108.08393 [astro-ph]},
    eprint = {2108.08393},
    eprinttype = {arxiv},
    primaryclass = {astro-ph},
    url = {http://arxiv.org/abs/2108.08393},
    urldate = {2021-08-20},
    archiveprefix = {arXiv}
    }

    @article{rimmer_starting_2021,
    title = {Starting {{Life}} and {{Searching}} for {{Life}} on {{Rocky Planets}}},
    author = {Rimmer, Paul B. and Ranjan, Sukrit and Rugheimer, Sarah},
    year = {2021},
    month = aug,
    journal = {arXiv:2108.08388 [astro-ph]},
    eprint = {2108.08388},
    eprinttype = {arxiv},
    primaryclass = {astro-ph},
    url = {http://arxiv.org/abs/2108.08388},
    urldate = {2021-08-20},
    archiveprefix = {arXiv}
    }

    @article{rivera-valentin_introductionfirst_2021,
    title = {Introduction\textemdash{{First Billion Years}}: {{Habitability}}},
    shorttitle = {Introduction\textemdash{{First Billion Years}}},
    author = {{Rivera-Valent{\'i}n}, Edgard G. and Filiberto, Justin and Lynch, Kennda L. and Mamajanov, Irena and Lyons, Timothy W. and Schulte, Mitch and M{\'e}ndez, Abel},
    year = {2021},
    month = aug,
    journal = {Astrobiology},
    volume = {21},
    number = {8},
    pages = {893--905},
    publisher = {{Mary Ann Liebert, Inc., publishers}},
    issn = {1531-1074},
    doi = {10.1089/ast.2020.2314},
    url = {https://www.liebertpub.com/doi/full/10.1089/ast.2020.2314},
    urldate = {2021-08-19}
    }


  • In your access macro, don't test for webpage or post-weblog, but test for the variable URL. Or just put an "else" instead of an else-if. Then it'll print out the URL.
    (note it'll also print out the accessed date as you have that in there)

    And then to get the "*preprint*" at the end, you'd want to test for volume+page and only then put out the container-title and set and else with "preprint".

    If you need more specific help, let me know and I can give you the code snippets.
  • FWIW, Zotero will likely get a preprint category and, for CSL purposes, we'll map this to "article" (instead of "article-journal") going forward, so you could also just enter your data that way.
  • @damnation thanks for the suggestions! I’m not really familiar with the syntax so will have to do some reading (if you have snippets ready I’d take them!) but otherwise will try thI ose in the following days when I have a minute.

    @adamsmith you’re saying, with zotero5? Then is it worth waiting for those changes — I mean: getting this to work fully isn’t critical to my work, if it’s going to be easier to get it to work with Z5 then I’ll wait
  • Z6, but that's the next major update. I don't have a good sense of ETA. Zotero devs have started actively working on the field updates, so good chance it won't be that long, but no promises - sometimes things take (much) longer than expected
  • I’m sorry for the long delay, I’ve been totally swamped with work in the last few weeks. Thank you for the modification. I’ve been able to eliminate one more little bug that printed "URL" before the URL, and another one that lead to blank journal name when the article type was "report".

    Everything prints almost correctly now, but some papers still wrongly get identified as "preprints" and I don’t know why. This is not a major problem but still annoys me a bit.

    Here’s an example. If you ever find a way around that let me know!

    @article{abbas_short_2021,
    title = {A Short Peptide Synthon for Liquid\textendash Liquid Phase Separation},
    author = {Abbas, Manzar and Lipi{\'n}ski, Wojciech P. and Nakashima, Karina K. and Huck, Wilhelm T. S. and Spruijt, Evan},
    year = {2021},
    month = oct,
    journal = {Nature Chemistry},
    pages = {1--9},
    publisher = {{Nature Publishing Group}},
    issn = {1755-4349},
    doi = {10.1038/s41557-021-00788-x},
    url = {https://www.nature.com/articles/s41557-021-00788-x},
    urldate = {2021-10-14},
    copyright = {2021 The Author(s), under exclusive licence to Springer Nature Limited},
    langid = {english},
    annotation = {Bandiera\_abtest: a Cg\_type: Nature Research Journals Primary\_atype: Research Subject\_term: Heterogeneous catalysis;Intrinsically disordered proteins;Chemical origin of life;Peptides;Self-assembly Subject\_term\_id: heterogeneous-catalysis;intrinsically-disordered-proteins;origin-of-life;peptides;self-assembly}
    }
Sign In or Register to comment.