I was trying to define my own pandoc template for job reports and I stumbled across many "undefined control sequence" problems. I have taken a look at the default template but it's too generic to really be understood.
I have written this and I don't want my template to be much more complex (i.e. no conditionals), the reason being I'd rather use \LaTeX to specify high-level typesseting options (that's what it was made for) and leave the YAML at a minimum.
\documentclass[11pt]{article}
\usepackage{fontspec,xltxtra,xunicode}
\setmainfont[
BoldFont={Fira Sans SemiBold},
BoldItalicFont={Fira Sans SemiBold Italic}
]{Fira Sans Book}
\setmonofont[
Contextuals={Alternate}
]{Fira Code Retina}
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\begin{document}
$body$
\end{document}
Considering I already had to provide the \tightlist
command, I would like to know what API does pandoc expect from my template, i.e. which functions / commands I would need to define in order to pandoc to just work.
I would write it in pure LaTeX but I also need to upload these documents to a GitLab repository, so markdown is the simplest solution.
I also haven't found any good, "for dummies" guide on writting pandoc templates, so if it exists, pointing me to that will be greatly appreciated.
Edit: the template I provided is throwing errors when using Pandoc (although may be a problem with my command flags: pandoc -N --template=mytemplate.tex --pdf-engine=xelatex my_doc.md -o my_doc.pdf
). I say this because the answer suggests that this template should work, but it's not :(