Installing the latest version of Pandoc on Ubuntu 17.04
May 17, 2017
This tutorial describes how I installed the latest version of Pandoc on Ubuntu 17.04 and installed additional packages in order to convert my resume written in Markdown to a PDF file.
Installing the latest version of Pandoc
I downloaded and installed the
latest Pandoc release
wget https://github.com/jgm/pandoc/releases/download/\ 126.96.36.199/pandoc-188.8.131.52-1-amd64.deb sudo dpkg -i pandoc-184.108.40.206-1-amd64.deb rm pandoc-220.127.116.11-1-amd64.deb
I verified that Pandoc got installed correctly and that the version
reported matched the version installed using
pandoc -v. This gave
the following output:
pandoc 18.104.22.168 Compiled with pandoc-types 22.214.171.124, texmath 0.9, skylighting 0.1.1.4 Default user data directory: /home/john/.pandoc Copyright (C) 2006-2016 John MacFarlane Web: http://pandoc.org This is free software; see the source for copying conditions. There is no warranty, not even for merchantability or fitness for a particular purpose.
In order to get the
pdflatex program, required to convert the LaTeX
pandoc to PDF, I installed
sudo apt-get install -y texlive-latex-recommended
This used nearly 800 MB of additional disk space. When I tested generating my PDF resume via Pandoc I ended up with the following LaTeX error:
! LaTeX Error: File `enumitem.sty' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty) Enter file name: ! Emergency stop. <read *> l.14 \usepackage pandoc: Error producing PDF
apt-cache search gave the following two results:
$ apt-cache search enumitem texlive-lang-german - TeX Live: German texlive-latex-extra - TeX Live: LaTeX additional packages
In my case the latter was the obvious choice, which I installed using
apt-get as follows:
sudo apt-get install -y texlive-latex-extra
This is most likely not a minimal install of LaTeX, as this used over 600 MB of additional disk space. However, I preferred this over manually installing LaTeX packages, especially as I was not sure how many were missing nor which ones I would need in the future.
If you want to test this installation the same way as I did,
required. Install it as follows:
sudo apt-get install -y git
Next, clone my resume repository as follows:
git clone https://github.com/john-bokma/resume-pandoc.git
Change into the
And generate the PDF version of my resume as follows:
pandoc perl-programmer-john-bokma-resume.md -f markdown+yaml_metadata_block \ --template templates/jb2resume.latex \ -o perl-programmer-john-bokma-resume.pdf
For more information on the template I used and its settings, see resume-pandoc.