I am trying to define several custom operators with custom precedence to implement geometric algebra. Loading the notation package

<< Notation`

I can define custom infix operators, e.g.


but they will inherit the precedence of [Wedge]. Next I tried to define

InfixNotation[ParsedBoxWrapper[TagBox["\[Wedge]",ext,SyntaxForm->"a\[Vee]b"]], exteriorProd]

which does the job for output, but I can not find a way whatsoever to enter this operator by keyboard (e.g. as an alias). When I try to convert the tag box to an expression it will just apply the tag to first argument... Is there any other box (besides InterpretationBox) that accepts the SyntaxForm option and does what I want?

By the way,

  1. SyntaxForm seems to depend very much on the argument that you write next to the "example operator", even when it looks like the operator is usually a binary/infix operator.
  2. The function Infix[] (not to be confused with InfixNotation[]) seems not to be able to deal correctly with the precedence option.
  3. (slightly out of context) it seems to me the function Symbolize[] shows a different behaviour than it is shown in the documentation.

is it correct to assume that the Notation package is not yet very mature?

Thanks a lot, Hendrik

Edit: Is it viable to use "non-infix" operators instead, then "parse" (convert) the input to an "infix" form like exteriorProd[a,b,c,d] and deal with displaying it in an infix way in a separate effort?

  • $\begingroup$ Please see the answer in the linked duplicate. Unfortunately, you cannot create your own compound operators with custom precedence. However, you can use one of the many built-in operators with no meanings and choose one that has the precedence you desire. $\endgroup$
    – rm -rf
    Commented Jan 30, 2014 at 17:23
  • $\begingroup$ Thanks for the quick answer! Does the SyntaxForm option work for Notation[]? Is there a way to use this instead on input if performance is not improtant? $\endgroup$
    – Hendrik
    Commented Jan 30, 2014 at 17:41


Browse other questions tagged or ask your own question.