Darren Freeman <[EMAIL PROTECTED]> writes: > Hi all, > > okay I finally worked out how to get formula numbering to work.. you > have to toggle display mode first. > > Why doesn't this happen automatically?
Well, if an equation is not in display mode, there has to be a reason... > Or if there is a good reason, why do nothing when the user selects > toggle numbering? The menu item should at least be inactive. It should. I tried to look at the code, but now I do not understand what these lfuns do. Andre', would you care to explain what the logic for MATH_NUMBER and MATH_NONUMBER is? I append a copy of the relevant code for reference. case LFUN_MATH_NUMBER: //lyxerr << "toggling all numbers" << endl; if (display()) { cur.recordUndoInset(); bool old = numberedType(); if (type_ == hullMultline) numbered(nrows() - 1, !old); else for (row_type row = 0; row < nrows(); ++row) numbered(row, !old); cur.message(old ? _("No number") : _("Number")); } break; case LFUN_MATH_NONUMBER: if (display()) { cur.recordUndoInset(); row_type r = (type_ == hullMultline) ? nrows() - 1 : cur.row(); bool old = numbered(r); cur.message(old ? _("No number") : _("Number")); numbered(r, !old); } break; JMarc