MathGroup Archive 2010

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

Search the Archive

Re: Creating a hybrid cell

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109204] Re: Creating a hybrid cell
  • From: "David Park" <djmpark at comcast.net>
  • Date: Sat, 17 Apr 2010 06:02:53 -0400 (EDT)

Put the Dynamic[x] in an Inline Cell within the Text cell. Select it and
Evaluate it in place.

Then when you evaluate x=5, or Clear[x] elsewhere in the notebook the value
in the Text cell should change. Anyway, it works for me.


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/  



From: Murray Eisenberg [mailto:murray at math.umass.edu] 


I cannot get this to work: I created two new Input cells:

   Dynamic[x]
   x = 5

Then I created a Text cell:

   the value is  as you can see

and into it, between "is " and " as" pasted the Dynamic[x] expression 
copied from the first of the two Input cells -- even using Ctrl-( to 
create explicitly an Inline cell there.

Still, selecting that pasted expression and using the menu item 
Evaluation > Evaluate in place seems to do nothing.

What am I doing wrong?

Also, if somehow this can be made to work, would the value of Dynamic[x] 
in the Inline cell then automatically update when the value of x 
changes?  (My understanding of Dynamic tells me it should.)


On 4/14/2010 11:13 PM, Geico Caveman wrote:
> On 2010-04-07 04:24:40 -0700, Jason Alexander<jalex at lse.ac.uk>  said:
>
>> A better solution would be the following: create a text cell and enter
>> something like "Previously we calculated the value of X1 to be ", then
>> insert an inline cell (ctrl+9, I believe). In the inline cell, enter
>> "Dynamic[X1]", select and evaluate in place.
>>
>> The inline cell, although it appears inside of a text cell, will
>> automatically update to reflect the current value of X1. The previous
>> solution only captures the value of X1 at the time of evaluation.
>>
>> Jason
>
> That is what I ultimately did. Thanks.
>

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305




  • Prev by Date: Re: Where is the code for DistanceMatrix?
  • Next by Date: Re: Using package functions in Manipulate/DynamicModule
  • Previous by thread: Re: Creating a hybrid cell
  • Next by thread: Re: Creating a hybrid cell