From 480a40def235757223bd00f7763922b5257e472e Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Wed, 26 Jan 2011 10:54:28 +0000 Subject: [PATCH] Fix bug #7254 (LyX may insert a blank line when ending an environment) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@37327 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetCollapsable.cpp | 2 +- src/insets/InsetFloat.cpp | 4 ++-- status.16x | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) 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