Skip to content

citation-js/integration-showdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • template (optional String): a CSL style name
  • locale (optional String): a CSL locale language
  • references (optional String): BibTeX file contents to cite by label in your document (requires the @citation-js/plugin-bibtex plugin)

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]