+ if (havetable)
+ os << MTag("mtr");
+ for (col_type col = 0; col < ncols(); ++col) {
+ os << MTag(celltag);
+ os << cell(index(row, col));
+ os << ETag(celltag);
+ }
+ if (havetable)
+ os << ETag("mtr");
+ }
+ if (havetable)
+ os << ETag("mtable");
+}
+
+
+// FIXME XHTML
+// We need to do something about alignment here.
+void InsetMathGrid::htmlize(HtmlStream & os, string attrib) const
+{
+ bool const havetable = nrows() > 1 || ncols() > 1;
+ if (!havetable) {
+ os << cell(index(0, 0));
+ return;
+ }
+ os << MTag("table", attrib);
+ for (row_type row = 0; row < nrows(); ++row) {
+ os << MTag("tr");
+ for (col_type col = 0; col < ncols(); ++col) {
+ os << MTag("td");