mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
MathML: improve formatting of formula in XHTML hull
Contributed by lynx: https://www.lyx.org/trac/ticket/12629
This commit is contained in:
parent
0c227d3dfa
commit
f9fd652aae
@ -2632,15 +2632,21 @@ docstring InsetMathHull::xhtml(XMLStream & xs, OutputParams const & op) const
|
|||||||
success = true;
|
success = true;
|
||||||
} catch (MathExportException const &) {}
|
} catch (MathExportException const &) {}
|
||||||
if (success) {
|
if (success) {
|
||||||
|
string const name_space_declaration = "xmlns='http://www.w3.org/1998/Math/MathML'";
|
||||||
if (getType() == hullSimple)
|
if (getType() == hullSimple)
|
||||||
xs << xml::StartTag("math",
|
xs << xml::StartTag("math", name_space_declaration, true);
|
||||||
"xmlns=\"http://www.w3.org/1998/Math/MathML\"", true);
|
else {
|
||||||
else
|
if (!xs.isLastTagCR())
|
||||||
xs << xml::StartTag("math",
|
xs << xml::CR();
|
||||||
"display=\"block\" xmlns=\"http://www.w3.org/1998/Math/MathML\"", true);
|
xs << xml::StartTag("math", name_space_declaration + " display='block'", true);
|
||||||
|
}
|
||||||
|
|
||||||
xs << XMLStream::ESCAPE_NONE
|
xs << XMLStream::ESCAPE_NONE
|
||||||
<< os.str()
|
<< os.str();
|
||||||
<< xml::EndTag("math");
|
|
||||||
|
if (!xs.isLastTagCR())
|
||||||
|
xs << xml::CR();
|
||||||
|
xs << xml::EndTag("math") << xml::CR();
|
||||||
}
|
}
|
||||||
} else if (mathtype == BufferParams::HTML) {
|
} else if (mathtype == BufferParams::HTML) {
|
||||||
odocstringstream os;
|
odocstringstream os;
|
||||||
|
Loading…
Reference in New Issue
Block a user