From cf87469cb2318b1ba18ce90f9d16db48e60f4211 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Sat, 24 Nov 2007 18:04:26 +0000 Subject: [PATCH] tex2lyx/text.cpp: - support for \newline - support for framed and shaded notes git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21764 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/tex2lyx/text.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 2385831302..ccca73386c 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -787,6 +787,26 @@ void parse_environment(Parser & p, ostream & os, bool outer, p.skip_spaces(); } + else if (name == "framed") { + eat_whitespace(p, os, parent_context, false); + parent_context.check_layout(os); + begin_inset(os, "Note Framed\n"); + os << "status open\n"; + parse_text_in_inset(p, os, FLAG_END, outer, parent_context); + end_inset(os); + p.skip_spaces(); + } + + else if (name == "shaded") { + eat_whitespace(p, os, parent_context, false); + parent_context.check_layout(os); + begin_inset(os, "Note Shaded\n"); + os << "status open\n"; + parse_text_in_inset(p, os, FLAG_END, outer, parent_context); + end_inset(os); + p.skip_spaces(); + } + else if (!parent_context.new_layout_allowed) parse_unknown_environment(p, name, os, FLAG_END, outer, parent_context); @@ -2187,6 +2207,12 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer, } } + else if (t.cs() == "newline") { + context.check_layout(os); + os << "\n\\" << t.cs() << "\n"; + skip_braces(p); // eat {} + } + else if (t.cs() == "input" || t.cs() == "include" || t.cs() == "verbatiminput") { string name = '\\' + t.cs(); -- 2.39.2