]> git.lyx.org Git - lyx.git/commitdiff
require amsmath when needed
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Wed, 30 Mar 2005 09:05:30 +0000 (09:05 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Wed, 30 Mar 2005 09:05:30 +0000 (09:05 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9757 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/ChangeLog
src/mathed/math_amsarrayinset.C
src/mathed/math_amsarrayinset.h
src/mathed/math_arrayinset.C
src/mathed/math_arrayinset.h
src/mathed/math_substackinset.C
src/mathed/math_substackinset.h

index 9e85296406c51ad911789a25fd3d0a44fdceacf3..5c1436b83aee24bcfcac5b2c5f585c95bea95e40 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-27  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
+
+       * math_amsarrayinset.[Ch] (validate): new, require amsmath
+       * math_substackinset.[Ch] (validate): ditto
+       * math_arrayinset.[Ch] (validate): ditto (in the case of subarray)
 
 2005-03-24  Martin Vermeer  <martin.vermeer@hut.fi>
 
index 448fd152a7c8da7915aff71611e0f0d347ace590..4acba92900884b75e8a82b059856ee03a72d84ee 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <config.h>
 
+#include "LaTeXFeatures.h"
 #include "math_amsarrayinset.h"
 #include "math_data.h"
 #include "math_mathmlstream.h"
@@ -103,3 +104,10 @@ void MathAMSArrayInset::normalize(NormalStream & os) const
        MathGridInset::normalize(os);
        os << ']';
 }
+
+
+void MathAMSArrayInset::validate(LaTeXFeatures & features) const
+{
+       features.require("amsmath");
+       MathGridInset::validate(features);
+}
index 6185a6c2a5fb0664690ae27474193d13b0373e58..9f3901fe5407ddcb8f56f4f434e4163e0fdea11a 100644 (file)
@@ -35,7 +35,8 @@ public:
        void write(WriteStream & os) const;
        ///
        void normalize(NormalStream &) const;
-
+       ///
+       void validate(LaTeXFeatures & features) const;
 private:
        virtual std::auto_ptr<InsetBase> doClone() const;
        ///
index 1e1554d45cdcb6391fbb3e7d0139ac57efabdfa2..6cbcd3a093861535da7b5fa21b47d54f4bdb7f33 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <config.h>
 
+#include "LaTeXFeatures.h"
 #include "math_arrayinset.h"
 #include "math_data.h"
 #include "math_parser.h"
@@ -130,3 +131,11 @@ void MathArrayInset::maple(MapleStream & os) const
        MathGridInset::maple(os);
        os << ')';
 }
+
+
+void MathArrayInset::validate(LaTeXFeatures & features) const
+{
+       if (name_ == "subarray")
+               features.require("amsmath");
+       MathGridInset::validate(features);
+}
index a61e7c036b3609b50bcf8e223bf02b6a988f3d4e..f3f9b7d5ee465404a0650bb37ecceff3638c7434 100644 (file)
@@ -25,7 +25,7 @@ public:
                char valign, std::string const & halign);
        ///
        MathArrayInset(std::string const &, char valign, std::string const & halign);
-       /// convienience constructor from whitespace/newline seperated data
+       /// convenience constructor from whitespace/newline separated data
        MathArrayInset(std::string const &, std::string const & str);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
@@ -44,7 +44,8 @@ public:
        void normalize(NormalStream & os) const;
        ///
        void maple(MapleStream & os) const;
-
+       ///
+       void validate(LaTeXFeatures & features) const;
 private:
        virtual std::auto_ptr<InsetBase> doClone() const;
        ///
index 6a288af21b3baccc48de603b3b78ef0f3b8853d1..b60e4898cc7802231d9e7169a14b678710897a29 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <config.h>
 
+#include "LaTeXFeatures.h"
 #include "math_substackinset.h"
 #include "math_data.h"
 #include "math_mathmlstream.h"
@@ -75,3 +76,10 @@ void MathSubstackInset::maple(MapleStream & os) const
        MathGridInset::maple(os);
        os << ')';
 }
+
+
+void MathSubstackInset::validate(LaTeXFeatures & features) const
+{
+       features.require("amsmath");
+       MathGridInset::validate(features);
+}
index 8013695740924d0ff4d04e00c8b21265324ecc4b..ca84d21e5817d3159f379c07df692ac7d8a6845b 100644 (file)
@@ -38,6 +38,8 @@ public:
        void normalize(NormalStream &) const;
        ///
        void maple(MapleStream &) const;
+       ///
+       void validate(LaTeXFeatures & features) const;
 private:
        virtual std::auto_ptr<InsetBase> doClone() const;
 };