- ws << "\\begin{" << name_ << '}';
- if (name_ != "split" && verticalAlignment() != 'c')
- ws << '[' << verticalAlignment() << ']';
- if (name_ == "alignedat")
+ docstring suffix;
+ if (!numbered_ && name_ == "align")
+ suffix = from_ascii("*");
+ ws << "\\begin{" << name_ << suffix << '}';
+ bool open = ws.startOuterRow();
+ bool const hasArg(name_ == "alignedat");
+ if (name_ != "split" && name_ != "align") {
+ if (verticalAlignment() != 'c')
+ ws << '[' << verticalAlignment() << ']';
+ else if (!hasArg) {
+ docstring const first(asString(cell(0)));
+ // prevent misinterpretation of the first character of
+ // the first cell as optional argument (bug 10361)
+ if (!first.empty() && first[0] == '[')
+ ws << "[]";
+ }
+ }
+ if (hasArg)