| Author |
Comment/Response |
Paul Breen
|
12/15/02 8:08pm
I'm trying to create a package to display logic operators using a more traditional mathematical notation. When I placed the custom package in my autoload directory and type in And[a,b], Mathematica displays a&&b, which is not what I want. But if I evaluate Simplify[1] and then evaluate And[a,b], Mathematica displays a^b like I want it to. Below is a simplified version of my package, MyNotation.m:
Utilities`Notation`AutoLoadNotationPalette = False;
BeginPackage["MyNotation`Notation`", {"Utilities`Notation`"}];
InfixNotation[NotationBoxTag["\[And]"], And];
EndPackage[];
And here is my init.m file for the package:
BeginPackage["MyNotation`"]
EndPackage[]
DeclarePackage["MyNotation`Notation`", {"Not","And","Or","Implies"}]
Null
I experimented with changing the list in the DeclarePackage command of init.m. If I remove "Not" from the list, And[a,b] always evaluates to a&&b. Adding or removing other values to the list, including "And", has no observable effect.
One other thing--I noticed that if I evaluate
!a, a dos screen (cmd.exe) comes up telling me that 'a' is not a recognized command. I'm using Windows XP. Is there any way to prevent this?
URL: , |
|