mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 14:15:32 +00:00
fix bug 1446 (tex2lyx nesting)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8822 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3dceaedfa2
commit
a5bf3f142f
@ -1,3 +1,8 @@
|
||||
2004-06-23 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* text.C (output_command_layout, parse_environment): fix bug 1446
|
||||
by passing parent_context.deeper_paragraph to the child context
|
||||
|
||||
2004-06-18 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* preamble.C, text.C: s/wether/whether/g
|
||||
|
@ -323,6 +323,12 @@ void output_command_layout(ostream & os, Parser & p, bool outer,
|
||||
parent_context.check_end_layout(os);
|
||||
Context context(true, parent_context.textclass, newlayout,
|
||||
parent_context.layout);
|
||||
if (parent_context.deeper_paragraph) {
|
||||
// We are beginning a nested environment after a
|
||||
// deeper paragraph inside the outer list environment.
|
||||
// Therefore we don't need to output a "begin deeper".
|
||||
context.need_end_deeper = true;
|
||||
}
|
||||
context.check_deeper(os);
|
||||
context.check_layout(os);
|
||||
if (context.layout->optionalargs > 0) {
|
||||
@ -338,6 +344,11 @@ void output_command_layout(ostream & os, Parser & p, bool outer,
|
||||
}
|
||||
parse_text_snippet(p, os, FLAG_ITEM, outer, context);
|
||||
context.check_end_layout(os);
|
||||
if (parent_context.deeper_paragraph) {
|
||||
// We must suppress the "end deeper" because we
|
||||
// suppressed the "begin deeper" above.
|
||||
context.need_end_deeper = false;
|
||||
}
|
||||
context.check_end_deeper(os);
|
||||
// We don't need really a new paragraph, but
|
||||
// we must make sure that the next item gets a \begin_layout.
|
||||
@ -589,6 +600,12 @@ void parse_environment(Parser & p, ostream & os, bool outer,
|
||||
newlayout->isEnvironment()) {
|
||||
Context context(true, parent_context.textclass, newlayout,
|
||||
parent_context.layout);
|
||||
if (parent_context.deeper_paragraph) {
|
||||
// We are beginning a nested environment after a
|
||||
// deeper paragraph inside the outer list environment.
|
||||
// Therefore we don't need to output a "begin deeper".
|
||||
context.need_end_deeper = true;
|
||||
}
|
||||
parent_context.check_end_layout(os);
|
||||
switch (context.layout->latextype) {
|
||||
case LATEX_LIST_ENVIRONMENT:
|
||||
@ -606,6 +623,11 @@ void parse_environment(Parser & p, ostream & os, bool outer,
|
||||
context.check_deeper(os);
|
||||
parse_text(p, os, FLAG_END, outer, context);
|
||||
context.check_end_layout(os);
|
||||
if (parent_context.deeper_paragraph) {
|
||||
// We must suppress the "end deeper" because we
|
||||
// suppressed the "begin deeper" above.
|
||||
context.need_end_deeper = false;
|
||||
}
|
||||
context.check_end_deeper(os);
|
||||
parent_context.new_paragraph(os);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user