Rename MathStream to MathMLStream.

This commit is contained in:
Thibaut Cuvelier 2020-12-26 20:02:46 +01:00
parent 8c67cb8c3a
commit ecafea8227
88 changed files with 130 additions and 130 deletions

View File

@ -202,7 +202,7 @@ void InsetMath::mathematica(MathematicaStream & os) const
}
void InsetMath::mathmlize(MathStream & ms) const
void InsetMath::mathmlize(MathMLStream & ms) const
{
ms << "<!-- " << from_utf8(insetName(lyxCode())) << " -->";
ms << MTag("mi");

View File

@ -104,7 +104,7 @@ class OctaveStream;
class MapleStream;
class MaximaStream;
class MathematicaStream;
class MathStream;
class MathMLStream;
class WriteStream;
class MathData;
@ -241,7 +241,7 @@ public:
/// 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,

View File

@ -51,7 +51,7 @@ public:
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;

View File

@ -135,7 +135,7 @@ void InsetMathBig::normalize(NormalStream & os) const
}
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'>"

View File

@ -35,7 +35,7 @@ public:
///
void normalize(NormalStream & os) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -107,7 +107,7 @@ void InsetMathBoldSymbol::write(WriteStream & os) const
}
void InsetMathBoldSymbol::mathmlize(MathStream & ms) const
void InsetMathBoldSymbol::mathmlize(MathMLStream & ms) const
{
ms << "<" << from_ascii(ms.namespacedTag("mstyle")) << " mathvariant='bold'>"
<< cell(0)

View File

@ -42,7 +42,7 @@ public:
///
void write(WriteStream & os) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -57,7 +57,7 @@ void InsetMathBox::normalize(NormalStream & os) const
}
void InsetMathBox::mathmlize(MathStream & ms) const
void InsetMathBox::mathmlize(MathMLStream & ms) const
{
// FIXME XHTML
// Need to do something special for tags here.
@ -163,7 +163,7 @@ void InsetMathFBox::normalize(NormalStream & os) const
}
void InsetMathFBox::mathmlize(MathStream & ms) const
void InsetMathFBox::mathmlize(MathMLStream & ms) const
{
SetMode textmode(ms, true);
ms << MTag("mstyle", "class='fbox'")
@ -307,7 +307,7 @@ void InsetMathMakebox::infoize(odocstream & os) const
}
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";
@ -391,7 +391,7 @@ void InsetMathBoxed::infoize(odocstream & os) const
}
void InsetMathBoxed::mathmlize(MathStream & ms) const
void InsetMathBoxed::mathmlize(MathMLStream & ms) const
{
ms << MTag("mstyle", "class='boxed'")
<< cell(0)

View File

@ -33,7 +33,7 @@ public:
///
void normalize(NormalStream & ns) const override;
///
void mathmlize(MathStream & ms) const override;
void mathmlize(MathMLStream & ms) const override;
///
void htmlize(HtmlStream & ms) const override;
///
@ -68,7 +68,7 @@ public:
/// 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;
///
@ -95,7 +95,7 @@ public:
/// 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;
///
@ -128,7 +128,7 @@ public:
///
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

View File

@ -96,7 +96,7 @@ void InsetMathBrace::octave(OctaveStream & os) const
}
void InsetMathBrace::mathmlize(MathStream & ms) const
void InsetMathBrace::mathmlize(MathMLStream & ms) const
{
ms << MTag("mrow") << cell(0) << ETag("mrow");
}

View File

@ -44,7 +44,7 @@ public:
///
void octave(OctaveStream &) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -138,7 +138,7 @@ void InsetMathCancel::htmlize(HtmlStream & os) const
}
void InsetMathCancel::mathmlize(MathStream & ms) const
void InsetMathCancel::mathmlize(MathMLStream & ms) const
{
switch (kind_) {
case cancel:

View File

@ -40,7 +40,7 @@ public:
///
InsetCode lyxCode() const override { return MATH_CANCEL_CODE; }
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -36,7 +36,7 @@ public:
///
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 {}
///

View File

@ -143,7 +143,7 @@ void InsetMathCases::maple(MapleStream & os) const
}
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'>"

View File

@ -41,7 +41,7 @@ public:
///
void maple(MapleStream &) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -228,7 +228,7 @@ void InsetMathChar::octave(OctaveStream & os) const
// 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_) {

View File

@ -43,7 +43,7 @@ public:
///
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

View File

@ -37,7 +37,7 @@ public:
///
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 {}
///

View File

@ -83,7 +83,7 @@ void InsetMathComment::maple(MapleStream & os) const
}
void InsetMathComment::mathmlize(MathStream & ms) const
void InsetMathComment::mathmlize(MathMLStream & ms) const
{
ms << MTag("comment") << cell(0) << ETag("comment");
}

