MathGroup Archive 2007

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

Search the Archive

Re: Creating boxes in text cells.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75559] Re: [mg75533] Creating boxes in text cells.
  • From: Carl Woll <carlw at wolfram.com>
  • Date: Sat, 5 May 2007 06:00:22 -0400 (EDT)
  • References: <200705040816.EAA04982@smc.vnet.net>

Hatto von Aquitanien wrote:

>This may seem trivial, but it has a big impact on how usable Mathematica is
>for me.  I currently use a pallet to paste:
>
>Cell[BoxData[
>    FormBox[
>      FrameBox["\[Placeholder]",
>        BoxMargins->{{0.2, 0.2}, {0.4, 0.4}}], TraditionalForm]]]
>
>into my text cells, and leave all my mathematical expressions wrapped up in
>frame boxes.  It may be ugly, but it is consistent.
>
>I want to be able to type a paragraph of mathematical prose containing both
>English text and mathematical expressions of one line height (i.e.,
>in-line).  If I type `\[Epsilon]', for example, it is immediately replaced
>by the character symbol for the Greek letter.  If I type `yCtrl+^x' in an
>otherwise empty text cell, the following results when I `Ctrl+Shift+e' the
>cell: 
>
>Cell[TextData[Cell[BoxData[
>    FormBox[
>      SuperscriptBox["y", "x"], TraditionalForm]]]], "Text"]
>
>This is pretty much what I want.  The font in which the "x" is displayed is
>different from an x which would be displayed if I simply type the
>character 'x'.  That, in itself, is a good thing.  Many symbols appearing
>in in-line expressions are displayed differently from their "raw text"
>counterparts.  If I type `x=y', the result is a "raw text" sequence of
>characters:
>
>Cell["x=y", "Text"]
>
>This is _not_ what I want.  I want what is displayed by the cell containing
>the following.
>
>Cell[TextData[Cell[BoxData[
>    FormBox[
>      RowBox[{"x", "=", "y"}], TraditionalForm]]]], "Text"]
>
>I can do something such as `xCtrl+^', and then delete the "\[Placeholder]"
>in the resulting expression.  That leaves me with:
>
>Cell[TextData[Cell[BoxData[
>    FormBox["x", TraditionalForm]]]], "Text"]
>
>which I can then extend to:
>
>Cell[TextData[Cell[BoxData[
>    FormBox[
>      RowBox[{"x", "=", "y"}], TraditionalForm]]]], "Text"]
>
>by typing in the natural fashion.
>
>Is there a way I can get "Cell[BoxData[FormBox["\[Placeholder]",
>TraditionalForm]]]" to appear on at the entry cursor using a key
>combination similar to what happens if I type `Ctrl+^'?
>
>If I type out the \!(...\) representation, it does not "snap into place" as
>rendered text.  Nor do I know of any way to persuade it to do so.
>
>Also, if I have already typed something such as "y=x", and decide I want it
>displayed as expression text rather than raw text, is there a way to
>highlight it, and "wrap" it in the appropriate boxes?
>  
>

If I understand your question correctly, then you can use the key 
combination Ctrl-( to start a typeset math expression in a text cell, 
and then Ctrl-) to end the typeset math expression. You can also 
highlight your math expression and then type Ctrl-(.

Carl Woll
Wolfram Research


  • Prev by Date: Re: GUI kit basic instructions
  • Next by Date: Re: Problem with reading version 4.2 DumpSave files,...
  • Previous by thread: Creating boxes in text cells.
  • Next by thread: Re: Creating boxes in text cells.