summaryrefslogtreecommitdiff
path: root/_extensions/js/graphics-noindent/graphics-noindent.lua
blob: 2f3a140e8b6382ccf114e9f8957662f15a41e988 (plain)
  1. -- Disable indentation when a paragraph exclusively contains an image
  2. local noindent = pandoc.RawInline('latex', [[
  3. \noindent
  4. ]])
  5. function Para(elem)
  6. if FORMAT:match 'latex' then
  7. if elem.content[1].t == 'Image' then
  8. new_elem = elem
  9. new_elem.content:insert(1, noindent)
  10. return new_elem
  11. end
  12. end
  13. end