diff options
Diffstat (limited to '_extensions/js/graphics-noindent/graphics-noindent.lua')
-rw-r--r-- | _extensions/js/graphics-noindent/graphics-noindent.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/_extensions/js/graphics-noindent/graphics-noindent.lua b/_extensions/js/graphics-noindent/graphics-noindent.lua new file mode 100644 index 0000000..2f3a140 --- /dev/null +++ b/_extensions/js/graphics-noindent/graphics-noindent.lua @@ -0,0 +1,15 @@ +-- Disable indentation when a paragraph exclusively contains an image + +local noindent = pandoc.RawInline('latex', [[ +\noindent +]]) + +function Para(elem) + if FORMAT:match 'latex' then + if elem.content[1].t == 'Image' then + new_elem = elem + new_elem.content:insert(1, noindent) + return new_elem + end + end +end |