A previous question inquires about animating some simple text, with an elegant solution that uses the animate package and the xstring package.
Is there a way to alter this code so that it works in math mode? For example, how can the following be animated to appear letter by letter?
Pythagorean theorem $a^2 + b^2 = c^2$
Also, is it possible to animate the following to appear character by character?
\begin{equation} \text{Quadratic formula } x = \frac{-b \pm \sqrt{b^2 - 4 a c } }{ 2 a} \end{equation}
Animating either of these statements would be quite helpful.
Late edit:
Bonus for doing multiple lines in a single animation,
Pythagorean theorem $a^2 + b^2 = c^2$\par
This means $c = \sqrt{a^2 + c^2}$
\[Cos \theta = \frac{c}{a}\]