MathGroup Archive 1999

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

Search the Archive

Re: Inline Equations in Text Cells

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15390] Re: Inline Equations in Text Cells
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Tue, 12 Jan 1999 03:14:52 -0500
  • Organization: University of Western Australia
  • References: <779dk6$bid@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Roger Miskowicz wrote:
 
> I've tried to use inline equations within a text cell (properties set to
> evaluate) that need to have the result shown in some text e.g. The
> input "2 squared = 2^2."  when evaluated should be:  "2 squared = 4."
> 
> But I get strange results like
> 4.00 2 squared =

Don't set Cell | Cell Properties to Cell Evaluatable.  Instead, here is
a text cell with some text and an inline equation:

Cell[TextData[{
  "This is a text cell with an inline equation, ",
  Cell[BoxData[
      FormBox[
        RowBox[{
          SuperscriptBox["2", "2"], "=", 
          SuperscriptBox["2", "2"]}], TraditionalForm]]],
  "."
}], "Text"]

If you paste this into a Notebook and select the expression after the =
sign, and then do Kernel | Evaluation | Evaluation in Place you will
get the desired behaviour and the text cell will now become

Cell[TextData[{
  "This is a text cell with an inline equation, ",
  Cell[BoxData[
      FormBox[
        RowBox[{
          SuperscriptBox["2", "2"], "=", 
          FormBox["4",
            "TraditionalForm"]}], TraditionalForm]]],
  "."
}], "Text"]

If you do a search on "Evaluate In Place" at DejaNews 
<http://www.dejanews.com/> under news:comp.soft-sys.math.mathematica,
you will find postings on this topic.

Cheers,
	Paul 
____________________________________________________________________ 
Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia            Nedlands WA  6907       
mailto:paul at physics.uwa.edu.au  AUSTRALIA                       
http://www.physics.uwa.edu.au/~paul

            God IS a weakly left-handed dice player
____________________________________________________________________


  • Prev by Date: Re: A REAL TOUGH PROBLEM
  • Next by Date: Re: controlling format of numbers in plot labels
  • Previous by thread: Inline Equations in Text Cells
  • Next by thread: ExtendGraphic