From 06a7a6d03299d555f5ff5895e70d0c0b1a56c1ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Tue, 3 Jun 2008 06:23:00 +0000 Subject: [PATCH] * Allow the use of eqrefs in mathed (bug 4623). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@25091 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathRef.cpp | 4 +++- src/mathed/MathParser.cpp | 4 ++-- status.15x | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mathed/InsetMathRef.cpp b/src/mathed/InsetMathRef.cpp index 1dba426cd0..f249689a2d 100644 --- a/src/mathed/InsetMathRef.cpp +++ b/src/mathed/InsetMathRef.cpp @@ -148,6 +148,8 @@ void InsetMathRef::validate(LaTeXFeatures & features) const features.require("varioref"); else if (commandname() == "prettyref") features.require("prettyref"); + else if (commandname() == "eqref") + features.require("amsmath"); } @@ -184,7 +186,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: "))}, diff --git a/src/mathed/MathParser.cpp b/src/mathed/MathParser.cpp index 68f8787ae7..a5fe8ee700 100644 --- a/src/mathed/MathParser.cpp +++ b/src/mathed/MathParser.cpp @@ -1109,8 +1109,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); diff --git a/status.15x b/status.15x index 1e81e6bf12..f58328495c 100644 --- a/status.15x +++ b/status.15x @@ -80,6 +80,8 @@ What's new - Fix error navigation with the keyboard (bug 4895). +- Allow the use of eqrefs in mathed (bug 4623). + * DOCUMENTATION AND LOCALIZATION