+docstring InsetCaption::xhtml(XHTMLStream & xs, OutputParams const & rp) const
+{
+ if (rp.html_disable_captions)
+ return docstring();
+ InsetLayout const & il = getLayout();
+ string const & tag = il.htmltag();
+ string attr = il.htmlattr();
+ if (!type_.empty()) {
+ string const our_class = "float-caption-" + type_;
+ size_t const loc = attr.find("class='");
+ if (loc != string::npos)
+ attr.insert(loc + 7, our_class + " ");
+ else
+ attr = attr + " class='" + our_class + "'";
+ }
+ xs << html::StartTag(tag, attr);
+ docstring def = getCaptionAsHTML(xs, rp);
+ xs << html::EndTag(tag);
+ return def;
+}
+
+
+void InsetCaption::getArgument(otexstream & os,
+ OutputParams const & runparams) const
+{
+ InsetLayout const & il = getLayout();
+
+ if (!il.leftdelim().empty())
+ os << il.leftdelim();
+
+ OutputParams rp = runparams;
+ if (isPassThru())
+ rp.pass_thru = true;
+ if (il.isNeedProtect())
+ rp.moving_arg = true;
+ rp.par_begin = 0;
+ rp.par_end = paragraphs().size();
+
+ // Output the contents of the inset
+ if (!paragraphs().empty())
+ os.texrow().forceStart(paragraphs()[0].id(), 0);
+ latexParagraphs(buffer(), text(), os, rp);
+ runparams.encoding = rp.encoding;
+
+ if (!il.rightdelim().empty())
+ os << il.rightdelim();
+}
+
+
+int InsetCaption::getCaptionAsPlaintext(odocstream & os,