Showdown extension for Citation.js.
npm install citation-js-showdown
Download this file.
First, load showdown and the required plugins:
const showdown = require('showdown')
// Citation.js plugins
require('@citation-js/plugin-csl')
require('@citation-js/plugin-bibtex') // see below
Second, register the extension:
require('citation-js-showdown')(showdown, options)
Third, use extension in the showdown converter:
const converter = new showdown.Converter({ extensions: ['citation.js'] })
Now you can use the converter like you normally would.
template
(optionalString
): a CSL style namelocale
(optionalString
): a CSL locale languagereferences
(optionalString
): BibTeX file contents to cite by label in your document (requires the@citation-js/plugin-bibtex
plugin)
^[input]
Where input
is any string that can be inputted to Cite
. Any appended sequence of [input]
is allowed to for additional citations in the same cluster. Example:
That also allows the analysis and visualisation of how research
cites each other ^[shotton_publishing_2013][eck_citnetexplorer_2014]