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
This commit is contained in:
Uwe Stöhr 2007-11-24 18:04:26 +00:00
parent b170e5890e
commit cf87469cb2

View 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();