MathGroup Archive 2000

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

Search the Archive

Notation for atomic objects

  • To: mathgroup at smc.vnet.net
  • Subject: [mg22430] Notation for atomic objects
  • From: Dr Dan <drdanw at my-deja.com>
  • Date: Wed, 1 Mar 2000 00:40:34 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

How can I create a notation for atomic objects? (Assume I have reasons
to not use the Notation package.)  Creating a notation for subscripted
objects is easy:

Format[Effort[n__]] := Subscript[\[ScriptE],n];
MakeExpression[SubscriptBox["\[ScriptE]", nd_], StandardForm] :=
  MakeExpression[RowBox[{"Effort", "[", nd, "]"}],
   StandardForm];

Allows me to use Effort[n] and subscripted \[ScriptE] interchangably.
This also ensures that the FullForm of the subscripted \[ScriptE] is
Effort[] (which is necessary for pattern matching elsewhere in my
package.)

But what if I want to have the same relationship between a symbol Time
and \[DoubleStruckT] ?  The subscripted notation above comes wrapped in
a SubscriptBox, but the atomic notation of \[DoubleStruckT] is not
wrapped in any kind of box (that I can tell).  Also, if I do get it to
work with single symbols, what happens when that symbol appears within
a RowBox, as in the expression

\[DoubleStruckT] + 1

?



Sent via Deja.com http://www.deja.com/
Before you buy.


  • Prev by Date: newbie, problems with loading packages
  • Next by Date: Re: generating all combinations.
  • Previous by thread: Re: newbie, problems with loading packages
  • Next by thread: Re: ListPlot with missing values