openjournals / joss

The Journal of Open Source Software
https://joss.theoj.org
MIT License
1.52k stars 185 forks source link

Citation order #1174

Closed ddhendriks closed 1 year ago

ddhendriks commented 1 year ago

LS,

I'm updating my submission paper, and I'm finding that the citation order in the PDF differs from the order I write it in the .md file.

Specifically:

[@izzardNewSyntheticModel2004; @izzardPopulationNucleosynthesisSingle2006; @izzardPopulationSynthesisBinary2009; @izzardBinaryStarsGalactic2018]

appears as

image

The associated BibTeX entries are:

@ARTICLE{izzardNewSyntheticModel2004,
       author = {{Izzard}, R.~G. and {Tout}, Christopher A. and {Karakas}, Amanda I. and {Pols}, Onno R.},
        title = "{A new synthetic model for asymptotic giant branch stars}",
      journal = {\mnras},
     keywords = {Astrophysics},
         year = 2004,
        month = may,
       volume = {350},
       number = {2},
        pages = {407-426},
          doi = {10.1111/j.1365-2966.2004.07446.x},
archivePrefix = {arXiv},
       eprint = {astro-ph/0402403},
 primaryClass = {astro-ph},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2004MNRAS.350..407I},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{izzardPopulationNucleosynthesisSingle2006,
       author = {{Izzard}, R.~G. and {Dray}, L.~M. and {Karakas}, A.~I. and {Lugaro}, M. and {Tout}, C.~A.},
        title = "{Population nucleosynthesis in single and binary stars. I. Model}",
      journal = {\aap},
     keywords = {stars: abundances, stars: AGB and post-AGB, stars: binaries: general, stars: chemically peculiar, stars: carbon, stars: Wolf-Rayet},
         year = 2006,
        month = dec,
       volume = {460},
       number = {2},
        pages = {565-572},
          doi = {10.1051/0004-6361:20066129},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2006A&A...460..565I},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{izzardPopulationSynthesisBinary2009,
       author = {{Izzard}, R.~G. and {Glebbeek}, E. and {Stancliffe}, R.~J. and {Pols}, O.~R.},
        title = "{Population synthesis of binary carbon-enhanced metal-poor stars}",
      journal = {\aap},
     keywords = {stars: carbon, binaries: close, stars: chemically peculiar, Galaxy: halo, Galaxy: stellar content, nuclear reactions, nucleosynthesis, abundances, Astrophysics - Solar and Stellar Astrophysics, Astrophysics - Astrophysics of Galaxies},
         year = 2009,
        month = dec,
       volume = {508},
       number = {3},
        pages = {1359-1374},
          doi = {10.1051/0004-6361/200912827},
archivePrefix = {arXiv},
       eprint = {0910.2158},
 primaryClass = {astro-ph.SR},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2009A&A...508.1359I},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{izzardBinaryStarsGalactic2018,
       author = {{Izzard}, R.~G. and {Preece}, Holly and {Jofre}, Paula and {Halabi}, Ghina M. and {Masseron}, Thomas and {Tout}, Christopher A.},
        title = "{Binary stars in the Galactic thick disc}",
      journal = {\mnras},
     keywords = {binaries: general, Galaxy: disc, Galaxy: stellar content, Astrophysics - Solar and Stellar Astrophysics},
         year = 2018,
        month = jan,
       volume = {473},
       number = {3},
        pages = {2984-2999},
          doi = {10.1093/mnras/stx2355},
archivePrefix = {arXiv},
       eprint = {1709.05237},
 primaryClass = {astro-ph.SR},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2018MNRAS.473.2984I},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

I am using the following command to generate the pdf file:

sudo docker run --rm -it -v $PWD:/data -u $(id -u):$(id -g) openjournals/inara -o pdf,crossref paper.md

How can I fix the correct order of the years in the pdf?

dfm commented 1 year ago

I'm pretty sure that the citations end up being sorted in alphabetical order by the citation key. Which, I agree, feels like a somewhat silly approach. But perhaps you can use it to hack the system...

arfon commented 1 year ago

@tarleb – do you know what's happening here?

tarleb commented 1 year ago

I think the authors names are used for sorting, although it is not clear to me if APA actually requires this. I'll take a closer look at our apa.csl style definition.

tarleb commented 1 year ago

I think this is a result of jgm/citeproc#126. I'll update Inara to use the latest pandoc, which should eliminate the issue.