X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Foutput_latex.cpp;h=783be726084195a10b6ec8c4f3d9f36b59865b6b;hb=7032b0374801d7e2621c221ce43f409855a901d6;hp=ed46c051753f97a90f28e29dd0a51ddba0c82887;hpb=41740ea915ee7a95206d780b6256e660cef39c6e;p=lyx.git diff --git a/src/output_latex.cpp b/src/output_latex.cpp index ed46c05175..783be72608 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -554,7 +554,7 @@ void TeXOnePar(Buffer const & buf, Paragraph const & par = paragraphs.at(pit); // FIXME This check should not really be needed. // Perhaps we should issue an error if it is. - Layout const style = text.inset().forcePlainLayout() ? + Layout const & style = text.inset().forcePlainLayout() ? bparams.documentClass().plainLayout() : par.layout(); if (style.inpreamble) @@ -672,7 +672,7 @@ void TeXOnePar(Buffer const & buf, // In some insets (such as Arguments), we cannot use \selectlanguage bool const localswitch = !use_polyglossia - && text.inset().getLayout().forcelocalfontswitch(); + && text.inset().forceLocalFontSwitch(); if (localswitch) { lang_begin_command = lyxrc.language_command_local; lang_end_command = "}"; @@ -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}";