View File

@ -44,7 +44,7 @@ public:
///
void octave(OctaveStream &) const override {}
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -223,7 +223,7 @@ namespace {
}
} // 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));

View File

@ -50,7 +50,7 @@ public:
///
InsetCode lyxCode() const override { return MATH_DECORATION_CODE; }
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
private:

View File

@ -179,7 +179,7 @@ void InsetMathDelim::mathematica(MathematicaStream & os) const
}
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())

View File

@ -58,7 +58,7 @@ public:
///
void mathematica(MathematicaStream &) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -85,7 +85,7 @@ void InsetMathDots::validate(LaTeXFeatures & features) const
}
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

View File

@ -35,7 +35,7 @@ public:
///
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:

View File

@ -69,7 +69,7 @@ void InsetMathEnsureMath::write(WriteStream & os) const
}
void InsetMathEnsureMath::mathmlize(MathStream & ms) const
void InsetMathEnsureMath::mathmlize(MathMLStream & ms) const
{
SetMode mathmode(ms, false);
ms << MTag("mstyle", "class='math'")

View File

@ -36,7 +36,7 @@ public:
///
void write(WriteStream & os) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -122,7 +122,7 @@ void InsetMathExFunc::mathematica(MathematicaStream & os) const
}
void InsetMathExFunc::mathmlize(MathStream & ms) const
void InsetMathExFunc::mathmlize(MathMLStream & ms) const
{
ms << "<" << from_ascii(ms.namespacedTag("mi")) << ">"
<< name_

View File

@ -41,7 +41,7 @@ public:
///
void mathematica(MathematicaStream &) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -123,7 +123,7 @@ void InsetMathExInt::mathematica(MathematicaStream & os) const
}
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

View File

@ -52,7 +52,7 @@ public:
///
void mathematica(MathematicaStream &) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -191,7 +191,7 @@ void InsetMathFont::htmlize(HtmlStream & os) const
// 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

View File

@ -48,7 +48,7 @@ public:
///
void validate(LaTeXFeatures & features) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -491,7 +491,7 @@ void InsetMathFrac::octave(OctaveStream & os) const
}
void InsetMathFrac::mathmlize(MathStream & ms) const
void InsetMathFrac::mathmlize(MathMLStream & ms) const
{
switch (kind_) {
case ATOP:
@ -730,7 +730,7 @@ void InsetMathBinom::normalize(NormalStream & os) const
}
void InsetMathBinom::mathmlize(MathStream & ms) const
void InsetMathBinom::mathmlize(MathMLStream & ms) const
{
char ldelim = ' ';
char rdelim = ' ';

View File

@ -90,7 +90,7 @@ public:
///
void octave(OctaveStream &) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///
@ -133,7 +133,7 @@ public:
///
bool extraBraces() const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -1158,7 +1158,7 @@ void InsetMathGrid::normalize(NormalStream & os) const
}
void InsetMathGrid::mathmlize(MathStream & ms) const
void InsetMathGrid::mathmlize(MathMLStream & ms) const
{
bool const havetable = nrows() > 1 || ncols() > 1;
if (havetable)

View File

@ -218,7 +218,7 @@ public:
///
//void maple(MapleStream &) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -2404,7 +2404,7 @@ void InsetMathHull::docbook(XMLStream & xs, OutputParams const & runparams) cons
// 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;
@ -2427,7 +2427,7 @@ void InsetMathHull::docbook(XMLStream & xs, OutputParams const & runparams) cons
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!).
@ -2505,7 +2505,7 @@ void InsetMathHull::htmlize(HtmlStream & os) const
// 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;
@ -2592,7 +2592,7 @@ docstring InsetMathHull::xhtml(XMLStream & xs, OutputParams const & op) const
// 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;

View File

@ -148,7 +148,7 @@ public:
///
docstring xhtml(XMLStream &, OutputParams const &) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -40,7 +40,7 @@ public:
///
void normalize(NormalStream & ns) const override;
///
void mathmlize(MathStream &) const override { }
void mathmlize(MathMLStream &) const override { }
///
void htmlize(HtmlStream &) const override { }
///

View File

@ -169,7 +169,7 @@ public:
///
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_); }
///
@ -1240,7 +1240,7 @@ void InsetMathMacro::mathematica(MathematicaStream & os) const
}
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);

View File

@ -105,7 +105,7 @@ public:
///
void mathematica(MathematicaStream &) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -92,7 +92,7 @@ void InsetMathMatrix::mathematica(MathematicaStream & os) const
}
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())

View File

