From 5a918564aec9925be8092e7537ddf0b37cfd820b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Wed, 5 Mar 2008 18:52:30 +0000 Subject: [PATCH] * src/insets/InsetMathBox.{cpp,h}: - add validate method and validate \tag[*] (bug 4586) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@23482 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathBox.cpp | 9 +++++++++ src/mathed/InsetMathBox.h | 2 ++ status.15x | 2 ++ 3 files changed, 13 insertions(+) diff --git a/src/mathed/InsetMathBox.cpp b/src/mathed/InsetMathBox.cpp index 0872973dbf..2ee8d7c234 100644 --- a/src/mathed/InsetMathBox.cpp +++ b/src/mathed/InsetMathBox.cpp @@ -14,6 +14,7 @@ #include "MathData.h" #include "MathStream.h" #include "MathStream.h" +#include "LaTeXFeatures.h" #include "support/std_ostream.h" @@ -74,4 +75,12 @@ void InsetMathBox::infoize(odocstream & os) const } +void InsetMathBox::validate(LaTeXFeatures & features) const +{ + if (name_ == "tag" || name_ == "tag*") + features.require("amsmath"); + cell(0).validate(features); +} + + } // namespace lyx diff --git a/src/mathed/InsetMathBox.h b/src/mathed/InsetMathBox.h index b217dc57fa..38cc0afd03 100644 --- a/src/mathed/InsetMathBox.h +++ b/src/mathed/InsetMathBox.h @@ -40,6 +40,8 @@ public: void normalize(NormalStream & ns) const; /// void infoize(odocstream & os) const; + /// + void validate(LaTeXFeatures & features) const; private: virtual std::auto_ptr doClone() const; diff --git a/status.15x b/status.15x index 673cea3ada..e7bc0b93b7 100644 --- a/status.15x +++ b/status.15x @@ -67,6 +67,8 @@ What's new - Allow to enter starred math commands like "\tag*" (bug 4584). +- Load amsmath when \tag or \tag* is used (bug 4586). + - Fix parameter input of the math commands \makebox and \framebox (bug 2461). - When cutting a selection do not leave a dangling paragraph (bug 3995).