]> git.lyx.org Git - features.git/commitdiff
Fix bug #6276: tex2lyx fails to import captions
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 15 Oct 2009 14:22:35 +0000 (14:22 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 15 Oct 2009 14:22:35 +0000 (14:22 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31638 a592a061-630c-0410-9148-cb99ea01b6c8

src/tex2lyx/text.cpp

index 558462e593075e43d7bb0298eb75e8b0c9aac9f3..eb88a9695810b32c9809eb5034eeffba54bafc91 100644 (file)
@@ -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");