mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
Workaround to let tex2lyx handle the new argument syntax. This needs to be implemented properly (proper argument number)
This commit is contained in:
parent
2e69c66195
commit
fffc46a4f7
@ -628,6 +628,7 @@ void output_command_layout(ostream & os, Parser & p, bool outer,
|
|||||||
}
|
}
|
||||||
context.check_deeper(os);
|
context.check_deeper(os);
|
||||||
context.check_layout(os);
|
context.check_layout(os);
|
||||||
|
// FIXME: Adjust to format 446!
|
||||||
int optargs = 0;
|
int optargs = 0;
|
||||||
while (optargs < context.layout->optArgs()) {
|
while (optargs < context.layout->optArgs()) {
|
||||||
eat_whitespace(p, os, context, false);
|
eat_whitespace(p, os, context, false);
|
||||||
@ -635,7 +636,8 @@ void output_command_layout(ostream & os, Parser & p, bool outer,
|
|||||||
p.next_token().character() != '[')
|
p.next_token().character() != '[')
|
||||||
break;
|
break;
|
||||||
p.get_token(); // eat '['
|
p.get_token(); // eat '['
|
||||||
begin_inset(os, "Argument\n");
|
// FIXME: Just a workaround
|
||||||
|
begin_inset(os, "Argument 999\n");
|
||||||
os << "status collapsed\n\n";
|
os << "status collapsed\n\n";
|
||||||
parse_text_in_inset(p, os, FLAG_BRACK_LAST, outer, context);
|
parse_text_in_inset(p, os, FLAG_BRACK_LAST, outer, context);
|
||||||
end_inset(os);
|
end_inset(os);
|
||||||
@ -648,7 +650,8 @@ void output_command_layout(ostream & os, Parser & p, bool outer,
|
|||||||
if (p.next_token().cat() != catBegin)
|
if (p.next_token().cat() != catBegin)
|
||||||
break;
|
break;
|
||||||
p.get_token(); // eat '{'
|
p.get_token(); // eat '{'
|
||||||
begin_inset(os, "Argument\n");
|
// FIXME: Just a workaround
|
||||||
|
begin_inset(os, "Argument 999\n");
|
||||||
os << "status collapsed\n\n";
|
os << "status collapsed\n\n";
|
||||||
parse_text_in_inset(p, os, FLAG_BRACE_LAST, outer, context);
|
parse_text_in_inset(p, os, FLAG_BRACE_LAST, outer, context);
|
||||||
end_inset(os);
|
end_inset(os);
|
||||||
@ -1601,6 +1604,7 @@ void parse_environment(Parser & p, ostream & os, bool outer,
|
|||||||
// Unfortunately LyX can't handle arguments of list arguments (bug 7468):
|
// Unfortunately LyX can't handle arguments of list arguments (bug 7468):
|
||||||
// It is impossible to place anything after the environment name,
|
// It is impossible to place anything after the environment name,
|
||||||
// but before the first \\item.
|
// but before the first \\item.
|
||||||
|
// FIXME: Adjust to format 446!
|
||||||
if (context.layout->latextype == LATEX_ENVIRONMENT) {
|
if (context.layout->latextype == LATEX_ENVIRONMENT) {
|
||||||
bool need_layout = true;
|
bool need_layout = true;
|
||||||
int optargs = 0;
|
int optargs = 0;
|
||||||
@ -1614,7 +1618,8 @@ void parse_environment(Parser & p, ostream & os, bool outer,
|
|||||||
context.check_layout(os);
|
context.check_layout(os);
|
||||||
need_layout = false;
|
need_layout = false;
|
||||||
}
|
}
|
||||||
begin_inset(os, "Argument\n");
|
// FIXME: Just a workaround
|
||||||
|
begin_inset(os, "Argument 999\n");
|
||||||
os << "status collapsed\n\n";
|
os << "status collapsed\n\n";
|
||||||
parse_text_in_inset(p, os, FLAG_BRACK_LAST, outer, context);
|
parse_text_in_inset(p, os, FLAG_BRACK_LAST, outer, context);
|
||||||
end_inset(os);
|
end_inset(os);
|
||||||
@ -1631,7 +1636,8 @@ void parse_environment(Parser & p, ostream & os, bool outer,
|
|||||||
context.check_layout(os);
|
context.check_layout(os);
|
||||||
need_layout = false;
|
need_layout = false;
|
||||||
}
|
}
|
||||||
begin_inset(os, "Argument\n");
|
// FIXME: Just a workaround
|
||||||
|
begin_inset(os, "Argument 999\n");
|
||||||
os << "status collapsed\n\n";
|
os << "status collapsed\n\n";
|
||||||
parse_text_in_inset(p, os, FLAG_BRACE_LAST, outer, context);
|
parse_text_in_inset(p, os, FLAG_BRACE_LAST, outer, context);
|
||||||
end_inset(os);
|
end_inset(os);
|
||||||
|
Loading…
Reference in New Issue
Block a user