Patterns in Notation.m
- To: mathgroup at smc.vnet.net
- Subject: [mg8009] Patterns in Notation.m
- From: Magnus Larsson <magnusl at isy.liu.se>
- Date: Wed, 30 Jul 1997 23:58:06 -0400
- Organization: Linköping University, Sweden
- Sender: owner-wri-mathgroup at wolfram.com
Hello all I am having problems with getting patterns to work with Notation.m. The final error message I can't get rid of when (hopefully) all TagBoxes are in place is Notation::"externalPatternTooComplex": Pattern "a_?StringMyHeadQ" appearing in the external representation "..." cannot be used since its head is not Optional, Pattern, PatternTest, or Condition. for the (test) notation \!\(\* RowBox[{"Notation", "[", RowBox[{ TagBox[ SubscriptBox[ RowBox[{"(", TagBox[ StyleBox[\(a_?StringMyHeadQ\), Background->RGBColor[0.999969, 0.913054, 0.988663]], NotationPatternTag, Editable->True], ")"}], "M"], NotationBoxTag], "\[DoubleLongLeftRightArrow]", TagBox[\(Magnus[a_?MyHeadQ]\), NotationBoxTag]}], "]"}]\) A copy/paste on the crucial pattern gives: In[]:=a_?StringMyHeadQ //FullForm Out[]//FullForm= NotationPatternTag[PatternTest[Pattern[a,Blank[]],StringMyHeadQ]] so everything seems to be right. Does anyone now what is wrong? The similar example in NotationDocumentation.nb gives the same error message. I use MMa 3.0 on a Sun workstation and the 26 March release of Notation. Grateful for help regards, Magnus