What is Pandoc?
Pandoc is open-source software used to transform various filetypes such as
.md into more user-friendly filetypes including
Listed below are the steps I took to install and configure Pandoc on Windows (10 Pro Edition) and Linux (Ubuntu 20.04 Focal) for markdown --> PDF document creation.
Please note all disclaimers remain flapping in the breeze, including "Your Mileage Might Vary."
I have been using the
chocolately package manager with Windows for several years now. So for me the simplest way to get Pandoc up and running was to install with this simple command.
choco install pandoc
Then I grabbed the Windows installer for MikTex from the official downloads page, and ran the
.exe file to install.
No further configuration was necessary, at least not on a functional level. Provisions exist within Pandoc to customize your installation at a quite granular level.
There is a reference section at the end of this document that is a good starting place.
Getting Pandoc setup with
After triaging a good deal of noise encountered while researching different packages, I found the general consensus for Ubuntu seemed to favor a Pandoc/TexLive setup.
Since I am running Linux on WSL2, I opted to build from scratch to avoid any conflicts with my local Windows environment.
First I used
wget to pull the latest
pandoc-linux-amd64 tarball from the release page.
Then, without switching directories, I used a two-step installation process.
sudo tar xvzf $TGZ --strip-components 1 -C '/usr/local'
Note the PATH in this snippet is generic and substitutions must be made to reflect your home directory.
sudo apt-get install texlive texlive-latex-extra
These configuration options are just examples and may not apply in every situation.
One should always consult the official Pandoc documentation for complete details and latest changes.
Specifies which engine Pandoc should use when producing PDF output.
Valid values are pdflatex, lualatex, xelatex, latexmk, tectonic, wkhtmltopdf, weasyprint, prince, context, and pdfroff.
If the engine is not in your PATH, the full path of the engine may be specified here.
If this option is not specified, pandoc uses the following defaults depending on the output format specified by -t/--to:
> -t latex or none
> -t context:
> -t html:
> -t ms:
Use the given string as a command-line argument to the pdf-engine. For example, to use a persistent directory
foo for latexmk’s auxiliary files, use
Note that no check for duplicate options is done.
Copyright 2006–2021 John MacFarlane (email@example.com). Released under the GPL, version 2 or greater. This software carries no warranty of any kind.