]> git.lyx.org Git - features.git/commitdiff
Fix bug #6310: Incorrect latex for sparse matrices with vertical lines.
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 22 Nov 2009 02:03:09 +0000 (02:03 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 22 Nov 2009 02:03:09 +0000 (02:03 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32145 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathGrid.cpp

index b42a262892f6ebcee52e41cf4e9fba3b34436740..52c8b2888469bbe4d4e73d23c90e4208aba8a452 100644 (file)
@@ -994,13 +994,19 @@ void InsetMathGrid::write(WriteStream & os,
 {
        MathEnsurer ensurer(os, false);
        docstring eol;
+       LYXERR0( " " << beg_col << " " << end_col );
+
+       LYXERR0( (colinfo_[beg_col].lines_) );
+       LYXERR0( (colinfo_[end_col].lines_) );
        for (row_type row = beg_row; row < end_row; ++row) {
                os << verboseHLine(rowinfo_[row].lines_);
-               // don't write & and empty cells at end of line
+               // don't write & and empty cells at end of line,
+               // unless there are vertical lines
                col_type lastcol = 0;
                bool emptyline = true;
                for (col_type col = beg_col; col < end_col; ++col)
-                       if (!cell(index(row, col)).empty()) {
+                       if (!cell(index(row, col)).empty()
+                                 || colinfo_[col + 1].lines_) {
                                lastcol = col + 1;
                                emptyline = false;
                        }