Re: Usage Messages in Mathematica

*To*: mathgroup at smc.vnet.net*Subject*: [mg129275] Re: Usage Messages in Mathematica*From*: Murray Eisenberg <murray at math.umass.edu>*Date*: Fri, 28 Dec 2012 05:36:23 -0500 (EST)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*Delivered-to*: l-mathgroup@wolfram.com*Delivered-to*: mathgroup-newout@smc.vnet.net*Delivered-to*: mathgroup-newsend@smc.vnet.net*References*: <20121227100447.E595B6866@smc.vnet.net>

And yet usage messages for built-in objects seem to handle in-line expressions and subscripts with aplomb. See, for example: Subscript::usage On Dec 27, 2012, at 5:04 AM, djmpark <djmpark at comcast.net> wrote: > An extremely weak features of Mathematica is the design of Usage messages, > which seems to be stuck at Version 1, although the technology has moved far > beyond that. > > The present design is not up to the task and full of gotchas. For example, > how does one include a box structure, for example a subscripted symbol, > within a usage message? If one just enters a subscript then the first time > the message is displayed there are quotes around it and the second time the > quotes go away. If one starts an InlineCell within the string and enters the > expression then that problem goes away. If one then moves the usage > definition to a package and Runs the package it works OK. But if one saves > and closes the package, quits the kernel and then reinitializes, loading the > package, the usage message is defective giving the InputForm of the box > expression. Mathematica parses and changes the usage messages when the file > is read. > > The String form is just not adequate for usage messages. Nor is it adequate > to contain information on overloading functions. Usage definitions should be > expressions. Something like the following: > > Usage[FunctionName] = {{template, usageExpression}..} > > (The usageExpression might be a Row containing Strings and mathematical > expressions.)... --- Murray Eisenberg murray at math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2838 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305

**References**:**Usage Messages in Mathematica***From:*"djmpark" <djmpark@comcast.net>