Skip to content

Instantly share code, notes, and snippets.

@jrgcmu
Last active April 21, 2020 12:31
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jrgcmu/3ccc11c0412f45f9a6a4 to your computer and use it in GitHub Desktop.
Save jrgcmu/3ccc11c0412f45f9a6a4 to your computer and use it in GitHub Desktop.
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.
@daacosta
Copy link

Thank you... Thank you, thank you, thank you... I can even apply filters, mess around, do bibliographies, use the full power of pandoc markdown... This thing made my day...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment