  In a famous paper of $1914$ Ramanujan gave a list of $17$ extraordinary
formulas for the number $\pi$. In this paper we explain a general method to
prove them, based on an original idea of James Wan and in some own ideas.
