Re: Programming page break
- To: mathgroup at smc.vnet.net
- Subject: [mg9425] Re: Programming page break
- From: "P.J. Hinton" <paulh>
- Date: Wed, 5 Nov 1997 01:56:40 -0500
- Organization: Wolfram Research, Inc.
- Sender: owner-wri-mathgroup at wolfram.com
I'm assuming that you want the page break to apply only to certain cells. If not, it would probably be better just to set the Cell option PageBreakAbove -> True at the global or notebook level. Try this one on for size. This is a function that you use as a wrapper to whatever you are evaluating. It takes whatever options you want and places them in the resulting output cell. embedOptions[expr_,opts___?OptionQ]:= CellPrint[Cell[BoxData[ToBoxes[expr]],"Output",opts]] Here is a test of the function: embedOptions[Integrate[x^3 - x, x], PageBreakAbove -> True] Here is what I get when I evaluate the test in a notebook: Cell[BoxData[ RowBox[{"embedOptions", "[", RowBox[{ RowBox[{"\[Integral]", RowBox[{ RowBox[{"(", RowBox[{ SuperscriptBox["x", RowBox[{"3", " "}]], "-", " ", "x"}], ")"}], RowBox[{"\[DifferentialD]", "x"}]}]}], ",", RowBox[{"PageBreakAbove", " ", "\[Rule]", " ", "True"}]}], "]"}]], "Input", CellLabel->"In[25]:="] Cell[BoxData[ RowBox[{ RowBox[{"-", FractionBox[ SuperscriptBox["x", "2"], "2"]}], "+", FractionBox[ SuperscriptBox["x", "4"], "4"]}]], "Output", PageBreakAbove->True] Note that the PageBreakAbove option appears in the output cell. -- P.J. Hinton Mathematica Programming Group paulh at wolfram.com Wolfram Research, Inc. http://www.wolfram.com/~paulh/