public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Trying to render markdown to pdf and a long table row is giving me a Undefined control sequence
@ 2022-12-14 20:51 Mike Power
       [not found] ` <012001ad-be6d-48d9-b0e2-b3173fe5346bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Power @ 2022-12-14 20:51 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2463 bytes --]

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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/012001ad-be6d-48d9-b0e2-b3173fe5346bn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 3548 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-14 22:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-14 20:51 Trying to render markdown to pdf and a long table row is giving me a Undefined control sequence Mike Power
     [not found] ` <012001ad-be6d-48d9-b0e2-b3173fe5346bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-12-14 20:52   ` Mike Power
     [not found]     ` <25b0b6d4-63f5-4d13-9175-0ba85bc605e5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-12-14 21:41       ` Albert Krewinkel
     [not found]         ` <87r0x1veyu.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2022-12-14 22:11           ` Mike Power

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).