@@ -365,8 +365,10 @@ end
365## Creating a handout from a paper
365## Creating a handout from a paper
367This filter extracts all the numbered examples, section
367This filter extracts all the numbered examples, section
368−headers, block quotes from a document, in addition to any
368+headers, block quotes, and figures from a document, in addition
369−divs with class `handout`:
369+to any divs with class `handout`. (Note that only blocks
370+at the "outer level" are included; this ignores blocks inside
371+nested constructs, like list items.)
372function Pandoc(doc)
374function Pandoc(doc)
@@ -375,6 +377,7 @@ function Pandoc(doc)
375 if (el.t == "Div" and el.classes[1] == "handout") or
377 if (el.t == "Div" and el.classes[1] == "handout") or
376 (el.t == "BlockQuote") or
378 (el.t == "BlockQuote") or
377 (el.t == "OrderedList" and el.style == "Example") or
379 (el.t == "OrderedList" and el.style == "Example") or
380+ (el.t == "Para" and #el.c == 1 and el.c[1].t == "Image") or
378 (el.t == "Header") then
381 (el.t == "Header") then
379 table.insert(hblocks, el)
382 table.insert(hblocks, el)