}
-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:
- InPreamble styles should be written to the premable as many times as the
user requests them, even if it results in duplicate commands.
+- Correctly protect the \pagebreak command when needed (bug 10092).
+
* LYX2LYX