From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/18538 Path: news.gmane.org!.POSTED!not-for-mail From: Nizamudheen Ahmed Newsgroups: gmane.text.pandoc Subject: Pandoc Python filter + Table constructor Date: Sat, 4 Nov 2017 08:34:32 -0700 (PDT) Message-ID: <1be02d85-bd95-4709-82f8-f6a5460930c6@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_5382_109463156.1509809672160" X-Trace: blaine.gmane.org 1509809672 19462 195.159.176.226 (4 Nov 2017 15:34:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 4 Nov 2017 15:34:32 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDG5REGGQMDRBCN467HQKGQEL4ZZ6ZY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Nov 04 16:34:26 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-oi0-f61.google.com ([209.85.218.61]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eB0So-0004ie-Hi for gtp-pandoc-discuss@m.gmane.org; Sat, 04 Nov 2017 16:34:26 +0100 Original-Received: by mail-oi0-f61.google.com with SMTP id y206sf5779895oiy.8 for ; Sat, 04 Nov 2017 08:34:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=o4sw4/XWhmRurIqc7xOxNxEfypDw7ozLjA5xhHIW9ho=; b=Z2zE90aME4/YmRpp8+8L0IAw3uHdyicobriFEhru50scCISCDU4QN1j89isQ1WtoQL y1xkbv3UZ8MBQp5hxE5Zv2qry5jVKoTj2tzKqSqBCgdBwb1oaXjiztQILdX7xgQzu5H5 lOXlRktVo+LbmOZpSgZRmq45sTVf8mqh4gK4qf9zB4mPKEV5mwZUkHeKhGBETwYiyHgm U8M+FCrh9XTqOD+QOXiIdbcHNwaaLBW7t6qtCTnsBrAOsV+Hh2D+G905TSRoZdMX+00n 3A/KdnHqQKbqexbBG73Kalk2yBJLCW0rlifWNAIGrcXs4FbhxMIxgDe42f8asZKLTUFv LOwA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:subject:mime-version:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=o4sw4/XWhmRurIqc7xOxNxEfypDw7ozLjA5xhHIW9ho=; b=O5sMbiRwUQYxuLeb31e7xckhPCmIRufK66wkD+ozHaKIFk4+y2hAqj1IpqWHAFpgHY rJeavJwNfNdJbo2goKKqyrNUdlEuindzBUBtDgUek5B0TW2pHiUjvBlrnBTr0pSobRpy pnvYyAsM0vU207Jwz7vjObNT5yS0MoUZEy4SdoAKXUtKNfjVSweCI7qI1iVywPp/vp+X r5C0JimN/sOTpwhs+9NhLtaGSgQrk99qAfNvG7eCEcTwnvAyoRRDqnqi5KuqH5bgbx6h kqKaV5FW/5ZkrKL7JzSUpKf7Fv4oxQiRaGh86JXef2ZtdU8bDqy6vdrpZiqW0N9SYYgv PnAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=o4sw4/XWhmRurIqc7xOxNxEfypDw7ozLjA5xhHIW9ho=; b=nTUBcNPgE+rc6KV4A5O/C9cSj7cGnt2Rha7/BT/ENkrhf+OovqM804iXa3JL+QFZYG gNbdyrGguWBwCm4k0WdSJbP4aSdRGwndpkphTVeIjloDOj3xuMvmYCc8EBvvMdDySOll KjnprfQTWKRiteJcX47RtOXno8sIb1WRExSKB5YKOxpe4ud5NNw0/gt8CqHXsq3bnBBm SV7h4u4+1l3Bo/FcD2f+QuRrZCYetlAJ9gQf9eZcqjCkbApC4+gQg2VnpyJxdMj9q6Ra 9rwcAhCWL1Vny5G1eG2R0/Tbgs5Yd3KVToXz0P9LpQwo9yBb3hzNt29joJ1SvOd+btrH itjQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJaThX6ci+/FbMgQaukppze0CmIqaXJP9zbrDS50ci7Sdk7V0p+fxhfs bEqf/SskCh0L0t+3+7FSEhs= X-Google-Smtp-Source: ABhQp+SP3fiQE9wKP723kH4nmxZSO3XxhG0X7AAROfPXVeCKAJuwHTQfMj0h/r71BjfPeHCF569FTw== X-Received: by 10.157.92.195 with SMTP id r3mr83822oti.5.1509809673834; Sat, 04 Nov 2017 08:34:33 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.157.85.214 with SMTP id z22ls2829399oti.4.gmail; Sat, 04 Nov 2017 08:34:32 -0700 (PDT) X-Received: by 10.157.68.130 with SMTP id v2mr342589ote.9.1509809672702; Sat, 04 Nov 2017 08:34:32 -0700 (PDT) X-Original-Sender: nizam.ahmed-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.org gmane.text.pandoc:18538 Archived-At: ------=_Part_5382_109463156.1509809672160 Content-Type: multipart/alternative; boundary="----=_Part_5383_2082453711.1509809672161" ------=_Part_5383_2082453711.1509809672161 Content-Type: text/plain; charset="UTF-8" Hi folks, I am new to Pandoc. I am trying to write a filter using Python. I wanted to create and return a "Table" as part of the filter function. I understood that the Table constructor takes 5 arguments. But the details of them (at least from the Python parlance) are not available. My novice code to construct the Table looked like the following tab_le = Table ([Str("This is the title of the table")], # Table caption? ["left", "left"], # Alignment? [0.5, 0.5], # Relative width of the columns? [Str("C1"), Str("C2")], #Column Header name? [ # Table rows? [Str("A1"), Str("B1")], [Str("A2"), Str("B2")], [Str("A3"), Str("B3")] ] ); With that code, i get the following error >>>> Error in $[373][0]: expected Object, encountered String <<<<< I am sure i am grossly off in the constructor. Can someone help me to create Table? Thanks and with best regards, Nizam -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/1be02d85-bd95-4709-82f8-f6a5460930c6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_5383_2082453711.1509809672161 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi folks,

I am new to Pandoc. I am tryi= ng to write a filter using Python. I wanted to create and return a "Ta= ble" as part of the filter function. I understood that the Table const= ructor takes 5 arguments. But the details of them (at least from the Python= parlance) are not available.=C2=A0

My novice code= to construct the Table looked like the following

=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 tab_le =3D Table ([Str("= ;This is the title of the table")], # Table caption?
=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 ["left", "left"], # Alignment?
<= div>=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 [0.5, 0.5], # Relative width of the columns?
=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 [Str("C1"), Str("C2")],= #Column Header name?
=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 # Table ro= ws?
=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[Str("A1"), S= tr("B1")],=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[S= tr("A2"), Str("B2")],=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[Str("A3"), Str("B3")]
=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= =A0With that code, i get the following error

= >>>>
Error in $[373][0]: expected Object, encountered= String
<<<<<

I am = sure i am grossly off in the constructor. Can someone help me to create Tab= le?


Thanks and with best regards,
Nizam



--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/1be02d85-bd95-4709-82f8-f6a5460930c6%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_5383_2082453711.1509809672161-- ------=_Part_5382_109463156.1509809672160--