MathGroup Archive 2007

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

Search the Archive

Creating boxes in text cells.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75533] Creating boxes in text cells.
  • From: Hatto von Aquitanien <abbot at AugiaDives.hre>
  • Date: Fri, 4 May 2007 04:16:40 -0400 (EDT)
  • Organization: Invisible Light

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?



  • Prev by Date: Re: averaging sublists of different lengths
  • Next by Date: Re: Re: MathPlayer???
  • Previous by thread: Mathematica/ Curvus Job Opportunity in the Philadelphia Area
  • Next by thread: Re: Creating boxes in text cells.