MathGroup Archive 2007

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

Search the Archive

Re: Prefix Forms on the BasicMath Palette

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84227] Re: Prefix Forms on the BasicMath Palette
  • From: Norbert Marxer <marxer at mec.li>
  • Date: Fri, 14 Dec 2007 07:04:37 -0500 (EST)
  • References: <fjj1dr$fvp$1@smc.vnet.net>

On 10 Dez., 10:38, "David Park" <djmp... at comcast.net> wrote:
> On the BasicMath Palette there are two forms that appear to have sub and
> super scripts in a prefix position. They are the two items on the right in
> the next to last row.
>
> These do not appear to work at all, and there does not appear to be
> corresponding names for them. Does anyone how these work and what one can do
> with them?
>
> David Park
>
> djmp... at comcast.net
>
>  <http://home.comcast.net/~djmpark>http://home.comcast.net/~djmpark

Hello

The BasicMathInput Palette works just fine on my system. With Show
Expression (Ctrl+Shift+E) you can see the content of the cells:

Cell[BoxData[
 RowBox[{
  SuperscriptBox["\[InvisiblePrefixScriptBase]", "\[Placeholder]"], "\
[Placeholder]"}]], "Input"]

Cell[BoxData[
 RowBox[{
  SubscriptBox["\[InvisiblePrefixScriptBase]", "\[Placeholder]"],
  "\[Placeholder]"}]], "Input"]

If you try to evaluate this cell, Mathematica interprets the input as
a multiplication (between a subscripted or superscripted
"InvisiblePrefixScriptBase" and a second factor). Mathematica does not
know how to handle this multiplication.

I think that these constructs are mainly useful in Text cells for
documentation etc. But nevertheless, if you want Mathematica to handle
such an expression, you can define e.g. something similar to the
following:

MakeExpression[
  RowBox[{SuperscriptBox["\[InvisiblePrefixScriptBase]", x_], y_}],
  StandardForm] :=
   MakeExpression[
  RowBox[{"mySuperscriptFunction", "[", x, ",", y, "]"}],
  StandardForm]

MakeExpression[
  RowBox[{SubscriptBox["\[InvisiblePrefixScriptBase]", x_], y_}],
  StandardForm] :=
   MakeExpression[
  RowBox[{"mySubscriptFunction", "[", x, ",", y, "]"}], StandardForm]

You can now define the functions mySuperscriptFunction and
mySubscriptFunction as you like and Mathematica knows how to interpret
your input.

Best Regards
Norbert Marxer









  • Prev by Date: Re: Have I found a bug?
  • Next by Date: Re: Unwanted Button
  • Previous by thread: Re: Prefix Forms on the BasicMath Palette
  • Next by thread: Binary Vector Manipulation