$ pandoc --version
pandoc 2.12
Compiled with pandoc-types 1.22, texmath 0.12.1.1, skylighting 0.10.4,
citeproc 0.3.0.8, ipynb 0.1.0.1
User data directory: /Users/mpower/.local/share/pandoc
Copyright (C) 2006-2021 John MacFarlane. Web: https://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.
When rendering markdown with a template, and the markdown has a table with long rows, the rendering fails with Undefined control sequenceSteps to reproduce:Create file named: i-am-a-file.mdContents:
| HTTP | Usage |
|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
| GET | Query Query Query Query Query Query Query Query Query Query Query Query Query Query Query Query Query Query Query Query Query Query Query Query Query |
| POST | Create Create Create Create Create Create Create Create Create Create Create Create Create Create Create Create Create Create Create Create Create |
| PUT | PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT PUT |
| DELETE | Delete Delete Delete Delete Delete Delete Delete Delete Delete Delete Delete Delete Delete Delete Delete Delete Delete Delete Delete Delete Delete |Create file named: i-am-a-template.texContents:
\documentclass{$documentclass$}
$if(tables)$
\usepackage{longtable}
$endif$
\begin{document}
$body$
\end{document}
Then run the following command:
pandoc i-am-a-file.md -f markdown -o i-am-a-pdf.pdf --template i-am-a-template.tex
Output:
Error producing PDF.
! Undefined control sequence.
<argument> @{} >{\raggedright \arraybackslash
}p{(\columnwidth - 2\tabcolsep...
l.13 ...umnwidth - 2\tabcolsep) * \real{0.95}}@{}}
If I shorten the table to:
| HTTP | Usage |
|--------|---------|
| GET | Query |
| POST | Create |
| PUT | PUT PUT |
| DELETE | Delete |
Then I get the following output
Error producing PDF.
! Undefined control sequence.
l.12 \toprule
Which I think is related to a missing package in my sample template because I tried to strip it down as much as possible to show only the code that is producing the error.
Is this a known bug? Is there a workaround for it?