MathGroup Archive 2006

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

Search the Archive

Re: How to generate sections, subsections, etc. automatically?


Will this do the trick:

calc[n_] := Integrate[x^n, x];

mycalculations[i_] := Module[{},
    CellPrint[Cell["Calulation Number
    " <> ToString[i], "Section", TextAlignment -> Center]];
    CellPrint[Cell["The value for parameter i in this calculation is: i
=
         " <> ToString[i], "Text"]];
    CellPrint[Cell[BoxData[ToBoxes[calc[i]]],
"Output"]];]Table[mycalculations[i], {i, 1, 4}];

Cheers,

Brian


wandering.the.cosmos at gmail.com wrote:
> My code gives multiple output, each of which I wish to put under a
> different section. Is it possible to generate a section within a
> notebook automatically, without using the toolbar to do so?
> 
> Thanks!


  • Prev by Date: Re: Division by Zero (Error Handling)
  • Next by Date: Re: Function argument
  • Previous by thread: How to generate sections, subsections, etc. automatically?
  • Next by thread: Re: How to generate sections, subsections, etc. automatically?