dashed / atom-pandoc-preview

Pandoc-powered Previewer for Atom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pandoc Preview

Run your current file through Pandoc and preview the output within Atom.

Commands:

  • Pandoc Preview: Show will run the current buffer through Pandoc and show it in a new pane.

There are three config settings:

  • pandoc.cmd which is the pandoc executable. This needs to be on your PATH.
  • pandoc.args which are the command-line arguments to pandoc, defaults to -s -S --self-contained.
  • pandoc.languages, a map of Atom grammar names to Pandoc input formats.

Limitations

  • Only has HTML output at the moment
  • Limited detection of input formats

Problems with PATH

To find the pandoc executable, ideally Atom should be able to find it on your PATH. Unfortunately, environment variables are a bit of an issue with GUI applications on OS X. Google it or see Setting Environment Variables in OS X?.

For the atom command, you need to make sure Atom is loaded via env (which it isn't currently).

vim `which atom`

Change:

open -a $ATOM_PATH -n --args --executed-from="$(pwd)" --pid=$$ $@

to:

env open -a $ATOM_PATH -n --args --executed-from="$(pwd)" --pid=$$ $@

Now Atom will have access to PATH, and can find your pandoc command.

About

Pandoc-powered Previewer for Atom

License:MIT License


Languages

Language:CoffeeScript 97.5%Language:CSS 2.5%