Re: Print out an Expression Letter by Letter on the same line
- To: mathgroup at smc.vnet.net
- Subject: [mg126221] Re: Print out an Expression Letter by Letter on the same line
- From: Bob Hanlon <hanlonr357 at gmail.com>
- Date: Thu, 26 Apr 2012 05:25:07 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201204250434.AAA06522@smc.vnet.net>
This hasn't been tested much but may be a start.
SetAttributes[slowPrint, HoldFirst];
slowPrint[expr_] := Module[
{k, len, in = ToString[expr],
nb = EvaluationNotebook[]},
len = StringLength[in];
k = 0;
While[k++ < len,
Pause[1/10];
NotebookWrite[nb, StringTake[in, k]];
SelectionMove[nb, All, Cell]]]
f[x] == Sin[x] // slowPrint
Bob Hanlon
On Wed, Apr 25, 2012 at 12:34 AM, Physics is Everything....Almost
<fizzycist at knology.net> wrote:
>
> I taught a course using Mathematica.....the problem I encountered with that was everything was all set to go, i.e. printed out completely..... and may have given the Students too much information all at once....
> I notice there is a Difference in watching an Instructor write an Expression on the Black board Letter by Letter....the mind has a chance to acclimate to what he is writing, etc....
> Hence, I wondered is there a way that I could get Mathematica to do that for me....example, Print out f[x] = Sin[x].....and be able to vary the Pause between letters until I find what is Optimum....
> I looked up Pause and Print , etc....with no Luck on how to put it on the same line....any suggestions?
> thanks....Jerry Blimbaum
>
- References:
- Print out an Expression Letter by Letter on the same line
- From: "Physics is Everything....Almost" <fizzycist@knology.net>
- Print out an Expression Letter by Letter on the same line