Re: StylePrint problem

*To*: mathgroup at smc.vnet.net*Subject*: [mg20473] Re: StylePrint problem*From*: "Allan Hayes" <hay at haystack.demon.co.uk>*Date*: Wed, 27 Oct 1999 02:04:43 -0400*References*: <7v3apq$5l1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Dana DeLouis <dana2 at email.msn.com> wrote in message news:7v3apq$5l1 at smc.vnet.net... > Hello. I am trying to learn Programming in Mathematica 4. I am also studying math > problems. > If I know that I am going to do 30+ problems at the end of a chapter, I > want to avoid typing in the text..Problem #1, Problem #2, etc > > I found this example in the "Tour of Mathematica" section of "The > Mathematica Book." > > Do[StylePrint["Problem # " <> ToString[i], "Section"], {i, 10}] > > Which works...kind of. After the above prints out correctly, I move the > cursor between say Problem #4, and Problem #5 to begin solving Problem #4. > As soon as I hit enter, all the output from Problem #5, down to the last > one is deleted! > > Does anyone do anything similar? Is there another command that I should be > using instead. I have looked for a long time. Thank you for any insight / > solution. Dana > > Dana, This seems to solve your poblem: Do[StylePrint["Problem # " <> ToString[i], "Section", CellAutoOverwrite -> False], {i, 2}] -- Allan --------------------- Allan Hayes Mathematica Training and Consulting Leicester UK www.haystack.demon.co.uk hay at haystack.demon.co.uk Voice: +44 (0)116 271 4198 Fax: +44 (0)870 164 0565