]> git.lyx.org Git - features.git/commitdiff
store and output xml names if known...
authorAndré Pönitz <poenitz@gmx.net>
Fri, 9 Nov 2001 18:55:03 +0000 (18:55 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Fri, 9 Nov 2001 18:55:03 +0000 (18:55 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3004 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_hash.C
src/mathed/math_parser.h
src/mathed/math_symbolinset.C

index be57d1ae072b4cfebcade49902efaafbc613280e..4c0d83def2928043c8199ad42b186febd7f69b32 100644 (file)
@@ -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";
index 44420f370b3f04061a835e5ba6c9502198df7665..c05780cd3fbf8c258fc6f5db2852cfe261805a90 100644 (file)
@@ -130,6 +130,8 @@ struct latexkeys {
        unsigned char latex_font_id;
        ///
        string type;
+       ///
+       string xmlname;
 };
 
 
index b2855ac9f2b739d28b3fb5274f8ee8f78f6772cd..4b635efbd51921db89835dc5779b44fe369bec39 100644 (file)
@@ -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() << " </" << type << '>';
+       os << '<' << type << "> ";
+       if (sym_->xmlname == "x") // unknown so far
+               os << name().c_str();
+       else
+               os << sym_->xmlname.c_str();
+       os << " </" << type << '>';
 }