Latex on python: \alpha and \beta don't work?
The issue is that \a
and \b
have special meaning inside a Python string literal.
I recommend that you use raw strings whenever there is a backslash embedded inside a string:
r'$ \alpha $'
In addition to using raw strings (as mentioned in the post above) you can also escape the backslash. So typing \\alpha
and \\beta
will also work.