#include "TextClass.h"
#include "support/debug.h"
+#include "support/docstream.h"
#include "support/gettext.h"
#include "support/lstrings.h"
#include "support/Translator.h"
params_.type = cmd.getArg(1);
else
string2params(to_utf8(cmd.argument()), params_);
- setLayout(cur.buffer().params());
+ setLayout();
break;
}
}
+docstring InsetBox::xhtml(odocstream &, OutputParams const & runparams) const
+{
+ string style;
+ if (!params_.width.empty())
+ style += ("width: " + params_.width.asHTMLString() + ";");
+ if (!params_.height.empty())
+ style += ("height: " + params_.height.asHTMLString() + ";");
+
+ docstring retval = from_ascii("<div class='" + params_.type + "'");
+ if (!style.empty())
+ retval += from_ascii(" style='" + style + "'");
+ retval += ">\n";
+ odocstringstream os;
+ docstring defer = InsetText::xhtml(os, runparams);
+ retval += os.str();
+ retval += "</div>\n";
+ retval += defer + "\n";
+ return retval;
+}
+
+
void InsetBox::validate(LaTeXFeatures & features) const
{
BoxType btype = boxtranslator().find(params_.type);
features.require("framed");
break;
}
- InsetText::validate(features);
+ InsetCollapsable::validate(features);
}