mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 06:15:16 +00:00
\\pagebreak is a fragile command in general
As such, it shall be protected in moving arguments, such as sections. Fixes bug #10092. (cherry picked from commit 86ee2699c30b63e5b4de3ad725519756d17aec2c)
This commit is contained in:
parent
fb5780d203
commit
8f858a5785
@ -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) {
|
switch (params_.kind) {
|
||||||
case InsetNewpageParams::NEWPAGE:
|
case InsetNewpageParams::NEWPAGE:
|
||||||
os << "\\newpage{}";
|
os << "\\newpage{}";
|
||||||
break;
|
break;
|
||||||
case InsetNewpageParams::PAGEBREAK:
|
case InsetNewpageParams::PAGEBREAK:
|
||||||
|
if (runparams.moving_arg)
|
||||||
|
os << "\\protect";
|
||||||
os << "\\pagebreak{}";
|
os << "\\pagebreak{}";
|
||||||
break;
|
break;
|
||||||
case InsetNewpageParams::CLEARPAGE:
|
case InsetNewpageParams::CLEARPAGE:
|
||||||
|
@ -47,7 +47,7 @@ What's new
|
|||||||
|
|
||||||
* DOCUMENT INPUT/OUTPUT
|
* DOCUMENT INPUT/OUTPUT
|
||||||
|
|
||||||
|
- Correctly protect the \pagebreak command when needed (bug 10092).
|
||||||
|
|
||||||
* LYX2LYX
|
* LYX2LYX
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user