This question already has an answer here:
I'd like to have a conditional macro that emboldens symbols, using different commands depending on whether the argument is a math symbol or text. Specifically, I'd like to use \bm for math symbols and \mathbf for alphanumeric characters. Thus it would look something like
Problem is I don't know of a test such as \ismathsymbol. Obviously, it would be just fine if there were a test for alphanumeric characters.
Thanks for any advice!