Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

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

Node.js

First, load showdown:

const Showdown = require('showdown')

Second, register extension:

require('citation-js-showdown')

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.

Browser

<script src="showdown.js"></script>
<script src="showdown.citation.js"></script>
<script>
  const converter = new Showdown.Converter({ extensions: ['citation.js'] })
</script>

Now you can use the converter like you normally would.

Syntax

^[<INPUT>]

Where <INPUT> is any string that can be inputted to Cite, omitting the quotes. Arrays may not work currently, see todos.

Todo

  • Sorting based on IDs
  • Add support for ^[<AUTHOR>, <YEAR>, <TITLE>, <ETC>] syntax
  • DOI input (actually a todo for Citation.js; if support for DOI is added there, it will automatically work here, assuming I update the dependencies)
  • Work async (Citation.js will probably be at least partly async soon). Requires either:
  • Configuration
    • output options available in Citation.js (assuming we want formatted citations that's only style and language)
    • Wikipedia-style references (i.e. [1]) or following style guides (i.e. (Willighagen, 2017))

About

Cite references in Showdown

Resources

Packages

No packages published
You can’t perform that action at this time.