From: Vincent van Ravesteijn Date: Sun, 22 Nov 2009 02:03:09 +0000 (+0000) Subject: Fix bug #6310: Incorrect latex for sparse matrices with vertical lines. X-Git-Tag: 2.0.0~5049 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=cd514c458a58875c41a9d6ab8c37346b1fd0fdc9;p=features.git Fix bug #6310: Incorrect latex for sparse matrices with vertical lines. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32145 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/InsetMathGrid.cpp b/src/mathed/InsetMathGrid.cpp index b42a262892..52c8b28884 100644 --- a/src/mathed/InsetMathGrid.cpp +++ b/src/mathed/InsetMathGrid.cpp @@ -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; }