mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
add awareness of the sgml/xml distinction for math output in docbook
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8896 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3d3fdcf032
commit
b241721780
@ -1,4 +1,7 @@
|
|||||||
|
2004-08-13 José Matos <jamatos@lyx.org>
|
||||||
|
|
||||||
|
* math_hullinset.C (docbook): add awareness of the distinction
|
||||||
|
between the sgml and xml versions of docbook.
|
||||||
|
|
||||||
2004-08-12 André Pönitz <poenitz@gmx.net>
|
2004-08-12 André Pönitz <poenitz@gmx.net>
|
||||||
|
|
||||||
|
@ -1263,17 +1263,27 @@ int MathHullInset::docbook(Buffer const & buf, ostream & os,
|
|||||||
OutputParams const & runparams) const
|
OutputParams const & runparams) const
|
||||||
{
|
{
|
||||||
MathMLStream ms(os);
|
MathMLStream ms(os);
|
||||||
string name="equation";
|
int res = 0;
|
||||||
if (! label(0).empty()) name += " id=\"" + label(0)+ "\"";
|
string name;
|
||||||
ms << MTag(name.c_str());
|
if (getType() == "simple")
|
||||||
ms << MTag("alt");
|
name= "inlineequation";
|
||||||
ms << "<[CDATA[";
|
else
|
||||||
int res = plaintext(buf, ms.os(), runparams);
|
name = "informalequation";
|
||||||
ms << "]]>";
|
|
||||||
ms << ETag("alt");
|
string bname = name;
|
||||||
|
if (! label(0).empty()) bname += " id=\"" + label(0)+ "\"";
|
||||||
|
ms << MTag(bname.c_str());
|
||||||
|
|
||||||
|
if (runparams.flavor == OutputParams::XML) {
|
||||||
ms << MTag("math");
|
ms << MTag("math");
|
||||||
MathGridInset::mathmlize(ms);
|
MathGridInset::mathmlize(ms);
|
||||||
ms << ETag("math");
|
ms << ETag("math");
|
||||||
ms << ETag("equation");
|
} else {
|
||||||
|
ms << MTag("alt");
|
||||||
|
res = latex(buf, ms.os(), runparams);
|
||||||
|
ms << ETag("alt");
|
||||||
|
}
|
||||||
|
|
||||||
|
ms << ETag(name.c_str());
|
||||||
return ms.line() + res;
|
return ms.line() + res;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user