From 23832ce191e0d63088dbb6a02e9f0ebc73472004 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Mon, 6 Feb 2012 22:38:41 +0000 Subject: [PATCH] HTML output for InsetMathCancel. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40711 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathCancel.cpp | 20 +++++++++++++++++--- src/mathed/InsetMathCancel.h | 4 ++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/mathed/InsetMathCancel.cpp b/src/mathed/InsetMathCancel.cpp index 545e6f5d20..f4618f259c 100644 --- a/src/mathed/InsetMathCancel.cpp +++ b/src/mathed/InsetMathCancel.cpp @@ -126,21 +126,35 @@ void InsetMathCancel::infoize(odocstream & os) const } +// unfortunately, we do not have many options here, so we have to treat +// them all the same way. +void InsetMathCancel::htmlize(HtmlStream & os) const +{ + os << MTag("span", "style='text-decoration: line-through;'") + << cell(0) + << ETag("span"); +} + + void InsetMathCancel::mathmlize(MathStream & os) const { switch (kind_) { case cancel: - os << MTag("menclose", "notation='updiagonalstrike'") << cell(0) << ETag("menclose"); + os << MTag("menclose", "notation='updiagonalstrike'") + << cell(0) + << ETag("menclose"); break; case bcancel: - os << MTag("menclose", "notation='downdiagonalstrike'") << cell(0) << ETag("menclose"); + os << MTag("menclose", "notation='downdiagonalstrike'") + << cell(0) + << ETag("menclose"); break; case xcancel: os << MTag("menclose", "notation='updiagonalstrike'") << MTag("menclose", "notation='downdiagonalstrike'") << cell(0) << ETag("menclose") - << ETag("menclose"); + << ETag("menclose"); break; } } diff --git a/src/mathed/InsetMathCancel.h b/src/mathed/InsetMathCancel.h index 1ee4062d24..55febf318d 100644 --- a/src/mathed/InsetMathCancel.h +++ b/src/mathed/InsetMathCancel.h @@ -41,8 +41,8 @@ public: InsetCode lyxCode() const { return MATH_CANCEL_CODE; } /// void mathmlize(MathStream &) const; - /// Nothing for HTML - void htmlize(HtmlStream &) const {} + /// + void htmlize(HtmlStream &) const; /// void validate(LaTeXFeatures &) const; -- 2.39.2