So, I have created a list of subscripted and overdotted variables that I would like to symbolize, so I run them through a for loop. Seems to me that this would work? Any help is appreciated.

enter image description here

vars = {Subscript[v, t], Subscript[a, n], Subscript[a, t], 
    \!\(\*OverscriptBox[\(v\), \(.\)]\), Subscript[v, x], Subscript[v, y], 
    Subscript[v, o]}
For[i = 0, i = Length[vars], i++, Symbolize[vars[[i]]]
  • 2
    $\begingroup$ Wellcome! Please also provide the copiable form of the code. Thanks! $\endgroup$ – Johu Aug 29 '18 at 14:55
  • $\begingroup$ Thanks, I edited the original post. $\endgroup$ – MGoforth Aug 29 '18 at 15:10

Thanks! Below is the end result. After running this code, I can now use this custom notation as variable in the Mathematica notebook. Also, just as a check, I used Head/@varlist to check that they are indeed recognized as symbols.

Image of the code

<< Notation`
Symbolize /@ {ParsedBoxWrapper[SubscriptBox["v", "t"]], ParsedBoxWrapper[SubscriptBox["a", "n"]], ParsedBoxWrapper[SubscriptBox["a", "t"]], ParsedBoxWrapper[OverscriptBox["v", "."]], ParsedBoxWrapper[SubscriptBox["v", "x"]], ParsedBoxWrapper[SubscriptBox["v","y"]], ParsedBoxWrapper[SubscriptBox["v","o"]]}; 
varlist = {Subscript[v, t], Subscript[a, n], Subscript[a, t],\!\(\*OverscriptBox[\(v\), \(.\)]\), Subscript[v, x], Subscript[v,  y], Subscript[v, o]}
Head /@ varlist
  • $\begingroup$ I think you should accept your answer as I realized mine not always works. $\endgroup$ – Kuba Sep 1 '18 at 12:04

@MGoforth, take a look at this presentation from the 2017 Wolfram Technology Conference. It covers advanced typesetting and the Notation package with lots of great examples.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.