mystmd icon indicating copy to clipboard operation
mystmd copied to clipboard

DOI citations to bibtex can lose fields

Open fwkoch opened this issue 1 year ago • 0 comments
trafficstars

Description

In my myst file, I have the citation [](doi:10.37921/426590wiobus). This has no author, only a publisher. The citation renders nicely in the web, using full CSL json, but on export to bibtex (for example, when writing out a .tex file), the bibtex loses the publisher field, leaving only the doi and a date.

Proposed solution

The conversion from CSL to bibtex uses citation-js directly. This means the solution is not trivial (we do not have control over which fields get written) see https://github.com/executablebooks/mystmd/blob/main/packages/citation-js-utils/src/index.ts#L261

I tried briefly to play around with configuration options described here: https://www.npmjs.com/package/@citation-js/plugin-bibtex - but nothing seems to quite fit...

fwkoch avatar Jun 11 '24 02:06 fwkoch