Controlling evaluation in Symbolize
- To: mathgroup at smc.vnet.net
- Subject: [mg30352] Controlling evaluation in Symbolize
- From: Richard Gass <gass at physics.uc.edu>
- Date: Sat, 11 Aug 2001 03:40:17 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I need to create a number of symbols (things like SubscriptBox["B", "r"]). I want this to behave as a single object so I need to Symbolize it. My symbols will all be subscripts but my question is more general. Here is a simple example: First I load some packages and set the coordinate system << Calculus`VectorAnalysis` << Utilities`Notation` SetCoordinates[Spherical[r, \[Theta], \[Phi]]] (* now from the palette I Symbolize B sub anything *) \!\(\* RowBox[{"Symbolize", "[", TagBox[\(B\_x_\), NotationBoxTag, TagStyle->"NotationTemplateStyle"], "]"}]\) (* Next I want to generate the needed symbols. *) In[9]:= \!\(Table[B\_\(\(Coordinates[]\)[\([i]\)]\), {i, 1, 3}]\) Out[9]= \!\({B\_\(\(Coordinates[]\)[\([\)\(i\)\(]\)]\), B\_\(\(Coordinates[]\)[\([\)\(i\)\(]\)]\), B\_\(\(Coordinates[]\)[\([\)\(i\)\(]\)]\)}\) (* But Symbolize freezes the evaluation so that Coordinate[][[i]] does not evaluate. What I want is In[4]:= \!\(Table[B\_\(\(Coordinates[]\)[\([i]\)]\), {i, 1, 3}]\) Out[4]= \!\({B\_r, B\_\[Theta], B\_\[Phi]}\) This code was of course, run before I symbolized B sub anything. What I want to do is to force the evaluation of Coordinates[][[i]] so that I generate B sub r, B sub theta and B sub phi as proper symbols. Since I do not know in advance what coordinate system will be used, just typing them in is not an option *) Any ideas? -- Richard Gass Department of Physics University of Cincinnati Cincinnati, OH 45221 phone- 513-556-0519 E-Mail gass at physics.uc.edu