]> 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:18:57 +0000 (23:18 -0400)
src/mathed/InsetMathHull.cpp

index 513a8963345ae7ba0fe0083f02b8e234c4879de6..beb3b2a12167e4f68ed95b97ec3c1b10e0cbb60a 100644 (file)
@@ -2486,7 +2486,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) {
@@ -2513,7 +2515,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();