Fix \cline calculation when last column has decimal alignment

This commit is contained in:
Juergen Spitzmueller 2021-10-01 12:42:06 +02:00
parent 4658781e56
commit 9a4a6ca079

View File

@ -2605,7 +2605,7 @@ void Tabular::TeXTopHLine(otexstream & os, row_type row, list<col_type> columns,
break; break;
} }
for (col_type j = cstart ; j < c ; ++j) for (col_type j = cstart ; j <= c ; ++j)
if (column_info[j].alignment == LYX_ALIGN_DECIMAL) if (column_info[j].alignment == LYX_ALIGN_DECIMAL)
++offset; ++offset;
col_type lastcol = (*it1 == *it2) ? c + 1 + offset : columns.size() - c + offset; col_type lastcol = (*it1 == *it2) ? c + 1 + offset : columns.size() - c + offset;
@ -2741,7 +2741,7 @@ void Tabular::TeXBottomHLine(otexstream & os, row_type row, list<col_type> colum
break; break;
} }
for (col_type j = cstart ; j < c ; ++j) for (col_type j = cstart ; j <= c ; ++j)
if (column_info[j].alignment == LYX_ALIGN_DECIMAL) if (column_info[j].alignment == LYX_ALIGN_DECIMAL)
++offset; ++offset;
col_type lastcol = (*it1 == *it2) ? c + 1 + offset : columns.size() - c + offset; col_type lastcol = (*it1 == *it2) ? c + 1 + offset : columns.size() - c + offset;