fix bug 1665

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10011 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2005-06-07 17:21:51 +00:00
parent 2d28f7c449
commit 75a5ef3c61
4 changed files with 17 additions and 4 deletions

View File

@ -1,3 +1,10 @@
2005-06-07 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* 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 <michael.schmitt@teststep.org>
* ref_inset.C: rename LFUN_REF_GOTO to LFUN_LABEL_GOTO

View File

@ -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";

View File

@ -35,6 +35,8 @@ public:
std::string extra;
/// how is this called as XML entity?
std::string xmlname;
/// required LaTeXFeatures
std::string requires;
};

View File

@ -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);
}