MathGroup Archive 1999

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

Search the Archive

RE: StylePrint problem


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


  • Prev by Date: Re: Re: how to avoid numeric error
  • Next by Date: Re: A simple question? Please help
  • Previous by thread: Re: StylePrint problem
  • Next by thread: Re: StylePrint problem