public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Extracting all equations (dropping the rest)
@ 2022-01-29 22:36 bapt a
       [not found] ` <235047d3-c000-4adb-8d61-e5b905475cc4n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: bapt a @ 2022-01-29 22:36 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 997 bytes --]

Hi,

I'm hoping to extract all equations from a latex document with a Lua 
filter, but I'm not having any luck.

Adapting an existing example I thought this might work,

function Pandoc(doc)
local hblocks = {}
for i,el in pairs(doc.blocks) do
if (el.t == "Math" ) then
table.insert(hblocks, el)
end
end
return pandoc.Pandoc(hblocks, doc.meta)
end

but nothing is returned, unfortunately. I also found this idea, 
https://stackoverflow.com/a/39963980

but it uses json (via Haskell) filters and I'd prefer something more 
portable with Lua.

Many thanks for any pointers,

baptiste






-- 
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/235047d3-c000-4adb-8d61-e5b905475cc4n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 3249 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-30 18:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-29 22:36 Extracting all equations (dropping the rest) bapt a
     [not found] ` <235047d3-c000-4adb-8d61-e5b905475cc4n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-01-30  7:18   ` John MacFarlane
     [not found]     ` <m24k5lsnc7.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org>
2022-01-30  9:04       ` bapt a
2022-01-30 11:20   ` Albert Krewinkel
     [not found]     ` <87leyxmpgu.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2022-01-30 18:53       ` bapt a

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).