]> git.lyx.org Git - features.git/commitdiff
ABOVE and CENTERED labels need special treatment.
authorRichard Heck <rgheck@lyx.org>
Thu, 30 Jun 2016 03:55:11 +0000 (23:55 -0400)
committerRichard Heck <rgheck@lyx.org>
Thu, 30 Jun 2016 03:56:54 +0000 (23:56 -0400)
Fixes bug #8843.

(cherry picked from commit 08bf9781ee86ea7fe2c9f3a0d670cad92807a017)

src/output_xhtml.cpp
status.22x

index e960e2c5d53ea0f8ba846e612b5c6dcd60cd26b0..c6b3c7875dbecf0759aa024b3e17b9433b0a2f0a 100644 (file)
@@ -1057,14 +1057,24 @@ void makeCommand(Buffer const & buf,
                    documentClass().counters().step(style.counter, OutputUpdate);
 
        bool const make_parid = !runparams.for_toc && runparams.html_make_pars;
+       
+       if (style.labeltype == LABEL_ABOVE)
+               xs << html::StartTag("div")
+                  << pbegin->params().labelString()
+                  << html::EndTag("div");
+       else if (style.labeltype == LABEL_CENTERED)
+               xs << html::StartTag("div", "style = \"text-align: center;\"")
+                  << pbegin->params().labelString()
+                  << html::EndTag("div");
 
        openParTag(xs, style, pbegin->params(),
                   make_parid ? pbegin->magicLabel() : "");
 
        // Label around sectioning number:
        // FIXME Probably need to account for LABEL_MANUAL
-       // FIXME Probably also need now to account for labels ABOVE and CENTERED.
-       if (style.labeltype != LABEL_NO_LABEL) {
+       if (style.labeltype != LABEL_NO_LABEL &&
+           style.labeltype != LABEL_ABOVE &&
+           style.labeltype != LABEL_CENTERED ) {
                openLabelTag(xs, style);
                xs << pbegin->params().labelString();
                closeLabelTag(xs, style);
index 5f12f110fc89568a91142f6fb27c4085b473f77f..f13c03bc9726560ee3b131d96861eff1811f1d52 100644 (file)
@@ -171,6 +171,8 @@ What's new
 
 - Fix output of vertical space in the middle of a paragraph (bug 8154).
 
+- Fix output of ABOVE and CENTERED label types (bug 8843).
+
 - Output correct entities for named delimiters (bug 8280).
 
 - Added class attribute for mathbb to allow customization (part of bug