Skip to main content

Simplistic Notation example


Notation package looks poorly documented.


For example, GridBoxDividers option is not documented at all.


Can someone give me a simplistic example of a Notation set up? For example, suppose I wish to represent


MyHead[a,b]

as


$\frac{a}{b}$


with



GridBox[{{"a"}, {"b"}}, GridBoxDividers -> {"Rows" -> {{False, True}}}]

If I enter


Notation[GridBox[{{ToString[x_]}, {ToString[y_]}}, 
GridBoxDividers -> {"Rows" -> {{False, True}}}]
\[DoubleLongLeftRightArrow]
MyHead[x_, y_]]

I get an error




Notation::noexbtag: The external representation GridBox[{{x_},{y_}},GridBoxDividers->{Rows->{{False,True}}}] does not have an embedded TemplateBox with tag NotationTemplateTag. The Notation statement Notation[GridBox[{{x_},{y_}},GridBoxDividers->{Rows->{{<<2>>}}}][DoubleLongLeftRightArrow]MyHead[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. >>





Comments