aboutsummaryrefslogtreecommitdiff
path: root/data/sample.lua
diff options
context:
space:
mode:
Diffstat (limited to 'data/sample.lua')
-rw-r--r--data/sample.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/data/sample.lua b/data/sample.lua
index f5c17839e..fa265d04d 100644
--- a/data/sample.lua
+++ b/data/sample.lua
@@ -84,7 +84,7 @@ function Doc(body, metadata, variables)
end
add('</ol>')
end
- return table.concat(buffer,'\n')
+ return table.concat(buffer,'\n') .. '\n'
end
-- The functions that follow render corresponding pandoc elements.
@@ -251,6 +251,12 @@ function html_align(align)
end
end
+function CaptionedImage(src, tit, caption)
+ return '<div class="figure">\n<img src="' .. escape(src,true) ..
+ '" title="' .. escape(tit,true) .. '"/>\n' ..
+ '<p class="caption">' .. caption .. '</p>\n</div>'
+end
+
-- Caption is a string, aligns is an array of strings,
-- widths is an array of floats, headers is an array of
-- strings, rows is an array of arrays of strings.