MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: fit to page using inline postscript

  • To: mathgroup at
  • Subject: [mg32033] Re: fit to page using inline postscript
  • From: pbrandani at (pbrandani)
  • Date: Wed, 19 Dec 2001 04:29:20 -0500 (EST)
  • References: <9vche3$3ma$>
  • Sender: owner-wri-mathgroup at

pbrandani at (pbrandani) wrote in message news:<9vche3$3ma$1 at>...
> Is there a way to insert page breaks at set intervals to delimit
> sections of a large notebook output (mixed text/graphics)?
> and then use inline postscript instructions to have these individual
> sections fit a single page of output on a printer?
> Is the outlined scheme feasible? what combination of mathematica and
> postscript code should be used?


A safer route is to probably separate discrete units of output into
individual cells.  This isn't too hard to implement with a couple of
utility functions:

evaluateToOutputCell[input_] :=
  Cell[BoxData[ToBoxes[input]], "Output"]

evaluateToGraphicsCell[input_] :=
  Cell[GraphicsData["PostScript", DisplayString[input]], "Graphics",
      CellLabel -> StringJoin["From In[", ToString[$Line], "]="]] /;
    MatchQ[input, _Graphics | _Graphics3D | _SurfaceGraphics |
      _ContourGraphics | _DensityGraphics]

You then use these functions as wrappers to your inputs that generate
outputs.  Here is what they would look like for relatively simple inputs.

evaluateToOuputCell[Integrate[x, x]]

evaluateToGraphicsCell[Plot3D[Sin[x] Cos[y], {x, 0, 2 Pi}, {y, 0, 2 Pi}]]

If you want to specify that a page break be added, after a cell, you can
edit the functions above to include the option PageBreakBelow -> <boolean>
where <boolean> may be True or False.
e.g. CellPrint[Cell["**--**", PageBreakAbove -> True]]

  • Prev by Date: Re: Simplify
  • Next by Date: Re: spherical trigonometry question
  • Previous by thread: fit to page using inline postscript
  • Next by thread: Bump Function