The name of the menu item Insert ► Page Break
is a bit misleading. According to the Documentation page for ShowPageBreaks
, manual page breaking is controlled via the PageBreakAbove
and PageBreakBelow
options of Cell
. This conclusions is further supported from the fact that when you use Insert ► Page Break
menu item you actually insert the following Cell
at the insertion point:
Cell["", "PageBreak",
PageBreakBelow->True]
But why this Cell
is displayed even when you set ShowPageBreaks -> False
? It is because in the "Core.nb" basic stylesheet the following definition is given for the "PageBreak"
style:
Cell[StyleData["PageBreak"],
Editable->False,
CellFrame->1,
CellMargins->{{0, 0}, {1, 1}},
CellElementSpacings->{"CellMinHeight"->1,
"ClosedCellHeight"->1},
CellOpen->False,
PageBreakBelow->True,
CellFrameMargins->0,
CellSize->{Inherited, 2},
Background->GrayLevel[0.5]]
Note that under this you can find more specific definition which is used only in the "Printout"
style environment and which makes Cell
s with this style completely invisible when you switch to the "Print Preview..." mode (which by default uses the "Printout"
style environment):
Cell[StyleData["PageBreak", "Printout"],
CellFrame->0,
ShowCellBracket->False,
Background->None]
So the conclusion is that what is displayed is NOT a page break but the inserted Cell
which contains information about it and this display differs substantially from what you see as page breaks when you set ShowPageBreaks -> True
or use the File ► Printing Settings ► Show Page Breaks
menu item. So what can be made? First of all, you can set private style definition for the "PageBreak"
style which will affect your Notebook only. If you did not added any private styles into your Notebook, you can evaluate the following code which will make all Cell
s with this style completely transparent (if you did, existing private style definitions will be overwritten):
SetOptions[EvaluationNotebook[],
StyleDefinitions ->
Notebook[{Cell[StyleData[StyleDefinitions -> "Default.nb"]],
Cell[StyleData["PageBreak"], FrontEnd`CellFrameStyle -> Opacity[0]]},
StyleDefinitions -> "PrivateStylesheetFormatting.nb"]]
Evaluate this to return to the defaults:
SetOptions[EvaluationNotebook[], StyleDefinitions -> "Default.nb"]
With this solution the File ► Printing Settings ► Show Page Breaks
menu item and the ShowPageBreaks
option will still show/hide the page breaks defined in the Cell
s added via Insert ► Page Break
menu item but these Cell
s themselves will be invisible.