I have tried to create some Notation declarations as follows
<< Notation`
Notation[Subscript[x_, i_] \[DoubleLongLeftRightArrow] x[i]]
Notation[OverBar[x_] \[DoubleLongLeftRightArrow] mean[x]]
Mathematica9 throws the following errors for the declarations
Notation::noexbtag: The external representation Subscript[x_, y_] does not have an embedded TemplateBox with tag NotationTemplateTag. The Notation statement Notation[Subscript[x_, y_][DoubleLongLeftRightArrow]x[y]] may not have been entered using the palette, or the embedded TemplateBox may have been deleted. The embedded TemplateBox ensures correct parsing and retention of proper styling and grouping information. >>
and
Notation::noexbtag: The external representation Overscript[x_, ] does not have an embedded TemplateBox with tag NotationTemplateTag. The Notation statement Notation[Overscript[x, _][DoubleLongLeftRightArrow]mean[x]] may not have been entered using the palette, or the embedded TemplateBox may have been deleted. The embedded TemplateBox ensures correct parsing and retention of proper styling and grouping information. >>
respectively.
It is not really clear to me what is going on. I read the documentation for TemplateBox
and looked up NotationTemplateTag
which seems to have been replaced by ParsedBoxWrapper
. After following some related function I thought the following might be what is required:
Notation[ToBoxes[Subscript[x_, y_]]\[DoubleLongLeftRightArrow] x[y]]
Notation[ToBoxes[OverBar[x_]] \[DoubleLongLeftRightArrow] mean[x]]
or perhaps
Notation[MakeBoxes[Subscript[x_, y_]]\[DoubleLongLeftRightArrow] x[y]]
Notation[MakeBoxes[OverBar[x_]] \[DoubleLongLeftRightArrow] mean[x]]
but both of those throw errors as well. So what is the right way to declare these notations? I am aware that setting up subscripts as a notation for function application is not something you would want to do in practice, but I am just experimenting.
Also do I actually need to import the Notation package or Notation
buit-in with Mathematica9?
ParsedBoxWrapper
is covered there for usingNotation
constructs without the palette. $\endgroup$