MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: packages/notation/errors

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74289] Re: [mg74202] packages/notation/errors
  • From: Christopher Arthur <caa0012 at unt.edu>
  • Date: Sat, 17 Mar 2007 02:05:01 -0500 (EST)
  • References: <200703140849.DAA24994@smc.vnet.net>

Try this as an experiment:

In one package define an infix notation on 
Subscript[\[SubsetEqual,"c"]] and give it any name you like, say, 
ClosedSubset.  In another package, put in one statement that actually 
uses the notation.  Be sure to put in the Needs as necessary.  I bet 
you'll find that Mathematica won't interpret the new operator unless 
you run the first package in another front-end window first; the 
Needs[] call is insufficent.

Chris Arthur

Quoting Chris Chiasson <chris at chiasson.name>:

> This probably has something to do with the contexts of the variables
> to which your notations are attached.
>
> It would be instructive for us to see the notations you have defined.
>
> On 3/14/07, Christopher Arthur <caa0012 at unt.edu> wrote:
>>
>> Mathematica's Package/Context hierarchy implication is impressive in
>> that it would seem to provide a way to stay organized with larger code
>> projects.  Unfortunately, getting it to work as expected is confusing,
>> especially when using the Utilities`Notation`.
>>
>> Suppose that you have two packages, called Math`Notation and
>> Math`Statements.  In the former you define your notation, and in the
>> latter you put it into use.  Now according to the documentation, all
>> you need to do to get this to work is put at statement like this at the
>> start of Math`Statements`
>>
>> BeginPackage["Math`Statements`",{"Math`Notation`"}]
>> ...
>>
>> But in fact this does not have the desireed effect.  Mathematica croaks
>> on all the non-standard notation that you defined.  The only way to
>> ensure that it won't croak is to load manually into the Kernel your
>> notation package.  Can someone work this out?
>>
>> Christopher Arthur
>> Student, Mathematics
>> University of North Texas
>>
>>
>
>
> -- 
> http://chris.chiasson.name/
>



Christopher Arthur
Student, Mathematics
University of North Texas


  • Prev by Date: Integrate
  • Next by Date: Re: Re: Picking Arguments
  • Previous by thread: Re: packages/notation/errors
  • Next by thread: Puzzle with Maximize