diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 002a111a0c..fb8f912d1d 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,9 @@ +2005-03-30 Georg Baum + + * math_amsarrayinset.[Ch] (validate): new, require amsmath + * math_substackinset.[Ch] (validate): ditto + * math_arrayinset.[Ch] (validate): ditto (in the case of subarray) + 2005-03-02 Georg Baum * math_parser.C (parse1): Don't parse "\|" following a "\left" or diff --git a/src/mathed/math_amsarrayinset.C b/src/mathed/math_amsarrayinset.C index 3223277ddb..3c68332a0b 100644 --- a/src/mathed/math_amsarrayinset.C +++ b/src/mathed/math_amsarrayinset.C @@ -1,5 +1,6 @@ #include +#include "LaTeXFeatures.h" #include "math_amsarrayinset.h" #include "math_mathmlstream.h" #include "math_metricsinfo.h" @@ -90,3 +91,10 @@ void MathAMSArrayInset::normalize(NormalStream & os) const MathGridInset::normalize(os); os << ']'; } + + +void MathAMSArrayInset::validate(LaTeXFeatures & features) const +{ + features.require("amsmath"); + MathGridInset::validate(features); +} diff --git a/src/mathed/math_amsarrayinset.h b/src/mathed/math_amsarrayinset.h index e5d254a6ec..a4a4d64b62 100644 --- a/src/mathed/math_amsarrayinset.h +++ b/src/mathed/math_amsarrayinset.h @@ -33,7 +33,8 @@ public: void write(WriteStream & os) const; /// void normalize(NormalStream &) const; - + /// + void validate(LaTeXFeatures & features) const; private: /// char const * name_left() const; diff --git a/src/mathed/math_arrayinset.C b/src/mathed/math_arrayinset.C index 266cc37bba..ff2fe21086 100644 --- a/src/mathed/math_arrayinset.C +++ b/src/mathed/math_arrayinset.C @@ -1,5 +1,6 @@ #include +#include "LaTeXFeatures.h" #include "math_arrayinset.h" #include "math_parser.h" #include "math_mathmlstream.h" @@ -110,3 +111,11 @@ void MathArrayInset::maplize(MapleStream & os) const MathGridInset::maplize(os); os << ')'; } + + +void MathArrayInset::validate(LaTeXFeatures & features) const +{ + if (name_ == "subarray") + features.require("amsmath"); + MathGridInset::validate(features); +} diff --git a/src/mathed/math_arrayinset.h b/src/mathed/math_arrayinset.h index 54f6f72e44..38173075fe 100644 --- a/src/mathed/math_arrayinset.h +++ b/src/mathed/math_arrayinset.h @@ -40,7 +40,8 @@ public: void normalize(NormalStream &) const; /// void maplize(MapleStream &) const; - + /// + void validate(LaTeXFeatures & features) const; private: /// string name_; diff --git a/src/mathed/math_substackinset.C b/src/mathed/math_substackinset.C index 22d6877987..b8f3ae3b47 100644 --- a/src/mathed/math_substackinset.C +++ b/src/mathed/math_substackinset.C @@ -1,5 +1,6 @@ #include +#include "LaTeXFeatures.h" #include "math_substackinset.h" #include "math_mathmlstream.h" #include "math_streamstr.h" @@ -49,3 +50,10 @@ void MathSubstackInset::maplize(MapleStream & os) const MathGridInset::maplize(os); os << ')'; } + + +void MathSubstackInset::validate(LaTeXFeatures & features) const +{ + features.require("amsmath"); + MathGridInset::validate(features); +} diff --git a/src/mathed/math_substackinset.h b/src/mathed/math_substackinset.h index 041dbe7bac..915e0c640d 100644 --- a/src/mathed/math_substackinset.h +++ b/src/mathed/math_substackinset.h @@ -23,6 +23,8 @@ public: void normalize(NormalStream &) const; /// void maplize(MapleStream &) const; + /// + void validate(LaTeXFeatures & features) const; }; #endif