]> git.lyx.org Git - features.git/commitdiff
Make sure we center displayed equations.
authorRichard Heck <rgheck@lyx.org>
Thu, 30 Jun 2016 03:18:57 +0000 (23:18 -0400)
committerRichard Heck <rgheck@lyx.org>
Thu, 30 Jun 2016 03:20:56 +0000 (23:20 -0400)
(cherry picked from commit a8aa7feb8936b751f088a10764b1f3623f143c77)

src/mathed/InsetMathHull.cpp
status.22x

index 48792a81ae8b090a256dec55e0febac309498dfd..349badbad3018fe77be2721de80263fb082e862a 100644 (file)
@@ -2483,7 +2483,9 @@ docstring InsetMathHull::xhtml(XHTMLStream & xs, OutputParams const & op) const
        //    )
        // but what follows is equivalent, since we'll enter only if either (a) we
        // tried and failed with MathML or HTML or (b) didn't try yet at all but
-       // aren't doing LaTeX, in which case we are doing Images.
+       // aren't doing LaTeX.
+       //
+       // so this is for Images.
        if (!success && mathtype != BufferParams::LaTeX) {
                graphics::PreviewImage const * pimage = 0;
                if (!op.dryrun) {
@@ -2510,7 +2512,7 @@ docstring InsetMathHull::xhtml(XHTMLStream & xs, OutputParams const & op) const
 
                        string const tag = (getType() == hullSimple) ? "span" : "div";
                        xs << html::CR()
-                          << html::StartTag(tag)
+                          << html::StartTag(tag, "style = \"text-align: center;\"")
                                 << html::CompTag("img", "src=\"" + filename + "\" alt=\"Mathematical Equation\"")
                                 << html::EndTag(tag)
                                 << html::CR();
index 151583f90c938a0cc483173a0eb398bc92a11a0e..5f12f110fc89568a91142f6fb27c4085b473f77f 100644 (file)
@@ -176,6 +176,8 @@ What's new
 - Added class attribute for mathbb to allow customization (part of bug
   8521).
 
+- Use 'text-align: center;' with displayed equations (bug 8654).
+
 
 * TEX2LYX