@ -40,7 +40,7 @@ public:
///
void mathematica(MathematicaStream &) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -68,7 +68,7 @@ void InsetMathNumber::octave(OctaveStream & os) const
}
void InsetMathNumber::mathmlize(MathStream & ms) const
void InsetMathNumber::mathmlize(MathMLStream & ms) const
{
ms << "<" << from_ascii(ms.namespacedTag("mn")) << ">"
<< str_

View File

@ -43,7 +43,7 @@ public:
///
void mathematica(MathematicaStream &) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -103,7 +103,7 @@ void InsetMathOverset::normalize(NormalStream & os) const
}
void InsetMathOverset::mathmlize(MathStream & ms) const
void InsetMathOverset::mathmlize(MathMLStream & ms) const
{
ms << "<" << from_ascii(ms.namespacedTag("mover")) << " accent='false'>"
<< cell(0) << cell(1)

View File

@ -38,7 +38,7 @@ public:
///
void normalize(NormalStream &) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -46,7 +46,7 @@ public:
///
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"

View File

@ -216,7 +216,7 @@ void InsetMathRoot::octave(OctaveStream & os) const
}
void InsetMathRoot::mathmlize(MathStream & ms) const
void InsetMathRoot::mathmlize(MathMLStream & ms) const
{
ms << MTag("mroot") << cell(0) << cell(1) << ETag("mroot");
}

View File

@ -45,7 +45,7 @@ public:
///
void normalize(NormalStream &) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -594,11 +594,11 @@ void InsetMathScript::mathematica(MathematicaStream & os) const
}
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)

View File

@ -65,7 +65,7 @@ public:
/// 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

View File

@ -385,7 +385,7 @@ void InsetMathSideset::normalize(NormalStream & os) const
}
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_)

View File

@ -54,7 +54,7 @@ public:
/// 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;

View File

@ -73,7 +73,7 @@ void InsetMathSize::write(WriteStream & os) const
// \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");

View File

@ -41,7 +41,7 @@ public:
///
void infoize(odocstream & os) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -195,7 +195,7 @@ void InsetMathSpace::octave(OctaveStream & os) const
}
void InsetMathSpace::mathmlize(MathStream & ms) const
void InsetMathSpace::mathmlize(MathMLStream & ms) const
{
SpaceInfo const & si = space_info[space_];
if (si.negative || !si.visible)

View File

@ -52,7 +52,7 @@ public:
///
void octave(OctaveStream &) const override;
///
void mathmlize(MathStream & ms) const override;
void mathmlize(MathMLStream & ms) const override;
///
void htmlize(HtmlStream & ms) const override;
///

View File

@ -132,7 +132,7 @@ void InsetMathSpecialChar::octave(OctaveStream & os) const
}
void InsetMathSpecialChar::mathmlize(MathStream & ms) const
void InsetMathSpecialChar::mathmlize(MathMLStream & ms) const
{
switch (char_) {
case '&':

View File

@ -47,7 +47,7 @@ public:
///
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

View File

@ -186,7 +186,7 @@ void InsetMathSplit::infoize(odocstream & os) const
}
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

View File

@ -35,7 +35,7 @@ public:
///
void infoize(odocstream & os) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -98,7 +98,7 @@ void InsetMathSqrt::octave(OctaveStream & os) const
}
void InsetMathSqrt::mathmlize(MathStream & ms) const
void InsetMathSqrt::mathmlize(MathMLStream & ms) const
{
ms << MTag("msqrt") << cell(0) << ETag("msqrt");
}

View File

@ -44,7 +44,7 @@ public:
///
void octave(OctaveStream &) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -141,7 +141,7 @@ void InsetMathStackrel::normalize(NormalStream & os) const
}
void InsetMathStackrel::mathmlize(MathStream & ms) const
void InsetMathStackrel::mathmlize(MathMLStream & ms) const
{
if (nargs() > 2)
ms << "<" << from_ascii(ms.namespacedTag("munderover")) << ">"

View File

@ -38,7 +38,7 @@ public:
///
void normalize(NormalStream &) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -94,7 +94,7 @@ void InsetMathString::octave(OctaveStream & os) const
}
void InsetMathString::mathmlize(MathStream &) const
void InsetMathString::mathmlize(MathMLStream &) const
{
// useless, no doubt, but we should not be here
LATTEST(false);

View File

@ -47,7 +47,7 @@ public:
///
void mathematica(MathematicaStream &) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void write(WriteStream & os) const override;
///

View File

@ -125,7 +125,7 @@ void InsetMathSubstack::maple(MapleStream & os) const
}
void InsetMathSubstack::mathmlize(MathStream & ms) const
void InsetMathSubstack::mathmlize(MathMLStream & ms) const
{
int movers = 0;
row_type const numrows = nrows();

View File

@ -39,7 +39,7 @@ public:
///
void write(WriteStream & os) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -156,7 +156,7 @@ void InsetMathSymbol::mathematica(MathematicaStream & os) const
}
void InsetMathSymbol::mathmlize(MathStream & ms) const
void InsetMathSymbol::mathmlize(MathMLStream & ms) const
{
// FIXME We may need to do more interesting things
// with MathMLtype.

View File

@ -63,7 +63,7 @@ public:
///
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

View File

@ -92,7 +92,7 @@ void InsetMathUnderset::normalize(NormalStream & os) const
}
void InsetMathUnderset::mathmlize(MathStream & ms) const
void InsetMathUnderset::mathmlize(MathMLStream & ms) const
{
ms << "<" << from_ascii(ms.namespacedTag("munder")) << " accent='false'>"
<< cell(0) << cell(1)

View File

@ -36,7 +36,7 @@ public:
///
void normalize(NormalStream & ns) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -89,7 +89,7 @@ void InsetMathUnknown::mathematica(MathematicaStream & os) const
}
void InsetMathUnknown::mathmlize(MathStream &) const
void InsetMathUnknown::mathmlize(MathMLStream &) const
{
throw MathExportException();
}

