]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/tex2lyx.C
Fix bug 2667
[lyx.git] / src / tex2lyx / tex2lyx.C
index 06905f42c067e26d36dbe21d4b76694ea4efb76a..09dcf7cbbcf35c7678056ef9b73df038005e3d31 100644 (file)
@@ -413,6 +413,9 @@ void tex2lyx(std::istream &is, std::ostream &os)
        active_environments.push_back("document");
        Context context(true, textclass);
        parse_text(p, ss, FLAG_END, true, context);
+       if (Context::empty)
+               // Empty document body. LyX needs at least one paragraph.
+               context.check_layout(ss);
        context.check_end_layout(ss);
        ss << "\n\\end_body\n\\end_document\n";
        active_environments.pop_back();