$ 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.


On Wednesday, December 14, 2022 at 2:51:05 PM UTC-6 Mike Power wrote:
When rendering markdown with a template, and the markdown has a table with long rows, the rendering fails with Undefined control sequence

Steps to reproduce:

Create file named: i-am-a-file.md
Contents:
| 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.tex
Contents:
\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?

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/25b0b6d4-63f5-4d13-9175-0ba85bc605e5n%40googlegroups.com.