[prev in list] [next in list] [prev in thread] [next in thread]
List: lyx-cvs
Subject: [LyX/2.2.x] Fix HTML display of math matrices.
From: Richard Heck <rgheck () lyx ! org>
Date: 2016-07-31 7:41:36
Message-ID: 20160731074136.E0EDA2801E2 () lyx ! lyx ! org
[Download RAW message or body]
commit ffd6a28a971e378a6e0d220aec8ac2c1518daa09
Author: Richard Heck <rgheck@lyx.org>
Date: Sat Jul 30 00:25:09 2016 -0400
Fix HTML display of math matrices.
(cherry picked from commit 60ce2b7570e65ccf31738c39211b0997113e4d57)
---
src/mathed/InsetMathGrid.cpp | 14 ++++++++++++++
src/mathed/InsetMathGrid.h | 2 ++
status.22x | 2 ++
3 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/src/mathed/InsetMathGrid.cpp b/src/mathed/InsetMathGrid.cpp
index 3d120a5..e504494 100644
--- a/src/mathed/InsetMathGrid.cpp
+++ b/src/mathed/InsetMathGrid.cpp
@@ -26,6 +26,7 @@
#include "FuncStatus.h"
#include "Cursor.h"
#include "FuncRequest.h"
+#include "LaTeXFeatures.h"
#include "frontends/Clipboard.h"
#include "frontends/Painter.h"
@@ -1237,6 +1238,19 @@ void InsetMathGrid::htmlize(HtmlStream & os) const
}
+void InsetMathGrid::validate(LaTeXFeatures & features) const
+{
+ if (features.runparams().math_flavor == OutputParams::MathAsHTML
+ && (nrows() > 1 || ncols() > 1)) {
+ // CSS taken from InsetMathCases
+ features.addCSSSnippet(
+ "table.mathtable{display: inline-block; text-align: center; border: none;"
+ "border-left: thin solid black; vertical-align: middle; padding-left: 0.5ex;}\n"
+ "table.mathtable td {text-align: left; border: none;}");
+ }
+}
+
+
void InsetMathGrid::write(WriteStream & os) const
{
write(os, 0, 0, nrows(), ncols());
diff --git a/src/mathed/InsetMathGrid.h b/src/mathed/InsetMathGrid.h
index e9ea396..426d941 100644
--- a/src/mathed/InsetMathGrid.h
+++ b/src/mathed/InsetMathGrid.h
@@ -239,6 +239,8 @@ public:
///
void htmlize(HtmlStream &, std::string attrib) const;
///
+ void validate(LaTeXFeatures & features) const;
+ ///
//void octave(OctaveStream &) const;
protected:
diff --git a/status.22x b/status.22x
index 8d1a409..89fd917 100644
--- a/status.22x
+++ b/status.22x
@@ -100,6 +100,8 @@ What's new
- Add "dir='auto'" to body tag, which should help a lot with export of
RTL languages (bug 8279, partly).
+- Fix display of cases and matrices (bugs 8753, 8755).
+
* TEX2LYX
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic