From: Juergen Spitzmueller Date: Mon, 1 Sep 2014 07:14:26 +0000 (+0200) Subject: Fix bug with wrong baseline calculation in last paragraph (2nd attempt) X-Git-Tag: 2.2.0alpha1~1684 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d9b87d651a066e4f5ff1385ec98e941110e3427c;p=features.git Fix bug with wrong baseline calculation in last paragraph (2nd attempt) This time, we consider the cases where a \par is not wanted (single-par insets, tabular cells). Fixes: #9231 --- diff --git a/src/output_latex.cpp b/src/output_latex.cpp index 8115e6a8d3..3595a089fa 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -849,9 +849,9 @@ void TeXOnePar(Buffer const & buf, // calculates the space between the baselines according // to this font. (Matthias) // - // Is this really needed ? (Dekel) - // We do not need to use to change the font for the last paragraph - // or for a command. + // We must not change the font for the last paragraph + // of non-multipar insets, tabular cells or commands, + // since this produces unwanted whitespace. Font const font = par.empty() ? par.getLayoutFont(bparams, outerfont) @@ -860,7 +860,9 @@ void TeXOnePar(Buffer const & buf, bool const is_command = style.isCommand(); if (style.resfont.size() != font.fontInfo().size() - && nextpar + && (nextpar || maintext + || (text.inset().getLayout().isMultiPar() + && text.inset().lyxCode() != CELL_CODE)) && !is_command) { os << '{'; os << "\\" << from_ascii(font.latexSize()) << " \\par}";