Re: Inline Formulas and Answers
- To: mathgroup at smc.vnet.net
- Subject: [mg50812] Re: Inline Formulas and Answers
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Wed, 22 Sep 2004 00:11:29 -0400 (EDT)
- Organization: The University of Western Australia
- References: <cidt1c$br9$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <cidt1c$br9$1 at smc.vnet.net>,
Gregory Lypny <gregory.lypny at videotron.ca> wrote:
> I've inserted a formula inside a text cell using the CRTL-( and CRTL-)
> key combinations. Is it possible to display the results of the
> formula's calculation in the text
Yes. Suppose you enter
x = 5;
and then have the following text cell
Cell[TextData[{
"The value of ",
Cell[BoxData[FormBox["x", TraditionalForm]]],
" is ",
Cell[BoxData[FormBox["x", TraditionalForm]]],
"."}],
"Text"]
If you select the second x and do
Kernel | Evaluation | Evaluate in Place
or use the keyboard shortcut, the value of x will be updated.
> as well and have it update automatically if the variables are changed?
This process is, AFAIK, manual. There are, however, special objects that
do update automatically, that can be created using
Input | Create Automatic Numbering Object...
Input | Create Value Display Object...
though such objects do not appear to function properly if they are
inside inline formula cells.
Nor does there appear to be a way to automate the above process using
"Create Value Display Object..." for the variable x, even after adding a
CellTag to the defining cell.
Cheers,
Paul
--
Paul Abbott Phone: +61 8 6488 2734
School of Physics, M013 Fax: +61 8 6488 1014
The University of Western Australia (CRICOS Provider No 00126G)
35 Stirling Highway
Crawley WA 6009 mailto:paul at physics.uwa.edu.au
AUSTRALIA http://physics.uwa.edu.au/~paul