]> git.lyx.org Git - features.git/commitdiff
Fix HTML display of math matrices.
authorRichard Heck <rgheck@lyx.org>
Sat, 30 Jul 2016 04:25:09 +0000 (00:25 -0400)
committerRichard Heck <rgheck@lyx.org>
Sun, 31 Jul 2016 07:41:13 +0000 (03:41 -0400)
(cherry picked from commit 60ce2b7570e65ccf31738c39211b0997113e4d57)

src/mathed/InsetMathGrid.cpp
src/mathed/InsetMathGrid.h
status.22x

index 3d120a5da8fbacb55b534df4b585f0ee37ac77fe..e5044947e7354387eee156b070e0ba9e47b180b7 100644 (file)
@@ -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());
index e9ea396930f3aa466536dd1135f3062393764ca4..426d941f19167bfa43be63ac68481575d7a31d45 100644 (file)
@@ -239,6 +239,8 @@ public:
        ///
        void htmlize(HtmlStream &, std::string attrib) const;
        ///
+       void validate(LaTeXFeatures & features) const;
+       ///
        //void octave(OctaveStream &) const;
 
 protected:
index 8d1a40984a53ab383e9835718a9d70a0f551576d..89fd9173a2a18c49185a85c5435fc934d1cb71c7 100644 (file)
@@ -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