Title: A variational calculus for Riemann surfaces