pandoc filter pandoc-doi2bib

This pandoc filter aeroreyna/pandoc-doi2bib ( is written in javascript. Do I need to install nodejs to use this filter? Are there existing examples of R packages which install pandoc filters with javascript?

Pandoc filters seem to be written in many different programming languages. Once installed, can the user ignore the programming language of the pandoc filter?

Thank you for your help

Hi @ace,

I've used Lua filters and Python filters, but not JavaScript, as of yet. That being said, yes, I would think you need to have node.js installed for this. Pandoc has its own Lua interpreter which is why Lua works so seamlessly for filters, but for Python and JavaScript (and others), pandoc will treat the file as executable as will assume access to the appropriate interpreter via the PATH.

More about Pandoc filters can be found here: Pandoc - Pandoc filters

In particular, this section (Pandoc - Pandoc filters) lists the interpreters used for filters based on different file extensions. Node is the listed interpreter for JS files.

Further, you can see the she-bang for the filter you provided is (pandoc-doi2bib/index.js at master · aeroreyna/pandoc-doi2bib · GitHub):

#!/usr/bin/env node

So this filter is executable using node.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.