InsetMathGrid::RowInfo::RowInfo()
- : lines_(0), skip_(0)
+ : lines_(0), skip_(0), allow_pagebreak_(true)
{}
if (!rowinfo_[row].crskip_.zero())
eol += '[' + from_utf8(rowinfo_[row].crskip_.asLatexString()) + ']';
+ else if(!rowinfo_[row].allow_pagebreak_)
+ eol += '*';
// make sure an upcoming '[' does not break anything
if (row + 1 < nrows()) {
* environments like "equation" that have a fixed number of rows.
*/
bool addRow(InsetMathGrid & grid, InsetMathGrid::row_type & cellrow,
- docstring const & vskip)
+ docstring const & vskip, bool allow_pagebreak = true)
{
++cellrow;
if (cellrow == grid.nrows()) {
lyxerr << "ignoring extra row";
if (!vskip.empty())
lyxerr << " with extra space " << to_utf8(vskip);
+ if (!allow_pagebreak)
+ lyxerr << " with no page break allowed";
lyxerr << '.' << endl;
return false;
}
}
grid.vcrskip(LyXLength(to_utf8(vskip)), cellrow - 1);
+ grid.rowinfo(cellrow - 1).allow_pagebreak_ = allow_pagebreak;
return true;
}
else if (t.cs() == "\\") {
if (flags & FLAG_ALIGN)
return;
- if (addRow(grid, cellrow, getArg('[', ']'))) {
+ bool added;
+ if (nextToken().asInput() == "*") {
+ getToken();
+ added = addRow(grid, cellrow, docstring(), false);
+ } else
+ added = addRow(grid, cellrow, getArg('[', ']'));
+ if (added) {
cellcol = 0;
if (grid.asHullInset())
grid.asHullInset()->numbered(