First time here? Check out the FAQ!
answered 13 years ago
You can use
Latex().eval(my_string, globals=globals)
as explained in this answer to a similar question.