I've gotten into the habit of using subscripted variables, invoking the Notation
package and Symbolize
. Now, I'd like to be able to write something like
In[1]:= Sum[a<sub>i<sub> ,{i,1,2}]
Out[1]:= a<sub>1<sub> + a<sub>2<sub>
but get
Out[1]:= 2 a<sub>i<sub>
I've tried RemoveSymbolize[myBoxes]
to get rid of definitions, but it has no effect. I know that
In[2]:= Sum[Subscript[a,i],{i,1,2}]
works as I'd like and may have to do, but I'm curious if the subscripted variables entered using Ctrl
+_
can be made to work.
Symbolize
the the complete variable plus subscript is treated as a single symbol -- which is the purpose of the function. To see this wrapHead
around your symbolized variable and then tryAtomQ
. Then try that again with a "normal" subscripted variable. So the "i" that is subscripted is not available for iterations when you useSymbolize
...by design. To remove symbols evaluateClearNotations
. $\endgroup$