Ernst Equation and Riemann Surfaces