Method: IsoDoc::WordFunction::Postprocess#word_image_caption
- Defined in:
- lib/isodoc/word_function/postprocess.rb
#word_image_caption(docxml) ⇒ Object
102 103 104 105 106 107 108 109 110 111 |
# File 'lib/isodoc/word_function/postprocess.rb', line 102 def word_image_caption(docxml) docxml.xpath("//p[@class = 'FigureTitle' or @class = 'SourceTitle']"). each do |t| if t&.previous_element&.name == "img" img = t.previous_element t.previous_element.swap("<p class=\'figure\'>#{img.to_xml}</p>") end style_update(t&.previous_element, "page-break-after:avoid;") end end |