Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

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


  • 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