I'm trying to programmatically generate a subscripted variable in a way that makes it appear "pretty". Here is a minimal working example that shows some strange behavior I'm trying to understand and correct for (picture of NB, code):
Image of Code
(*fullform syntax*) Subscript[s, 1] // FullForm (*symbolize*) << Notation` Symbolize[ ParsedBoxWrapper[ SubscriptBox["s", "_"]]] // Once (*recheck fullform syntax*) Subscript[s, 2] // FullForm (*syntax has changed*) s\[UnderBracket]Subscript\[UnderBracket]2 (*pretty output*) s\[UnderBracket]Subscript\[UnderBracket]3 (*not pretty output*)
So, why does a symbolized, subscripted variable have to be input using "ctrl-_" and manually evaluated in order to look "pretty?
In the end, I'm hoping to generate a list of "pretty" subscripted variables and use this list while I'm doing derivations in higher dimensions, but it will only display pretty subscripted variables if I've previously evaluated them. Example:
n = 3; (*# of subscripted variables to generate*) S = ToExpression[ ToString[s\[UnderBracket]Subscript\[UnderBracket]] <> ToString[#]] & /@ Range[n] (*vector of subscripted variables, s2 is the only pretty output*)
However, I really want to get this using the Symbolize functionality).
Any discussion/suggestions would be much appreciated. Thanks!