class Kramdown::Converter::Latex

def convert_standalone_image(el, _opts, img)

element.
Helper method used by +convert_p+ to convert a paragraph that only contains a single :img
def convert_standalone_image(el, _opts, img)
  attrs = attribute_list(el)
  "\\begin{figure}#{attrs}\n\\begin{center}\n#{img}\n\\end{center}\n" \
    "\\caption{#{escape(el.children.first.attr['alt'])}}\n" \
    "#{latex_link_target(el, true)}\n\\end{figure}#{attrs}\n"
end