Create a gist now

Instantly share code, notes, and snippets.

@jrgcmu /npp-pandoc.md Secret
Last active Aug 29, 2015

Call pandoc from within Notepad++

Setup

  1. Install the NppExec plugin.
  2. Choose Execute from the NppExec menu and paste the following into the console:

    cd "$(CURRENT_DIRECTORY)"
    pandoc "$(FILE_NAME)" -o "$(NAME_PART).pdf" -V geometry:margin=1in --latex-engine=pdflatex
    
  3. Name your script (e.g. pandoc-pdf) and save.

Customization

  • It's easy to modify the script to suit your needs (e.g., convert to docx, use a template, etc.)
  • You can add a dedicated menu entry and/or keyboard shortcut using the Advanced Options interface under the NppExec menu.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment