[prev in list] [next in list] [prev in thread] [next in thread]
List: lyx-cvs
Subject: [LyX/2.2.x] Make sure we center displayed equations.
From: Richard Heck <rgheck () lyx ! org>
Date: 2016-06-30 3:20:50
Message-ID: 20160630032050.9D6BC28025D () lyx ! lyx ! org
[Download RAW message or body]
commit c52f30f2531125a7a76a9afe0b173cc954dff137
Author: Richard Heck <rgheck@lyx.org>
Date: Wed Jun 29 23:18:57 2016 -0400
Make sure we center displayed equations.
(cherry picked from commit a8aa7feb8936b751f088a10764b1f3623f143c77)
---
src/mathed/InsetMathHull.cpp | 6 ++++--
status.22x | 2 ++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index 48792a8..349badb 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -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();
diff --git a/status.22x b/status.22x
index 151583f..5f12f11 100644
--- a/status.22x
+++ b/status.22x
@@ -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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic