From 75a5ef3c613ab418625ee8bd56892a4dd96e4def Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Tue, 7 Jun 2005 17:21:51 +0000 Subject: [PATCH] fix bug 1665 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10011 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/ChangeLog | 7 +++++++ src/mathed/math_factory.C | 6 ++++++ src/mathed/math_parser.h | 2 ++ src/mathed/math_symbolinset.C | 6 ++---- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index f29e46cea4..97770fc8a6 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,10 @@ +2005-06-07 Georg Baum + + * math_parser.h (latexkeys): new member requires + * math_factory.C (initSymbols): fill the requires field for fonts + * math_symbolinset.C (validate): use sym_->requires instead of + sym_->inset (fixes bug 1665) + 2005-05-07 Michael Schmitt * ref_inset.C: rename LFUN_REF_GOTO to LFUN_LABEL_GOTO diff --git a/src/mathed/math_factory.C b/src/mathed/math_factory.C index 271bf3fa3c..045bf8d1f1 100644 --- a/src/mathed/math_factory.C +++ b/src/mathed/math_factory.C @@ -163,6 +163,12 @@ void initSymbols() // tmp.inset _is_ the fontname here. // create fallbacks if necessary + // store requirements as long as we can + if (tmp.inset == "msa" || tmp.inset == "msb") + tmp.requires = "amssymb"; + else if (tmp.inset == "wasy") + tmp.requires = "wasysym"; + // symbol font is not available sometimes string symbol_font = "lyxsymbol"; diff --git a/src/mathed/math_parser.h b/src/mathed/math_parser.h index 20c0f864a2..e2321c6b31 100644 --- a/src/mathed/math_parser.h +++ b/src/mathed/math_parser.h @@ -35,6 +35,8 @@ public: std::string extra; /// how is this called as XML entity? std::string xmlname; + /// required LaTeXFeatures + std::string requires; }; diff --git a/src/mathed/math_symbolinset.C b/src/mathed/math_symbolinset.C index 2d07bd6240..b366a7cc94 100644 --- a/src/mathed/math_symbolinset.C +++ b/src/mathed/math_symbolinset.C @@ -136,10 +136,8 @@ bool MathSymbolInset::takesLimits() const void MathSymbolInset::validate(LaTeXFeatures & features) const { - if (sym_->inset == "msa" || sym_->inset == "msb") - features.require("amssymb"); - else if (sym_->inset == "wasy") - features.require("wasysym"); + if (!sym_->requires.empty()) + features.require(sym_->requires); } -- 2.39.2