Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time

@argdown/pandoc-filter

Argdown logo

Argdown is a simple syntax for analyzing complex argumentation, inspired by Markdown.

This package provides a Pandoc filter that allows to use argdown-map code blocks in Markdown files. The code blocks can be transformed into web-components or svg, png, jpg, webp images.

Additionally argdown code blocks can be transformed into the web-component with the "source view" activated, providing a simple way to add syntax highlighting. This is only recommended if you export to html and use the web-component anyway.

Otherwise we recommend to use argdown-pandoc-highlighting for syntax highlighting instead.

Please read the full documentation of this package in the Argdown documentation.

Installation

  1. Install Pandoc
  2. Install latex (see Pandoc installation guide)
  3. Install rsvg-convert (see Pandoc installation guide)
  4. Run npm install -g @argdown/pandoc-filter
  5. Optionally install the @argdown/image-export plugin: npm install -g @argdown/image-export

Generate a pdf file from your Argdown-in-Markdown file:

pandoc -f markdown my-argdown-in-markdown-file.md --filter argdown-filter -o my-pdf-file.pdf

Generate a html file from your Argdown-in-Markdown file on OSX or Linux:

pandoc -s -f markdown my-argdown-in-markdown-file.md --filter argdown-filter -o my-html-file.html

On Windows 10 you have to use argdown-filter.cmd instead:

pandoc input-file.md -f markdown -t pdf --filter argdown-filter.cmd -o output-file.pdf

On Windows 8.1 using node filters this way currently does not work (see here and here).