From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Pandoc Python filter + Table constructor
Date: Sat, 4 Nov 2017 16:05:32 -0700 [thread overview]
Message-ID: <20171104230532.GC97257@Johns-MacBook-Pro.local> (raw)
In-Reply-To: <1be02d85-bd95-4709-82f8-f6a5460930c6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
If you're using the pandocfilters library, I suggest you
check out the alternative library panflute, which is more
pythonic and easier to use.
+++ Nizamudheen Ahmed [Nov 04 17 08:34 ]:
> 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 [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to
> [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> [3]https://groups.google.com/d/msgid/pandoc-discuss/1be02d85-bd95-4709-
> 82f8-f6a5460930c6%40googlegroups.com.
> For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
> 1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> 2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> 3. https://groups.google.com/d/msgid/pandoc-discuss/1be02d85-bd95-4709-82f8-f6a5460930c6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
> 4. https://groups.google.com/d/optout
next prev parent reply other threads:[~2017-11-04 23:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-04 15:34 Nizamudheen Ahmed
[not found] ` <1be02d85-bd95-4709-82f8-f6a5460930c6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-11-04 19:34 ` Kolen Cheung
2017-11-04 23:05 ` John MacFarlane [this message]
[not found] ` <20171104230532.GC97257-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2017-11-06 4:15 ` Nizamudheen Ahmed
[not found] ` <CA+zEWHCd+EGXRoWsJcxk0hb_fn2JpWsmVuCnmKJz5ge6FzFCjw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-06 11:03 ` Kolen Cheung
[not found] ` <ae54a6c7-f694-4337-87d6-15178ab3f18d-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-11-13 6:08 ` Nizamudheen Ahmed
[not found] ` <CA+zEWHBcdnzHekVNY3Tdi4qZCkwbgqt4PWAQKYXOzyXmHtAn2Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-14 11:26 ` Nizamudheen Ahmed
[not found] ` <CA+zEWHBp2oiKbUVih9nM-LjVv_Kxti6t7uZ356_ScAdxkMMzUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-11 7:51 ` Kolen Cheung
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=20171104230532.GC97257@Johns-MacBook-Pro.local \
--to=jgm-tvlzxgkolnx2fbvcvol8/a@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).