larsgw / citation.js

Citation.js converts formats like BibTeX, Wikidata JSON and ContentMine JSON to CSL-JSON to convert to other formats like APA, Vancouver and back to BibTeX.
https://citation.js.org/
MIT License
219 stars 30 forks source link

JSON to BibLatex #231

Open AntoinePy11 opened 8 months ago

AntoinePy11 commented 8 months ago

I have a Vuejs project and I try to export my JSON to BibTex. So I get my result as bibtex like this: const bibtex = new Cite(myJSON, { output: { type: 'string', style: 'bibtex' } }) It works correctly but I want all of my infos and I have seen in the demo page that the biblatex format give me all of my infos. How can I use it here ? I tried to put biblatex in style but it doesn't work :(
Thank you for you help :)

larsgw commented 8 months ago

The output option is deprecated, but I see this is not documented. The current way to do this would be

const bibtex = (new Cite(myJSON)).format('biblatex', { type: 'text' })