]> git.lyx.org Git - features.git/commitdiff
add label (id) to <equation>...</equation> if present
authorJosé Matox <jamatos@lyx.org>
Mon, 17 May 2004 16:29:24 +0000 (16:29 +0000)
committerJosé Matox <jamatos@lyx.org>
Mon, 17 May 2004 16:29:24 +0000 (16:29 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8758 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/ChangeLog
src/mathed/math_hullinset.C

index 6b7aa193b8a69ad91c4e33cf160be4e1444b28ad..31506aa8f84605c5389a5df825b250979fa34eda 100644 (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:
index 7c5327650eaa6540544a0724b8321ccc6f70ce51..a39330fca1b6d10adeb6c5fd60013682f0ee9a43 100644 (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);