A Mutable Log

A blog by Devendra Tewari


Project maintained by tewarid Hosted on GitHub Pages — Theme by mattgraham

Use eisvogel custom template with Pandoc

On macOS prior to Catalina, the preinstalled tlmgr command is used to install \(\TeX\) packages from CTAN. To install tlmgr on macOS Catalina using Homebrew, run

brew cask install mactex

To list currently installed packages

tlmgr list --only-installed

To update tlmgr itself - you won’t be able to install packages unless you do

sudo tlmgr update --self

To install packages required by the eisvogel \(\LaTeX\) template for Pandoc

sudo tlmgr install csquotes mdframed needspace sourcesanspro ly1 mweights sourcecodepro titling pagecolor

The command needs to be run with sudo because the path where \(\TeX\) and associated packages are installed is at /usr/local/texlive/2016basic/texmf-dist/tex and does not have write permission for my user.

To use the eisvogel template, clone its repo

git clone https://github.com/Wandmalfarbe/pandoc-latex-template.git

To render PDF, in the folder cloned above, run

pandoc file.md -f gfm -o file.pdf --template ./eisvogel.tex --variable titlepage=true

Remove the --variable titlepage=true option if you don’t want a title page.