I need to define a macro, lets call it DifferentFontMacro, that takes a single string x as input. This string x is of the form {string1}^{string2}\_{string3}
.
Now, I want the output of this macro to be {string1}^{\mathsf{string2}}_{\mathsc{string3}}
. One approach that I could find is using the xstring package to extract string1
, string2
and string3
from x
, and then outputting the desired output. However, it seems cumbersome, and I don't know if there's a better solution.
Thanks.
\mathsc
(which is not defined by default)