mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-13 20:09:59 +00:00
LyX does not support optional arguments of ref commands
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37730 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2bb88c63e0
commit
29ee44e84c
@ -2348,13 +2348,22 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
|
|||||||
}
|
}
|
||||||
|
|
||||||
else if (is_known(t.cs(), known_ref_commands)) {
|
else if (is_known(t.cs(), known_ref_commands)) {
|
||||||
context.check_layout(os);
|
string const opt = p.getOpt();
|
||||||
begin_command_inset(os, "ref", t.cs());
|
if (opt.empty()) {
|
||||||
// LyX cannot handle newlines in a latex command
|
context.check_layout(os);
|
||||||
// FIXME: Move the substitution into parser::getOpt()?
|
begin_command_inset(os, "ref", t.cs());
|
||||||
os << subst(p.getOpt(), "\n", " ");
|
// LyX cannot handle newlines in a latex command
|
||||||
os << "reference " << '"' << subst(p.verbatim_item(), "\n", " ") << '"' << "\n";
|
// FIXME: Move the substitution into parser::getOpt()?
|
||||||
end_inset(os);
|
os << "reference \""
|
||||||
|
<< subst(p.verbatim_item(), "\n", " ")
|
||||||
|
<< "\"\n";
|
||||||
|
end_inset(os);
|
||||||
|
} else {
|
||||||
|
// LyX does not support optional arguments of ref commands
|
||||||
|
handle_ert(os, t.asInput() + '[' + opt + "]{" +
|
||||||
|
p.verbatim_item() + "}", context);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (use_natbib &&
|
else if (use_natbib &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user