* Allow the use of eqrefs in mathed (bug 4623).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25092 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2008-06-03 06:23:45 +00:00
parent 07d1b1684b
commit e8d99617b5
2 changed files with 5 additions and 3 deletions

View File

@ -147,6 +147,8 @@ void InsetMathRef::validate(LaTeXFeatures & features) const
features.require("varioref"); features.require("varioref");
else if (commandname() == "prettyref") else if (commandname() == "prettyref")
features.require("prettyref"); features.require("prettyref");
else if (commandname() == "eqref")
features.require("amsmath");
} }

View File

@ -1260,8 +1260,8 @@ void Parser::parse1(InsetMathGrid & grid, unsigned flags,
parse(cell->back().nucleus()->cell(0), FLAG_ITEM, mode); parse(cell->back().nucleus()->cell(0), FLAG_ITEM, mode);
} }
else if (t.cs() == "ref" || t.cs() == "prettyref" || else if (t.cs() == "ref" || t.cs() == "eqref" || t.cs() == "prettyref"
t.cs() == "pageref" || t.cs() == "vpageref" || t.cs() == "vref") { || t.cs() == "pageref" || t.cs() == "vpageref" || t.cs() == "vref") {
cell->push_back(MathAtom(new InsetMathRef(t.cs()))); cell->push_back(MathAtom(new InsetMathRef(t.cs())));
parse(cell->back().nucleus()->cell(1), FLAG_OPTION, mode); parse(cell->back().nucleus()->cell(1), FLAG_OPTION, mode);
parse(cell->back().nucleus()->cell(0), FLAG_ITEM, mode); parse(cell->back().nucleus()->cell(0), FLAG_ITEM, mode);