mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
HTML for stackrel.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33989 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
85425d8e6c
commit
bab268352b
@ -11,6 +11,8 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include "InsetMathStackrel.h"
|
#include "InsetMathStackrel.h"
|
||||||
|
|
||||||
|
#include "LaTeXFeatures.h"
|
||||||
#include "MathData.h"
|
#include "MathData.h"
|
||||||
#include "MathStream.h"
|
#include "MathStream.h"
|
||||||
|
|
||||||
@ -74,4 +76,28 @@ void InsetMathStackrel::mathmlize(MathStream & ms) const
|
|||||||
ms << "<mover accent='false'>" << cell(1) << cell(0) << "</mover>";
|
ms << "<mover accent='false'>" << cell(1) << cell(0) << "</mover>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void InsetMathStackrel::htmlize(HtmlStream & os) const
|
||||||
|
{
|
||||||
|
// at the moment, this is exactly the same as overset
|
||||||
|
os << MTag("span", "class='overset'")
|
||||||
|
<< MTag("span", "class='top'") << cell(0) << ETag("span")
|
||||||
|
<< MTag("span") << cell(1) << ETag("span")
|
||||||
|
<< ETag("span");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void InsetMathStackrel::validate(LaTeXFeatures & features) const
|
||||||
|
{
|
||||||
|
// from overset
|
||||||
|
if (features.runparams().math_flavor == OutputParams::MathAsHTML)
|
||||||
|
features.addPreambleSnippet("<style type=\"text/css\">\n"
|
||||||
|
"span.overset{display: inline-block; vertical-align: bottom; text-align:center;}\n"
|
||||||
|
"span.overset span {display: block;}\n"
|
||||||
|
"span.top{font-size: 66%;}\n"
|
||||||
|
"</style>");
|
||||||
|
|
||||||
|
InsetMathNest::validate(features);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace lyx
|
} // namespace lyx
|
||||||
|
@ -32,6 +32,10 @@ public:
|
|||||||
///
|
///
|
||||||
void mathmlize(MathStream &) const;
|
void mathmlize(MathStream &) const;
|
||||||
///
|
///
|
||||||
|
void htmlize(HtmlStream &) const;
|
||||||
|
///
|
||||||
|
void validate(LaTeXFeatures &) const;
|
||||||
|
///
|
||||||
InsetCode lyxCode() const { return MATH_STACKREL_CODE; }
|
InsetCode lyxCode() const { return MATH_STACKREL_CODE; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user