Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9806

Re: Print out an Expression Letter by Letter on the same line

From Bob Hanlon <hanlonr357@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Print out an Expression Letter by Letter on the same line
Date 2012-04-26 09:25 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jnb4al$5bo$1@smc.vnet.net> (permalink)
References <201204250434.AAA06522@smc.vnet.net>

Show all headers | View raw


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@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
>

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Print out an Expression Letter by Letter on the same line Bob Hanlon <hanlonr357@gmail.com> - 2012-04-26 09:25 +0000

csiph-web