]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/text.cpp
Fix typo.
[lyx.git] / src / tex2lyx / text.cpp
index e6110904c9b1150bf1f62ca95172438555fd2a0b..eb88a9695810b32c9809eb5034eeffba54bafc91 100644 (file)
@@ -1453,8 +1453,8 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                        context.check_layout(os);
                        begin_inset(os, "LatexCommand ");
                        os << t.cs() << "\n";
-                       os << p.getOpt();
-                       os << "key " << '"' << p.verbatim_item() << '"' << "\n";
+                       os << "label \"" << p.getOptContent() << "\"\n";
+                       os << "key \"" << p.verbatim_item() << "\"\n";
                        end_inset(os);
                }
 
@@ -1573,11 +1573,16 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                }
 
                else if (t.cs() == "caption") {
+                       // FIXME: this should get some cleanup. All
+                       // the \begin_layout:s are output by the
+                       // Context class!
                        p.skip_spaces();
                        context.check_layout(os);
                        p.skip_spaces();
                        begin_inset(os, "Caption\n\n");
-                       os << "\\begin_layout Standard";
+                       os << "\\begin_layout " 
+                          << to_utf8(context.textclass.defaultLayout().name()) 
+                          << '\n';
                        if (p.next_token().character() == '[') {
                                p.get_token(); // eat '['
                                begin_inset(os, "OptArg\n");
@@ -2366,8 +2371,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                        }
                }
 
-               else if (t.cs() == "newline" ||
-                       t.cs() == "linebreak") {
+               else if (t.cs() == "newline") {
                        context.check_layout(os);
                        os << "\n\\" << t.cs() << "\n";
                        skip_braces(p); // eat {}
@@ -2485,7 +2489,6 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                }
 
                else if (t.cs() == "newpage" ||
-                       t.cs() == "pagebreak" ||
                        t.cs() == "clearpage" ||
                        t.cs() == "cleardoublepage") {
                        context.check_layout(os);