From: Stephan Boltzmann <stephan2boltzmann-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Lua filter to remove captions from tables
Date: Thu, 14 Jan 2021 01:40:41 -0800 (PST) [thread overview]
Message-ID: <82e61683-5190-45c6-8420-60243cf1bee3n@googlegroups.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1353 bytes --]
Hello everybody out there using Pandoc,
I would like to remove the caption from tables in PDF output and tried a
couple of things without success:
if FORMAT:match 'latex' then
function Table (elem)
--caption = elem.caption
caption = elem.c[2] -- caption seems to be second element
print(pandoc.utils.stringify(caption))
--elem.c[2] = nil
--elem.c[2] = pandoc.Str('Test')
--elem.caption = nil
--elem = nil
--return {pandoc.Table(elem.c)}
--return {elem}
--elem:remove(2)
--table.remove(elem.c,2)
--[[
return {
pandoc.Para(pandoc.Str('test'))
}
--]]
return {
--pandoc.Table(elem.caption, elem.aligns, elem.widths, elem.headers,
elem.rows)
}
end
end
The main problem could actually rather be the construction of the table
using the function pandoc.Table in the return statement:
Could not read list: Could not get Block value: expected table, got 'nil'
(nil)
--
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/82e61683-5190-45c6-8420-60243cf1bee3n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 2394 bytes --]
next reply other threads:[~2021-01-14 9:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 9:40 Stephan Boltzmann [this message]
[not found] ` <82e61683-5190-45c6-8420-60243cf1bee3n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-01-14 10:43 ` BPJ
[not found] ` <CADAJKhAuKkpGQZfv0ptudJcH6U1iL+_tkd9Ubm6jGw8ky3_L8w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-01-14 12:28 ` Stephan Boltzmann
[not found] ` <7e2c1a91-6cb1-4344-aab5-8577f1b82905n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-01-14 21:59 ` BPJ
[not found] ` <CADAJKhBczM9Li+FG_6rWrPnSOCG0Bo6rrPdRFc5poZpNrx8jVw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-01-16 9:23 ` Stephan Boltzmann
[not found] ` <35c35036-590d-48d9-bddb-09e6e71b4982n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-01-16 9:31 ` BPJ
[not found] ` <CADAJKhBTKO4irrpCpy-1NfwQLMWzrV-i3b=MYPrwsLjgROOaHg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-01-16 17:05 ` Albert Krewinkel
[not found] ` <87czy43j9c.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2021-01-16 17:46 ` Stephan Boltzmann
2021-01-17 9:57 ` BPJ
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=82e61683-5190-45c6-8420-60243cf1bee3n@googlegroups.com \
--to=stephan2boltzmann-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).