mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
\\pagebreak is a fragile command in general
As such, it shall be protected in moving arguments, such as sections. Fixes bug #10092.
This commit is contained in:
parent
282fe102f3
commit
7628f0bf97
@ -212,13 +212,15 @@ ColorCode InsetNewpage::ColorName() const
|
||||
}
|
||||
|
||||
|
||||
void InsetNewpage::latex(otexstream & os, OutputParams const &) const
|
||||
void InsetNewpage::latex(otexstream & os, OutputParams const & runparams) const
|
||||
{
|
||||
switch (params_.kind) {
|
||||
case InsetNewpageParams::NEWPAGE:
|
||||
os << "\\newpage{}";
|
||||
break;
|
||||
case InsetNewpageParams::PAGEBREAK:
|
||||
if (runparams.moving_arg)
|
||||
os << "\\protect";
|
||||
os << "\\pagebreak{}";
|
||||
break;
|
||||
case InsetNewpageParams::CLEARPAGE:
|
||||
|
Loading…
Reference in New Issue
Block a user