summaryrefslogtreecommitdiff
path: root/doc/lua-filters.md
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-11-12 15:51:10 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2017-11-12 15:51:10 -0800
commit5c71e5afbfb127f4a7fc225610a486d33e21cdb4 (patch)
tree820ea96fdc5d10d34835230a5d27833558073ef2 /doc/lua-filters.md
parenteacf1a2f0096135609fa16699980624577db31d7 (diff)
Improve handout example.
Diffstat (limited to 'doc/lua-filters.md')
-rw-r--r--doc/lua-filters.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index 8e59b73ea..5703a68ec 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -365,8 +365,10 @@ end
## Creating a handout from a paper
This filter extracts all the numbered examples, section
-headers, block quotes from a document, in addition to any
-divs with class `handout`:
+headers, block quotes, and figures from a document, in addition
+to any divs with class `handout`. (Note that only blocks
+at the "outer level" are included; this ignores blocks inside
+nested constructs, like list items.)
``` lua
function Pandoc(doc)
@@ -375,6 +377,7 @@ function Pandoc(doc)
if (el.t == "Div" and el.classes[1] == "handout") or
(el.t == "BlockQuote") or
(el.t == "OrderedList" and el.style == "Example") or
+ (el.t == "Para" and #el.c == 1 and el.c[1].t == "Image") or
(el.t == "Header") then
table.insert(hblocks, el)
end