Re: Sending again: Symbolizing subscripts

*To*: mathgroup at smc.vnet.net*Subject*: [mg62788] Re: Sending again: Symbolizing subscripts*From*: dh <dh at metrohm.ch>*Date*: Mon, 5 Dec 2005 13:40:52 -0500 (EST)*References*: <dn0uda$8ak$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Hi Andrew, if you do not mind if your output looks a bit funny, you may replace any subscripted variable by a symbol whose name is constructed by the original name and the index. E.g. Unprotect[Subscript]; Subscript[x1_,x2_]:=Symbol[ToString[x1]<>"sub"<>ToString[x2]] This will change any subcsripted variable into a symbol with name ...sub... Daniel Andrew Moylan wrote: > Sorry if I am sending this twice, but the first one doesn't seem to have > worked: > > > It looks like there aren't any ideas for solving my original problem > (included below), so I'll widen my search a bit. > > I want any expression of the form Subscript[a, b] to be interpreted as a > symbol. I can achieve this easily using the Notation package, by the > following: > Utilities`Notation`Symbolize[NotationBoxTag[SubscriptBox["_", "_"]]] > > I also want to run my code in batch mode (without a front end). However, > [it appears that] the Notation package cannot be used in batch mode. > Given that I can't easily make the Notation package work in batch mode, > I now ask: does anyone know another way (not using the Notation package) > to make all subscripts behave as symbols? > > Thanks again for any ideas. > -Andrew > > Andrew Moylan wrote: > > I have some code that includes (and relies upon) a call to > > Utilities`Notation`Symbolize[...]. I would like to run the code in batch > > mode (without a front end), but the Notation package generates many error > > messages when being loaded without a front end, and subsequent calls to > > Symbolize[...] result in the Mathematica kernel hanging. > > > > Does anyone know of any way to use the notation package in batch mode, or > > does anyone have any ideas for other ways to run my code automatically from > > the (linux) shell? > > > > Thanks for any help. > > -Andrew > > > > > > > > >