diff --git a/src/mathed/InsetMathSpace.cpp b/src/mathed/InsetMathSpace.cpp index bd426008cd..985e93f127 100644 --- a/src/mathed/InsetMathSpace.cpp +++ b/src/mathed/InsetMathSpace.cpp @@ -207,6 +207,40 @@ void InsetMathSpace::mathmlize(MathStream & ms) const } +void InsetMathSpace::htmlize(HtmlStream & ms) const +{ + SpaceInfo const & si = space_info[space_]; + switch (si.kind) { + case InsetSpaceParams::THIN: + ms << from_ascii(" "); + break; + case InsetSpaceParams::MEDIUM: + ms << from_ascii(" "); + break; + case InsetSpaceParams::THICK: + ms << from_ascii(" "); + break; + case InsetSpaceParams::ENSKIP: + ms << from_ascii(" "); + break; + case InsetSpaceParams::QUAD: + ms << from_ascii(" "); + break; + case InsetSpaceParams::QQUAD: + ms << from_ascii("  "); + break; + case InsetSpaceParams::CUSTOM: { + string l = length_.asHTMLString(); + ms << MTag("span", "width='" + l + "'") + << from_ascii(" ") << ETag("span"); + break; + } + default: + break; + } +} + + void InsetMathSpace::normalize(NormalStream & os) const { os << "[space " << int(space_) << "] "; diff --git a/src/mathed/InsetMathSpace.h b/src/mathed/InsetMathSpace.h index 381562178c..8f633fffa8 100644 --- a/src/mathed/InsetMathSpace.h +++ b/src/mathed/InsetMathSpace.h @@ -53,6 +53,8 @@ public: /// void mathmlize(MathStream & ms) const; /// + void htmlize(HtmlStream & ms) const; + /// void write(WriteStream & os) const; /// generate something that will be understood by the Dialogs. InsetSpaceParams params() const;