Exporting Files in Emacs Using Pandoc

pandoc-mode and ox-pandoc

ox-pandox allows flat exports

pandoc-mode provides facilities to set the various options that Pandoc accepts and to run Pandoc on the input file

Install via Melpa

Activate `pandoc-mode`

Add hooks for certain modes

`(add-hook 'markdown-mode-hook 'pandoc-mode)`

Leverages the `hydra` package to provide a user-friendly interface for interacting with Pandoc

`C-c /` runs the command `pandoc-main-hydra/body`

Through this menu, users can convert files, adjust input and output formats, access and modify a wide range of Pandoc options, and view both the output of their conversions and the current settings applied to the document.

You can save your settings on a file per file basis, project basis of globally

To get PDF exports to work you must have `LaTeX` installed

https://miktex.org/

Add to System Path and to Emacs `exec-path`

In org mode you can easily adapt the settings

#+LATEX_CLASS_OPTIONS: [12pt]
#+LATEX_HEADER: \usepackage[margin=1in]{geometry}
#+LATEX_HEADER: \usepackage[top=0.5in, bottom=0.5in, left=0.5in, right=0.5in]{geometry}

Return to Home