}
+void InsetMathChar::htmlize(HtmlStream & ms) const
+{
+ std::string entity;
+ switch (char_) {
+ case '<': entity = "<"; break;
+ case '>': entity = ">"; break;
+ case '&': entity = "&"; break;
+ default: break;
+ }
+
+ bool have_entity = entity.empty();
+
+ if (ms.inText() || have_entity) {
+ if (have_entity)
+ ms << from_ascii(entity);
+ else
+ ms.os().put(char_);
+ return;
+ }
+
+ if (!entity.empty()) {
+ ms << ' ' << from_ascii(entity) << ' ';
+ return;
+ }
+
+ char const * space =
+ (isalpha(char_) || Encodings::isMathAlpha(char_))
+ ? "" : " ";
+ // we don't use MTag and ETag because we do not want the spacing
+ ms << space << char_type(char_) << space;
+}
+
+
bool InsetMathChar::isRelOp() const
{
return char_ == '=' || char_ == '<' || char_ == '>';
void octave(OctaveStream & os) const;
///
void mathmlize(MathStream & ms) const;
+ ///
+ void htmlize(HtmlStream & ms) const;
/// identifies Charinsets
InsetMathChar const * asCharInset() const { return this; }
///