From f6be7d89ef4c6a3d2004c5312578813c9a72410c Mon Sep 17 00:00:00 2001 From: Guillaume Munch Date: Sun, 1 Nov 2015 23:58:41 +0000 Subject: [PATCH] Fix bug #9813 tex/row correspondance for \end{tabular}. --- src/insets/InsetTabular.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index e827bfd27e..ae6ea58448 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -2676,14 +2676,16 @@ void Tabular::TeXRow(otexstream & os, row_type row, void Tabular::latex(otexstream & os, OutputParams const & runparams) const { bool const is_tabular_star = !tabular_width.zero(); + TexRow::RowEntry pos = TexRow::textEntry(runparams.lastid, + runparams.lastpos); //+--------------------------------------------------------------------- //+ first the opening preamble + //+--------------------------------------------------------------------- os << safebreakln; - if (runparams.lastid != -1) - os.texrow().start(runparams.lastid, runparams.lastpos); + if (!TexRow::isNone(pos)) + os.texrow().start(pos); if (rotate != 0) os << "\\begin{turn}{" << convert(rotate) << "}\n"; @@ -2812,6 +2814,9 @@ void Tabular::latex(otexstream & os, OutputParams const & runparams) const if (rotate != 0) os << breakln << "\\end{turn}"; + + if (!TexRow::isNone(pos)) + os.texrow().start(pos); }