+docstring InsetBox::xhtml(XHTMLStream & xs, OutputParams const & runparams) const
+{
+ // construct attributes
+ string attrs = "class='" + params_.type + "'";
+ string style;
+ if (!params_.width.empty()) {
+ string w = params_.width.asHTMLString();
+ if (w != "100%")
+ style += ("width: " + params_.width.asHTMLString() + "; ");
+ }
+ // The special heights don't really mean anything for us.
+ if (!params_.height.empty() && params_.height_special == "none")
+ style += ("height: " + params_.height.asHTMLString() + "; ");
+ if (!style.empty())
+ attrs += " style='" + style + "'";
+
+ xs << html::StartTag("div", attrs);
+ XHTMLOptions const opts = InsetText::WriteLabel | InsetText::WriteInnerTag;
+ docstring defer = InsetText::insetAsXHTML(xs, runparams, opts);
+ xs << html::EndTag("div");
+ xs << defer;
+ return docstring();
+}
+
+