diff --git a/src/mathed/InsetMathChar.cpp b/src/mathed/InsetMathChar.cpp index 8e02c6a92c..7949c23099 100644 --- a/src/mathed/InsetMathChar.cpp +++ b/src/mathed/InsetMathChar.cpp @@ -175,10 +175,10 @@ void InsetMathChar::mathmlize(MathStream & ms) const } char const * type = - (isalpha(char_) || Encodings::isMathAlpha(char_)) + (isalpha(char_) || Encodings::isMathAlpha(char_)) ? "mi" : "mo"; // we don't use MTag and ETag because we do not want the spacing - ms << "<" << type << ">" << char(char_) << ""; + ms << "<" << type << ">" << char_type(char_) << ""; } diff --git a/src/mathed/MathStream.cpp b/src/mathed/MathStream.cpp index 9ce8f9051a..ac511dd917 100644 --- a/src/mathed/MathStream.cpp +++ b/src/mathed/MathStream.cpp @@ -250,6 +250,32 @@ MathStream::MathStream(odocstream & os) {} +void MathStream::cr() +{ + os() << '\n'; + for (int i = 0; i < tab(); ++i) + os() << ' '; +} + + +void MathStream::defer(docstring const & s) +{ + deferred_ << s; +} + + +void MathStream::defer(string const & s) +{ + deferred_ << from_utf8(s); +} + + +docstring MathStream::deferred() const +{ + return deferred_.str(); +} + + MathStream & operator<<(MathStream & ms, MathAtom const & at) { at->mathmlize(ms); @@ -278,6 +304,13 @@ MathStream & operator<<(MathStream & ms, char c) } +MathStream & operator<<(MathStream & ms, char_type c) +{ + ms.os() << c; + return ms; +} + + MathStream & operator<<(MathStream & ms, MTag const & t) { ++ms.tab(); @@ -297,32 +330,6 @@ MathStream & operator<<(MathStream & ms, ETag const & t) } -void MathStream::cr() -{ - os() << '\n'; - for (int i = 0; i < tab(); ++i) - os() << ' '; -} - - -void MathStream::defer(docstring const & s) -{ - deferred_ << s; -} - - -void MathStream::defer(string const & s) -{ - deferred_ << from_utf8(s); -} - - -docstring MathStream::deferred() const -{ - return deferred_.str(); -} - - MathStream & operator<<(MathStream & ms, docstring const & s) { ms.os() << s; diff --git a/src/mathed/MathStream.h b/src/mathed/MathStream.h index 51fbdd367e..c2eb3d2326 100644 --- a/src/mathed/MathStream.h +++ b/src/mathed/MathStream.h @@ -286,6 +286,8 @@ MathStream & operator<<(MathStream &, char const *); /// MathStream & operator<<(MathStream &, char); /// +MathStream & operator<<(MathStream &, char_type); +/// MathStream & operator<<(MathStream &, MTag const &); /// MathStream & operator<<(MathStream &, ETag const &);