Hi @zxdawn,
Right now LaTeX typesetting is preformed on the entire string, not on individual subsets so the \text
approach is the best way as far as I know.
For cases where you only need special characters and super/subscripts, you could also use HTML formatting. For example, the HTML code for the “plus minus” symbol is ±
(See https://www.toptal.com/designers/htmlarrows/math/plus-or-minus-sign/). So you could specify these strings as
name='± ' + a
Hope that helps!
-Jon