- os << " & ";
- cell(index(row, col)).Write(os, fragile);
- }
- if (n) {
- if (!label_[row].empty())
- os << "\\label{" << label_[row] << "}";
- if (nonum_[row])
- os << "\\nonumber ";
- }
- }
-
- footer_write(os);
-}
-
-
-string MathMatrixInset::label(int row) const
-{
- return label_[row];
-}
-
-void MathMatrixInset::label(int row, string const & label)
-{
- label_[row] = label;
-}
-
-
-void MathMatrixInset::numbered(int row, bool num)
-{
- nonum_[row] = !num;
-}
-
-
-bool MathMatrixInset::numbered(int row) const
-{
- return !nonum_[row];
-}
-
-
-bool MathMatrixInset::ams() const
-{
- return true;
-}
-
-
-bool MathMatrixInset::display() const
-{
- return GetType() != LM_OT_SIMPLE;
-}
-
-
-std::vector<string> const MathMatrixInset::getLabelList() const
-{
- std::vector<string> res;
- for (int row = 0; row < nrows(); ++row)
- if (!label_[row].empty() && nonum_[row] != 1)
- res.push_back(label_[row]);
- return res;
-}
-
-
-bool MathMatrixInset::numberedType() const
-{
- if (GetType() == LM_OT_SIMPLE)
- return false;
- for (int row = 0; row < nrows(); ++row)
- if (!nonum_[row])
- return true;
- return false;
-}
-
-
-void MathMatrixInset::Validate(LaTeXFeatures & features)
-{
- features.amsstyle = ams();
-
- // Validation is necessary only if not using AMS math.
- // To be safe, we will always run mathedValidate.
- //if (features.amsstyle)
- // return;
-
- //Validate1(features);
-
- features.boldsymbol = true;
- features.binom = true;
-}
-
-/*
-void MathMatrixInset::Validate1(LaTeXFeatures & features)
-{
- MathIter it(cell());
-
- while (it.OK() && !(features.binom && features.boldsymbol)) {
- MathInset * p = it.GetInset();
- if (p) {
- p = it.GetActiveInset();
- if (p) {
- if (!features.binom && p->GetType() == LM_OT_MACRO &&
- p->name() == "binom") {
- features.binom = true;
- } else {
- for (int i = 0; i <= p->getMaxArgumentIdx(); ++i) {
- p->setArgumentIdx(i);
- Validate1(features, p);
- }
- }
- } else {
- if (!features.boldsymbol && p->name() == "boldsymbol")
- features.boldsymbol = true;
- }