MathMLStream::MathMLStream(odocstream & os, std::string const & xmlns)
- : os_(os), tab_(0), line_(0), in_text_(false), xmlns_(xmlns)
+ : os_(os), xmlns_(xmlns)
{
if (in_text_)
font_math_style_ = TEXT_STYLE;
}
-MathMLStream & operator<<(MathMLStream & ms, char const * s)
+MathMLStream & operator<<(MathMLStream & ms, docstring const & s)
{
ms.os() << s;
return ms;
}
+MathMLStream & operator<<(MathMLStream & ms, char const * s)
+{
+ ms << from_utf8(s);
+ return ms;
+}
+
+
MathMLStream & operator<<(MathMLStream & ms, char c)
{
- ms.os() << c;
+ ms << docstring(1,c);
return ms;
}
MathMLStream & operator<<(MathMLStream & ms, char_type c)
{
- ms.os().put(c);
+ ms << docstring(1,c);
return ms;
}
}
-MathMLStream & operator<<(MathMLStream & ms, docstring const & s)
-{
- ms.os() << s;
- return ms;
-}
-
-
//////////////////////////////////////////////////////////////////////
* Full author contact details are available in file CREDITS.
*/
-#ifndef MATH_MATHMLSTREAM_H
-#define MATH_MATHMLSTREAM_H
+#ifndef MATH_MATHSTREAM_H
+#define MATH_MATHSTREAM_H
#include "InsetMath.h"
#include "FontInfo.h"
void cr();
///
odocstream & os() { return os_; }
- ///
- int line() const { return line_; }
- ///
+ /// Indentation when nesting tags
int & tab() { return tab_; }
///
- friend MathMLStream & operator<<(MathMLStream &, char const *);
- ///
void defer(docstring const &);
///
void defer(std::string const &);
///
odocstream & os_;
///
- int tab_;
- ///
- int line_;
+ int tab_ = 0;
///
- bool in_text_;
+ bool in_text_ = false;
///
odocstringstream deferred_;
///