Skip to content

Instantly share code, notes, and snippets.

@larsgw
Created October 30, 2016 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larsgw/f366e50526ed3d49a2d769a3f4529136 to your computer and use it in GitHub Desktop.
Save larsgw/f366e50526ed3d49a2d769a3f4529136 to your computer and use it in GitHub Desktop.
Demo of CSL -> BibTeX
var Cite = require('citation-js')
var csl = [
{
id: "Q23571040",
type: "article-journal",
title: "Correlation of the Base Strengths of Amines 1",
DOI: "10.1021/ja01577a030",
author: [
{
given: "H. K.",
family: "Hall"
}
],
issued: [
{
'date-parts': [ "1957", "1", "1" ]
}
],
'container-title': "Journal of the American Chemical Society",
volume: "79",
issue: "20",
page: "5441-5444"
}
]
var data = new Cite(csl,{
type:'string',
style:'bibtex'
})
var bibtex = data.get()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment