From 597afac060a1118debcf4f46015edfad6ab357e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Fri, 9 Nov 2001 18:55:03 +0000 Subject: [PATCH] store and output xml names if known... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3004 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/math_hash.C | 3 +-- src/mathed/math_parser.h | 2 ++ src/mathed/math_symbolinset.C | 7 ++++++- 3 files changed, 9 insertions(+), 3 deletions(-) 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 << " '; } -- 2.39.2