This patch make lyx add \usepackage{amsmath} if \begin{cases} is used inside a math formula.
Index: math_casesinset.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_casesinset.C,v retrieving revision 1.11 diff -u -p -r1.11 math_casesinset.C --- math_casesinset.C 11 Jul 2002 11:27:24 -0000 1.11 +++ math_casesinset.C 25 Oct 2002 21:08:55 -0000 @@ -8,6 +8,7 @@ #include "math_parser.h" #include "math_mathmlstream.h" #include "math_support.h" +#include "LaTeXFeatures.h" #include "support/LOstream.h" @@ -67,4 +68,10 @@ void MathCasesInset::maplize(MapleStream void MathCasesInset::infoize(std::ostream & os) const { os << "Cases "; +} + + +void MathCasesInset::validate(LaTeXFeatures & features) const +{ + features.require("amsmath"); } Index: math_casesinset.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_casesinset.h,v retrieving revision 1.4 diff -u -p -r1.4 math_casesinset.h --- math_casesinset.h 8 Jul 2002 16:20:53 -0000 1.4 +++ math_casesinset.h 25 Oct 2002 21:08:55 -0000 @@ -28,6 +28,8 @@ public: void maplize(MapleStream &) const; /// void write(WriteStream & os) const; + /// + void validate(LaTeXFeatures & features) const; }; #endif