add label (id) to <equation>...</equation> if present

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8758 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
José Matox 2004-05-17 16:29:24 +00:00
parent db707dab04
commit fd14ebf7e0
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2004-05-17 José Matos <jamatos@lyx.org>
* math_hullinset.C (docbook): add support for label.
2004-04-29 Angus Leeming <leeming@lyx.org>
* math_hullinset.C:

View File

@ -1241,7 +1241,9 @@ int MathHullInset::docbook(Buffer const & buf, ostream & os,
OutputParams const & runparams) const
{
MathMLStream ms(os);
ms << MTag("equation");
string name="equation";
if (! label(0).empty()) name += " id=\"" + label(0)+ "\"";
ms << MTag(name.c_str());
ms << MTag("alt");
ms << "<[CDATA[";
int res = plaintext(buf, ms.os(), runparams);