Re: Plus Behavior Inside a Notation Box?
- To: mathgroup at smc.vnet.net
- Subject: [mg64910] Re: Plus Behavior Inside a Notation Box?
- From: Peter Pein <petsie at dordos.net>
- Date: Tue, 7 Mar 2006 06:12:10 -0500 (EST)
- References: <email@example.com>
- Sender: owner-wri-mathgroup at wolfram.com
Josh schrieb: > I was trying to set up some aliases using the Notation package and > noticed some odd behavior when Plus is included in the right hand > side. I distilled it down to the following, and I'm hoping someone can > shed some light on this. The command I set up is: > > Notation[a <=> Plus[b,c] ] > > With the following behavior: > > In:= b + c > Out= a > > In:= b + c + 1 > Out= 1+b+c > > In:= b + c + 0 > Out= a > > Case 1 and 3 work as expected, but case 2 is not. Any ideas? The goal > is to set up aliases for Bessel and Hankel functions in some EM work, > and it was working very nicely until I hit this 'minor' roadblock. > > Thanks, > > Josh > The Notation Package seems strange to me. After calling In:= <<Utilities`Notation` the cursor jumps between the first an second "<" in the input line. If I try In:= Notation[a \[DoubleLongLeftRightArrow] (b + c)] I get From In:= Notation::noexbtag:The external representation a does not have an embedded \ NotationBoxTag TagBox. The Notation statement Notation[a\ \[DoubleLongLeftRightArrow](b+c)] may not have been entered using the \ palette, or the embedded TagBox may have been deleted. The embedded TagBox \ ensures correct parsing and retention of proper styling and grouping \ information. Out= $Failed This package & me, we can't coexist in the same universe...:-\ I prefer the simple: In:= b + c + 1 /. b -> a - c Out= 1 + a