Re: Symbolize in the Notations Package
- To: mathgroup at smc.vnet.net
- Subject: [mg28190] Re: [mg28157] Symbolize in the Notations Package
- From: Jason Harris <jasonh at wolfram.com>
- Date: Tue, 3 Apr 2001 02:38:09 -0400 (EDT)
- References: <200104020618.CAA17297@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
At 2:18 am -0400 2/4/01, David Park wrote:
>Dear MathGroup,
>
>I have often tried to use the Notations package, but I always get stopped by
>the very first Symbolize example. It is something like
>
>Symbolize[Domain\[PartialD]] except that Domain is in script letters.
>
>If one tries to just type this (or click it from the characters palette)
>into the Symbolize statement (which I clicked in from the Notations palette)
>it does not work.
Yes. Unfortunately PartialD is an operator. It is necessary to use an
underlying TagBox structure to wrap the juxtaposed symbol and
operator in order that Mathematica can treat the object as a whole.
(Otherwise the underlying expressions just get too complex. You can,
and should, experiment with showing the underlying box expressions of
these examples using cmd-shift-E.)
>Later, in the Changing Precedences section of the Help a TagBox form of the
>expression is shown.
That was one of the points of that section. To demonstrate and
explain what was going on. I guess I didn't do a good job... :)
> But when I wrap that in DisplayForm and copy it into
>the Symbolize statement it also failed.
DisplayForm wraps a TagBox around the underlying expression, then
when you symbolize this you are symbolizing a different structure, so
that's probably why what you did there failed.
Basically the symbolize statement should look like the following underneath
Cell[BoxData[
RowBox[{"Symbolize", "[",
TagBox[
TagBox[
StyleBox[
RowBox[{
"Domain", "\[PartialD]"}],
ZeroWidthTimes->True],
DomainD],
NotationBoxTag,
TagStyle->"NotationTemplateStyle"], "]"}]], "Input"]
When using the composed symbol in an expression you must ensure that
the underlying box structure is
TagBox[
StyleBox[
RowBox[{
"Domain", "\[PartialD]"}],
ZeroWidthTimes->True],
DomainD]
You could set up an input alias if you want. To do this copy and
paste the following into Mathematica. Evaluate the resulting
expression after you have loaded the Notation package.
Cell[BoxData[
RowBox[{"AddInputAlias", "[",
RowBox[{"\"\<domD\>\"", "\[Rule]",
TagBox[
TagBox[
StyleBox[
RowBox[{"Domain", "\[PartialD]"}],
ZeroWidthTimes->True],
DomainD],
NotationBoxTag,
TagStyle->"NotationTemplateStyle"]}], "]"}]], "Input"]
>
>I can copy the Symbolize statement from the Help and that works. Can anyone
>show me how to enter the statement from scratch?
Cheers,
Jason
- References:
- Symbolize in the Notations Package
- From: "David Park" <djmp@earthlink.net>
- Symbolize in the Notations Package