}
-void InsetMath::mathmlize(MathStream & ms) const
+void InsetMath::mathmlize(MathMLStream & ms) const
{
ms << "<!-- " << from_utf8(insetName(lyxCode())) << " -->";
ms << MTag("mi");
class MapleStream;
class MaximaStream;
class MathematicaStream;
-class MathStream;
+class MathMLStream;
class WriteStream;
class MathData;
/// write content as something readable by Mathematica
virtual void mathematica(MathematicaStream &) const;
/// write content as MathML
- virtual void mathmlize(MathStream &) const;
+ virtual void mathmlize(MathMLStream &) const;
/// write content as HTML, best we can.
/// the idea for this, and some of the details, come from
/// eLyXer, written by Alex Fernandez. no code is borrowed. rather,
void normalize(NormalStream &) const override;
// Don't need mathmlize or htmlize, as this is handled by
// InsetMathMatrix after being extracted in MathExtern.
- // void mathmlize(MathStream &) const override;
+ // void mathmlize(MathMLStream &) const override;
// void htmlize(HtmlStream &) const override;
///
void validate(LaTeXFeatures & features) const override;
}
-void InsetMathBig::mathmlize(MathStream & ms) const
+void InsetMathBig::mathmlize(MathMLStream & ms) const
{
ms << "<" << from_ascii(ms.namespacedTag("mo"))
<< " form='prefix' fence='true' stretchy='true' symmetric='true'>"
///
void normalize(NormalStream & os) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathBoldSymbol::mathmlize(MathStream & ms) const
+void InsetMathBoldSymbol::mathmlize(MathMLStream & ms) const
{
ms << "<" << from_ascii(ms.namespacedTag("mstyle")) << " mathvariant='bold'>"
<< cell(0)
///
void write(WriteStream & os) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathBox::mathmlize(MathStream & ms) const
+void InsetMathBox::mathmlize(MathMLStream & ms) const
{
// FIXME XHTML
// Need to do something special for tags here.
}
-void InsetMathFBox::mathmlize(MathStream & ms) const
+void InsetMathFBox::mathmlize(MathMLStream & ms) const
{
SetMode textmode(ms, true);
ms << MTag("mstyle", "class='fbox'")
}
-void InsetMathMakebox::mathmlize(MathStream & ms) const
+void InsetMathMakebox::mathmlize(MathMLStream & ms) const
{
// FIXME We could do something with the other arguments.
std::string const cssclass = framebox_ ? "framebox" : "makebox";
}
-void InsetMathBoxed::mathmlize(MathStream & ms) const
+void InsetMathBoxed::mathmlize(MathMLStream & ms) const
{
ms << MTag("mstyle", "class='boxed'")
<< cell(0)
///
void normalize(NormalStream & ns) const override;
///
- void mathmlize(MathStream & ms) const override;
+ void mathmlize(MathMLStream & ms) const override;
///
void htmlize(HtmlStream & ms) const override;
///
/// write normalized content
void normalize(NormalStream & ns) const override;
///
- void mathmlize(MathStream & ms) const override;
+ void mathmlize(MathMLStream & ms) const override;
///
void htmlize(HtmlStream & ms) const override;
///
/// write normalized content
void normalize(NormalStream & ns) const override;
///
- void mathmlize(MathStream & ms) const override;
+ void mathmlize(MathMLStream & ms) const override;
///
void htmlize(HtmlStream & ms) const override;
///
///
void write(WriteStream & os) const override;
///
- void mathmlize(MathStream & ms) const override;
+ void mathmlize(MathMLStream & ms) const override;
///
void htmlize(HtmlStream & ms) const override;
/// write normalized content
}
-void InsetMathBrace::mathmlize(MathStream & ms) const
+void InsetMathBrace::mathmlize(MathMLStream & ms) const
{
ms << MTag("mrow") << cell(0) << ETag("mrow");
}
///
void octave(OctaveStream &) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathCancel::mathmlize(MathStream & ms) const
+void InsetMathCancel::mathmlize(MathMLStream & ms) const
{
switch (kind_) {
case cancel:
///
InsetCode lyxCode() const override { return MATH_CANCEL_CODE; }
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
///
InsetCode lyxCode() const override { return MATH_CANCELTO_CODE; }
/// Nothing for now
- void mathmlize(MathStream &) const override {}
+ void mathmlize(MathMLStream &) const override {}
/// Nothing for HTML
void htmlize(HtmlStream &) const override {}
///
}
-void InsetMathCases::mathmlize(MathStream & ms) const
+void InsetMathCases::mathmlize(MathMLStream & ms) const
{
ms << "<" << from_ascii(ms.namespacedTag("mo"))
<< " form='prefix' fence='true' stretchy='true' symmetric='true'>"
///
void maple(MapleStream &) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
// mathalpha, then we'll treat it as an identifier, otherwise as an
// operator.
// Worst case: We get bad spacing, or bad italics.
-void InsetMathChar::mathmlize(MathStream & ms) const
+void InsetMathChar::mathmlize(MathMLStream & ms) const
{
std::string entity;
switch (char_) {
///
void octave(OctaveStream & os) const override;
///
- void mathmlize(MathStream & ms) const override;
+ void mathmlize(MathMLStream & ms) const override;
///
void htmlize(HtmlStream & ms) const override;
/// identifies Charinsets
///
void write(WriteStream & os) const override;
/// FIXME XHTML For now, we do nothing with color.
- void mathmlize(MathStream &) const override {}
+ void mathmlize(MathMLStream &) const override {}
/// FIXME XHTML For now, we do nothing with color.
void htmlize(HtmlStream &) const override {}
///
}
-void InsetMathComment::mathmlize(MathStream & ms) const
+void InsetMathComment::mathmlize(MathMLStream & ms) const
{
ms << MTag("comment") << cell(0) << ETag("comment");
}
///
void octave(OctaveStream &) const override {}
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
} // namespace
-void InsetMathDecoration::mathmlize(MathStream & ms) const
+void InsetMathDecoration::mathmlize(MathMLStream & ms) const
{
TranslationMap const & t = translationMap();
TranslationMap::const_iterator cur = t.find(to_utf8(key_->name));
///
InsetCode lyxCode() const override { return MATH_DECORATION_CODE; }
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
private:
}
-void InsetMathDelim::mathmlize(MathStream & ms) const
+void InsetMathDelim::mathmlize(MathMLStream & ms) const
{
ms << "<" << from_ascii(ms.namespacedTag("mo")) << " form='prefix' fence='true' stretchy='true' symmetric='true'>"
<< convertDelimToXMLEscape(left_, ms.xmlMode())
///
void mathematica(MathematicaStream &) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathDots::mathmlize(MathStream & ms) const
+void InsetMathDots::mathmlize(MathMLStream & ms) const
{
// which symbols we support is decided by what is listed in
// lib/symbols as generating a dots inset
///
InsetCode lyxCode() const override { return MATH_DOTS_CODE; }
///
- void mathmlize(MathStream & ms) const override;
+ void mathmlize(MathMLStream & ms) const override;
///
void htmlize(HtmlStream & os) const override;
protected:
}
-void InsetMathEnsureMath::mathmlize(MathStream & ms) const
+void InsetMathEnsureMath::mathmlize(MathMLStream & ms) const
{
SetMode mathmode(ms, false);
ms << MTag("mstyle", "class='math'")
///
void write(WriteStream & os) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathExFunc::mathmlize(MathStream & ms) const
+void InsetMathExFunc::mathmlize(MathMLStream & ms) const
{
ms << "<" << from_ascii(ms.namespacedTag("mi")) << ">"
<< name_
///
void mathematica(MathematicaStream &) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathExInt::mathmlize(MathStream & ms) const
+void InsetMathExInt::mathmlize(MathMLStream & ms) const
{
// At the moment, we are not extracting sums and the like for MathML.
// If we should decide to do so later, then we'll need to re-merge
///
void mathematica(MathematicaStream &) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
// The fonts we want to support are listed in lib/symbols
-void InsetMathFont::mathmlize(MathStream & ms) const
+void InsetMathFont::mathmlize(MathMLStream & ms) const
{
// FIXME These are not quite right, because they do not nest
// correctly. A proper fix would presumably involve tracking
///
void validate(LaTeXFeatures & features) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathFrac::mathmlize(MathStream & ms) const
+void InsetMathFrac::mathmlize(MathMLStream & ms) const
{
switch (kind_) {
case ATOP:
}
-void InsetMathBinom::mathmlize(MathStream & ms) const
+void InsetMathBinom::mathmlize(MathMLStream & ms) const
{
char ldelim = ' ';
char rdelim = ' ';
///
void octave(OctaveStream &) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
///
bool extraBraces() const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathGrid::mathmlize(MathStream & ms) const
+void InsetMathGrid::mathmlize(MathMLStream & ms) const
{
bool const havetable = nrows() > 1 || ncols() > 1;
if (havetable)
///
//void maple(MapleStream &) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
// With DocBook 5, MathML must be within its own namespace; defined in Buffer.cpp::writeDocBookSource as "m".
// Output everything in a separate stream so that this does not interfere with the standard flow of DocBook tags.
odocstringstream osmath;
- MathStream ms(osmath, "m", true);
+ MathMLStream ms(osmath, "m", true);
// Output the MathML subtree.
odocstringstream ls;
try {
// First, generate the MathML expression.
odocstringstream ostmp;
- MathStream mstmp(ostmp, ms.xmlns(), ms.xmlMode());
+ MathMLStream mstmp(ostmp, ms.xmlns(), ms.xmlMode());
InsetMathGrid::mathmlize(mstmp);
// Then, output it (but only if the generation can be done without errors!).
// this duplicates code from InsetMathGrid, but
// we need access here to number information,
// and we simply do not have that in InsetMathGrid.
-void InsetMathHull::mathmlize(MathStream & ms) const
+void InsetMathHull::mathmlize(MathMLStream & ms) const
{
bool const havenumbers = haveNumbers();
bool const havetable = havenumbers || nrows() > 1 || ncols() > 1;
// FIXME Eventually we would like to do this inset by inset.
if (mathtype == BufferParams::MathML) {
odocstringstream os;
- MathStream ms(os);
+ MathMLStream ms(os);
try {
mathmlize(ms);
success = true;
///
docstring xhtml(XMLStream &, OutputParams const &) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
///
void normalize(NormalStream & ns) const override;
///
- void mathmlize(MathStream &) const override { }
+ void mathmlize(MathMLStream &) const override { }
///
void htmlize(HtmlStream &) const override { }
///
///
void mathematica(MathematicaStream & ms) const override { ms << mathMacro_->cell(idx_); }
///
- void mathmlize(MathStream & ms) const override { ms << mathMacro_->cell(idx_); }
+ void mathmlize(MathMLStream & ms) const override { ms << mathMacro_->cell(idx_); }
///
void htmlize(HtmlStream & ms) const override { ms << mathMacro_->cell(idx_); }
///
}
-void InsetMathMacro::mathmlize(MathStream & ms) const
+void InsetMathMacro::mathmlize(MathMLStream & ms) const
{
// macro_ is 0 if this is an unknown macro
LATTEST(d->macro_ || d->displayMode_ != DISPLAY_NORMAL);
///
void mathematica(MathematicaStream &) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathMatrix::mathmlize(MathStream & ms) const
+void InsetMathMatrix::mathmlize(MathMLStream & ms) const
{
ms << "<" << from_ascii(ms.namespacedTag("mo")) << " form='prefix' fence='true' stretchy='true' symmetric='true' lspace='thinmathspace'>"
<< convertDelimToXMLEscape(left_, ms.xmlMode())
///
void mathematica(MathematicaStream &) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathNumber::mathmlize(MathStream & ms) const
+void InsetMathNumber::mathmlize(MathMLStream & ms) const
{
ms << "<" << from_ascii(ms.namespacedTag("mn")) << ">"
<< str_
///
void mathematica(MathematicaStream &) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathOverset::mathmlize(MathStream & ms) const
+void InsetMathOverset::mathmlize(MathMLStream & ms) const
{
ms << "<" << from_ascii(ms.namespacedTag("mover")) << " accent='false'>"
<< cell(0) << cell(1)
///
void normalize(NormalStream &) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
///
InsetCode lyxCode() const override { return MATH_PHANTOM_CODE; }
/// Nothing for now
- void mathmlize(MathStream &) const override {}
+ void mathmlize(MathMLStream &) const override {}
/// Nothing for HTML
void htmlize(HtmlStream &) const override {}
/// request "external features"
}
-void InsetMathRoot::mathmlize(MathStream & ms) const
+void InsetMathRoot::mathmlize(MathMLStream & ms) const
{
ms << MTag("mroot") << cell(0) << cell(1) << ETag("mroot");
}
///
void normalize(NormalStream &) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathScript::mathmlize(MathStream & ms) const
+void InsetMathScript::mathmlize(MathMLStream & ms) const
{
bool d = hasDown() && !down().empty();
bool u = hasUp() && !up().empty();
- // FIXME: the MathStream should be able to give us this information
+ // FIXME: the MathMLStream should be able to give us this information
bool l = has_limits_;
if (u && d)
/// write content as something readable by Mathematica
void mathematica(MathematicaStream &) const override;
/// write content as MathML
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
/// write content as HTML
void htmlize(HtmlStream &) const override;
/// write content as something readable by Octave
}
-void InsetMathSideset::mathmlize(MathStream & ms) const
+void InsetMathSideset::mathmlize(MathMLStream & ms) const
{
// FIXME This is only accurate if both scriptl_ and scriptr_ are true
if (!scriptl_)
/// write normalized content
void normalize(NormalStream &) const override;
/// write content as MathML
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
/// write content as HTML
void htmlize(HtmlStream &) const override;
// \scriptscriptstyle. The corresponding values of displaystyle and scriptlevel
// for those TeX styles would be "true" and "0", "false" and "0", "false" and "1",
// and "false" and "2", respectively.
-void InsetMathSize::mathmlize(MathStream & ms) const
+void InsetMathSize::mathmlize(MathMLStream & ms) const
{
string const & name = to_utf8(key_->name);
bool dispstyle = (name == "displaystyle");
///
void infoize(odocstream & os) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathSpace::mathmlize(MathStream & ms) const
+void InsetMathSpace::mathmlize(MathMLStream & ms) const
{
SpaceInfo const & si = space_info[space_];
if (si.negative || !si.visible)
///
void octave(OctaveStream &) const override;
///
- void mathmlize(MathStream & ms) const override;
+ void mathmlize(MathMLStream & ms) const override;
///
void htmlize(HtmlStream & ms) const override;
///
}
-void InsetMathSpecialChar::mathmlize(MathStream & ms) const
+void InsetMathSpecialChar::mathmlize(MathMLStream & ms) const
{
switch (char_) {
case '&':
///
void mathematica(MathematicaStream &) const override;
///
- void mathmlize(MathStream & ms) const override;
+ void mathmlize(MathMLStream & ms) const override;
///
void htmlize(HtmlStream & ms) const override;
/// identifies SpecialChar insets
}
-void InsetMathSplit::mathmlize(MathStream & ms) const
+void InsetMathSplit::mathmlize(MathMLStream & ms) const
{
// split, gathered, aligned, alignedat
// At the moment, those seem to display just fine without any
///
void infoize(odocstream & os) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathSqrt::mathmlize(MathStream & ms) const
+void InsetMathSqrt::mathmlize(MathMLStream & ms) const
{
ms << MTag("msqrt") << cell(0) << ETag("msqrt");
}
///
void octave(OctaveStream &) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathStackrel::mathmlize(MathStream & ms) const
+void InsetMathStackrel::mathmlize(MathMLStream & ms) const
{
if (nargs() > 2)
ms << "<" << from_ascii(ms.namespacedTag("munderover")) << ">"
///
void normalize(NormalStream &) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathString::mathmlize(MathStream &) const
+void InsetMathString::mathmlize(MathMLStream &) const
{
// useless, no doubt, but we should not be here
LATTEST(false);
///
void mathematica(MathematicaStream &) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void write(WriteStream & os) const override;
///
}
-void InsetMathSubstack::mathmlize(MathStream & ms) const
+void InsetMathSubstack::mathmlize(MathMLStream & ms) const
{
int movers = 0;
row_type const numrows = nrows();
///
void write(WriteStream & os) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathSymbol::mathmlize(MathStream & ms) const
+void InsetMathSymbol::mathmlize(MathMLStream & ms) const
{
// FIXME We may need to do more interesting things
// with MathMLtype.
///
void mathematica(MathematicaStream &) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
/// \param spacing controls whether we print spaces around
}
-void InsetMathUnderset::mathmlize(MathStream & ms) const
+void InsetMathUnderset::mathmlize(MathMLStream & ms) const
{
ms << "<" << from_ascii(ms.namespacedTag("munder")) << " accent='false'>"
<< cell(0) << cell(1)
///
void normalize(NormalStream & ns) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathUnknown::mathmlize(MathStream &) const
+void InsetMathUnknown::mathmlize(MathMLStream &) const
{
throw MathExportException();
}
///
void mathematica(MathematicaStream &) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathXArrow::mathmlize(MathStream & ms) const
+void InsetMathXArrow::mathmlize(MathMLStream & ms) const
{
char const * arrow;
///
void normalize(NormalStream & os) const override;
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
}
-void InsetMathXYMatrix::mathmlize(MathStream &) const
+void InsetMathXYMatrix::mathmlize(MathMLStream &) const
{
throw MathExportException();
}
///
InsetCode lyxCode() const override { return MATH_XYMATRIX_CODE; }
///
- void mathmlize(MathStream &) const override;
+ void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
}
-void mathmlize(MathData const & dat, MathStream & ms)
+void mathmlize(MathData const & dat, MathMLStream & ms)
{
MathData ar = dat;
extractStructure(ar, MATHML);
class MapleStream;
class MaximaStream;
class MathematicaStream;
-class MathStream;
+class MathMLStream;
class OctaveStream;
class WriteStream;
class MathData;
void maple(MathData const &, MapleStream &);
void maxima(MathData const &, MaximaStream &);
void mathematica(MathData const &, MathematicaStream &);
-void mathmlize(MathData const &, MathStream &);
+void mathmlize(MathData const &, MathMLStream &);
void octave(MathData const &, OctaveStream &);
bool extractNumber(MathData const & ar, int & i);
//////////////////////////////////////////////////////////////////////
-MathStream::MathStream(odocstream & os, std::string const & xmlns, bool xmlMode)
+MathMLStream::MathMLStream(odocstream & os, std::string const & xmlns, bool xmlMode)
: os_(os), tab_(0), line_(0), in_text_(false), xmlns_(xmlns), xml_mode_(xmlMode)
{}
-void MathStream::cr()
+void MathMLStream::cr()
{
os() << '\n';
for (int i = 0; i < tab(); ++i)
}
-void MathStream::defer(docstring const & s)
+void MathMLStream::defer(docstring const & s)
{
deferred_ << s;
}
-void MathStream::defer(string const & s)
+void MathMLStream::defer(string const & s)
{
deferred_ << from_utf8(s);
}
-docstring MathStream::deferred() const
+docstring MathMLStream::deferred() const
{
return deferred_.str();
}
-MathStream & operator<<(MathStream & ms, MathAtom const & at)
+MathMLStream & operator<<(MathMLStream & ms, MathAtom const & at)
{
at->mathmlize(ms);
return ms;
}
-MathStream & operator<<(MathStream & ms, MathData const & ar)
+MathMLStream & operator<<(MathMLStream & ms, MathData const & ar)
{
mathmlize(ar, ms);
return ms;
}
-MathStream & operator<<(MathStream & ms, char const * s)
+MathMLStream & operator<<(MathMLStream & ms, char const * s)
{
ms.os() << s;
return ms;
}
-MathStream & operator<<(MathStream & ms, char c)
+MathMLStream & operator<<(MathMLStream & ms, char c)
{
ms.os() << c;
return ms;
}
-MathStream & operator<<(MathStream & ms, char_type c)
+MathMLStream & operator<<(MathMLStream & ms, char_type c)
{
ms.os().put(c);
return ms;
}
-MathStream & operator<<(MathStream & ms, MTag const & t)
+MathMLStream & operator<<(MathMLStream & ms, MTag const & t)
{
++ms.tab();
ms.cr();
}
-MathStream & operator<<(MathStream & ms, ETag const & t)
+MathMLStream & operator<<(MathMLStream & ms, ETag const & t)
{
ms.cr();
if (ms.tab() > 0)
}
-MathStream & operator<<(MathStream & ms, CTag const & t)
+MathMLStream & operator<<(MathMLStream & ms, CTag const & t)
{
ms.cr();
ms.os() << "<" << from_ascii(ms.namespacedTag(t.tag_));
}
-MathStream & operator<<(MathStream & ms, docstring const & s)
+MathMLStream & operator<<(MathMLStream & ms, docstring const & s)
{
ms.os() << s;
return ms;
//////////////////////////////////////////////////////////////////////
-SetMode::SetMode(MathStream & ms, bool text)
+SetMode::SetMode(MathMLStream & ms, bool text)
: ms_(ms)
{
was_text_ = ms_.inText();
class MathExportException : public std::exception {};
-class MathStream {
+class MathMLStream {
public:
/// Builds a stream proxy for os; the MathML namespace is given by xmlns (supposed to be already defined elsewhere in the document).
- explicit MathStream(odocstream & os, std::string const & xmlns = "", bool xmlMode = false);
+ explicit MathMLStream(odocstream & os, std::string const & xmlns = "", bool xmlMode = false);
///
void cr();
///
///
int & tab() { return tab_; }
///
- friend MathStream & operator<<(MathStream &, char const *);
+ friend MathMLStream & operator<<(MathMLStream &, char const *);
///
void defer(docstring const &);
///
};
///
-MathStream & operator<<(MathStream &, MathAtom const &);
+MathMLStream & operator<<(MathMLStream &, MathAtom const &);
///
-MathStream & operator<<(MathStream &, MathData const &);
+MathMLStream & operator<<(MathMLStream &, MathData const &);
///
-MathStream & operator<<(MathStream &, docstring const &);
+MathMLStream & operator<<(MathMLStream &, docstring const &);
///
-MathStream & operator<<(MathStream &, char const *);
+MathMLStream & operator<<(MathMLStream &, char const *);
///
-MathStream & operator<<(MathStream &, char);
+MathMLStream & operator<<(MathMLStream &, char);
///
-MathStream & operator<<(MathStream &, char_type);
+MathMLStream & operator<<(MathMLStream &, char_type);
///
-MathStream & operator<<(MathStream &, MTag const &);
+MathMLStream & operator<<(MathMLStream &, MTag const &);
///
-MathStream & operator<<(MathStream &, ETag const &);
+MathMLStream & operator<<(MathMLStream &, ETag const &);
///
-MathStream & operator<<(MathStream &, CTag const &);
+MathMLStream & operator<<(MathMLStream &, CTag const &);
/// A simpler version of ModeSpecifier, for MathML
class SetMode {
public:
///
- explicit SetMode(MathStream & ms, bool text);
+ explicit SetMode(MathMLStream & ms, bool text);
///
~SetMode();
private:
///
- MathStream & ms_;
+ MathMLStream & ms_;
///
bool was_text_;
};
class OutputParams;
// Inspiration for the *Tag structs and for XMLStream
-// came from MathStream and its cousins.
+// came from MathMLStream and its cousins.
namespace xml {
struct StartTag;