]> git.lyx.org Git - lyx.git/blobdiff - src/Layout.cpp
Correctly set language after intitle paragraphs
[lyx.git] / src / Layout.cpp
index e4b6b3e3db20e7386396b83804ae4996561fd709..3c1a9bd955515d321e847e1a7c408a50e59de9f8 100644 (file)
@@ -1016,12 +1016,14 @@ void Layout::readArgument(Lexer & lex)
        arg.nodelims = false;
        arg.autoinsert = false;
        arg.insertcotext = false;
+       arg.insertonnewline = false;
        bool error = false;
        bool finished = false;
        arg.font = inherit_font;
        arg.labelfont = inherit_font;
        arg.is_toc_caption = false;
        arg.passthru = PT_INHERITED;
+       arg.free_spacing = false;
        string id;
        lex >> id;
        bool const itemarg = prefixIs(id, "item:");
@@ -1076,6 +1078,9 @@ void Layout::readArgument(Lexer & lex)
                } else if (tok == "decoration") {
                        lex.next();
                        arg.decoration = lex.getString();
+               } else if (tok == "newlinecmd") {
+                       lex.next();
+                       arg.newlinecmd = lex.getString();
                } else if (tok == "font") {
                        arg.font = lyxRead(lex, arg.font);
                } else if (tok == "labelfont") {
@@ -1095,6 +1100,9 @@ void Layout::readArgument(Lexer & lex)
                } else if (tok == "istoccaption") {
                        lex.next();
                        arg.is_toc_caption = lex.getBool();
+               } else if (tok == "freespacing") {
+                       lex.next();
+                       arg.free_spacing = lex.getBool();
                } else {
                        lex.printError("Unknown tag");
                        error = true;
@@ -1146,6 +1154,8 @@ void writeArgument(ostream & os, string const & id, Layout::latexarg const & arg
                os << "\t\tRequires \"" << arg.requires << "\"\n";
        if (!arg.decoration.empty())
                os << "\t\tDecoration \"" << arg.decoration << "\"\n";
+       if (!arg.newlinecmd.empty())
+               os << "\t\tNewlineCmd \"" << arg.newlinecmd << "\"\n";
        if (arg.font != inherit_font)
                lyxWrite(os, arg.font, "Font", 2);
        if (arg.labelfont != inherit_font)
@@ -1163,6 +1173,8 @@ void writeArgument(ostream & os, string const & id, Layout::latexarg const & arg
        }
        if (!arg.pass_thru_chars.empty())
                os << "\t\tPassThruChars \"" << to_utf8(arg.pass_thru_chars) << "\"\n";
+       if (arg.free_spacing)
+               os << "\t\tFreeSpacing " << arg.free_spacing << "\n";
        os << "\tEndArgument\n";
 }