livecomsjournal / article_templates

Templates for use in preparing articles for the Living Journal of Computational Molecular Sciences (LiveCoMS)
http://www.livecomsjournal.org/
Creative Commons Attribution 4.0 International
9 stars 14 forks source link

Switch from `natbib` to `biblatex` in `livecoms` document class #83

Open ltalirz opened 3 years ago

ltalirz commented 3 years ago

The livecoms documentclass currently uses the natbib package for bibliography management which is ancient and no longer really developed. In particular, natbib only supports the bibtex format, which has very limited support for citing things like web sites or software (which I guess is a common use case here) - they all end up as the @misc entry type.

Switching to biblatex would provide support for the biber backend (while still supporting bibtex as well). biber supports a much wider range of entry types, as well as UTF-8 inside the .bib file.

See e.g. this great summary on the topic. Note that overleaf also recommends using biblatex.

davidlmobley commented 3 years ago

Thanks for this (and your other issues, which I or one of us will hopefully revisit soon -- all great points). On this one, would you be willing to submit a PR to change? I think we're amenable to switch. I haven't worked with biblatex much myself yet, but your point about web site and other citations sounds like a great reason to switch.

ltalirz commented 3 years ago

I'm not a biblatex expert myself but I opened a PR that demonstrates the basic steps this would involve https://github.com/livecomsjournal/article_templates/pull/85

I haven't yet spent much time trying to adapt the biblatex style to the livecoms one since this involves quite a bit of work. Does it need to be fully reproduced?

There are a number of existing styles one could choose from (more on the biblatex contrib).

The PR uses the standard numeric-comp style with one modification (displaying DOIs as valid hyperlinks). It also contains a commented-out stab a displaying author names like in the current livecoms format (although that still needs more work).

Helpful material for further style adaptation:

ltalirz commented 2 years ago

@davidlmobley Since I'm already using biblatex for the atomistic.software article, it would would be great to get some feedback on how closely the citation style needs to be reproduced, see comparison in

https://github.com/livecomsjournal/article_templates/pull/85#issuecomment-897646752

davidlmobley commented 2 years ago

Sorry for the delay; this has been in my tasks but I'm oversubscribed. I don't think the style needs to be exactly reproduced. cc @dwsideriusNIST and @mrshirts in case they have input. Let me see also if anyone else wants to provide feedback.

dwsideriusNIST commented 2 years ago

sorry, missed this issue. I can't get to this for at least two weeks. One concern I have is how biblatex will deal with the requirement of electronic links (DOI, pMID, etc.) and using just one. For some history, take a look at closed issues #53 and #62

ltalirz commented 2 years ago

Hey Dan, just added the ASAP version for the atomistic.software article at https://github.com/ltalirz/livecoms-atomistic-software/blob/master/releases/LiveCoMS_Article_ASAP_V1.pdf

Perhaps have a look whether you notice anything that needs to be improved in the bibliography layout.

In this particular case there doesn't seem to be an issue with identifier precedence (but there isn't really much diversity besides DOIs and URLs).

dwsideriusNIST commented 2 years ago

@ltalirz I'll fork your paper and inspect the difference between natbib and biblatex!

dwsideriusNIST commented 2 years ago

@ltalirz would you create a branch of your paper with the atomistic.software.bl.bib file included so that I run a comparison with natbib?

ltalirz commented 2 years ago

@ltalirz would you create a branch of your paper with the atomistic.software.bl.bib file included so that I run a comparison with natbib?

Done! https://github.com/ltalirz/livecoms-atomistic-software/tree/natbib-comparison

ltalirz commented 2 years ago

Following the editorial decision, I'll be reverting the bibliography of the atomistic.software article back to bibtex/natbib.

In order to serve as (part of the) motivation for the transition to biber/biblatex, below I'll document the issues encountered in this process when using the bibtex export of the zotero reference manager (and comparing it to the biber export):

Using @article for bibtex image

Using @article for biber image

Using @article for bibtex image Using @inreference (=item from a reference work) for biber image

Using @misc for bibtex image

Using @online for biber image

Using @misc for bibtex image

Using @software for biber image

@dwsideriusNIST Any suggestions on how to work around these issues in bibtex for the time being?

dwsideriusNIST commented 2 years ago

@ltalirz I'll attempt substitutions to solve these differences and then make a PR into your natbib-comparison branch

ltalirz commented 2 years ago

Thanks a lot for the quick reply @dwsideriusNIST !

In the meanwhile I've fixed the issue with the URLs by modifying the settings of the zotero bibtex exporter (I believe the livecoms template expects them in the url field, not in the howpublished field).

P.S. One thing I came across (just for reference): zotero added type = {GitHub Guide} to one of the entries, which caused the livecoms template to crash with You can't pop an empty literal stack for ...