mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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:
parent
b170e5890e
commit
cf87469cb2
@ -787,6 +787,26 @@ void parse_environment(Parser & p, ostream & os, bool outer,
|
|||||||
p.skip_spaces();
|
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)
|
else if (!parent_context.new_layout_allowed)
|
||||||
parse_unknown_environment(p, name, os, FLAG_END, outer,
|
parse_unknown_environment(p, name, os, FLAG_END, outer,
|
||||||
parent_context);
|
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"
|
else if (t.cs() == "input" || t.cs() == "include"
|
||||||
|| t.cs() == "verbatiminput") {
|
|| t.cs() == "verbatiminput") {
|
||||||
string name = '\\' + t.cs();
|
string name = '\\' + t.cs();
|
||||||
|
Loading…
Reference in New Issue
Block a user