]> git.lyx.org Git - features.git/commitdiff
tex2lyx/text.cpp:
authorUwe Stöhr <uwestoehr@web.de>
Sat, 24 Nov 2007 18:04:26 +0000 (18:04 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Sat, 24 Nov 2007 18:04:26 +0000 (18:04 +0000)
- 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

index 2385831302c3fcc5756ed21b8ec482c997fe1347..ccca73386c82c9ce884a3ffbd25badd075f7106b 100644 (file)
@@ -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();