X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_symbolinset.C;h=f2f0f5c6a2273a88990a9af1558fd148f7c4a4ff;hb=c446acbd866d608963435f0b5d82506bc476f212;hp=9b0a9e41dea40168fa79f345d711c3975bda0396;hpb=015b7a2f587742b011982497e153e29fdf1aabdc;p=lyx.git diff --git a/src/mathed/math_symbolinset.C b/src/mathed/math_symbolinset.C index 9b0a9e41de..f2f0f5c6a2 100644 --- a/src/mathed/math_symbolinset.C +++ b/src/mathed/math_symbolinset.C @@ -1,5 +1,8 @@ +#include + #include "math_symbolinset.h" #include "math_mathmlstream.h" +#include "math_streamstr.h" #include "math_support.h" #include "math_parser.h" #include "debug.h" @@ -15,6 +18,11 @@ MathSymbolInset::MathSymbolInset(const char * name) {} +MathSymbolInset::MathSymbolInset(string const & name) + : sym_(in_word_set(name.c_str())), h_(0) +{} + + MathInset * MathSymbolInset::clone() const { @@ -114,7 +122,7 @@ bool MathSymbolInset::takesLimits() const void MathSymbolInset::normalize(NormalStream & os) const { - os << "[symbol " << name().c_str() << "]"; + os << "[symbol " << name() << "]"; } @@ -123,7 +131,7 @@ void MathSymbolInset::maplize(MapleStream & os) const if (name() == "cdot") os << '*'; else - os << name().c_str(); + os << name(); } @@ -147,9 +155,9 @@ void MathSymbolInset::mathmlize(MathMLStream & os) const char const * type = MathMLtype(sym_->type); os << '<' << type << "> "; if (sym_->xmlname == "x") // unknown so far - os << name().c_str(); + os << name(); else - os << sym_->xmlname.c_str(); + os << sym_->xmlname; os << " '; } @@ -159,13 +167,24 @@ void MathSymbolInset::octavize(OctaveStream & os) const if (name() == "cdot") os << '*'; else - os << name().c_str(); + os << name(); } void MathSymbolInset::write(WriteStream & os) const { - os << '\\' << name().c_str() << ' '; + os << '\\' << name() << ' '; +} + + +void MathSymbolInset::infoize(std::ostream & os) const +{ + os << '\\' << name(); } +void MathSymbolInset::validate(LaTeXFeatures & features) const +{ + // if (...) + // features.require("amssymb"); +}