Re: Using subscripts in variable _names_!!!
- To: mathgroup at smc.vnet.net
- Subject: [mg6256] Re: [mg6104] Using subscripts in variable _names_!!!
- From: Jason Harris <jasonh>
- Date: Mon, 3 Mar 1997 01:29:11 -0500
- Sender: owner-wri-mathgroup at wolfram.com
Hi Guy, In article <5elugs$3g6 at smc.vnet.net>, delamart at bullwinkle.pas.rochester.edu (Guy Delamarter) wrote: > My department has finally purchased and installed Mathematica 3.0 and > I was looking forward to using variable names that LOOKED like the > variables I use in and read from technical documents. However, it > appears that Mathematica assumes that subscripts are array indicies. > I would gladly give up the ability to use subscripts as array > addressing and use square brackets instead, if I could then use > subscripts to denote unique names.For example, I would like it so R_{sub} >is a > totally independent variable from R_{x}. I wrote the Notation package that ships with Mathematica 3.0. It will allow you to easily do this. There is a demonstration of the package under the help browser Demos -> Notation Maker. You load the package with <<Utilities`Notation` Just see the documentation and you will see how to symbolize R\_x Then it is a simple matter to use this in a definition e.g. \!\(f[R\_x : _] := g[R\_x]\) You really need WYSIWYG email to read this :) but just paste it into Mathematica and it looks nice. There is an update to the Notation package which is about to be announced by me at http://wolfram.com/~jasonh/Notation.html (The code is complete but the documentation might change a little.) Cheers, Jason