RE: StylePrint problem

*To*: mathgroup at smc.vnet.net*Subject*: [mg20483] RE: [mg20402] StylePrint problem*From*: "Ersek, Ted R" <ErsekTR at navair.navy.mil>*Date*: Wed, 27 Oct 1999 02:04:48 -0400*Sender*: owner-wri-mathgroup at wolfram.com

Dana DeLouis found this example in the "Tour of Mathematica" section of "The Mathematica Book." Do[StylePrint["Problem # " <> ToString[i], "Section"], {i, 10}] After the above prints out correctly, she moves the cursor between say Problem #4, and Problem #5 to begin solving Problem #4. As soon as she evaluates an input cell between Problem #4, Problem #5, all the cells from Problem #5, down to the last are deleted! --------------- SOLUTION: I don't know if that's a bug in StylePrint, but I think the next line will do what you want without trouble. Do[NotebookWrite[nb, Cell[StringJoin["Problem #",ToString[i]],"Section"]],{i,10}] -------------------- Regards, Ted Ersek For Mathematica tips, tricks see http://www.dot.net.au/~elisha/ersek/Tricks.html