store and output xml names if known...

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3004 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2001-11-09 18:55:03 +00:00
parent 46e600604c
commit 597afac060
3 changed files with 9 additions and 3 deletions

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

View File

@ -130,6 +130,8 @@ struct latexkeys {
unsigned char latex_font_id;
///
string type;
///
string xmlname;
};

View 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 << '>';
}