View File

@ -48,7 +48,7 @@ public:
///
void mathematica(MathematicaStream &) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -84,7 +84,7 @@ void InsetMathXArrow::normalize(NormalStream & os) const
}
void InsetMathXArrow::mathmlize(MathStream & ms) const
void InsetMathXArrow::mathmlize(MathMLStream & ms) const
{
char const * arrow;

View File

@ -32,7 +32,7 @@ public:
///
void normalize(NormalStream & os) const override;
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;
///

View File

@ -154,7 +154,7 @@ void InsetMathXYMatrix::validate(LaTeXFeatures & features) const
}
void InsetMathXYMatrix::mathmlize(MathStream &) const
void InsetMathXYMatrix::mathmlize(MathMLStream &) const
{
throw MathExportException();
}

View File

@ -49,7 +49,7 @@ public:
///
InsetCode lyxCode() const override { return MATH_XYMATRIX_CODE; }
///
void mathmlize(MathStream &) const override;
void mathmlize(MathMLStream &) const override;
///
void htmlize(HtmlStream &) const override;

View File

@ -1586,7 +1586,7 @@ void mathematica(MathData const & dat, MathematicaStream & os)
}
void mathmlize(MathData const & dat, MathStream & ms)
void mathmlize(MathData const & dat, MathMLStream & ms)
{
MathData ar = dat;
extractStructure(ar, MATHML);

View File

@ -21,7 +21,7 @@ class NormalStream;
class MapleStream;
class MaximaStream;
class MathematicaStream;
class MathStream;
class MathMLStream;
class OctaveStream;
class WriteStream;
class MathData;
@ -32,7 +32,7 @@ void normalize(MathData const &, NormalStream &);
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);

View File

@ -267,12 +267,12 @@ WriteStream & operator<<(WriteStream & ws, unsigned 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)
@ -280,60 +280,60 @@ void MathStream::cr()
}
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();
@ -345,7 +345,7 @@ MathStream & operator<<(MathStream & ms, MTag const & t)
}
MathStream & operator<<(MathStream & ms, ETag const & t)
MathMLStream & operator<<(MathMLStream & ms, ETag const & t)
{
ms.cr();
if (ms.tab() > 0)
@ -355,7 +355,7 @@ MathStream & operator<<(MathStream & ms, ETag const & t)
}
MathStream & operator<<(MathStream & ms, CTag const & t)
MathMLStream & operator<<(MathMLStream & ms, CTag const & t)
{
ms.cr();
ms.os() << "<" << from_ascii(ms.namespacedTag(t.tag_));
@ -366,7 +366,7 @@ MathStream & operator<<(MathStream & ms, CTag const & t)
}
MathStream & operator<<(MathStream & ms, docstring const & s)
MathMLStream & operator<<(MathMLStream & ms, docstring const & s)
{
ms.os() << s;
return ms;
@ -461,7 +461,7 @@ HtmlStream & operator<<(HtmlStream & ms, docstring const & s)
//////////////////////////////////////////////////////////////////////
SetMode::SetMode(MathStream & ms, bool text)
SetMode::SetMode(MathMLStream & ms, bool text)
: ms_(ms)
{
was_text_ = ms_.inText();

View File

@ -341,10 +341,10 @@ public:
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();
///
@ -354,7 +354,7 @@ public:
///
int & tab() { return tab_; }
///
friend MathStream & operator<<(MathStream &, char const *);
friend MathMLStream & operator<<(MathMLStream &, char const *);
///
void defer(docstring const &);
///
@ -393,35 +393,35 @@ private:
};
///
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_;
};

View File

@ -25,7 +25,7 @@ class Paragraph;
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;