From 79728dcde975fc5968d0ef9e6b56df57023acd88 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sat, 17 Mar 2018 12:19:50 +0100 Subject: [PATCH] tex2lyx: do not eat empty paragraphs if keepempty is true Fixes: #11078 --- src/tex2lyx/text.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 53620380dd..24f57feeb6 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -2099,6 +2099,12 @@ void parse_environment(Parser & p, ostream & os, bool outer, break; } context.check_deeper(os); + if (newlayout->keepempty) { + // We need to start a new paragraph + // even if it is empty. + context.new_paragraph(os); + context.check_layout(os); + } // handle known optional and required arguments if (context.layout->latextype == LATEX_ENVIRONMENT) output_arguments(os, p, outer, false, string(), context, -- 2.39.5