diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index 0f579497df..f70bed1c71 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -831,7 +831,7 @@ int InsetCollapsable::latex(odocstream & os, if (layout_->latextype() == InsetLayout::COMMAND) { os << "}"; } else if (layout_->latextype() == InsetLayout::ENVIRONMENT) { - os << "\n\\end{" << from_utf8(layout_->latexname()) << "}\n"; + os << "%\n\\end{" << from_utf8(layout_->latexname()) << "}\n"; i += 4; } } diff --git a/src/insets/InsetFloat.cpp b/src/insets/InsetFloat.cpp index 1f3acec30f..8610961c44 100644 --- a/src/insets/InsetFloat.cpp +++ b/src/insets/InsetFloat.cpp @@ -355,8 +355,8 @@ int InsetFloat::latex(odocstream & os, OutputParams const & runparams_in) const int const i = InsetText::latex(os, runparams); // The \n is used to force \end{} to appear in a new line. - // In this case, we do not case if the current output line is empty. - os << "\n\\end{" << from_ascii(tmptype) << "}\n"; + // Also in this case, we care that the current output line is not empty. + os << "%\n\\end{" << from_ascii(tmptype) << "}\n"; return i + 4; } diff --git a/status.16x b/status.16x index d6efa49a85..3adb224139 100644 --- a/status.16x +++ b/status.16x @@ -66,6 +66,9 @@ What's new - Do not output PDF settings if these are disabled in the document settings (bug 7052). +- Avoid inserting a blank line before the end of an environment when + exporting to LaTeX a custom inset (bug 7254). + - Correctly check for RTF and DOC viewers. - KOMA classes: Support the optional argument of Addpart, Addchap and