public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Mike Power <dodtsair-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Trying to render markdown to pdf and a long table row is giving me a Undefined control sequence
Date: Wed, 14 Dec 2022 12:51:05 -0800 (PST)	[thread overview]
Message-ID: <012001ad-be6d-48d9-b0e2-b3173fe5346bn@googlegroups.com> (raw)


[-- 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 --]

             reply	other threads:[~2022-12-14 20:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 20:51 Mike Power [this message]
     [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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=012001ad-be6d-48d9-b0e2-b3173fe5346bn@googlegroups.com \
    --to=dodtsair-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).