From: Geico Caveman on
I am doing a calculation. Let us say that the result of the calculation
is in variable X1 (which was extracted from a list using [[]] type
constructs - unimportant, but it is a result).

I want to add text cells later in the notebook that refer to the value
of X1 (not the string "X1"). I have tried doing this with the use of
inline cells crtl + ( and ctrl + ), but when I evaluate the notebook, I
just get something like :

"We calculated X1 earlier to be X1." instead of the expected "We
calculated X1 earlier to be <<value of X1>>".

I am trying to use Mathematica as a tool to create a handout for a class.

I am not a Mathematica newbie, though I am new to using it for any
purpose other than as a calculation program.

Any ideas if this is possible ?

From: David Bailey on
Geico Caveman wrote:
> I am doing a calculation. Let us say that the result of the calculation
> is in variable X1 (which was extracted from a list using [[]] type
> constructs - unimportant, but it is a result).
>
> I want to add text cells later in the notebook that refer to the value
> of X1 (not the string "X1"). I have tried doing this with the use of
> inline cells crtl + ( and ctrl + ), but when I evaluate the notebook, I
> just get something like :
>
> "We calculated X1 earlier to be X1." instead of the expected "We
> calculated X1 earlier to be <<value of X1>>".
>
> I am trying to use Mathematica as a tool to create a handout for a class.
>
> I am not a Mathematica newbie, though I am new to using it for any
> purpose other than as a calculation program.
>
> Any ideas if this is possible ?
>
This question is rather vague, but I have two suggestions:

1) Post some actual code that doesn't do what you expect, for us to look at.

2) Learn to do real Mathematica programming. What I mean is that most of
the cells in your notebook should do nothing but define functions (that
typically call each other). Then at the bottom of the notebook, you have
a few cells (often just one) that actually calls one of the functions to
do the calculation. It is a bit hard to figure out what you are doing,
but I don't think your work is organised that way.

David Bailey
http://www.dbaileyconsultancy.co.uk

From: dh on
On 05.04.2010 14:00, Geico Caveman wrote:
> I am doing a calculation. Let us say that the result of the calculation
> is in variable X1 (which was extracted from a list using [[]] type
> constructs - unimportant, but it is a result).
>
> I want to add text cells later in the notebook that refer to the value
> of X1 (not the string "X1"). I have tried doing this with the use of
> inline cells crtl + ( and ctrl + ), but when I evaluate the notebook, I
> just get something like :
>
> "We calculated X1 earlier to be X1." instead of the expected "We
> calculated X1 earlier to be<<value of X1>>".
>
> I am trying to use Mathematica as a tool to create a handout for a class.
>
> I am not a Mathematica newbie, though I am new to using it for any
> purpose other than as a calculation program.
>
> Any ideas if this is possible ?
>

Hi geico,
you could e.g. assuming x already has a value, first write your text like:
x=x
then select the second x and choose "Evaluate in Place" (from the menu
"Evaluation" or by right click)
Daniel

--

Daniel Huber
Metrohm Ltd.
Oberdorfstr. 68
CH-9100 Herisau
Tel. +41 71 353 8585, Fax +41 71 353 8907
E-Mail:<mailto:dh(a)metrohm.com>
Internet:<http://www.metrohm.com>


From: David Park on
Start a Text cell and type: The value of x is Dynamic[x].

When you do this put the first x and Dynamic[x] in Inline Cells. Use Ctrl+9
to start an Inline Cell.

Evaluate in place the Dynamic[x] Inline Cell.

Now evaluate x = 6 somewhere in the notebook and it should be reflected in
the Text statement. Evaluate Clear[x] and it should return to a plain x.


David Park
djmpark(a)comcast.net
http://home.comcast.net/~djmpark/



From: Geico Caveman [mailto:spammers-go-here(a)spam.invalid]

I am doing a calculation. Let us say that the result of the calculation
is in variable X1 (which was extracted from a list using [[]] type
constructs - unimportant, but it is a result).

I want to add text cells later in the notebook that refer to the value
of X1 (not the string "X1"). I have tried doing this with the use of
inline cells crtl + ( and ctrl + ), but when I evaluate the notebook, I
just get something like :

"We calculated X1 earlier to be X1." instead of the expected "We
calculated X1 earlier to be <<value of X1>>".

I am trying to use Mathematica as a tool to create a handout for a class.

I am not a Mathematica newbie, though I am new to using it for any
purpose other than as a calculation program.

Any ideas if this is possible ?



From: Geico Caveman on
On 2010-04-06 04:24:51 -0700, dh <dh(a)metrohm.com> said:

> On 05.04.2010 14:00, Geico Caveman wrote:
>> I am doing a calculation. Let us say that the result of the calculatio=
n
>> is in variable X1 (which was extracted from a list using [[]] type
>> constructs - unimportant, but it is a result).
>>
>> I want to add text cells later in the notebook that refer to the value
>> of X1 (not the string "X1"). I have tried doing this with the use of
>> inline cells crtl + ( and ctrl + ), but when I evaluate the notebook, =
I
>> just get something like :
>>
>> "We calculated X1 earlier to be X1." instead of the expected "We
>> calculated X1 earlier to be<<value of X1>>".
>>
>> I am trying to use Mathematica as a tool to create a handout for a cla=
ss.
>>
>> I am not a Mathematica newbie, though I am new to using it for any
>> purpose other than as a calculation program.
>>
>> Any ideas if this is possible ?
>>
>
> Hi geico,
> you could e.g. assuming x already has a value, first write your text li=
ke:
> x=x
> then select the second x and choose "Evaluate in Place" (from the menu
> "Evaluation" or by right click)
> Daniel

Perfect. Thanks :)