Using Utilities`Notation` in a package
- To: mathgroup at smc.vnet.net
- Subject: [mg16131] Using Utilities`Notation` in a package
- From: "Nicolas B.E. Sawyer" <nbes at eee.nott.ac.uk>
- Date: Sat, 27 Feb 1999 03:23:03 -0500
- Organization: University of Nottingham
- References: <7b36fa$23r@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
1) How do I inlude this:-
\!\(<< Utilities`Notation`; \nSymbolize[a\_n]; \)
\!\(\*
RowBox[{
RowBox[{\(a[y_]\), ":=",
RowBox[{"StandardForm", "[",
RowBox[{
StyleBox["Subsuperscript",
"MR"],
StyleBox["[",
"MR"],
RowBox[{
StyleBox["a",
"TI"],
StyleBox[",",
"MR"], " ",
StyleBox["n",
"TI"],
StyleBox[",",
"TI"],
StyleBox["y",
"TI"]}],
StyleBox["]",
"MR"]}],
StyleBox["]",
"MR"]}]}],
StyleBox[";",
"MR"], "\n",
\(a[y_Real] := \(Interpolation[Table[{x, x^2}, {x, 0, 10}]]\)[y]\),
";",
\(a[y_Integer] := \(Interpolation[Table[{x, x^2}, {x, 0,
10}]]\)[y]\),
";", "\n", \(Notation[a\_n\%y_ \[DoubleLeftRightArrow] a[y_]]\)}]\)
in a package, so that
In[89]:=
\!\(a\_n\%x\n
a\_n\%4.\n
a\_n\%4\)
gives
Out[89]//StandardForm=
\!\(\*
InterpretationBox[\(a\_n\%x\),
Subsuperscript[ a, n, x],
Editable->False]\)
Out[90]=
16.
Out[91]=
16
2) How do I get symbol::usage to output
My notation for a [x].
n
in response to
\!\(\(?a\_n\%x\)\)
... can it be shown in StandardForm ?
Thanks
--
Nicolas B.E. Sawyer
Department of Electrical and Electronic Engineering,
University of Nottingham,
University Park,
Nottingham,
NG7 2RD.
Tel: +44 115 9515151 ext 12028
Fax: +44 115 9515616
E-mail: nbes at eee.nottingham.ac.uk