jagregory / atom-pandoc-preview

Pandoc-powered Previewer for Atom
MIT License
14 stars 7 forks source link

Pandoc Preview

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

Commands:

There are three config settings:

Limitations

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 (in some older versions of Atom it is not).

vim `which atom`

If you can find the following, you are fine:

open -a "$ATOM_PATH/$ATOM_APP_NAME" -n --args --executed-from="$(pwd)" --pid=$$ --path-environment="$PATH" "$@"

If you see the following instead:

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

Change it 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.