From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31887 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mike Power Newsgroups: gmane.text.pandoc Subject: Re: Trying to render markdown to pdf and a long table row is giving me a Undefined control sequence Date: Wed, 14 Dec 2022 12:52:00 -0800 (PST) Message-ID: <25b0b6d4-63f5-4d13-9175-0ba85bc605e5n@googlegroups.com> References: <012001ad-be6d-48d9-b0e2-b3173fe5346bn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2748_90498001.1671051120280" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10381"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBD6NVPU3TUIRB4PO5COAMGQE7YOU2VA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Dec 14 21:52:05 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f56.google.com ([209.85.210.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p5YjV-0002VM-7L for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 14 Dec 2022 21:52:05 +0100 Original-Received: by mail-ot1-f56.google.com with SMTP id e8-20020a9d63c8000000b006704cedcfe2sf2311974otl.19 for ; Wed, 14 Dec 2022 12:52:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=AJmPdx43PbjyY/LKpK6pSlDtf1CwAbhJEycUJtAh1Vc=; b=ChBNkhWeoWYT4zlaTKGYYOFrfdXwqExa6L2n7p4fxnYWspVmMm7fOBbbefcTR3k3Fe iN/HcA8Uz1yUNZ1J3qgTV43X8fqQzW59CYxzN///sG7khP0SjUwnqCKPXSF8ESmd6TG/ HRlEzxTKJd+4syAaPBIpLmC6Dx0wjYe6x5cLR70XYVaKbvWWVu3WHdA37ANc0dqlyR8v ORS1wzrOavViAnmyUU4dtpcg8bJQQ4E4I1YxYage+yH/PZmet9eQ3NgN/tNL1RUNaHkN MAH3C42FSSrZVj5qFgkHrW+cQFIJQUiOLOkKCKF8Sx/NL5k8lZWzrY6bMnznrcC2vo4r XfTA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=AJmPdx43PbjyY/LKpK6pSlDtf1CwAbhJEycUJtAh1Vc=; b=EUnoiVovxD9+IEHMwUUoJE30It+KHu6A344ZHDTB1r86fU3wVs3ODrD4AXHmH3c1rV lyTqEvPZ1CZFo2EK7O+guAY4dyfDZ7qp61+OvsEmiHc+PYPeDOjrIxqF51lSu+oqlDwR XjjrQeGTTW+itkbUEZHrDdujqgcLtJsOx8I++Zz6pd2jjB7sS0fyPlv+8ebGiF8wtEER IIt6zK8CyxttcYWQM2OV1xxadeJT5jxTpvxVa8qEfqjRvY5KEewpOTkWKEdUO7ad8xx6 UV857Vaezff8fa/uylFwQ5rI7opEa01/vr3wqsoHfstIuCq9TVeHmjPMIYc0D+XvFyMN nFJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=AJmPdx43PbjyY/LKpK6pSlDtf1CwAbhJEycUJtAh1Vc=; b=orJE/vimhizhDx74YfG4t87QKvh+6b5ph/G/1CRPsuGUmVnNzjGEF4r1p4oN45jAfh I1RdvnnAfKOCEl98zc506PK0HL0ie2iwpMXE5AxAJplxAPYJzGa72AHOSWv5VRquQTh+ 30PRkgLuYcQka7LapPEFD++SfDJk4WTm2YQReb4H0tN/w67laBPfSNkaUhymGNAcd596 IQ/AfxPzw6zN+ezQqEJharNqJFEvzsP59jqFlO2uDBSsgpJY3vQKrfp1zDkuAkoGd2vC rBDnHfJ87PdnMgtNBFgIn7I24ZuNykPDh9q2t6NnBXwqj+65T/+312Sq3/8Kk+vAfCnz C7ZA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AFqh2kpB3kKiXqGUoW+COGin8uGoAOablfiUpVxJWRtzUiOJ+wmi+kAy OKB9edXQyAAenYiPI7oao3U= X-Google-Smtp-Source: AMrXdXvjf7gAo+yrMj1w7htZ0orVvnyMQluiJoO95hyR7MB75mtxOUJTx0WPqNaapFJ66/qcF2U+9Q== X-Received: by 2002:a05:6870:ac88:b0:144:514c:434d with SMTP id ns8-20020a056870ac8800b00144514c434dmr294624oab.50.1671051124086; Wed, 14 Dec 2022 12:52:04 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6808:8c2:b0:35a:8063:d38b with SMTP id k2-20020a05680808c200b0035a8063d38bls2173542oij.11.-pod-prod-gmail; Wed, 14 Dec 2022 12:52:01 -0800 (PST) X-Received: by 2002:a05:6808:1490:b0:35b:4bd8:6833 with SMTP id e16-20020a056808149000b0035b4bd86833mr180988oiw.104.1671051120966; Wed, 14 Dec 2022 12:52:00 -0800 (PST) In-Reply-To: <012001ad-be6d-48d9-b0e2-b3173fe5346bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: dodtsair-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:31887 Archived-At: ------=_Part_2748_90498001.1671051120280 Content-Type: multipart/alternative; boundary="----=_Part_2749_1562470038.1671051120280" ------=_Part_2749_1562470038.1671051120280 Content-Type: text/plain; charset="UTF-8" $ 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. > @{} >{\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/25b0b6d4-63f5-4d13-9175-0ba85bc605e5n%40googlegroups.com. ------=_Part_2749_1562470038.1671051120280 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

$ 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/sha= re/pandoc

Copyright (C) 2006-2021 John MacFarlane. Web:=   https://pandoc.org

This is free software; see the source for cop= ying conditions. There is no

warranty, not even for merchantability or fit= ness 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=C2=A0Undefined contro= l sequence

Steps to reproduce:

Cre= ate file named:=C2=A0i-am-a-file.md
Contents:
| HTTP | Usage = = |
|--------|--------------------------------------= ---------------------------------------------------------------------------= --------------------------------------|
| GET | Query Query Query Que= ry Query Query Query Query Query Query Query Query Query Query Query Query = Query Query Query Query Query Query Query Query Query |
| POST | Creat= e Create Create Create Create Create Create Create Create Create Create Cre= ate 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 Dele= te Delete Delete Delete |

Create fil= e named:=C2=A0i-am-a-template.tex
Contents:
\documentclass{$documentclass$}

$if(tables)$
\usepackage= {longtable}
$endif$




\begin{document}

$body= $

\end{document}

Then run the following command:
= =C2=A0pandoc i-am-a-file.md =C2=A0 =C2=A0 =C2=A0 =C2=A0-f markdown =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0-o i-am-a-pdf.pdf =C2=A0 =C2=A0 =C2=A0 =C2=A0--t= emplate i-am-a-template.tex

Output:
Er= ror producing PDF.
! Undefined control sequence.
<argument> @{}= >{\raggedright \arraybackslash
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }p{(\columnwidth - 2\t= abcolsep...
l.13 ...umnwidth - 2\tabcolsep) * \real{0.95}}@{}}


If I shorten the table to:
| HTTP = | Usage |
|--------|---------|
| GET | Query |
| POST | C= reate |
| PUT | PUT PUT |
| DELETE | Delete |

Then= I get the following output
Error producing P= DF.
! Undefined control sequence.
l.12 =C2=A0 =C2=A0 \toprule
Which I think is related to a missing package in my sample template beca= use I tried to strip it down as much as possible to show only the code that= is producing the error.=C2=A0=C2=A0


Is this a known bug?=C2=A0 = Is there a workaround for it?

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-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.
------=_Part_2749_1562470038.1671051120280-- ------=_Part_2748_90498001.1671051120280--