]> git.lyx.org Git - features.git/commitdiff
* Allow the use of eqrefs in mathed (bug 4623).
authorJürgen Spitzmüller <spitz@lyx.org>
Tue, 3 Jun 2008 06:23:45 +0000 (06:23 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Tue, 3 Jun 2008 06:23:45 +0000 (06:23 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25092 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathRef.cpp
src/mathed/MathParser.cpp

index 36a678ae06ac03d28e25a30e92b7910839524f9c..20740f83c9d8f1bfba0b15a1a695944953d3a2e7 100644 (file)
@@ -147,6 +147,8 @@ void InsetMathRef::validate(LaTeXFeatures & features) const
                features.require("varioref");
        else if (commandname() == "prettyref")
                features.require("prettyref");
+       else if (commandname() == "eqref")
+               features.require("amsmath");
 }
 
 
@@ -182,7 +184,7 @@ string const InsetMathRef::createDialogStr(string const & name) const
 
 
 InsetMathRef::ref_type_info InsetMathRef::types[] = {
-       { from_ascii("ref"),       from_ascii(N_("Standard[[mathref]]")),              from_ascii(N_("Ref: "))},
+       { from_ascii("ref"),       from_ascii(N_("Standard[[mathref]]")),   from_ascii(N_("Ref: "))},
        { from_ascii("eqref"),     from_ascii(N_("Equation")),              from_ascii(N_("EqRef: "))},
        { from_ascii("pageref"),   from_ascii(N_("Page Number")),           from_ascii(N_("Page: "))},
        { from_ascii("vpageref"),  from_ascii(N_("Textual Page Number")),   from_ascii(N_("TextPage: "))},
index 699a4ea69ec13f95b3156255bb3f410084349795..806f42378171e2bae28fe8de6c8b66528e22431e 100644 (file)
@@ -1260,8 +1260,8 @@ void Parser::parse1(InsetMathGrid & grid, unsigned flags,
                        parse(cell->back().nucleus()->cell(0), FLAG_ITEM, mode);
                }
 
-               else if (t.cs() == "ref" || t.cs() == "prettyref" ||
-                               t.cs() == "pageref" || t.cs() == "vpageref" || t.cs() == "vref") {
+               else if (t.cs() == "ref" || t.cs() == "eqref" || t.cs() == "prettyref"
+                         || t.cs() == "pageref" || t.cs() == "vpageref" || t.cs() == "vref") {
                        cell->push_back(MathAtom(new InsetMathRef(t.cs())));
                        parse(cell->back().nucleus()->cell(1), FLAG_OPTION, mode);
                        parse(cell->back().nucleus()->cell(0), FLAG_ITEM, mode);