]> git.lyx.org Git - features.git/blobdiff - src/Layout.cpp
Allow InPreamble to be used with Paragraph-type environments. There is
[features.git] / src / Layout.cpp
index 5ba77ce1c6d0c67a0c8983d6f4c4231b6b5ed5a9..cdfc1746b9fd530cb1a1d793f88aeffcb92f9b06 100644 (file)
@@ -577,8 +577,8 @@ bool Layout::read(Lexer & lex, TextClass const & tclass)
        }
        lex.popTable();
        // make sure we only have inpreamble = true for commands
-       if (inpreamble && latextype != LATEX_COMMAND) {
-               LYXERR0("InPreamble not permitted except with Command-type layouts.");
+       if (inpreamble && latextype != LATEX_COMMAND && latextype != LATEX_PARAGRAPH) {
+               LYXERR0("InPreamble not permitted except with command and paragraph layouts.");
                LYXERR0("Layout name: " << name());
                inpreamble = false;
        }