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)