@argdown/pandoc-filter
v1.7.7
Published
Turns Argdown code fences into svg, png, jpg, webp or web-component argument maps
Downloads
7
Maintainers
Readme
@argdown/pandoc-filter
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
- Install Pandoc
- Install latex (see Pandoc installation guide)
- Install rsvg-convert (see Pandoc installation guide)
- Run
npm install -g @argdown/pandoc-filter
- 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).