citation-js / integration-showdown

Cite references in Showdown
5 stars 0 forks source link

citation.js-showdown

Showdown extension for Citation.js.

NPM version NPM total downloads Build Status

Install

Node.js

npm install citation-js-showdown

Browser

Download this file.

Use

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.

Options

Syntax

^[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]