From: André Pönitz Date: Fri, 9 Nov 2001 18:55:03 +0000 (+0000) Subject: store and output xml names if known... X-Git-Tag: 1.6.10~20361 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=597afac060a1118debcf4f46015edfad6ab357e2;p=features.git store and output xml names if known... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3004 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/math_hash.C b/src/mathed/math_hash.C index be57d1ae07..4c0d83def2 100644 --- a/src/mathed/math_hash.C +++ b/src/mathed/math_hash.C @@ -166,7 +166,6 @@ void readSymbols(string const & filename) lex.setFile(filename); while (lex.isOK() && lex.next()) { latexkeys tmp; - string xmlname; tmp.name = lex.getString(); if (lex.next()) tmp.token = tokenEnum(lex.getString()); @@ -177,7 +176,7 @@ void readSymbols(string const & filename) if (lex.next()) tmp.type = lex.getString(); if (lex.next()) - xmlname = lex.getString(); + tmp.xmlname = lex.getString(); if (theWordList.find(tmp.name) != theWordList.end()) lyxerr << "readSymbols: token " << tmp.name << " already exists.\n"; diff --git a/src/mathed/math_parser.h b/src/mathed/math_parser.h index 44420f370b..c05780cd3f 100644 --- a/src/mathed/math_parser.h +++ b/src/mathed/math_parser.h @@ -130,6 +130,8 @@ struct latexkeys { unsigned char latex_font_id; /// string type; + /// + string xmlname; }; diff --git a/src/mathed/math_symbolinset.C b/src/mathed/math_symbolinset.C index b2855ac9f2..4b635efbd5 100644 --- a/src/mathed/math_symbolinset.C +++ b/src/mathed/math_symbolinset.C @@ -138,7 +138,12 @@ char const * MathMLtype(string const & s) void MathSymbolInset::mathmlize(MathMLStream & os) const { char const * type = MathMLtype(sym_->type); - os << '<' << type << "> " << name().c_str() << " '; + os << '<' << type << "> "; + if (sym_->xmlname == "x") // unknown so far + os << name().c_str(); + else + os << sym_->xmlname.c_str(); + os << " '; }