From 783b1434ea9369c55788d320f6d6ed1b7389c3c1 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 15 Oct 2009 14:09:11 +0000 Subject: [PATCH] Fix #6276: tex2lyx fails to import captions git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31637 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/tex2lyx/text.cpp | 7 ++++++- status.16x | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index ba3ca1e143..6880125ea4 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -1565,11 +1565,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"); diff --git a/status.16x b/status.16x index 95be5c9ced..2ea972720e 100644 --- a/status.16x +++ b/status.16x @@ -104,6 +104,8 @@ What's new - Fix (again!) reading of default modules by tex2lyx (part of bug 5702). +- Fix reading of caption texts, which got broken in 1.6.4 (bug 6276). + - Fix support for polytonic Greek with multiple diacritics (bug 5976). - Assure the author name is encoded correctly in the LaTeX output of